Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 06, 2016, 03:49:35 03:49


Login with username, password and session length


Pages: [1]
Print
Author Topic: Regulated Load / PIC  (Read 2316 times)
0 Members and 1 Guest are viewing this topic.
madmax
V.I.P
Newbie
*****
Offline Offline

Posts: 15

Thank You
-Given: 10
-Receive: 1


« on: January 17, 2008, 07:46:47 19:46 »

Another project that I would like to put together for the lab is a regulated current shunt. The basic circuit is an N channel JFET with the base attached to the output of an op amp. As current flows through the JFET and through a small value sense resistor in series that voltage drop will be fed back to the op amp to regulate the current draw of the JFET to match a reference voltage on the + input of the op amp. Once this has been built I’d like to add a PIC to monitor and display the voltage of a power supply under test (No load, 1.3 amp, 2.5 amp and 4 amp). Ideally the PIC will be able to compare the voltage readings for all of the tests and signal a PASS or FAIL condition. I don’t know how to do it at the moment but I am pretty sure I could use the PIC to replace the op amp all together. The pic could monitor the voltage drop across Rsense and send a signal (perhaps PWM?) to the JFET to control the current draw. I’ve ordered most of the analog components and once that portion of the circuit is up and running I will attempt to add some features using the PIC. Any suggestions on what other features could easily be implemented in this design using a PIC?
-MadMax


Posted on: January 15, 2008, 08:31:23 20:31 - Automerged

Another variation of this circuit would be used to test batteries. A battery would be placed in the test set-up and a load applied until the battery voltages drops to the minimum acceptable level. I am working with SLA (Sealed Lead Acid) battery with 4V /1 Ah so the minimum battery voltage is something close to 3.4. Once the minimum voltage is reached the unit will switch to charge mode and monitor charge current until the battery reaches a full charge. Once full charge is achieved, the load circuit will place a 1 amp load on the battery for 23 minutes and monitor the output. After 23 minutes the PIC will check to make sure that Vbat is at an acceptable level.

Posted on: January 15, 2008, 08:37:19 20:37 - Automerged

Sorry that I don’t have the article to directly reference at the moment however I was happy to find one method (I’m sure there are more) to create an analog signal using the ADC, an I/O pin, a cap and resistor. Essentially The software keeps the pin in the high impedance state while the adc reads the voltage drop across a small cap. If the voltage is too low the I/O pin is pulled high more a few micro seconds and if the voltage is too high, the pin is pulled low for a few micro seconds. Any other time, the pin is placed in the high impedance state. The PIC seems to be a very versatile part.  Shocked
Logged
Walkura
Active Member
***
Offline Offline

Posts: 123

Thank You
-Given: 55
-Receive: 82


« Reply #1 on: April 20, 2008, 08:08:34 08:08 »

At the moment i'm developing a regulated load for testing battery chargers .
This came a bit as a side effect of a nickel mangane charger i builded previously .
(the cells should be discharged partly before charging to prevent memory effect)
You can build a regulated load by using semiconductors as they do in the following link .
http://electronicdesign.com/Articles/Index.cfm?AD=1&ArticleID=3239
This is however vunerable method of doing things .
All the heat created will come out of your transistor and its easy to destroy .
I chosen to switch resistors with mosfets , driven by a pwm generator .
For simple discharging purposes i used 5 mosfets ,20 resistors of 50 Watt + sg3525 .
This setup i used to discharge 42 volt @ 20 Amperes .
By sharing the load over 5 mosfets its even resistant against reverse polarity .
(It will discharge full power through the intrisic body diode but the induced heat isnt to high)

The regulated load i'm designing now is with pic processor (877A)
Its basicly the same setup of switched resistors .
This proven to be very reliable so far .
My pwm output will go through a optocoupler to protect my controller .
Ampere measurement will be done by using a hall sensor also to provide isolation .
Temperature measurement will be done with a lm35 .
The voltage sensing i'm still a little in doubt .
Right now i see 2 options .
A : use the second pwm output for a unregulated forward converter (measuring the *secundary*)
B : make voltage to frequency & measure that .
Maybe you have some idea's too about it .
The optical isolation is for me a absolute must .
(the power of this load will be 30 Volt -200 Ampere) i dont want this to discharge into my computer  Grin
Mostly i have the software (messy and temporary) working in simulations with proteus .
Resistors are ordered so its almost time for trials .
P.s. what amount of power you try to design ?

