A Charger Lightly – How to Make a Battery Charger Part 2

A Charger Lightly – How to Make a Battery Charger Part 2

By: Lasse Jaspersen

Once you’ve done the initial build setup from Part 1, now we can move on to completing the battery for the solar tracker here in Part 2.

How to Make a Battery Charger

How to Build a Battery Charger

Wiring for Perfboard and PTH-Soldering

How to Build a Battery ChargerPay attention to the schematics – the charger has been divided into several, for simplicity’s sake. When you wire onto perfboard that only has metal rings around each hole on ONE side, you must do your soldering on that side. Usually, that’s the bottom, and you pop your components in from the top, align them, space them right, and fix them in place before soldering by bending their legs/pins. Double-sided perfboard is more flexible, in that you can solder on either side, and you don’t need to run as many wires underneath the perfboard.

 

 

A simple example will do. If you have a resistor, bend its legs perpendicular to the resistor body, and pull it carefully onto the perfboard with a pair of pliers. Don’t use force. When it’s aligned correctly, bend the legs to whichever side is most convenient, and solder onto the spots where the legs came through from the top to the bottom. This is not a soldering tutorial, so it is sufficient to say that the 1-2-3 rule of thumb is perfectly fine here.

Place the tip of your iron on the point to be soldered for ~3 seconds, counting up to three, apply solder, count up to three again, and remove the iron. You should have a nice round-shaped solderjoint at the hole you soldered. If it’s jagged or uneven, it may come loose (cold-soldering), and you’ll have to fix it later. If it moves after it has come loose it may cause a short. By pre-heating the little ring around the hole in the perfboard (and by extension, the leg of the resistor), the solder flows freely into a half-drop shaped around the leg of the resistor.

Perfboard is usually made from glassfiber, and can tolerate high temperatures. I use two soldering irons (I’ve forgotten their watt value) interchangeably; one reaches 110 degrees celsius, and another reaches 200. I only use the 110 degrees iron when I solder something that can pop at higher temperatures, like transistors, LEDs or Arduinos. A lot of people will stress the importance of a variable temperature iron, like the HAKKA series, and while I don’t disagree, it’s not important for soldering to perfboard. Just be mindful that most active components will not benefit from being exposed to 200 degrees for more than a few seconds. You don’t absolutely need a high-end iron when you can get two cheap ones. I also have a Dremel Versatip gas iron, which does have sort-of-variable temperature, but I use that mostly for shrinking heatshrink tube. The heat of a gas iron has to go _somewhere_, and if you’re not careful, that exhaust heat will burn your skin, or the wires of the board you’re soldering. Keep it simple.

When planning the layout of components, peek at the schematics every so often, and have a working copy of your circuit laid out on a breadboard. This is invaluable for your reference, and things can get weird if you don’t do it. Your mileage may vary here, but I’ve blown my share of transistors because I though I had the pinout memorized (CBE, BCE, GDS, SGD, it _VARIES_ a lot!). One peek at the breadboard will prevent this.

Finally, plug the components in, in an arrangement that will allow you to have at least 2-3 holes in between each component. You can go minimalistic here, as seen in this MAX7219+RGB LED driver with a 3V3 Arduino Pro Mini:

Or be oblivious to the rules of engagement between yourself and the circuit, as in this Christmas blinky-blinky LED driver – notice how hot glue and PVC tape can be used to proactively prevent shorts and how I just stacked segments of perfboard onto each other inside the Christmas-themed can, separating each layer with an ‘insulator’:

How to Build a Battery Charger

Or you can ignore perfboard completely, and just stick your MCU and other components onto ‘holders’, as in this Apple Remote to TV IR bridge + dual-channel 5V relay controller (the load on the relay is for a fan that runs on a Raspberry Pi nearby, connected to my TV – only needed when the TV is on):

How to Build a Battery Charger

In the end you will settle on a decent layout of components. People will complain otherwise, and you may receive a prohibition against keeping your useful devices where your better half can see them. This RGB driver for some ambient lighting baboonery is done nicely, despite being out of view inside a shell:

