Bike Blinker +Plus+ in the Garden
I hope you have had a chance to read the article in Nuts & Volts that describes how I made a bicycle helmet light that does double duty. Its most important task is to alert drivers to my presence on the road but it also flashes out the temperature so that I and those riding with me know why we feel so darn cold or warm, depending on the season!
After I completed the first few helmet blinkers friends asked if I could make them blinkers with some different characteristics & capabilities.
First I was asked to make a unit that could put into a garden so that a glance out of the window and a quick observation of the flashing LED would give an outside temperature reading. I thought it was a great idea but a number of questions came up including:
That got me to thinking and to setting a number of design objectives.
The second request was for a version of the Bike Blinker that would only give a temperature report only when its button was pressed. This was to be mounted on the handlebars of a bicycle so that a temperature report could be generated whenever it was safe to observe the blinking LED for a few seconds.
I decided to power this unit with a small 2032 watch battery as it would be drawing nearly no power when waiting for the button to be pressed. This would be accomplished by putting the microcontroller to "sleep" and using an interrupt, from the unit's button, to awaken it from its low power mode.
Garden Temperature Flasher
No hardware changes were needed to convert the helmet blinker to one that would reside in the garden. I simply connected the circuit to a pair of AA cells. Two fresh alkaline AA cells provide enough power (approximately 1000 ma / hour) to operate the blinker for more than a month. If a smaller unit is needed AAA cells can be used. Just remember to keep the voltage below 3.7 volts unless you install the optional current limiting resistors to protect the LEDs.
I also experimented with rechargeable batteries that were charged during the day with a solar panel. I found very small solar cells at Solarbotics.com that were rated for 6.7 volts at 31ma. I connected that solar cell to 3 AA NiCad cells and then to the flasher circuit. Even though the solar cell was extremely small, less than 1.5" square, it did a great job of keeping the unit alive.
In this photo the solar panel is on the right with a penny sitting on it. The LED is on the left. The piece of black tape behind the LED helps with viewing when the unit is in sunlight. The circuitry and 3 AA NiCad cells are in the small plastic box. If you look carefully you may be able to see that the LED's leads have begun to rust. That is the only sign of corrosion that I have noted to date.
The tests with solar charging were done in the summer and I suspected that a larger solar panel may be needed in the winter due to the shorter days and a dearth of sunlight.
I found a likely candidate for a larger solar panel from BG Micro. They sell a solar unit that is a larger (2 3/8" square) and delivers 4.5 volts at 90 ma. It, too, worked well in the summer and I expect it will keep the blinker working through those long dark winter days!
The schematic is about as simple as it gets! The solar panel is to the left and the batteries are to the right. Diode, D1, keeps the batteries from discharging through the solar panel at night when the sun is down. Just make sure that you don't run the blinker without the batteries in the circuit. In direct sunlight many solar panels can put out sufficient voltage to destroy the microcontroller. The batteries in the circuit provide a load that helps to keep the voltage down. Even though the schematic shows 2.4 volts for the batteries (two rechargeable cells) it works equally with three or four cells. Just make sure that the output from the solar panels is a few volts above the voltage of the battery.
If you decide to use the solar powered option you can use either NiCad or NiMh rechargeable cells. NiCads give more charge / discharge cycles while NiMh typically have a higher mAh rating. I decided to use some very small NiMh cells from Harbor Freight. Each cell is only about 1 cm in diameter and 1.5 cm high. You won't find these tiny cells in their catalog as they are hidden within their 9v rechargeable battery, shown here. Note that the 9 volt battery is marked 8.4 volts. Since one NiMh cell puts out 1.2 volts I reasoned that there should be 7 individual cells inside. Little did I know how nicely they would work out for this project.
To disassemble the battery remove the colored label material and pry off the top. You should then be able to slide the insides of the unit out of the case. As you can see there are seven individual cells wired in series.
I first experimented with using three of the cells (shown here) and encasing them in heat shrink tubing. It worked fairly well but I decided to use four cells to get a bit more brightness from the LEDs.
The solar panels from BG Micro ( http://www.bgmicro.com/pwr1241.aspx ) are shown here. Each panel puts out 4.5 volts in direct sunlight. That is a bit lean to recharge four cells so I opted to put two panels in series giving me an output of about 9 volts. This drops a bit due to the diode that is in series with them but is more than sufficient to charge four cells.
It is important to note that there is a black "-" sign that has been placed on the back of each panel indicating the negative lead. Here are the two panels ready to be wired in series.
When joined together at a slight angle as shown here the panels began to resemble butterfly wings so I glued the battery, encased in black heat shrink tubing. in the center to represent the insect's body.
The circuit board and two pieces of plastic tubing were added. The tubing holds the two LEDs that blink out the temperature and resemble a butterfly's antennae. The temperature sensor is in the center on a short wire extension. Note that in this photo I am using four cells wired in series.
The unit is nearly complete with its green LEDs lighting up brightly as they flash out the temperature.
A short stick attached to the bottom allows for easy placement in the garden.
The software modifications for the garden flasher are very minor. The processor is put to sleep for 7 seconds after each temperature report. The area of the program where changes were made are highlighted in RED in the listing below.
The mode selection routines are bypassed and the unit only works as a temperature reporter. The button has one purpose. You can hold it in on power-up to change the temperature from Fahrenheit to Celsius or visa versa.
On Demand Temperature Flasher
The unit that was to be mounted on the bicycle's handlebars was modified to sit on top of a battery holder for a 2032 lithium battery. Even though these cells are very small and can only deliver a small amount of power the fact that the processor is in an extremely low power mode when not flashing allows a single battery to last for months & months. A piece of Velcro was glued to the bottom of the unit to facilitate easy mounting on the bike.
The 2032 battery is housed in a small cell holder that will be glued to the bottom of the circuit board. The one shown here is similar to this unit from Digikey: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=1065K-ND and this one from batteryholders.com http://www.batteryholders.com/show-part.php?part=bk-5058 - There are a number of other 2032 holders that would work equally well.
Here the cell 2032 holder has been glued to the circuit board. The negative power lead is soldered to the negative contact that is used for ISCP and the positive lead is attached with a piece of red wire.
In this view you can see the positive connection (the red wire) and the negative connection by the "-" at top center.
To simplify mounting to the bike a section of Velcro has been glued to the unit. The glue connection was reinforced with thread.
Software changes are again minimal. The areas where the changes were made are highlighted in Red.
Some Thoughts on Water-Proofing
Both of these circuits are likely to experience rain and other insults from the environment. I have used the handlebar unit for well over a year and have not done anything to protect it from the elements. The battery and its contacts have needed periodic cleaning and the switch has malfunctioned when drenched but for the most part the board has survived admirably.
The garden blinker has also worked well in the rain but I am convinced that some of the components are sure to corrode and fail if I do nothing more. I may "pot" the whole thing in epoxy or put the electronics in a small plastic pill box and see how it holds up. Even then there are likely to be corrosion issues. If anyone has any suggestions for dealing with moisture please drop me a note (firstname.lastname@example.org)
I think that you will find that these two variations of the Bike Blinker +Plus+ make it an even more interesting and useful device. I encourage you to give it a try. Please let me know if I can help.
On Demand Blinker