Introduction: Bike Dashboard

Picture of Bike Dashboard

In this Instructable I'll show you how to make a electronic dashboard for a bicycle. We'll be using an Arduino and a few off-the-shelf parts to create a system with light control and an LED speedometer.

Step 1: Materials

Picture of Materials

Arduino Micro (RadioShack #: 276-258)

12V 10W halogen bulb (RadioShack #: 272-011)

(2x) 12V lamp (RadioShack #: 272-336)

(6x) LED holder (RadioShack #: 276-080)

(3x) green LED (RadioShack #: 55050659) web only

(2x) yellow LED (RadioShack #: 276-021)

red LED (RadioShack #: 55050657) web only

1 uF capactior (RadioShack #: 55047769) web only

(6x) 330 ohm resistor (RadioShack #: 271-1315)

(4x) 10K ohm resistor (RadioShack #: 271-1126)

(3x) N-channel MOSFET (RadioShack #: 276-2072)

74HC14 Schmitt Trigger (RadioShack #: 55050984) web only

reed switch (RadioShack #: 55050593) web only

on/off toggle switch (RadioShack #: 275-602)

(2x) SPST toggle switch (RadioShack #: 275-612)

(6x) terminal block (RadioShack #: 55055598) web only

(2x) 4 cell D battery holder (RadioShack #: 270-396)

(8x) D battery (RadioShack #: 23-2220)

(16x) 8-32 x 5/8" screw

(16x) 8-32 nut

(4x) 4-40 x 1/2" screw

(4x) 4-40 x 1.5" screw

(8x) 4-40 nut

~40" double sided Velcro

zip ties

.2 inch plywood

Bicycle

Step 2: Build the Circuit: Schematic

Picture of Build the Circuit: Schematic

The circuit is composed of five main parts:

Power: Eight 1.5V batteries in series will give us ~12V. This system is attached to a large SPST toggle switch for control.

Debouncer: The reed switch is connected across the capacitor of an RC circuit. The analog output is fed into a 74HC14 Hex Inverting Schmitt Trigger which converts it into a digital signal, which is then fed into Arduino Micro interrupt 1 (digital pin 2). This chip is powered by the 5V from the Arduino.

Speedometer: Six LEDs are attached via current limiting resistors directly to the digital output pins of the Arduino.

Lamp Control: Three lamps are connected to N-channel MOSFETs. Each MOSFET has a 10k pulldown resistor on its gate pin, which is control by a digital output pin.

Step 3: Build the Circuit: Assembly

Picture of Build the Circuit: Assembly

First we'll attach the wires for the taillights. Cut four 36 inch lengths of wire and solder them to the lamps. The lamps do have polarity, so keep note of which wire is your anode or cathode.

Solder a few inches of wire to a terminal block. This will be the attachment for the lamp.

Attach two lengths of wires to each of the toggle switches. A few inches should do.

Take the LEDs and slide them into the rubber stoppers. Solder a few inches of wire to each.

Place the Arduino Micro on the proto-board with the micro USB connector facing out.

Place three terminal blocks along the edge with one of the pins in the power rail and the other in the main rows.

Place two terminal blocks with both pins in the power rail near the Arduino.

Place the MOSFETS on the board with the drain (the middle pin) aligned with the terminal block.

Place the 74HC14 to the left of the Arduino with the divot facing left as well.

Place a 10K resistor across the 74HC14 from pin one to pin fourteen.

Place a 10K resistor from the gate (leftmost when facing) pin of the MOSFET to the source (rightmost when facing) pin.

Place the six 300 ohm resistors next to the 74HC14, bridging the gap in the middle of the board.

Place the 1uF capacitor in line with the first pin of the 74HC14, making sure the cathode is connected to the ground rail at the bottom.

Solder the remaining LEDs, switches, and jumper wires to the board. Refer to the schematic on the previous step for the connections.

Make sure every connection is properly powered and grounded. The 74HC14 is powered by the 5V out pin of the Arduino, but the Arduino is powered directly from the 12V line via its VIN pin.

Step 4: Software

Picture of Software

You'll need the Arduino IDE to download the code to the Micro. Any version 1.0 or beyond should work just fine. Be sure to select the the proper board and serial port in the tools menu. Download the attached .INO sketch. We'll need to modify the sketch for things to work properly.

Open the sketch in the IDE.

Change the variable value of "wheelDiameter" in the sketch to the diameter of your front bicycle wheel. You can find this variable at the top of the sketch.

The sketch is set up to display speed in kilometers per hour. There are ranges down near the bottom of the sketch that determine when the LEDs light up. Adjust these numbers to suit your needs.

Step 5: Dashboard and Battery Box

Picture of Dashboard and Battery Box

I designed the compartments for the dashboard and battery box in Adobe Illustrator and cut them out of .2" plywood on an Epilog laser cutter. The dashboard itself could be made of any flat material really. As is, the system is designed to be modular and without needing glue for major assembly. Attached you'll find the vectors for the parts to cut out.

Step 6: Build Battery Box

Picture of Build Battery Box

The battery box we'll be using holds 8 D batteries for about 12+ hours of continuous use. The case consists of a shell for enclosing the plastic D battery holders and a lid that allows for securing the batteries in place.

The box holds together with 8-32 screws and is attached to the frame with Velcro straps.

From the roll of Velcro, cut three 8 inch pieces and two 7 inch pieces. Weave the two short straps with the "hook" side inward and "loop" side outward from the slots in the top panel of the battery box.

Cut down, strip, and solder the two wires in between the holders.

Measure and cut two 36 inch lengths of wire. Solder one side of each to the wires extending from the battery box.

Place the combined holders over the solid back plate. Line up the holes in the battery holders with the plate.

Screw in the eight 3/8" screws through the holder to the plate. Tighten the nut on the back.

On one side of the plate with the large cutout, glue a 4-40 nut centered over the hole on the top.

Slide the back plate into the slots on the long base plate.

Thread the wires from the holders through one of the side plates. Slide the side plates into the slots on the base plate.

Slide the large cutout piece into the slots on the base plate. Make sure the nut is on the inside.

Place the top plate with the Velcro on to the tabs from the other plates.

Slide an 8-32 nut into each of the slots near the edge and fasten with the 8-32 screw.

Place the eight batteries into the holder. Fasten the last remaining plate over the cutout window with a 4-40 screw.

Solder the red wire extending from the box to the large power switch. Remember to put the heat shrink tube on first!

Solder another short length of wire from the power switch.

Step 7: Build the Dashboard

Picture of Build the Dashboard

Place the chrome LED mounts in the dashboard plate and tighten them.

Grab the main circuit and slide the LEDs and rubber stoppers into the mounts.

Slide the toggle switches into the holes near the emergency symbol and the "light" circle. Screw on their panel nuts.

Cut three 8 inch strips of Velcro and slide them through the slots of the rectangular baseplate with the "hook" side facing down.

Screw in the main circuit with the 4-40 x 1/2" screws

Slide the LEDs and rubber stops into the chrome holders. They're tightly packed, so keep track of the order.

Slide the toggle switches into their respective holes and fasten with their mounting nuts.

Take one of the small octagonal plates and place one of the long 4-40 screws into each of the four holes.

Place the halogen face down over the the hole in the plate.

Place the remaining octagonal plate over the back of the halogen.

Over two of the screws, place a couple of the tiny wooden spacers.

Slide the matching side plate over the headlamp assembly and fasten with the remaining nuts.

Place the completed headlight plate in between the top and bottom plates.

Screw in the lamp wires into the matching terminal block (the leftmost one in this case).

To complete the dash box, we'll need it mounted to the bike.

Step 8: Attaching the System

Picture of Attaching the System

Before we complete the dash box, we'll first attach the other electronics. Grab a few zip ties and fasten the taillights to your seat. Weave the wires together to keep them compact.

Strap the battery box to your top tube, running the power wires underneath it.

Strap the base of the dashboard box to the stem and handlebars of your bike.

Slide the power switch and wires through the hole in the back plate. Screw in the loose red wire into the 12V terminal block and the black wire in to the GND terminal block.

Slide the reed switch out the hole in the back plate, so that it will be free when the box is sealed.

Slide the taillight wires into the back plate and connect them to the two terminal blocks near the edge. The anode of each light should connect to the 12V rail, and the cathode should connect to the other terminal block socket, which is connected to the drain (middle) pin of the MOSFET.

Slide up the back panel and slot it into place.

Slot in the side planels.

Tighten the box with the 8-32 screws and nuts.

Place the sticky back of the reed switch on the fork of your bike and slide zip ties through the holes in its flange.

Trim the flange off the magnet piece and tape it to a spoke near your magnet. Test with the power on to see if it's close enough to the switch by spinning the wheel.

Step 9: Usage

Picture of Usage

Instructions: See how fast you can go! (Remember to wear a helmet)

The bicycle dashboard is a fairly simple system, so it's ripe for modification.

Possible upgrades:

Sound system (perhaps with a smartphone cozy holder)

Turn signals!

More LEDs (for a more accurate speedometer)

LCD odometer

Comments

smartmiltoys (author)2015-02-24

And what about recumbent exercise bike?

Fission Chips (author)2014-10-10

Very nice Instructable! Is there any advantage, besides the components being permanently mounted, of using a perforated board instead of a solderless breadboard?

It's More *Shall I Say* (Stable and durable)

wobbler (author)2014-09-18

A well done Instructable with clear information and a nicely drawn circuit diagram.

I'm not sure you actually need the debounce circuit on the reed switch which could save you the 74HC14. I'm not sure whether the Arduino S1 has a Schmitt input on it or not in which case you could use the capacitor, but you could implement a switch debouncer in software rather than hardware and also eliminate the capacitor. There's plenty of references on the t'internet to how to do it, but an example one is here:

http://arduino.cc/en/Tutorial/Debounce

thomasya (author)2014-07-31

Hello.

I got an suggestion, hope it helps you.

I think that using a Pb or Li rechargeable battery might be better. Just like the ones used on motorcycles. It's a little bigger, but it is good for our earth and cheaper for a long-time use.

jnewman11 (author)2014-07-27

The reed switch isn't on the parts list....

Aleator777 (author)jnewman112014-07-28

Nice catch! Added.

par64guy (author)2014-07-27

May I also suggest converting the headlamp to LED to save power and improve battery life. I would also suggest adding some sort of power generation scheme and replacing the D-cells with a rechargeable pack. Food for thought!

galen (author)2014-07-24

Nice idea. I would replace the halogen light (actually all the lights) with LED equivalents. This would lower your power requirements by quite a bit. You might not even need the MOSFETs then.

Consider replacing the batteries with lithium iron phosphate batteries. That will reduce weight and give you a big jump in capacity. 18650's would be a good choice.

Aleator777 (author)galen2014-07-25

Yes this would work much better!

LynxSys (author)2014-07-24

Combining all of these functions is a neat idea. I bet you could easily configure it to signal turns as well! I'd love to see a numerical speed readout on this system, either a digital one or - better yet - an analog speedometer with a needle (there are even analog cable speedometers for bikes out there, if you want to get old-school).

I do have a few suggestions about the lights. Using a 12V halogen is quite inefficient (and probably dim) compared to a lot of the insanely bright LEDs that you could choose from. You might also be better served (and more environmentally friendly) if you used a rechargeable lithium battery pack. For those considering this build, I would suggest higher-powered LEDs all around, although you might have to go farther than RadioShack to find the appropriate LED(s), drivers, batteries, and battery charger. Lastly, You might considering mounting the headlight outside of the control box, so that the angle and direction is more easily adjustable.

Aleator777 (author)LynxSys2014-07-25

All good ideas. I intentionally didn't want to include a digital readout for speed as it is detracting. I wanted to create an ambient display that you could easily gauge in your peripheral vision. I've sketched out a mini version with one LED per M or Kph.

rufus_doofus (author)2014-07-24

awesome! could you wack on some small solar panels and put rechargeable batteries in? My bike is always parked in the sun.

Aleator777 (author)rufus_doofus2014-07-24

Yeah, for sure! A nice pack of 10 NiMh batteries would be a good choice to get roughly the same voltage. It should last at least an hour with that kind of configuration.

Aleator777 (author)2014-07-24

The main electronics are ~$50 if you don't include the batteries. The case could be made out of anything (or without any case at all!), I just like laser cutting. If you just wanted to do the speedometer aspect you could easily make this for < $20 with a cheap arduino pro and a simple reed switch.

About This Instructable

55,190views

371favorites

License:

Bio: My name is DJ and I previously made electronic whatsits, 3D-printed thingamabobs, and laser-cut kajiggers for the Instructables Design Studio; now I build and repair ... More »
Add instructable to: