PIC12F683 based battery charger

This time I’m starting off with a device I already built, unfortunately there won’t be any photos from the actual build, just a quick article on how I imagined it and how it works.

A short story about how the whole thing started

My uncle has a nice little place at the countryside at about 50 kilometers away from where we live. Unfortunately there is no electricity in the house, so the lights, music, and anything else that’s electronic runs from a 12V car battery. The battery was charged before each trip with an old-school car battery charger, until the charger eventually broke. He brought it to me to get it repaired, but the two components it had inside both were dying so I decided to build him a new one. His birthday was coming, so I decided to make it as a present. I haven’t finished building it on time, but he was all-right with it!

PIC12F683 based battery charger

Step 1: Parts list

Here’s a list of the thing you will need to make a copy:

  1. Enclosure – buy the one you like the most, or make your own
  2. Transformer – think of the charging current, then make your decision about the amps. I have this one.
  3. Panel meter – must be able to measure your transformers maximum current. I have this one.
  4. Banana-plugs and sockets – buy in bulk off ebay.
  5. 220V cable socket – I bought this one.
  6. Fuse holder – I bought this one, this is for the transformers secondary winding
  7. Button – a random button, I’ve had this for ages
  8. LED – buy in bulk off ebay, I used a green and a red one, both 3 mm
  9. PIC12F683 – ebay link, buy more of these, they’re very useful for small MCU projects
  10. 220ohm resistors – protection resistors for the LEDs
  11. 4K7 resistor – pull-up resistor for the button input
  12. 1K resistor – series protection resistor for the NPN transistors base pin
  13. Voltage divider resistors – any kind of resistors with 1:4 dividing ratio
  14. LM7805 – TO220 voltage regulator, buy in bulk off ebay
  15. PicKit2 or PicKit3 – build or buy, I used my home-made PicKit2 for the job
  16. Wire terminal block – I used this kind of connectors
  17. NPN transistor – a random BC transistor that is able to handle 30 mA
  18. Relay – general purpose small relay, able to handle the charging current
  19. Screws – 4 mm screws for the transformer
  20. Drills, saw, sand paper and other hand tools
  21. Computer to write the firmware on.
  22. Extension chord for mains

Step 2: The enclosure

First, you need to imagine what the charger should look like, and get an enclosure that can fit in all the stuff you want. At first, I ordered one I thought was good, but when I saw it with my own eyes, I almost had a heart attack. Luckily the seller had this black enclosure on stock, I bought it without further hesitation. You can see how the two enclosures look like on the photo.

When you have both the enclosure and the clue how you want it to look like, you can start fitting in the components. I used my Bionic hand drill to drill a contour of the shapes I wanted to cut out, and snapped out the pieces of plastic. A small saw and sand paper was used to give the holes and slots their final form. After I cut these slots, I snapped in the components that supposed to go on the front and the back panels. The arrangement of components in and on the enclosure:

  • Front panel: panel amp-meter, banana sockets, two LEDs and a button
  • Back panel: 220V entry plug with fuses, fuse holder (for the transformers secondary winding), radiator and a current regulator (I changed my mind about this later on, but the holes were already there..)
  • Inside: transformer, prototype board, electronic circuitry

For more detail: PIC12F683 based battery charger


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top