LM317/350 and 08M control

manie

Senior Member
This thread refers to the thread here:
http://www.picaxeforum.co.uk/showthread.php?t=10039&highlight=battery+charger&page=22

BCJkiwi and Wapo both got the circuit working so I'll attempt it next. However, I want to employ a 28x1, running at 8MHz so as to (maybe) include a matrix keypad READADC for setting required voltages etc. The problem is that the available current is somewhat low, 1.5 and 3 Amp for the two mentioned regulators.

Will this work with a PNP Pass Transistor (as is placed across the 78xx series) in order to increase current capacity to say 6 - 10A ?

Is "doubling-up" as per the regulator datasheets possible to increase current ?

Will the 28x1 at 8MHz be quick enough to read analogue keypad value inputs while maintaining voltage ?

I see that BCJkiwi states that once the required voltage is reached on the output it remains stable. Will this then make it possible for the 28x1 to perform other tasks such as RS232 comms with the Firmware chip for LCD updates etc ?

Just some questions (still) on the circuit from a VERY long original thread...
 

hippy

Ex-Staff (retired)
I seem to recall the circuit worked best when running as fast as possible, so probably best not to have it doing anything else; use a 28X1/2 for your main control, an 08M as the voltage controller. You can probably interrupt the main loop to transfer data as to what the voltage should be. Any erratic voltage shouldn't matter too much as you are changing voltage at that time anyway, but it would be ideal if it reasonable matched if live electronics are connected at the time.

With a fast 28X1/28X2 you might be able to read an analogue keypad as well as control the voltage but RS232 comms and LCD updates are probably out of the question.

PICAXE's are so cheap ( as are resonators ), that it isn't obligatory to try and do everything on a shoestring budget or more constrained than you need be. It's worth spending a little more to get yourself the best solution, especially when the PICAXE cost is just a rather small part of the overall total.

If speed is as important as I think it is, I'd throw a 28X1 operating at 40MHz ( or 20X2 at 64MHz ) at it just for that part of the circuit so as to get the fastest response rate. Plus that allows background HSERIN ( or I2C slave ) which makes for getting data in without overly disrupting the timing rather easy.
 

manie

Senior Member
That sounds reasonable Hippy, it was what I thought it might be. I agree, the Picaxe is (almost) the lowest cost component besides R's and some C's in most circuits. As with my re-design on the chook-house saga, I'll now be using a minimum of three 28x1's to control that, especially since timing is the least of my worries with probably 30secs (min) to 2 minutes (max) between cycles.

As for the increased current, can this still be done with a PNP pass tranny for the current ?
 

BeanieBots

Moderator
Will the 28x1 at 8MHz be quick enough to read analogue keypad value inputs while maintaining voltage ?
Very unlikely.
I've mentioned several times here that PICAXE is not a very good choice for PSU control. Horses for courses and all that.
An analogue PSU is best controlled by an analogue system. (op-amp).

6A to 10A pass transistor. Not impossible but look out for low hfe values on high current transistors.
10A in a linear design. Get some BIG heatsinks.

Have a good read of the LM317 app notes for ideas.
 

fernando_g

Senior Member
It can be done, however in an overload or short circuit conditions the power dissipation will be quite high for the transistor, which lacks the internal protection the regulator has.

Perhaps an LM338 monolitic 5 amp regulator, which is quite similar to the LM317, could be a better choice........
 

manie

Senior Member
Fernando: Yes the 338 will be better. Problem is the supplier (in the country side, not city) just can't keep every part in stock. He is doing exceptionally well and had a metal can LM338 available, but the price was horrific ! Translates to US $ 10.00 each ! So I took the lower cost (by a LOT) LM350's, two in parallel will give 6 amp so not too bad for lighter jobs...

BB: Thanks for the pointer re hfe.... top end current will probably be between 4 and 6 Amps, one does not want such a nice controller to run out of steam at 3A only... I have come across a treasure trove of old PC power supply cases, fans and all, so this will come in handy to house the transformer and PCB unit and cool it at the same time.
 

Andrew Cowan

Senior Member
Or use an op-amp for control (driving transistors). Use a serial or I2C DAC convertor to provide the input to the op-amp. I've breadboarded this circuit and it works very well. I have a circuit diagram for a PIC controlled, current and voltage limited PSU, with keypad entry, RS232 comms and an LCD.

I converted the design to use a PICAXE, and started machining the case. I then got distracted by other projects...

A
 
Last edited:

BCJKiwi

Senior Member
Manie,
Not sure that anything bigger/faster than a dedicated 08M would be required.
Tweaking of the gate circuit will alter response rate.

The question is how fast does the response to a change in set point need to be - this will determine if a faster PICAXE is required.

Remember the internal ocscillator speed in the regulator is very high and this is what is regulating the output. The PICAXE is only there to change the set point, NOT to regulate the output.
 

manie

Senior Member
BCJ: That is what I understood from your thread in "completed projects". Also that the Gate charging cap plays a role ie. a larger value cap responds slower which means the Picaxe has more time "off" to do other things. Having built this circuit, what is your view ? I do not mind at all to add a second Picaxe dedicated to the controller and have a larger Axe performing the exotics like reading keypads and updating the Firmware/LCD combo. I would like a menu driven controller which can also report back with some data regarding the setpoint/output V, maybe even LM350 heatsink temperature etc.
 

BCJKiwi

Senior Member
Well I've never used it in an application.

It was one of those threads where there were many different views and theories but no practical experience so in the end I built it to test it and determine what actually worked in practice.

If it were me I'd put in a purpose built single task 08M but since I don't know what your requirements are, nor how much other work the 28X1 that might do this task has to perform then I'm unable to advise further.

Suggest you do both;
1. build the 08M version so you get a feel for how it works and responds.
Then
2. incorporate it into the 28X1 circuit and see if it matches the 08M - if so OK. If not, implement the 08M version.
3. Let us know how it went!
 

manie

Senior Member
BCJ: Thanks, I did think maybe a 08M for control and a 28x1 doing the "main" tasks with an interrupt to the 08M to serial new setpoint data etc. The project is comming, and I'll let you guys know. Heck there is SUCH a lot of new stuff to do and try before one can make progress again on the 'main" project. But I'm getting there (between Mosfet smoking and "faulty" soldering irons...)
 

BCJKiwi

Senior Member
Rather than serial interface to to the 08M, since the main PICAXE is 28X1 there is also the option of using a HPWM output (if there is a spare) with an RC to smooth the output to DC and using the "potentiometer" readadc input from the sample circuits.
 

manie

Senior Member
That is a distinct possibility. However, I'll have to learn the basics and fine print of the PWM (digital pulses) to DC (analogue voltages). For instance, what will the relationship be between PWM Duty % and Capacitance value ? Do you use low leakage Tantalum (polarized cap) or what ? etc etc etc. Any thoughts on that ?
 

BCJKiwi

Senior Member
You'll need to do some testing with a CRO attached.

Basically you are converting a square wave into DC - will always be a compromise but as it's mostly unchanging? a big cap is probably a good starting point.

However, there is no exact relationship - it will depend on the RC chosen and the PWM frequency etc.

Maybe, if there are no issues with serial hang etc (due to interrupt handshaking) it may, on reflection, be better to stick with the specific commanded value via serial.
 

manie

Senior Member
A single number will be easier to understand AND control I think. It also requires just two pins, one for serial and one for interrupt. Think I'll venture that way first...
 
Top