Good luck .
Logged
Wizpic
Global Moderator
Hero Member
*****
Offline Offline

Posts: 976

Thank You
-Given: 197
-Receive: 344



« Reply #2 on: April 20, 2008, 08:37:28 08:37 »

Walkura What did you write your software in

has for the voltage method could you use an op-amp to dvide the voltage down to 5V for 32/48V input ?
also use op-amp to boost voltage for curent reading ?

I have a routine that has a very close tolerance for voltage readings but it is done in proton

want too share your design or we could sahre some ideas

wizpic
Logged

When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
madmax
V.I.P
Newbie
*****
Offline Offline

Posts: 15

Thank You
-Given: 10
-Receive: 1


« Reply #3 on: April 20, 2008, 06:54:58 18:54 »

Walkura,
I’m only trying to regulate 1 to 5 amps at about 5 volts for periods of 15 seconds or less for testing a power supply. I also want to use a variation of my circuit to test a 4.2 volt lead acid battery by drawing a 1 amp load for 23 minutes and measuring the Vbat each minute to make sure it meets a minimum requirement. I have begun building the circuit and will be happy to supply the schematics etc when complete. The current load basically consists of a MOSFET rated at 15 amps (Slightly overkill) controlled by an op amp. As current flows through the MOSFET it passes through a 0.1 ohm resistor which is used as feedback to the op amp. The reference voltage for the op amp is controlled by the PIC. I see the circuit you reference uses a 0.01 ohm resistor which I like better. I’ll take a closer look at your circuit and post and see if I can make any suggestions and thanks for your reply as the load you are working on will handle some pretty serious current and will require more thought with regard to safety as you already know. As for the voltage measurement, am I to understand that you want to measure a high voltage but still keep the advantages of the opto isolator? I will give it some thought but hopefully some of the more experienced people here will comment on that one. Please keep me posted on your progress and I will do the same.
-MadMax
Logged
Walkura
Active Member
***
Offline Offline

Posts: 123

Thank You
-Given: 55
-Receive: 82


« Reply #4 on: April 20, 2008, 09:42:54 21:42 »

Dear Madmax & Wizpic .
Let me start with thanking for your reply's .
Now about my regulated load .
There are a few criteria that i setted for it .
The optical isolation is sort of mandatory because the load will be regulated from a plc .
0 ... 10 Volt makes 0 ... 200 Ampere ,or possibly voltage regulation mode 0 ... 10 volt makes 0 ... 30 volts .
The main victims on test will be battery chargers (so far simple & easy) but also dynamo's for cars and trucks .
The latter ones can create spikes of upto lets say 150 Volt .
These requirements make that i take a overload capacity of 50 % (45 volt - 300 Ampere)
Further the fact that i will regulate the load from a plc makes it absolutly neccasery that i have optical isolation.
The damage a 150 Ampere charger will do in your computer aint solvable with a simple fuse  Grin
The load (resistors) itself will be splitted over 5(10) big heatsinks with 9-300 Watt resistors sandwiched between 2 heatsinks .
On the pictures attached you can see the 1000 Watt Discharger-charger that brought me to the plan to build this regulated load .
For this regulated load i wanted to use the same aproach but instead of SG3525 i use 877A for easyer interfacing & measuring .
Current measurement will be done with ACS750 (providing optical isolation) on every (resistor) module followed by a summing amplifier .
That way i avoid that i have to design a hallsensor meter for 200 Ampere but i can easily feed it into the pic .
Gatesignals from the pwm to the gates can be easily putted through a optocoupler into a ir2101 gatedriver .
My doubts arise with the voltage measurement ,i tryed some simulations in Proteus with lm331 to convert voltage to frequency > opto >vice versa .
Those results didn't really convince me that was the right way to do it .
The second option i thought of was to use my remaining pwm output > opto > mosfet swithing a forward transformer .
Being unregulated i expect on my secundary , input voltage > output voltage = Npri > Nsec .
If anyone of you has idea's on how to get relativly accurate an analog signal transfered isolated i would be very pleased to discuss that .
Except some hobby trials of dc-dc converters and modifeid sinus inverters i never builded smps,s .
My knowledge in that aspect doesnt go much further then what i learned from the pressman & brown books.
For now this is a little my bottleneck .
About my code & simulations .
To be honest its written in Mikrobasic and very messy (but working ,it is my first program in Mikrobasic)
As it is now in constant change i would be ashamed to put it here Smiley
The simulations i made are for now nothing more then all 4 input signals (ampere reading ,temperature ,voltage & the voltage to set pwm)
My displays shows those values + a scope to show the pwm created .
In the code i still have to add :
Feedback from currentsensor (true amperes) > setted value ,the start value now assumes maximum input voltage at start .
I will have to add a routine that decreases duty cycle till it matches the setted values .
Voltage mode  & possibly as protection involve the lm 35 to decrease dutycycle when things get to hot .
In itself i chose to do my simulations like this to keep it bearable (and fast) on my computer  .
(afterall there is no use to have it simulate mosfetdrivers etc. etc. when all you want to know for now is if your program works)
Not to mention i have that stage builded and tested in the discharger i previously mentioned and attached on the pictures .
If the design or idea intrests you i can upload the pcb for the discharger .
Regulation goes by potentiometer ,shutdown by termistor or 5 volt from a processor .
Also it has reverse polarity signalisation & ventilator control .
The BIG regulated load has no pcb yet and the schematics are for now only in my head *blush*
But i will keep you posted about the progress ,i just ordered my resistors and trials will start when i have them here .

The problem i want to solve is this .
When i have to test a battery charger i'm always messing with halogens or even resistors in garbage cans of water .
I want to build a load that i can just put in the corner & set 25 or lets say 50 or a 100 Amperes of load without 20 halogens or buckets  Cheesy .

Have a nice eve .
Walkura


Logged
Wizpic
Global Moderator
Hero Member
*****
Offline Offline

Posts: 976

Thank You
-Given: 197
-Receive: 344



« Reply #5 on: April 20, 2008, 11:13:26 23:13 »

Walkura not usre if this will help but it says it's protected upto 2000volts

http://schematics.blogspot.com/2006/10/voltmeter-attenuator-rectifier.html

In the mean time I will start looking and digging

Share what you have even the code if you want it does not matter how messy it is

wizpic
Logged

When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
Walkura
Active Member
***
Offline Offline

Posts: 123

Thank You
-Given: 55
-Receive: 82


« Reply #6 on: April 21, 2008, 08:47:10 20:47 »

This is the first option i came to myself - http://www.national.com/an/AN/AN-C.pdf
But when i putted it in proteus the result didnt convince me .
Although i have to say that the optical isolation poses a little puzzle when it comes to transfering a analog signal ,
I just don't want to risk that component failure of a 5 cent part makes a 2500 VA transformer go bananas in my logic .
(Last year i had some proof of 325 volt finding its way through mosfets ,mosfet drivers ,into my microcontroller (it was a 500 watt inverter)
Tomorrow i will draw a schema of how i meanth it with the unregulated forward for measurement .
The power needed can be very low ,all i need is that the secundairy voltage drops in relation to the input voltage .
Diode ,little elko & resistor for discharging the elko would do .
When i have the proteus .dsn ready i will put it here with the .hex file so you can have a look if i don't make a terrible stupid mistake .
Afterall saturating my transformer will mean instant destruction of the weakest link in the measurement circuit .
(probably being the diode from the + or the windings of the transformer ,although when the diode shorts it can go serious wrong)
Since i emigrated 18 months back i don't have fellow hobbyists around ,so i really apreciate your opinions .

Have a nice eve Walkura
Logged
Wizpic
Global Moderator
Hero Member
*****
Offline Offline

Posts: 976

Thank You
-Given: 197
-Receive: 344



« Reply #7 on: April 25, 2008, 07:48:56 19:48 »

I would be interested in your deisgn, Has I thougth of making one well not on has a big scale like yours, I only need max 48V and 25amp load, I want to be able to simulate a battery for testing chargers so any info you can share would be great

wizpic
Logged

When you think, "I can't do anymore. I need a break," that is the time to challenge yourself to keep going another five minutes. Those who persevere for even an extra five minutes will win in life..
Walkura
Active Member
***
Offline Offline

Posts: 123

Thank You
-Given: 55
-Receive: 82


« Reply #8 on: April 25, 2008, 09:29:07 21:29 »

But ofcourse Wizpic .
If you send me a email adress i can send you pcb files & schema .
(sorry for not posting it here but its a design thats marketed recently)
I am modifying the pcb so you have the latest version with feedback.
The big regulated load i didn't have much time last few days i still have to draw the schema  Roll Eyes
Hopefully after the weekend i have at least a prelimminary schema here .

Have a nice eve Walkura .


Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC