Electronics > Beginners
LM317 Dummy load circuit
<< < (6/9) > >>
VEGETA:

--- Quote from: Ian.M on April 17, 2018, 02:16:05 am ---Yes, with that OPAMP and a couple of other LT 'precision' ones I tried, it doesn't seem to want to stabilise no matter what we do in the OPAMP feedback loop.  I suspect an issue with the LM317 model as it isn't always passing the minimum current it requires for regulation.   Perhaps a rethink is in order: Discard my idea of using the LM317 inside the loop, and simply let the LM317 run as a regulator, similar to your original concept.

However the LM317 model seems to implement feedback current limiting at a little over 15V across it when passing 1A, so if that's realistic you may not get the load you want with one LM317.  If you use two, Adj and In in parallel with separate 0.2R current set resistors it will probably work better.

Use the OPAMP to convert 0 to 5V from your PWM to -1.25V) to -1.15V) on the ADJ pin to vary the voltage across the 0.1R current set resistor.

You either need a precision reference for the bias voltage that offsets the OPAMP output, or two Zeners cascaded for better stabilisation as I have drawn, or it will let the current rise excessively as the + battery discharges.

I've put some attention into rolling off the HF response of the OPAMP and decoupling Adj to hopefully make it more stable in real life.

Sim attached.

--- End quote ---

I will try the circuit when I return home.

My idea was to use Arduino pro mini to generate 150mv voltage from PWM and RC filter to act as the input to a 10-turn potentiometer which in turns sets the output desired current from 0v to 150mv -> 0A to 1.5A. Why Arduino? because it is gonna be used anyway to drive the LCD so why not using it for other stuff?

Without opening the .asc file now, I cannot see the circuit. However, I you mention getting the lm317 out of the loop and returning to be a regulator but we are feeding it with a voltage now. Perhaps you meant the driving op-amp should not take feedback from 0.1R resistor and just drive it with a voltage directly? well, that was my original idea but I needed the 150mv upper limit so that it doesn't exceed 1.5A.

However, as I told you before, it doesn't work perfectly as it works up to 600-700mA then jumps straight to around 2A. This could be due to the diodes used earlier, so perhaps with two 9v batteries could be different?

So now we need to adjust the opamp circuit to output negative values. For 0A we need -1.25v and for 1.5A we need -1.10v (not -1.15, so why you picked it?)... I still don't get the idea of 0.2R resistors, plus I don't have zener diodes in hand.
VEGETA:
Just a quick suggestion...

I want to use one of these to give 5v to Arduino from the +9v battery: https://www.banggood.com/5Pcs-Mini-DC-Adjustable-Power-Supply-Buck-Module-Step-Down-Module-p-952402.html

So I thought why not use one like it for giving the -1.10v maximum for the 10-turn pot? we could give it the circuit ground as it's positive input and -9v as it's negative input... then adjust it to give -1.10v! So it will be -1.10 to -9v but we can put potential divider (or a pot) to make it have better resolution like from -1.10v to -1.30v?

These units are so damn cheap and I've got 10 of them...giving them 0 and -9v is correct because overall it will be positive voltage.

What do you think?
Ian.M:
I think that's doomed to failure.  The control voltage needs to be very stable and a cheap switching regulator has too much ripple and often, poor stability.  Its probably a good idea to use an actual voltage reference IC and drive a SPDT analog switch IC with the raw PWM from the Arduino, to chop between 0V and an accurate Vref then low-pass filter that to get the control voltage.    I think you'll also need to close the loop in software - use the same Vref for tha Arduino ADC reference, and pick up the voltage across the 0.1R resistor, amplify it with another OPAMP and feed it to an Arduino analog channel so it can detect if the current differs from that commanded, and depending on the magnitude of the error, either trim it or shut down with an error.

Driving it with a 10 turn pot in place of the Arduino should be OK.  just put the POT across the 4.7V Zener.   The resistors that control the limits will need re-trimming - do that without the LM317 connected to get a range from -1.3V to -1.1V then hook it up and trim to get the desired range of current.   For the trimming resistors, you'll probably need to use the nearest lower preferred value with a preset in series for fine adjustment.

However its your need for as low a minimum voltage as possible for your load + the choice of a LM317 that's causing issues - balancing the 1.25V internal reference against the external control voltage to leave only 0.15V max across the resistor is a recipe for poor stability.   If one wants to use a regulator + low value resistor, go for the LT3083 as its output voltage directly tracks its set pin voltage, so if you ignore the 50uA current out of the set pin, normally used to control the output by developing a voltage across the control resistor, you could simply drive it from 0 to 0.15V from the output of an OPAMP. 

However its probably easier just to wait for your MOSFETs to arrive and use the 'classic' low minimum input load circuit.
VEGETA:

--- Quote from: Ian.M on April 17, 2018, 10:09:04 am ---I think that's doomed to failure.  The control voltage needs to be very stable and a cheap switching regulator has too much ripple and often, poor stability.  Its probably a good idea to use an actual voltage reference IC and drive a SPDT analog switch IC with the raw PWM from the Arduino, to chop between 0V and an accurate Vref then low-pass filter that to get the control voltage.    I think you'll also need to close the loop in software - use the same Vref for tha Arduino ADC reference, and pick up the voltage across the 0.1R resistor, amplify it with another OPAMP and feed it to an Arduino analog channel so it can detect if the current differs from that commanded, and depending on the magnitude of the error, either trim it or shut down with an error.

--- End quote ---

I don't have such components, any component that I want to get I always get it from Aliexpress. Simply because shipping from US\Europe based supplier is crazy expensive. Digikey offers 75$ for shipping same as mouser.

These are cheap DC-DC converters but I think they have stable voltage especially for very low current consumption. I just put some caps on output to filter ripple and noise as much as possible.

I want to know if the idea itself is working or not. I have another LM317 on hand so It could be put instead of the DC-DC module for regulating the -1.10v... how about that? So it is a matter of trial to see which one works. I will still use the dc-dc module for +5v supply for arduino.

the only problem is now size of the project but it is not really an issue. I planned to put all this inside an Altoids-like tin from banggood but looks like I am gonna put it inside a traditional plastic box.


--- Quote ---However its probably easier just to wait for your MOSFETs to arrive and use the 'classic' low minimum input load circuit.

--- End quote ---

That would need another month or so. We have some local market shops for electronics but people working there are not really experts in details. I don't expect them to know "logic level MOSFET" which is the requirement for the project.

I have ordered those mosfets for making a bigger version of this one which takes 30v and 5A... This one is mere 30v 1.5A and it is portable for small uses like testing batteries and dc-dc modules and so on.
Ian.M:
Yes, another LM317 would be a good choice for the reference.  Mount it on the same heatsink as the constant current LM317, and ground its  Adj pin and it should provide a 1.25V that tracks the internal reference of the other one fairly closely.   

Without any analog switches, its going to be a PITA keeping the PWMed control voltage stable with respect to the reference.  Are you sure you cant source a CD4066 or equivalent, or a 74HC4066 locally?   They used to be quite common for audio input switching  in CRT TVs , so there's a chance you may still find a few at a TV repair shop.

If not, I'll think up a precision clamp circuit using discrete components to limit the PWM output to the reference voltage before you filter it.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod