Author Topic: Help needed regarding programmable power supply(4x3 keypad & rotary encoder base  (Read 280 times)

0 Members and 1 Guest are viewing this topic.

Offline SHARANYA

  • Contributor
  • Posts: 5
  • Country: in
Hi experts
I am currently building a programmable power supply based on atmega328p/dac8574(16 bit dac)/mcp3424(18 bit adc)/LT1013 op amp.The output range is 0-30v/0-4A.I burnt the INA169(1000mv/A) current sensor and currently using acs714(0.185mv/A).
The CV/CC control part is totally based on analog electronics(LT1013 op-amp+some BJTs).
By far,my setup is working correctly on the breadboard setup(except the precision of 2nd decimal digit on both the voltage & current range).

Now,my main question is how to let the atmega328p know that the control part is in CV/CC mode?Is it by checking the voltage(both set & actual output) or by checking the current(both set & actual flowing) or by checking both?What is the general rule?

Also,as far as i have understand,the LT1013 is not a very good choice for this control loop.Please suggest some good precision op amps which are generally used in this sort of application.Will OP295 be a good choice?(I have read in the datasheet that they are used in power supplies!)

Also I added buffers previously (using LT1013 op amps) after the DAC & the current sensor INA169 to protect it's output.But there are significant change in the decimal digits (specially in lower range) of the output due to the offset error of the op-amp.So currently i removed the buffer.
As for buffer choice,should I use AD8630 (as they have a ultra low offset error and they are rail to rail)?
 

Online pe6o991

  • Contributor
  • Posts: 5
  • Country: bg
  • Error 404
I don't see a reason why you use linear regulators instead of digital but ok.You can just tap the output of the CC op-amp with a RC-network to filter the voltage and feed it to a digital pin of the MCU(also you will need a voltage divider to lower the voltage if your op-amp is powered with a voltage higher than 5V).
 

Offline void_error

  • Frequent Contributor
  • **
  • Posts: 630
  • Country: ro
  • I can transistor...
Now,my main question is how to let the atmega328p know that the control part is in CV/CC mode?Is it by checking the voltage(both set & actual output) or by checking the current(both set & actual flowing) or by checking both?What is the general rule?
Hi, 'not an expert' here.

It might be easier to use a comparator to check which loop is active, it will output high or low for CV or CC depending on how you set it up, but since I don't know how you implemented your control loops I can't tell.

Quote
Also,as far as i have understand,the LT1013 is not a very good choice for this control loop.Please suggest some good precision op amps which are generally used in this sort of application.Will OP295 be a good choice?(I have read in the datasheet that they are used in power supplies!)
For op-amps at least there's a trade-off between precision, speed, and low-price. You can only pick two. Something in your control loop will slow you down be it the op amps or series pass elements (in case it's a linear supply). In other words, assuming it's a linear supply, there's no need to use really fast op amps if your series pass transistor(s) can't keep up.

More experienced members of the forum could give you a more detailed explanation.
Trust me, I'm NOT an engineer.
 

Online duak

  • Contributor
  • Posts: 44
  • Country: ca
Hello,

I don't see the schematic you've used so it's hard to comment on the design.  If it uses a voltage feedfack loop and a current feedback loop using some sort of clamp or selection logic to determine which loop is in control, the loop that is NOT in control will have its output driven to maximum.  This can usually be detected by a simple comparator but in this case, the micro should be able sample the amplifier outputs of the two loops and determine which one is higher and thus not in control.

The LT1013 is a good device and is free of many quirks such as polarity reversal under some conditions.  It has an absolute maximum Vcc - Vee of 44 but it won't be able to drive the pass transistors without another voltage gain stage.  I don't know how much accuracy, stability and precision you want or expect, but good supplies have been built with lesser devices and careful design.  My only concern is that the LT1013 can be a bit slow and the transient response is not as good as it could be with a faster device.  Note that slower devices can be stuck in a saturated state with their outputs at a maximum or minimum for a relatively  long period of time.  This is important when the power supply is changing from constant voltage to constant current  and back again - you may get some very high voltage or current spikes during the transition.

Cheers,


« Last Edit: November 22, 2017, 08:37:03 AM by duak »
 

Offline SHARANYA

  • Contributor
  • Posts: 5
  • Country: in