It also really helps if you find out the dimensions of the perfboard chunk you will need in advance of buying a box/shell for it. Many hardware stores stock 3-5mm plexiglass and can cut it for you, often without a fee. This can be smacked together with a few small metal pins, and some superglue to provide an Apple-esque looking iDevice which will outshine anything else in the vicinity.

A final note on perfboard:

Plug in your components in a sensical manner, and walk away for 5 minutes. Come back, and check your logic. This is not rocket science. If you’re alright with it, and you’ve got some good spacing between the components, get a steel ruler, a marker, and a sturdy hobby knife, like the Stanley FatMax. Line up the cuts with the marker, and do 4-5 cuts with some force into the perfboard. It will be easy to break off the piece when you’ve done this both ways. If the edges are uneven, a good rough metal file will take care of this.

In this article, we won’t have a wiring guide. Refer the the schematics for the charger, take a little extra time to align the components on your perfboard, and use the 1-2-3 rule to avoid damaging the active components. Passive components like resistors are less of a concern.

I recommend that you use a pre-assembled single channel 5V relay instead of the TONGLING pirate relay on my charger. TONGLING – while they do have a GND pin – do not have any connections running away from that GND pin into the IC. It’s very annoying, and I just took my TONGLING apart and smacked it onto perfboard, with a driving transistor instead of an optocoupler. 

A note on the current limiter schematic: by using 8 x 10 ohm/0.25 watt resistors in parallel, we get a 1.25 ohm/2 watt resistor. Just what we need here. Parallel resistors are easy: 10 / 8 = 1.25 ohm 0.25 * 8 = 2 watts. The beautiful bouquet of resistors on the picture, that’s our parallel resistor. It’s spread a bit out so it can dissipate as much heat as possible.

How to Build a Battery Charger

How to Build a Battery Charger

Download Code: battery12VChargeController.ino

Sample output from serial monitor:

$ serialMonitor

NOT CHARGING – batteryVoltage => 12.7V
Hit the target voltage of 12.7V, keeping charge ON for 5 minutes before re-checking…
Loads are powered…

NOT CHARGING – batteryVoltage => 12.7V
Hit the target voltage of 12.7V, keeping charge ON for 5 minutes before re-checking…
Loads are powered…
Battery is fully charged. ~108Wh available.
Keeping charge ON for an additional 10 minutes before turning it off.
NOT CHARGING – batteryVoltage => 12.7V
Hit the target voltage of 12.7V, keeping charge ON for 5 minutes before re-checking…
Loads are powered…

Battery is fully charged. ~108Wh available.
Keeping charge ON for an additional 10 minutes before turning it off.
NOT CHARGING – batteryVoltage => 12.7V
Hit the target voltage of 12.7V, keeping charge ON for 5 minutes before re-checking…
Loads are powered…
— snip —

In operation, the charger will sense both battery voltage and charge voltage at intervals (the RGB LED will rapidly blink green and red for 2 seconds). If the battery voltage is in the critical range, the LED will indicate this with a stable red light, and if it is in the safe range, it will indicate this with a green light. If the battery voltage goes below 11.5V, loads will be cut-off via the relay, and will remain off until the battery voltage is acceptable. Charging will continue during this period, but all the power is reserved for the battery. When the battery is full at 12.7V, loads can pull power, charging settles after a period before stopping, and a timer is started. Only at the expiration of this timer does charging pick up again.

The compiled firmware is only 5.6KB with ‘debug = false’, so there’s lots of room for expansion here.

What’s next?

We built this charger specifically for a solar panel of X watts. It’s meant to be portable, and automated. A solar tracker is the perfect place to mount this small charger. It may look large on the pictures, but it’s quite small, and intended to be mounted inside a small box, not on a chunk of plywood.


Links:

  • IRF9630 datasheet link – rated for 200V, 6.5A, R_DS 0.8 ohm
  • BC239 datasheet link

Click here to go back to Part 1

Leave a Comment