(2) 2N3904 transistors (1) Red LED (1) Yellow LED
(2) 10 Q resistors
(2) 220 Q resistors
(3) 470 Q resistors (1) 1N4148 diode
(1) AAA Battery Holder (red wire is +, black wire is -)
(2) 1.2-volt AAA NiCad rechargeable batteries (included) (1) DC fan assembly (from the Solar Kit)
1 DC motor 1 stand base 1 stand post 1 stand loop 1 screw 1 hex nut
1 2-wire lead with connectors Electrical tape (not included)
V Assemble the DC fan motor, propeller, and stand, following the direction in the Solar Kit.
V Connect the wire leads to the back of the fan motor with the attached slotted clips.
V Bend one bare end of each jumper wire into a tight hook.
V Slip one hook through each eyelet on the other end of the fan motor leads.
V Pinch the hooks closed to make sure the bare metal of both parts stays in contact.
V Cover the hook and eye wire joint with a small fold of electrical tape.
V Build the circuit shown in the schematic (Figure 2-3) and wiring diagram (Figure 2-4) being very careful to place the parts in exactly the positions shown.
V Be sure that both transistors are positioned with their flat sides facing towards the edge of the board.
V Be careful that the leads of the LEDs do not touch each other, or the leads to the resistors. If, after you have programmed your battery charger, you see some strange LED blinking behavior that is not described in the text, check your LED leads to make sure they are not forming unwanted connections!
Vss Vss Vss
Figure 2-3: Programmable Battery Charger Schematic
NOTE: The ADC channels are not depicted in the same order in this schematic as they are in other schematics throughout the text. Remember that the schematic depicts only connections and not actual parts placement.
V Connect the DC fan motor to the battery charger circuit as shown in the schematic (Figure 2-3) and wiring diagram (Figure 2-4).
V If you are continuing on now, check your wiring carefully then reconnect power to your board.
WARNING: Do not leave your Programmable Battery Charger Unattended! Commercial programmable battery chargers have many built-in sensors and safety features that are beyond the scope of this text. Please follow a few precautionary guidelines:
DO double-check your wiring before programming your battery charger
DON'T leave your battery charger circuit unattended while the board's power supply or the batteries are connected.
DON'T leave your batteries in the battery holder if the holder is not connected to the breadboard. The unsecured leads could touch each other and cause a short circuit.
If your plot varies greatly from what is expected, disconnect your batteries and board power supply, and reexamine your circuit and code before proceeding.
If your batteries feel hot to the touch while charging, disconnect the power supply from your board. However, some slight warmth is normal.
The battery charging circuit consists of two 2N3904 NPN transistors, the NiCad rechargeable batteries themselves, the A/D converter, a small-signal diode and four resistors. In addition, three LED's are used as indicators, one for each program state: Charging (Green), Discharging (Red), and Replay of the charge cycle (Yellow).
Now take a closer look at the battery charger schematic in Figure 2-3.
Simply put, the Charge transistor on P15 is used to charge the batteries, and the Discharge transistor on P4 is used to discharge them. For their individual circuits, both transistors use a 220Q resistor connected to the transistor's base and a 10 Q resistor connected to the collector. The other ends of the 220 Q resistors are connected to the Board of Education via two pins, P15 and P4, which control the charge and discharge cycles, respectively. The two 10 Q resistors act to limit the current for the battery charge and discharge cycles.
If you're not familiar with transistor operation, the following is a brief, but adequate, explanation for their use in the battery charger circuit.
Common transistors, like the 2N3904 used in this experiment, are designed to amplify a small input signal (on the base) to a correspondingly larger output signal (on the collector). For our purposes, however, we are using both transistors as low-current, solid-state switches and not as amplifiers.
With either P15 or P4 at a logic low voltage, at or near zero volts, the respective transistors are said to be in a "cutoff' state. That is, no current can flow from the collector to the emitter. Therefore, if we wish to disable either the charge or discharge features, we need only set P15 or P4 to a logic 0 with the LOW instruction. In effect, this turns our solid-state transistor switch OFF.
However, in order to enable the charge or discharge functions, P15 or P4 needs to be at a logic 1 state, or around 3.5 volts. Programming either pin with the high instruction does this. When this happens the voltage at the base is high enough to put the transistor into a "saturation" state. With the transistor in saturation, the maximum amount of current can flow from the collector to the emitter, with the current limited only by the voltage drop across the 10 Q resistor plus the small internal resistance of the transistor itself. Putting the transistor into saturation turns our solid-state transistor switch ON.
Once again, the above should not be considered a rigorous explanation of transistor operation. It does, however, point out the manner in which the transistors are used in our battery charging circuit. Therefore, if you're so inclined, and we hope you are, please refer to the web for more material on transistor theory of operation. Transistors are fundamental to nearly all modern electronics, so learning more about them will be a rewarding investment of your time. Plus, you will be able to better understand how other circuits work, even those that use integrated circuits, which are all built around transistors.
The battery charger program code makes sure that only one of the two transistors is ON at any given time. What this means is that the batteries are either being charged or discharged, but never at the same time.
During the charge cycle, the Charge transistor is turned ON and the Discharge transistor is turned OFF. Current is allowed to flow into the batteries from Vdd, the +5 volt regulated supply, through the 10 Q resistor, and the small internal resistance of transistor itself, thus limiting the amount of current flow to the sum of these two resistances.
During the discharge cycle, the Charge transistor is turned OFF and the Discharge transistor is turned ON. Now current is allowed to flow into the load, the motor-fan, which is again limited by a second 10 Q resistor and the small internal resistance of the transistor.
That takes care of the actual charging and discharging functions. Now to the rest of the circuit.
The three LEDs show which state the battery charger circuit is in at the time:
• Flashing green for the charging state
• Steady green when batteries have finished charging
• Flashing red for the discharge state
• Steady red when batteries have finished discharging
• Flashing yellow for the replay state where the charge cycle's voltage and current are displayed in a fast-forward manner
The diode in this circuit is functioning as a "flyback diode", and its purpose is to protect the transistor from a wash of back-EMF when the fan motor stops or reverses direction during our discharge cycle.
Finally, the A/D converter is used to measure four important parameters in the charge and discharge cycles:
The A/D converter constantly monitors these parameters and provides feedback to the BASIC Stamp module about the charge and discharge cycles. We will be using StampPlot Pro to view plotting examples of the charge-discharge cycles after you program this experiment, next.
Was this article helpful?
You can now recondition your old batteries at home and bring them back to 100 percent of their working condition. This guide will enable you to revive All NiCd batteries regardless of brand and battery volt. It will give you the required information on how to re-energize and revive your NiCd batteries through the RVD process, charging method and charging guidelines.