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.