Recent Popular Posts

April 17, 2014

Children building a Speedometer/odometer

For Monday morning every week I have been working with few four kids from Deepanam on electronics and Arduino based projects. These kids were up for bicycling to the electronics lab in Udavi.

After tinkering around a few things we finally decided to build a speedometer for the cycles. One and a half hours a week was not getting us there and I let them access the lab for 1-1/2 hrs more as I merged the class with 6th grade electronics-mathematics classes in the lab.

For the speedometer the first work was on the LCD display. We first got a 16x2 that got burnt because the kids wired it one pin off and switched supply and ground. We then used a 16x1 which actually needs to be accessed as a 8x2 and eventually the next order of 16x2 came in. The lesson of the switched supply as well learnt as the displays have been hooked on and off tens of times without loosing another display.

We planned to measure the rotations of the cycle using a reed switch. (A reed switch has two metal wires placed in such a way that if a magnet gets close it would close the connections).
Unfortunately the experience with the reed switch was comic almost approaching tragic proportions. We only had a couple of appropriate reed switches. I had a couple from Bangalore, but once we got the first working (perhaps) it looked good enough to be stolen off the bike. The second was burned out when both ends of the reed switches were connected between power and ground. We soldered a couple of really delicate reed switches and put them in ball pen refill for protection. Two of those broke off because the magnet was too strong and the reed switch wire just kicked off its glass body to join the magnet. We finally seem to have one that has lasted a couple of weeks, but its still the weak link.

We calibrated the rotations by printing the frequency measured based off the switch with a multimeter measuring Hz. We also realized that using pin13 for reading was convenient as it showed when the switch got close to the magnet with the built in LED on the board.


For the software, a basic polling routine worked fine for reading the reed switch and we didn't encounter a limit of the speed of the routing even when we were spinning really fast (or tricking it with a jitter around where the magnet activates the reed switch). Using the radius of the cycle both the speed and the distance are reported. We made some optimizations to avoid rewriting the fixed letters.

No comments: