Wireless Altoids Cycle Computer

 by Alexdlp
Featured
Front One.JPG
Front Two.JPG
FinalAppLogo.png
IMG_0381.JPG
IMG_0272.JPG
IMG_0383.JPG
IMG_0385.JPG
This instructable will show you the how to build your own remote cycle computer for your bike!
A word of warning though... this one's a monster!!

Background
So a few weeks ago, my usual speedometer for my bike gave up and eventually stopped working completely. I have had it for a good number of years now and it has served me well, but it was obviously time for a replacement. This got me thinking and inspired me to create this Arduino based project. A while ago, I published an instructable documenting how to build a 'Wireless Altoids Display'. It consisted of an 16x2 LCD controlled by an Arduino and a pair of maxsteam Xbee modules. Simple enough, ASCII text sent over serial from the computer would be displayed on the remote LCD. Through this project, I will hopefully be able to show you how you can integrate that setup in a useful application.

What does it do exactly?
The 16x2 display is mounted on the bike's handle bars and provides the user with feedback in terms of how fast they are currently traveling. There is also a nice little bar graph on the top row to provide a visual representation. As well as being able to view your speed in realtime on the bike, the data is also sent wirelessly 'back to base' where the results can be logged and visualised on an moving graph using 'Processing'. The arduino sends the current Speed, Average and Distance covered whilst riding.

Components & Configuration
>> On the bike: (Arduino + Magnetic Reed Switch + Xbee Pro Module + 16x2 LCD)
>> At home: (Xbee Pro Module + FTDI USB Cable)

Let's get to it!
 
Remove these adsRemove these ads by Signing Up

Step 1: Tools & Components

IMG_0241.JPG
Here's a list of what you're going to need for this project:

Components:
  • (2x) ALTOIDS Tins
  • Arduino ATMega 328
  • 16x2 LCD HD44780
  • A form of sheet insulation (Card / Foam etc.)
  • 5mm Clear PVC Tubing
  • (2x) Xbee Pro Modules (U.FL antenna connector)
  • (2x) U.FL to RP-SMA pigtails
  • (2x) Adafruit Industries Xbee Adapter Kit
  • (2x) RP-SMA 2.4Ghz Duck Antenna
  • USB type A to type B
  • USB to Serial FTDI
  • Cat5 Cable
  • 1k Resistor
Tools Needed:
  • Soldering Iron & Solder
  • Needle-nose Pliers
  • Scissors
  • Marker Pen
  • Wire Strippers
  • Fine Grade Sandpaper
  • Power Drill (5mm bit) / Bodkin Skewer
1-40 of 51Next »
nyo tom says: Jun 7, 2013. 1:41 PM
What type of magnet should I use? Should I use Neodymium?
fooons says: Nov 12, 2012. 11:58 AM
Hi Alexdlp,
First of all very good job. I want to use your magnific work on my bycicle, but at the moment links are not working and give me a 440 server error. I would like to test it and if I can do some mods for a bigger screen. Could you put links back please.
Thanks and best regards
Daniel Deacon says: Mar 21, 2012. 6:53 AM
you should add a simple project box like this

http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=310376577132#ht_1286wt_952

mark out the LCD then get a dremel and cut the box, it will look much better and would be less affected by water

epierce in reply to Daniel DeaconJul 16, 2012. 6:44 PM
What is the range of the xbee with and without the antenna?
haizul26 says: Jan 12, 2012. 8:59 AM
hello, is this the correct type (Arduino ATMega 328) ? :

http://www.sgbotic.com/index.php?dispatch=products.view&product_id=1080

one more thing,is it possible of i left out part where the antenna has to be installed?is it necessary to have antenna?

thank you. :)
Alexdlp (author) in reply to haizul26Jan 14, 2012. 7:06 AM
Yes, the Uno R3 is the latest equivalent board to the old Duemilanove. If you have Xbee's designed for use with an external antenna (for extended signal range), it is very important that you only power the modules with the antenna fitted. Otherwise you risk damaging the board. Hope this helps answer your question :)
tlynch1 says: Jan 8, 2012. 6:36 PM
This with another color display would be so awesome to work out for a motorcycle
yaly says: Dec 31, 2011. 3:28 PM
hi i need only to make the cycle computer without the wireless thingy can you upload a sketch for me with that please and if applicable the use of nokia 3310 lcd which is available to me at the moment instead of the 16x2 charecter lcd thank you
jrhinoferos says: Nov 27, 2011. 8:53 PM
hey!

Great job.

I can't seem to link to the sketch, I am trying a similar project and am a bit lost...

Thanks
Simpson21 says: Oct 7, 2011. 1:57 PM
Looks very well made. I would love to try this out but it looks as if your link to the arduino code has 404'd. Hope to see it back up soon.
Alexdlp (author) in reply to Simpson21Oct 7, 2011. 2:40 PM
Should be alright now hopefully, thanks for letting me know :)
francisroan says: Aug 7, 2011. 2:21 AM
can i use an ir led????with receiver as the reed switch????
Alexdlp (author) in reply to francisroanAug 7, 2011. 3:49 AM
Do you mean use an IR beam to trigger one cycle of the wheel instead of the magnetic reed switch? Yes, of course but you'll have to modify and tailor the code for your specific application and hardware. It might not be suitable to just plug your IR receiver output into the pins that we are for the reed switch in this project. Hope this helps :)
jimsims says: Jun 24, 2011. 2:00 AM
Alex, This is , a great project. I am modifying it to display speed, distance, and time ridden on the LCD without XBee. One question is: why use analog input to sense reed switch instead of a digital input? thanks
Alexdlp (author) in reply to jimsimsJun 24, 2011. 8:54 AM
Hey, pleased that you liked it! It would perhaps make more sense to use a digital input - it's just I had difficulty getting the pin to register a HIGH value for some reason. Although I couldn't actually get to see inside the sensor casing, i'm pretty sure it's just a reed switch so.. yeah try and use a digital input :)
jimsims in reply to AlexdlpJul 11, 2011. 11:12 AM
Alex and fjohn, I am using a burglar alarm type magnetic reed switch that is NO (normally open). FYI most burglar alarm switches are NC. I lashed it to the bike with "zip ties". Also, I am using arduino mini-pro so I can fit it all in the altoids tin. I am wired up with 5V to the switch, the mini pro has no 3V pin. I am guessing that there is a resistor in series inside of your reed switch. Can you measure and post the ohms value of your switch with magnet near and far away from switch? Since I am already hard wired with solder to the analog input I would like like to continue with the analog input by adding a resistor. I fried a mini pro with my switch hooked to 5V without a resistor. Thanks.
Alexdlp (author) in reply to jimsimsJul 14, 2011. 8:38 AM
I think a 10K ohm resistor to ground should protect your arduino sufficiently. (Pull down resistor configuration). Hope this works out okay.
francisroan says: Jun 26, 2011. 2:41 AM
hey can any other sensor be used instead of the reed switch??????
francisroan says: Jun 17, 2011. 4:14 AM
wen i compiled the stuff the ide showed a few errors like lcd bargraph lbg(&lcd......
Alexdlp (author) in reply to francisroanJun 17, 2011. 5:45 AM
Make sure you have all of the libraries installed - it's not enough just to run the code. The error that you have is likely to be because you don't have the lcd bar graph library installed correctly. Apologies in advance if this is not the case but I have checked the code and it runs fine every time for me. :)
francisroan says: Jun 17, 2011. 4:21 AM
could ya check the code again there are a lot of errors wen i compiled it!!!
francisroan says: Jun 11, 2011. 1:38 AM
could u give the full code????
Alexdlp (author) in reply to francisroanJun 11, 2011. 2:07 AM
The full code is already listed and can be downloaded from Step 13, the 'Resources' page :)
johnpoole says: May 30, 2011. 5:37 PM
clean build, great documentation.. another for the to do list for my wheel chair, because that's just how i roll..
Jedrokivich says: Apr 26, 2011. 8:45 AM
I think this is the nicest thing I could ever do for my Trek 820.
espdp2 in reply to JedrokivichMay 2, 2011. 1:28 PM
I'VE got the same bike. :)
TheRevJester says: Apr 30, 2011. 7:03 PM
I keep hoping someone will make an LED display bike light/turn signal/message board. Most of the time it'd function as a flashing light for visibility. Flip your front turn signals and it shows what direction you're turning. You could also have pre-programmed messages "Thanks!" "Slow down!" "Move over!" or such. Unfortunately I don't have the electronic knowledge to do so myself.
Nate Ocean says: Apr 28, 2011. 10:17 AM
Schematic diagram? Block diagram? Anything?
Alexdlp (author) in reply to Nate OceanApr 30, 2011. 4:55 AM
I've uploaded a wiring diagram to Step 13 Resources.
You can see the original, full size image here...

Hope this is okay? :)
drgonzoishere says: Apr 28, 2011. 11:06 AM
You ever take it off any sweet jumps?
crispernakisan in reply to drgonzoishereApr 29, 2011. 7:26 AM
... we both know I'm training to become a cage fighter.
bill2009 says: Apr 28, 2011. 6:36 PM
great instructions.

How does the unprotected display stand up to the elements?
Alexdlp (author) in reply to bill2009Apr 29, 2011. 4:36 AM
Thanks, well I've only used it in good weather as it's not waterproof yet. Perhaps that's an improvement to make in the future!
diskincluded says: Apr 28, 2011. 9:08 AM
Could this be altered to work with an exercise bike?
Alexdlp (author) in reply to diskincludedApr 28, 2011. 12:39 PM
Check out the original processing code on this website which has extra features specifically designed for use with a stationary exercise bike...

http://cadjunkie.com/1489/blog_simple-graphic-trainer/
diskincluded in reply to AlexdlpApr 28, 2011. 4:40 PM
Oh very nice, thankyou
uberwald says: Apr 28, 2011. 11:27 AM
Have you considered using an sd card to log the info instead of sending it over xigbee? I've been considering a similar project, but I'd rather not have to stay w/in range of a laptop to get the data... also eliminating xigbee would drop the cost a bit...
Alexdlp (author) in reply to uberwaldApr 28, 2011. 12:48 PM
Yeah, integrating an SD card will be my next challenge if I get around to it! As you say it makes far more practical sense and is likely to bring the cost down from trying to transmit over wireless. Thanks for the suggestion btw :)
jamwaffles says: Apr 28, 2011. 9:34 AM
This is a great instructable, as well as an awesome idea! At first I thought you were using WiFi (wut. 100m range?), but then I saw ZigBee. 1 mile from that little module is really good, but if you wanted to go a bit further (15 miles) and don't mind spending some extra cash, take a look here: http://www.sparkfun.com/products/9086. Could be a tad much for some readers though. Personally, I think it's borderline, but the 15 mile range makes it rather appealing. For two of them though... $132 (or whatever that is in quids for us Brits) is pretty darn expensive!
iamuke says: Apr 28, 2011. 6:44 AM
You can also put a block of wood behind the metal, inside the Altoids tin. That way you have a backing surface which keeps the metal from deforming and also helps make neat holes.
1-40 of 51Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!