Arduino-powered bike computer

Okay, long story short: electronic-newbe programmer-guy is gonna build an Arduino-based bike computer.
I want to have at least speed, heart beat, cadance, GPS coordinates and time for outdoor rides, and RPM, cadance and heartbeat for indoor training on the Tacx, of course all nicely logged for further analysis.

So, my main problem is that I'm quite afraid of pushing the Arduino's (Uno R3, in my case) limits. I think I'll need at least a GPS-shield, a SD-card shield for the logging, two Hall Effect Sensors (wheel revolutions and cadance), a heart beat sensor and a LCD-display for the output (speed, heart beat etc).

The first problem I'll have to fix is getting to know if this is possible on one Arduino or not. Using two Arduino's is possible, but would complicate the things more then I like.

Can anyone here tell me how many shields and/or sensors an Arduino can handle, considering the fast-paced readings of the sensord on the wheel and cadance?

Totally possible on one Arduino, and if speed is a concern, just make sure all of your modules support I2c or SPI, and it will handle it.

You can use interrupts for the hall-effect sensors, so the Arduino doesn't have to keep checking the state, and it will handle it easily enough. You woul have install jets on your bike before worry about overrunning its capabilities.

The amount of sensors is limited by what type of sensor etc, so is kind of impossible to give you a max number, but it can handle multiple I2C devices, so you could run the GPS, SD card and LCD all off I2C.

Haha wow, good to hear.
I did a bit of research, and the internet is stuffed with half-finished projects like this. Got worried because it might be impossible to do on a Arduino, but lucky enough that's not the case.

Thanks!

So, an Arduino can handle a Hall Effect Sensor firing changes multiple times a second?

Yeah, it can handle counting many thousands of times per second, so handling inputs from sensors on a bike should be no problem, especially if you use interrupts, so it only does work when there is a change of state.

Hmm. Makes me think, if an Hall Sensor only has state HIGH when the wheel-magnet passes it, it will be HIGH for a freaking short time. It will pass about five times a second (rough calculations after four beers, haha), but only trigger a small portion of that time. Is that long enough to be catched every single time?

Damn, the list of questions for this projects is longer then I thought. Love it!

Uuuhhhhh ... Yup.

Thats why I suggest using an interrupt: http://arduino.cc/en/Reference/AttachInterrupt

The Arduino will be able to catch very short triggers, and interrupts are about the most reliable way of catching short signals or pulses. Instead of having to check constantly if a pin is HIGH/LOW, the Arduino continually monitors it for you, and interrupts the main loop when the state of the pin changes. This leaves the CPU free to do other things in between signals.

Arduino is a development board. You can program AVR chips to put in end-products.

For the money, a 1284 is one of the best AVR's, it's got lots of pins and loads of all 3 types of memory. If you really need a board, CrossRoads (a member at the forum here) sells one just for that chip. It can probably handle all you want and more.

BTW, how about an anemometer? Tell if you have head, tail or maybe side winds? I rode enough years to have wanted THAT. Oh heck, one of those would have been fun drafting trucks! Watch the headwind drop as you get behind the right brake light. :smiley:
But it's mostly good if you're keeping a speed log. And to go with that, how about a gyro and accelerometer? Then you're closer to full kit.


A bike speedometer that uses a Hall sensor and one magnet is going to be lame. Think how much you change speed in 7 feet.

Do your wheel hubs have a ring of holes? They used to. There's both field and optical methods to use those to better watch the wheel turn. Optical is cheaper and simpler but not dirt-proof.

I'm working on a bike computer to replace my really terrible Bell computer. I'm only doing simple speed, distance, Calorie stuff but I've managed to getting it running on a 3v coin battery and sleeping it at low enough power to not need to physically switch it off, the wheel rotating can wake it up. Unfortunately I finally wore out my graphic LCD running it at 5v during programming so now I'm waiting for replacement to finish this thing. As soon as I get it it'll be ready to go on an printed board and mounted to my bike, as wonky as it will look.

Running off a 3v coin battery probably wont work for you if need GPS. However if you could settle simply for distance then that would really simplify your project. REALLY simplify it. In fact I'd even suggest that you omit it at first simply until you have more of it worked out.

I'd also suggest using a reed switch instead of a hall effect sensor. That's what bike computers usually use. A hall effect sensor would be to tell you how far away the magnet is. But you only need to know when it is passing by. A reed switch will simply switch on as it passes by.

GoForSmoke:
A bike speedometer that uses a Hall sensor and one magnet is going to be lame. Think how much you change speed in 7 feet.

I disagree, at just 10mph that's two updates per second. You wouldn't want it updating any faster, you wouldn't be able to read it.

GoForSmoke:
Arduino is a development board. You can program AVR chips to put in end-products.

You mean, dus take the chip from the board qnd put it on some PCB? That's what I'm planning to do in the end, indeed.

The anemometer sounds fun! Would need some calculations to leave the bike speed out of the wind speed, but that must be not that big of a problem.

I agree with stoopkid on the magnet sensor. Two updates a second (well, more most of the time, since 10mph isn't that fast), is good for me. Maybe in the end I'll want to update it, but for now it's ok.

Stoopkid, I will start with the speed only, yes. I havbe a hometrainer which is great for testing indoor, so I can work out the speed, cadance and heart rate easily.

Good. For now I'll just order some reed sensors and give it a first go.
Thanks guys, I'll keep you updated!