Introduction: The Super Capacitor Flashlight With Custom Charger and Voltage Booster
CHECK OUT OUR SUPER CAPACITOR FLASHLIGHT KICKSTARTER CAMPAIGN:
I'm a bit of a super capacitor fanatic, and I've made dozens of circuits that employ them. This circuit is a prototype that I'm turning into a DIY kit. Itis relatively simple, and is pretty darn efficient. There is also a lot of room for customization! When I get my custom PCBs made, I'll be throwing this device into an old flash light housing. For the time being, I'll be talking about the circuit as it is.
This is my entry for the MAD SCIENCE FAIR contest, as well as the MAKE IT GLOW contest, so if you liked this instructable, I'd sincerely appreciate your vote or a rating =) I've done my best to be AS THOROUGH AS POSSIBLE!
HERE IS THE FINAL PRODUCT:
What The Circuit Does:
Unfortunately, super capacitors can only be charged to lower voltages; typically around 2.5v or 2.7v as a standard. If you place some super capacitors in series, you can charge to higher voltages, but you lose a tremendous amount of capacitance. When you plug this device into a wall transformer ((I designed this device around a 9v@1A transformer), the on-board microprocessor turns on a relay that connects power to the capacitor bank. The series super capacitors then charge to 5.2v through the relay contacts. The capacitors an be interchanged to use higher or lower values, depending on how much you want to spend. The voltage on the capacitor bank is constantly being sampled by an ADC (Analog to Digital Converter) that is embedded in the microprocessor. When the voltage exceeds a value of roughly 5.2v, a flag trips in software, and the MCU turns off the charging relay, at which point the green LED indicator will start and continue to blink as an indicator to show the user that the caps are charged. You can leave this device plugged in for as long as you want, and the caps will be very much safe and sound.
When the caps are charged, the user can flip a switch that connects power from the capacitors into a DC-DC voltage booster. The voltage booster takes the 5.2v from the capacitor bank and boosts it to a calibrated 8v. The output voltage from the booster can be boosted anywhere from 3.4v to 34v, and is easily calibrated by an on-board 10-turn variable resistor.
Since I've calibrated the booster to output 8v, as soon as you flip the switch, the output of the booster will provide a constant 8v to the LED bank that acts to emit light. The LED bank is meant for 12v, but works great at 8v, and consumes MUCH less current. However, the LED bank is much brighter at 12v. The booster will continue to source power to the LED bank until the capacitors drain down to 3.4v, at which point the circuit shuts down. At this point, if you can plug it in again, to charge back up to 5.2v.
When the booster is tuned to output 12v, the circuit consumes quite a bit more current, but the light output is much greater. If you're going to consider maximum brightness, you're going to want to use 2x 400f 2.7v caps in parallel with one another. I also took the liberty of hooking up a $1 LED flash light head that I purchased from the dollar store directly to the capacitors as opposed to the booster, and it lasts MUCH longer. See the video.
THE WALL TRANSFORMER CAN BE SUBSTITUTED WITH A SOLAR PANEL! SEE NEXT STEP!
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Circuit Background
HOW LONG WILL IT LAST?
That is a trick question =) In regards to how long the caps can last, or how many times they can be charged..... In all likelihood, they're going to outlive you . Super capacitors, if treated properly, can be charged 100,000s of times. Batteries can not, which makes this such an interesting project. How long will the light stay on after charging the cap bank to 5.2v? That depends on three things:
1) What value of capacitors are you using? If you're using two 400f 2.7v caps in series (200f 5.4v), then your flash light will last well over an hour in the current configuration. If you use 2x 50f 2.7v caps (25f 5.4v), then the flash light will last for about 15 minutes. Keep in mind that since the booster can only operated with 3.4v at the input, you only have about 1.8v of dissipation from the 5.2v on the capacitor bank. Charging back up to 5.2v from 3.4v will only take a short time. This project can easily be modified to work with more than 2x series capacitors, but this is merely a prototype!
2) What kind of light are you using? In my current configuration, the booster is actually consuming more current than the LED bank. If you choose to use a single high bright LED with no booster, and you use the proper current limiting resistor, you can really make this circuit last. I've offered an example of this in the video. You can customize this circuit so that it requires extremely little power, which will make your flash light work for hours on end.
3) If you are using the booster, the power consumption will vary depending on how much voltage you're applying to your bank. Keep in mind that you don't need to use a bank like mine. My bank is very bright, but it also requires more current. DO NOT use normal flash light bulbs. They require a bunch of current, and they're no good for this application. USE HIGH BRIGHT LEDs!
You can also connect some parallel LEDs and a current limiting resistor directly to the capacitors when charged (AS SEEN IN THE VIDEO). This won't give you as much of an opportunity to customize your circuit, but it certainly is cheaper, and it will consume less current, and also last much longer!
HOW LONG WILL IT TAKE TO CHARGE?
Another interesting question. It depends on three things as well:
1) What is your bank size? If you're using two 50f 2.7v caps in series, it will take about 5 minutes in the current configuration. If you're using two 400f 2.7v caps in series, it will take about an hour to charge, but it will last much longer than an hour when emitting constant light.
2) I designed this prototype around a 9v 1A transformer. Since I need to save some power for the digital circuitry, I am only supplying around 500mA to the capacitor bank, which is not a lot. If you have a bigger wall transformer that can output 9v or higher, and can support more than 1A of current, then you can change the current limiting resistor bank so that is allows for more current to charge the capacitor bank, and therefore will charge it faster.
3) The current limiting resistor has a HUGE impact. I only had a bunch of 1.8 ohm power resistors in house, but what I needed was an 18 ohm 5 watt resistor. I worked with what I had. With an 18 ohm 5 watt resistor, I would be charging the bank to 500mA. Here is the logic and the calculation:
The power supply is 9v
The transformer can support 1A of current.
I want to save a few hundred mA for the digital circuitry and the relay (Even through it requires less than 100mA)
To determine which resistor to use, I need to know what current I want to charge the caps at. I chose 500mA (0.5A).
Resistance = Voltage / Current
R = 9v / 0.5A
R = 18 Ohms
Now, we need to determine the power requirement for the resistor.
Power = Voltage x Current
P = 9v x 0.5A
P = 4.5W (So I'll use an 18R 5W resistor)
DO YOU WANT TO CHANGE YOUR RESISTOR VALUES AND INPUT VOLTAGE SOURCE TO CHARGE FASTER?
Here is another example that you can follow if you want to change how fast your bank charges.
Power supply = 12v @ 3A
I need to save 500mA for my digital circuitry and my relay, so I can charge my caps at 2.5A.
R = 12v / 2.5A
R = 4.8 Ohms
P = 12v x 2.5A
P = 57.6 Watts
So I need a 4.8 Ohm resistor rated for 57.6 Watts. (A more likely value would be 5 Ohm 60W resistor).
THINGS TO REMEMBER:
Since there is a resistor bank limiting current to the capacitor bank, you don't need to worry about the cap bank being charged at a higher voltage, because as the caps charge, there will be a bunch of voltage along the resistor bank. If you place a multimeter on the cap bank, you will see the voltage slowly charge up from 0v. Make sure to place your resistors at least 0.5cm above the board, as they will get HOT. You don't want to damage your board! Since this circuit employs a 5v regulator for the microprocessor and the 5v relay, you don't need to worry about your input voltage source. It must be more than 7v, and lower than 28v.
CAN I USE SOLAR PANELS TO POWER THIS?
YES! If you have a solar panel, or a series/parallel bank of solar cells as a power supply, as long as you consider the calculations above, you can use them to charge this circuit as opposed to a wall transformer!
Step 2: Parts List
In order to replicate this circuit AS IS, you'll need the following:
1x 7cm x 9cm prototyping solder board
1x LED bank
1x 3.4 to 34v voltage booster board
1x 10 Ohm 5W resistor
2x 1N4001 Diodes
1x 5v relay
1x 7805 5v regulator IC
1x PIC10F222 Micro controller (Programmed)
1x NPN 2N2222 transistor
3x 10k resistors (Preferably 10% tolerance, but 5% will do).
1x 9v 1A wall transformer
2x Super capacitors (50v 2.7v)
1x 3-pin terminal block
2x 2-pin terminal blocks
1x Green LED
1x 470R resistor
2x 10uF capacitors
1x 0.1uF capacitor
1x 5mm female DC jack
1x 5mm male DC jack
Soldering Iron / Solder / Wire
Step 3: Schematic Diagram and Explanation
Before I begin talking about the schematic, let it be known that there are four hardware blocks to this circuit:
1) The wall transformer
2) The charger board (Connected to the capacitors)
3) The voltage booster board
4) The LED bank
You can follow along with the picture, as I will be EXTREMELY THOROUGH with my hardware Explanation. The wall transformer, booster, and LED bank are all stand-alone products. The charger board is the circuit that has to be created in order to get everything up and running, so let's talk in detail about the charger circuit.
THE POWER SUPPLY:
As you can see, the power supply circuit is relatively simple. We have our DC power jack that connects to the wall transformer. This voltage source provides power to the capacitor bank through a current limiting resistor bank and a diode. As well, this 9v source is connected to a 7805 5v regulator. The output of this regulator is a smooth 5v, which acts to power our micro controller (PIC10F222), as well as our 5v relay. This regulated 5v source is labelled VCC in the schematic. There is a 10uf capacitor on the input of the regulator, as well as on the output. These caps are just used to stabilize the output. There is also a 0.1uf capacitor on the output that is used as a decoupling capacitors. It acts to filter out any unwanted noise at the output; high frequency spikes, and what not.
THE CAPACITOR CHARGING RELAY AND DRIVER:
When power is applied, pin#4 of the PIC10F222 goes from 0v to 5v, which activates the relay through a simple driver circuit. I've used an NPN transistor (2N2222) and a 10k resistor. When 5v is applied to the base of the transistor through the 10k protective resistor, power from the collector sinks through to the emitter of the transistor, which is connected to ground. The collector is connected to the relay coil, and to the anode of a 1N4001 diode. I'll get to the diode in a second. The secondary end of the relay coil is connected to the regulated 5v supply (VCC). When the base of the transistor is activated, power sourced by our VCC line sinks through the coil and through the transistor to ground, and therefore completes the circuit. The coil is then magnetized, which acts to switch the common pin of the relay (CO) to the normally open pin of the relay (NO). When the microprocessor turns the relay off, the magnetic field along the relay collapses, and a large voltage spike occurs. The cathode (negative end) of the diode is connected also to our VCC 5v source. The diode acts to protect the circuit from this voltage spike. It is very necessary. Make sure that you don't place the diode in the wrong way, or else you're going to have a short circuit when the relay turns on, and that will reset your device.
The common pin of the relay is connected to the cathode (negative end) of the 1N4001 diode on the power line, just after the resistor bank. This diode is to ensure that there is no back powering from the capacitor bank. This diode will ensure that current will only flow into the capacitor bank from the power supply, and not backwards from the cap bank into the power supply or regulator. When the relay is activated, the common pin connects to the normally open pin (NO), which is connected to our capacitor bank, which enables the charging of the capacitors. When the relay turns off, the common pin is re-connected to the normally connected (NC) pin of the relay, which cuts off the charge to the caps.
THE MICRO-CONTROLLER AND THE ADC:
I've chosen the PIC10F222 for this project. This is a programmable microchip that I've programmed in my lab at home. It requires a regulated 5v (VCC) on pin#2, and our DC ground to pin#7. I employ only three of the four onboard I/O ports. The first is GPIO1, which is configured as an output (Pin#4). This acts to activate/deactivate our relay. The second I/O port is GPIO0, which is pin#5. This pin is configured as an input, and is programmed to work as an analog to digital converter (ADC). When the power turns on, the relay turns on and charging commences. From there, the ADC is constantly sampling the charge on the caps through a resistor divider network made up of 2x 10k resistors along the charge line after the diode. Why is this needed, you ask? Since we'll be requiring that the capacitor bank be charged to more than 5v, we need to divide the voltage value on the caps in half, as if you place a value higher than 5v on the ADC line, you're going to damage your chip. With the resistor divider in place, the ADC will see half of that voltage only. In programming, the ADC is looking for a voltage higher than 5.2v, so as soon as the voltage on the caps reaches 5.2v, there will be 2.6v on the ADC line. The second the charge on the caps reaches this charge level, the MCU instructs GPIO1 to go LOW, which turns the relay off and disables the charge to the super caps. Lastly, GPIO2, which is pin#3 acts as an output, which acts to flicker the green LED indicator on and off when charging is about to commence, and when charging has completed.
There has to be a good way of connecting our capacitors to the charger board, as well as our booster board and LED bank. There are two (2-pin) terminal blocks that can be used for the two capacitors, and a 3-pin terminal block for the LED bank and the booster. The 3-pin terminal block has two grounds, and a lead connected to the positive lead of the capacitor bank. The positive lead of the capacitor bank will be connected to the VIN (Voltage input) of the voltage booster. One of the ground pins can be connected to the GND (ground) pin of the booster board. The output pin of the voltage booster can be connected to the RED (Positive) wire of the LED bank, and the BLACK (negative) wire of the LED bank can be connected to the secondary ground pin of the 3-pin terminal block on the charge board. So now ALL ground are connected. This is very important. The power of the capacitor bank is connected to the input of the voltage booster, which we have calibrated to 8v. The output of the booster, which is boosted to 8v, is connected to the LED bank, which provides it power. The booster will keep boosting to 8v until the voltage on the capacitors runs below 3.4v.
Step 4: The Software
The software that can be programmed into the PIC can be found here:
However, I have the main source code commented below so that you can follow along with ease =) I used my trusty MPLAB ICD2 PIC programmer to program my PIC. You don't need this programmer specifically, but you will be requiring one of the 1000s of PIC programmers that are available out there. The PIC ICD2 can be purchased through http://www.microchip.com. You can also google MPLAB ICD2, and you'll likely be able to find some deals. It is very easy to use, and you can use any of my source codes by copying and pasting the templates that I provide in my instructables.
Here is the commented main source code:
MOVLW B'1001' ; GPIO0 = ADC Input / GPIO1 = Relay Activate Output / GPIO2 = LED Indicator Output
TRIS GPIO ; INITIALIZE
MOVLW B'01000000' ;Set-up analog i/p configuration
MOVWF ADCON0 ; INITIALIZE
CLRF GPIO ; Clear all outputs (Set to 0v)
MOVLW B'00001000' ; Enable GPIO2 as a digital I/O
OPTION ; INITIALIZE
CALL LOOP3 ; Call short delay
CALL FLICKER ; Blink green LED three times as an indicator
BSF GPIO,1 ; Turn relay on
CALL LOOP3 ; Set up six short delays before scanning (Less than 400 milliseconds)
MOVLW B'01000001' ; Set up ADC
MOVWF ADCON0 ; INITIALIZE
BSF ADCON0,GO ; Take an ADC reading
BTFSC ADCON0,GO ; Poll for reading to complete
GOTO WAITADC ; If not done, keep polling
MOVLW B'10000111' ; Place 87H in compare register (When ADC sample reaches this value, capacitor bank is charged)
SUBWF ADRES,C ; Compare instruction
BTFSC STATUS,C ; if ADC reading is more than 87H, charging has completed.
GOTO NEXT ; If charging has completed, go to NEXT routine.
GOTO SCAN ; If not, take another sample
CALL FLICKER ; Flicker LED three times
CALL LOOP3 ; Set up four short delays
GOTO NEXT ; Loop the NEXT INSTRUCTION until power is disconnected
; LOOP3/4 work together as a long delay routine
Step 5: Balancing Circuitry???
While my company sells balancing circuitry, balancing circuitry takes up a lot of room and is expensive. For normal capacitors, you can use resistors of a high resistance, but not for super caps. I talk about it in my "Practical guide to super capacitors" instructable. I counter the need for balancing circuitry by charging to only 5.2v as opposed to the full rated bank voltage of 5.4v (2x 2.7v capacitors in series). Because I have charge protection on the circuit, unless I have some really low-quality super caps, I'll never run into a problem.
Check out my PRACTICAL GUIDE TO SUPER CAPACITORS instructable. A link for this can be found later on in the instructable.
Step 6: Considerations:
Please keep in mind that this is a prototype. There are 100s of different ways of going about this. It is just my version, and there will be others =) I am in the midst of having a custom PCB created for distribution of kits, and this PCB will have a lot of capability for change.
if you are interested in learning about super capacitors, please check out my practical guide to super capacitors instructable that can be found here:
I have 15 or more videos on my super capacitor projects that can be found on my youtube channel here:
1) Treat your capacitors with love and respect, and they'll live longer than you will!
2) Always limit the charge to your super capacitors, so that you don't harm your power supply!
3) Super capacitor power may be the wave of the future! Always be thinking of new and special ways to implement them into your projects!
Step 7: Where to Buy Parts?
Super capacitors of all shapes and sizes can be found on all over ebay. So can power resistors, and PIC10F222 microcontrollers, and all of the passive components you need. I'll be making a kit that will be available in February 2012 with a custom PCB and all, so stay tuned =)
The kit will be available here
HOWEVER, I EMPLORE YOU TO TRY THIS AT HOME! LET'S STOP USING BATTERIES, AND KEEP OUR EARTH GREEN!
Thank you all for having a look at my instructable. I hope you have found it educational, and that it inspires you to start up your own super capacitor projects. They're wonderful little storage devices, and they are the wave of the future in my opinion.
Take care, and have a wonderful day!