I’m making a bicycle speedometer for Pokitto. Currently it’s only counting pulses from a button. Next I need to get some wire and connectors and test it with a magnetic switch that I have from an old speedometer. Getting the speed bar move smoothly wasn’t quite as easy as I thought, but I’m happy with the way it works now.
That is fantastic!! Oh my gosh
A nice project! After you have finished the project, would you like to write a short (or longer) explanation to Pokitto Zine?
I can think about it. I like the idea, but writing isn’t something I enjoy doing.
That’s a really neat use for pokitto, and the sensor is super simple
This has now been tested under actual road conditions and it works great. The handlebar mount design still needs some thinking though. It is made from technic legos and an old bicycle light mount.
One of the 90 degree elbows failed when I drove over a gap in the asphalt at 30 km/h. Luckily nothing happened to Pokitto, as the other three elbows were still somewhat holding it in place and it also had a safety strap attached to the handlebar. Those elbows are made from two separate parts held together by a pin, so it’s no wonder they are the weakest point.
Really awesome. Might want to just glue the pieces together with contact glue. And spray paint the whole thing.
For precision do you have to input the wheel diameter and other info so that the distance traveled is correct?
I use wheel circumference because it’s easier to measure precisely than diameter and eliminates use of pi in calculations. It can be measured by pushing the bike for one full revolution and marking on the floor the two spots where the front wheel valve is closest to ground. Currently the value is hard coded, but now that the basics are working I can start adding more features, like wheel calibration.
That sounds like a great use of pokitto. Do you have it in daily use?
Yeah, it’s been working great. I don’t use it daily but I often use it for longer trips.
How has the lego been holding up? The only reason I haven’t tried this is I have no way to attach the Pokitto to my bike securely.
I’ve had no problems with it except the one time during the first test ride.
After that I replaced the elbows, that were made from two toggle joint parts (on left), with full length axle and a single toggle joint secured with a bush at the end of the axle (on right).
One thing I would like to improve is to make it easier to detach and attach Pokitto. Currently it’s a bit laborious because I need to be careful not to accidentally bend the lego parts too much.
I would think running some string or cord through the holes would be a viable option as long as you can do it in a way that keeps the Pokitto stable.
That is brilliant
Could you try a design where instead of the snap pegs to connect, use the bars and make them go through the pokitto connectors and pin them with the bush piece? That way you’d just be removing four pieces and sliding off pokitto. Instead of trying to snap pokitto from the 4 pieces.
That could work, but it seems the axle doesn’t fit into the elbow part as securely as a peg, so the design needs some more changes. I’ll see how it turns out.
This has become something I am ver interested in, do you have the code available for replication? I have a similar project I want to do and yours could be guidance for me.
I’ll clean up and publish the source code. Stay tuned.
It’s quite messy now because I was studying the internals of PokittoLib and doing various experiments at the same time.
You can now find the source code in GitHub:
Precompiled binary: Cyclometer.bin (66.5 KB)
The Reed switch is connected between pins 3V3 and Ext0. You can also use button B to test the program without reed switch. Every click of the button equals one revolution of the wheel.
Speed and distance are calculated based on wheel circumference, which is defined in Cyclometer.h.
Was this modified from my fixed point library by any chance?