Thanks a lot for the nice explanation.Actually,i didn't draw any schematic still now that's why it is missing!sorry for that....I am trying to explain the control part as much as i can do for now.
My control part is much similar to Dave's revc schematic.Except for the Lt3080,I am using two transistors in darlington pair(MJE15032 for driver & TIP35 as Pass transistor) for more current handling.The voltage feedback control is present after the emitter of the darlington(i.e at final output).
I also tried to measure the output of the current controller op amp before the base of the 2N3904.(For 1A CC test).I am getting only 0.247v and the current is being controlled.Although when I am disconnecting the opamp output from the BJT base driving resistor 10k and crossing 1A current draw,The comparator is triggering & i am getting nearabout 31v at the op-amps output(I am feeding 33v for the op-amps).So my point is,it is very difficult to determine the mode by measuring the current controller op-amp output as the whole control is being executed in a very small amount of voltage change.(Because the 2n3904 is not even getting into full saturation).
So,is there a way I can do it in software?
And my aim is to be correct after two decimal digits.
And please suggest some high speed op-amps that can handle 33-36v.I was thinking to use OP295.Is it ok?I am struggling with this project for a very long time!
The CC & CV mode detection is only to update in the display.So if it's a few milisec delayed as compared to the main analog event,then there would be no trouble.But my main target is to detect it ASAP.
« Last Edit: November 22, 2017, 07:37:46 AM by SHARANYA »
 

Online pe6o991

  • Contributor
  • Posts: 5
  • Country: bg
  • Error 404
since you mentioned dave's rev c shematic there is a current limit output for the MCU.If you look to the right of the PWM DAC you can see the current limit comparator and it splits into 2 transistors.One is for controlling the regulator and one goes to the micro.the micro probably has a internal pullup and thats how it knows if its in Constant current.I've posted a picture below.
 

Offline SHARANYA

  • Contributor
  • Posts: 5
  • Country: in
 :-+ :-+ :-+ :-+ :-+.....missed that part.I will add that BJT and let you guys know the result!
 

Offline SHARANYA

  • Contributor
  • Posts: 5
  • Country: in
One more thing i would like to ask!
As described by duak
Quote
This is important when the power supply is changing from constant voltage to constant current  and back again - you may get some very high voltage or current spikes during the transition.
I was testing if there is a voltage spike present when the current control takes place,I didn't find any spikes but instead,I saw that the whole output is oscillating during the current control loop!! :(
The frequency is nearabout 1.5-1.9khz and Vpp is approx 282mV.
How to overcome it??
« Last Edit: November 22, 2017, 08:37:01 AM by SHARANYA »
 

Online pe6o991

  • Contributor
  • Posts: 5
  • Country: bg
  • Error 404
You getting oscillations because you don't use lt3080 but straight BJT's as you mentioned.In Dave's videos about designing a lab power supply he mentioned something about getting weird oscillations if you use only a comparator and a bjt.His recomendation was to add a small cap on the feedback.It's kinda late and my brain is not functioning correct but try to put a load on the power supply and see if there are weird stuff in CV mode.You didn't post any waveforms so i can't tell whats going on.Maybe some other minds can come and help.
« Last Edit: November 22, 2017, 09:25:44 AM by pe6o991 »
 

Offline SHARANYA

  • Contributor
  • Posts: 5
  • Country: in
Ok...The oscillation is happening in the CV mode also.I conducted some tests by varying the current draw.The voltage was at 5v.

1)NewFile0 is where the load is drawing 20mA.(Almost no oscillation)
2)NewFile1 is where the load is drawing 500mA.(Oscillation freq is 38khz and range is less than 250mv pp).
3)NewFile2 is where the load is drawing 1A.(Oscillation freq is 78khz and range is between 1v pp).

Please take a look.I also tried some compensation cap of different values(10nF/40nF/100nF)between inverting input and the output.But no significant changes detected.

« Last Edit: Yesterday at 08:56:51 PM by SHARANYA »
 

Online pe6o991

  • Contributor
  • Posts: 5
  • Country: bg
  • Error 404
Those oscillations look very square.Are you using the micro to set the voltage.If yes scope the CV op-amp non inverting input to see the voltage coming from the micro(maybe its noisy and causes oscillations).Maybe post a schematic to see how things are connected.Also your output filtering capacitance maybe low.Linear regulator usually have a bigger caps on the output.Another thing is to measure the input voltage noise and probably the op-amps supply.Do these things and post the results.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf