Let's Make Robots!

Controllable battery charger based on max712


Well here it is!! My attemps at building my own battery charger using a sample of the max712, here is the original post that inspired me, http://letsmakerobots.com/node/9272 and special thanks to ezekiel181 !!! 

Although I will build a prototype on a breadboard just to test I have already started drowing a circuit using diptrace. The final version will be a programmable battery charger using a picaxe 40x2, a keypad from Sprkfun  to set the outputs  and an LCD to display remaining time, elapsed time and the

Check list:

-          Gather electrical components for the breadboard prototype

-          Finish designing pcb with all corrections discovered from prototyping.

-          Build prototype using all components of finished design (relays, keypad ...)

-          Find a suitable power source ( laptop supply from dealextream maybe)

-          Coding to understand keyboard input, do necessary calculations, set relays to correct position, display info on LCD.   



Parts list:

-          12 or maybe 6 relays depending on how they are configured

-          Blocking diode

-          1 external power PNP transistor

-          3 resistors( well thats what the datasheet says but I clearly see 5 in the diagram)

-          3 capacitors ( same as before, I see 5 in the typical operating circuit)

-          A keypad to input info

-          An LCD to display info

-          A picaxe to drive set the relays depending on cell number, fast charge time... 


Well the only bit of work I can put up is the box I am planning to put this all in, it may seem a bit large but this way the laptop power supply, keypad, LCD will all fit in perfectly! 


The phones is there for size reference.  


Well my first idea on how to control the connections of pgm0,pgm1,pgm2,pgm3 was by using transistors as a switch, but since I don’t know how much current and in which direction it would be travelling meant that I would be safer off using relays.

I still need to do some more research to get some points strait but for now I am pretty optimist on this project. 

There has been a change in my plans, voodoobot suggested using one of these http://www.sparkfun.com/commerce/product_info.php?products_id=9117 , which does seem like an interesting option, 1 of these with the select option would allow me to set all the needed variables, it would also be useful because it only requires 2 pins instead of the 7 that the keypad require. There is only 1 inconvenience, the coding, I have absolutely no idea how to read or even count the pulses, sure, a post here on LMR would helpJ but, since I have 2 samples might consider that part for my second battery charger.

Well know for the work;

For this I will need to input variables via the keypad into the picaxe, have it do a few simple calculations then have it set its outputs high or low to set the relays.  The problems come when dealing with R1, a resistance that need to be changed depending on the batteries being charged, to solve this I have 3 possible solutions; 1 use a variable resistance condoled by the picaxe, 2 use a variable resistance that I will adjust by hand, 3 use a 8mA current limiting diode (from the max713 ev kit diagram)      


MAX712-MAX713.pdf223.35 KB
Evaluation_kit.JPG183.22 KB
Pin_configuration_Max712.JPG42.76 KB
Typical_Operating_Circuit.JPG65.42 KB
MAX713SWEVKIT.pdf63.79 KB
MAX713_EV_Pin_out.png94.96 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Hey vince, just throwing an idea out there so ignore this at your leasure!!  :D. Since I'm more of a minimalist person, I like using the smaller chips like the picaxe 8's to 20's. The 40x seems like overkill, have you considered the 20x2 or something smaller?  Also a different method of controlling the charger, you could use use one of these rotary encoders an and do all of your adjustments via this device. A nice feature about it is that it has a button press feature. So that could be used as a select option. Again, just random ideas....  :)

Well thanks for the ideas! They are always appreciated!

Well I would love to use a smaller chip ! But you have to consider all the pins that will be used, 6 or 12 outputs to the relays, 1 serial for the LCD and to be safe 2 outputs for leds, 1 last one for a main relay to cut all power, for inputs 7 if I use they keypad, and need to think how many if I use the encoders. Max 16 outputs and max 9 inputs (added 2 to be safe) ,

You can not imagine how much I was going back and forward between using a rotarary switch or encoder and a keypad! And now that you brought it up again I'm not sure witch one to choose anymore !! Could have the lcd display the value that I would then choose by using the select option ... but ... what about the keypad .... I cant decide !!!  

The absolute ideal would have been a big knob like on a multimeter ! I would have loved one but it would be way to difficult to wire up and mount :( 


Heya Vince I'll see if I can take a look at the rotary encoder this weekend and give you an idea of how it would work.

Though if anyone has any info on using them with the picaxe that would be awesome. :)

Dont worry about it! I wont be needing info on that for some time, because of the size of the box that will hold all

of this and a few other reasons I have decided to go with the keypad, but for my next one (since I have 2 samples) I think I will use the encoder, like that I will be able to make a much more compact  and better looking version of the charger :)


I figured I wanted to play with the 20x2 and the new unio memory I got this weekend so this could be an experiment in selecting(rotary) a memory location and reading it(push button action)...a mini project!  :)

Though....I just found out I'll be putting in possible late nights and weekends for work to get an urgent project  so Ii'll have less time than I hoped...for anything!  :(

Good call on the keypad though, it'll be a nice project either way.


Heya vince,

In doing some research on using interupts, mainly hw ints for the 20x2, I was testing some code which was failing miserably. I ended up find this bit of code though. This is again for using the rotary encoder, but this would seem to do the trick and I figured if you  ever went in this direction, it could be useful for ya. This will detect the int on either of the 2 pins that the encoder is connected to and output that pin id. This could easily be entegrated into a program that would use this data to select which direction to scroll a cursor in an lcd panel.

Now for the button press on the encoder I'm thinking that I can attach that to both int pins and check to see if I get a 1 on both. This isn't in the code below but it doesn't really seem possible to do in the simulator so I opted to leave that out. When I get the setup with an lcd connected, I'll make a post on it as I think it could be useful for others. For now I thought I'd just give ya the heads up as it seemed pretty cool and maybe useful to you.

 This code is from the reved site. giving credit where credit is due...  :) btw, that hippy guy rocks....

hintsetup %00000110
SetIntFlags %00001000, %00001000

'setint %00000011,%00000011
'endless loop
goto main

  hintflag = 0
  If hint1flag = 1 Then

    SerTxd( "INT1 ")
    hint1flag = 0
  End If
  If hint2flag = 1 Then
    SerTxd( "INT2 ")
    hint2flag = 0
  End If
  SetIntFlags %00001000, %00001000

Hey voodoo, sorry for the delay, had to put this project on pause for a bit. 

Cant wait to see your post on using the encoder! But don't worry, personally I wont need it for some time, well not till my V2 of this charger, a smaller version.

A simulator will never be as good as a breadboard, a few wires, leds and a picaxe. :p

Thanks for the help and will try to update the page soon with some new info :)   

That's quite the ambitious pursuit! I typically go with a Sony hdr-vx7 and it serves me well, although would love to try to build my own one day.