Microcontrollers are very powerful tools for exploration into the electrical world. In this tutorial we will be using Arduino's Uno board, and we will show you how to program a number of basic functions into a breadboard bike light. To allow for switching between the various function of the bike light we will show you how to physically debounce a button and use an interrupt in Arduino code. Also we will show you how to set up a basic voltage divider to measure the value of a photoresistor, and how to power your Arduino externally so that it could be removed from your computer.

Step 1: The Materials

For this instructable you will require the following in addition to your arduino board:

1. A breadboard
2. 5 LEDs
3. A standard pushbutton
4. An inverting shmidt trigger
5. A 10 uF Capacitor
6. A 10k Ohm Resistor
7. A bunch of wires (not pictured)
8. Some kind of power supply from 5V-9V that doesn't need a whole lot of current. (optional)
<p>Very good article! </p><p>I have some questions: </p><p>1. Is it possible to feed the Arduino with power from a Lipo Rider? <br><a href="http://www.seeedstudio.com/depot/Lipo-Rider-p-710.html?cPath=1_75" rel="nofollow">http://www.seeedstudio.com/depot/Lipo-Rider-p-710....</a></p><p>Or an Energy Shield? <br><a href="http://www.seeedstudio.com/wiki/Energy_Shield#1._Charge_Examples" rel="nofollow">http://www.seeedstudio.com/wiki/Energy_Shield#1._C...</a></p><p>My plan is to use a no friction magnet dynamo to deliver the power and let the Lipo Rider take care of charging a Litium battery pack so that I can have a steady source for the LED's, USB (iPhone) and Arduino. </p><p>These circuits are made for solar input. Can I use them with no mods with a no friction magnet dynamo instead?</p><p>2. I plan to use the 5 LED's for the back light. For the headlamp I will use one power LED. How do I control this? With a separate output?<br></p>
<p>1. A basic friction magnet gives low power, especially then you want a front light. Use a rechargable battery in every case, charge it from anything you want (with an appropriate charge controller). And drive your electronics from stabilized voltage (with dc-dc boost to 5V converter).</p><p>2. The Arduino cannot give large current output needed for a front light, so you must separate it: use a transistor, or other appropriate part to drive the high current LED, and not forget about current limiting.</p>

About This Instructable




More by Slater-Victoroff:How to make a swarmbot How to make an Arduino-controlled bike-light 
Add instructable to: