Analog to Reistance Help.

simf14

Joined Jul 27, 2007
43
Hello Everyone-this is my first post and I will try to make sense since I am an very inexperienced amateur.

I have an infinitely variable 0-5v 20 ma output from an USB D-A converter (LabJack Industries) controlled from my computer. I want to control an 8V, 2amps regulator with the DA.

I do not want to use a digital pot circuit because of the number of inputs from the DA required for the Digital Pot. Another requirement is that the two circuits (the output of the DA and the regulator) must be electrically isolated so I do not blow the DA.

I have tried controlling a variable 8v, 2A regulator by replacing the linear pot with an analog optical isolator which works great but the gain is so small with the AOI. (1.5V in turns on the circuit 1.55V gives half output and 1.6V turns off the circuit).

Does anyone have a suggestion on what I might look at?

Thank you so much!!! Free rides in a 747 flight simulator!!!

SgtWookie

Joined Jul 17, 2007
22,230
Seems like an op amp (Operational Amplifier), like perhaps an LM741 would get you the isolation and the amplification you're seeking. (The 741 is an ancient design, one single op-amp in an 8-pin IC.)

You're going to need about 10 to 12 volts to drive the op amp. You'll need to tap off somewhere with a Vreg (like a 7810 (fixed +10v), 7812, 7910 (fixed -10), 7912, or 317/337 (variable + or var - V) to get voltage that's independent of the supply's regulated output. If you have to locate the regulator more than a couple inches from the big cap just past the rectifiers, you'll need to put a .33 uF cap to ground on the input terminal of the regulator, and a .1 uF cap on the output to prevent oscillations.

For the 741 op amp, pin 7 to V+, 4 to V-, 3 = input from your D/A (op amp + input), pin 2 (op amp - input) to ground via a 5.1k resistor (we'll call it R1). Pin 6 is your output signal.

To control the gain of the op amp in this circuit, you'll need to connect a resistor between pins 2 and pins six.

Gain = 1 + ( R2 / R1 )
For example, if R1 = 5,100 ohms, and R2 = 3,100 ohms, then:
Gain = 1 + ( 3,100 / 5,100 ) = 1.6 (approx)
So, if you put in 5v, you'd get out roughly 8 volts.
Put in zero, you'd get perhaps a half a volt - because the 741 is not a "rail to rail" design; those came later. (the "rails" are the absolute peak voltages available from the power supply).

I'm too sleepy to look anything else up at the moment - but this will get you started.

747 Simulator, eh? Fun! Lots of switches, dials and levers to keep one occupied.

Here's one of the first aircraft I ever worked on:

(McDonnell-Douglas F-4J Phantom II, photo taken early summer, 1977 at Beaufort, SC)

simf14

Joined Jul 27, 2007
43
First Semper Fi, thats must be the ugliest airplane in the world

A question: If I understand correctly I have a 12V regulated power supply that I can hook up 12V+ to 7, ground to 4, 3 to DA+output, pin 2 DA ground via 5.1K resistor, Pin 6 is the variable output +V so I hope the ground output goes to pin 4 correct???

Now you mention "If you have to locate the regulator more than a couple inches from the big cap just past the rectifiers" Sorry but what big cap and rectifiers? The ones within the Op Amp?

Thank you again!!!

simf14

Joined Jul 27, 2007
43
Sorry, also took a look at the LM741 specs and did not see max amps. for output. Can it handle 1-2 amps??? If not do I need to add another transistor?

SgtWookie

Joined Jul 17, 2007
22,230
First Semper Fi, thats must be the ugliest airplane in the world
Semper Fi, and bite me
A question: If I understand correctly I have a 12V regulated power supply that I can hook up 12V+ to 7, ground to 4, 3 to DA+output, pin 2 DA ground via 5.1K resistor, Pin 6 is the variable output +V so I hope the ground output goes to pin 4 correct???
In this case, yes - pin 4 to ground. The 741 op amp was designed to be used with + and - supplies, but you CAN use them with just one of the two. However, your performance below around 1 volt is going to be non-linear. The V+ pin must always be more positive than the V- pin. There are much more modern op amps available; I'm just too lazy to look them up

Now you mention "If you have to locate the regulator more than a couple inches from the big cap just past the rectifiers" Sorry but what big cap and rectifiers? The ones within the Op Amp?
OK, you're controlling an 8 volt 2 amp power supply, right? Inside that supply, there is a transformer, then a rectifier bridge, then caps to begin filtering the output of the rectifier. You could actually connect another Vreg to where the cap(s) are connected, giving you a more-or-less independent supply. However, if you're connecting the new Vreg via wires, you'll need to connect caps to the input and output pins to prevent oscillations, which would naturally cause havoc.
Thank you again!!!
Velkommen

SgtWookie

Joined Jul 17, 2007
22,230
Sorry, also took a look at the LM741 specs and did not see max amps. for output. Can it handle 1-2 amps??? If not do I need to add another transistor?
Wait - I thought you simply wanted to replace a potentiometer with an interface circuit from your D/A jobberdoothingy? Pots are really just adjustable voltage dividers, and all that the circuit I gave you will do is to output a low-current (about 1.7-2.8 mA) voltage directly porportional to the input voltage. You would use this output as a reference voltage for something inside your power supply.

No, a 741 will NOT source that much current. But you CAN use it to control something, like a transistor.

Take a look at an LM350, a 3A 1.5-33v voltage regulator IC. The datasheet is available on this page:
http://www.onsemi.com/PowerSolutions/product.do?id=LM350T

In the datasheet, see figure 23 on page 8, right middle. This circuit is set up for TTL shutdown of a 5V supply, but you could easily increase the Vout by increasing the 720 ohm resistor, and then connect the output of your 741 to the TTL input.

That's for a variable positive 3A supply - if negative, look for LM133/LM333's.

SgtWookie

Joined Jul 17, 2007
22,230
Then again, you could possibly use the op amp output to drive a 2n2222 transistor in the circuit that you want to replace the potentiometer.

The op amp gives you isolation from the circuit you want to control, and the transistor will give you more sink current than the op amp would provide.

It would help a great deal to have a schematic of the power supply that you're working on.

simf14

Joined Jul 27, 2007
43
Sarg:

Thank you so much for your time which I am positive is invaluable.

I am making my own power supply from a LM338K and can do anything with it. It can handle to needed final output Amps (0-8V,2A) easily. The basic circuit is http://www.national.com/mpf/LM/LM338.html. I would love any suggestion on how to interface the LM143 into it, or whatever else would accept the DA box isolated 0-5V 20 ma control input.

nanovate

Joined May 7, 2007
666
LM338K and can do anything with it. It can handle to needed final output Amps (0-8V,2A) easily.
I assume you will heatsink it? The TO-3 is usually around 35C/W so (Vin-Vout)*Iout = Pd means that assuming 12V Vin you could have to dissipate ~3.5W before it reaches the max Junction temp.

@SgtWookie
Although I respect the raw power and speed of the F4, I will always be partial to the F/A-18 my first. Do you miss the flightline? Whenever I go to an airshow and smell the JP5 or hear the sounds I get a little flashback. I remember 451 at Iwakuni during one of our westpacs-- they were flying the alphas then I think.

John

SgtWookie

Joined Jul 17, 2007
22,230
Well, I've attached a JPG of something I threw together in CircuitMaker Student 6.0. Note that the resistor values are arbitrary, except the 120 ohm value from the output of the LM338.

Basically, the LM741 is set up as an inverting amplifier. The gain is calculated by: - ( R2 / R1 )

The correct value for R3 is derived by: ( R1 x R2 ) / ( R1 + R2 )

Pin 6, the output of the 741, drives a PNP 2N2222 or 2222A transistor. The more positive the voltage on the base, the more the transistor conducts, placing the reference pin closer to ground, lowering the output voltage.

So, when your D/A converter output becomes more positive, the output of the 741 decreases, which decreases the voltage on the base of Q1, increasing it's resistance/impedance, thus causing the output of the voltage regulator to increase.

Clear as mud, right?

Like I've said, you'll need to fiddle with the values of resistance around the 741 to get the right -amplification.

Attachments

• 64.5 KB Views: 29

SgtWookie

Joined Jul 17, 2007
22,230
Here's the .ckt file, with a .TXT extension added. You'll need CircuitMaker 6 Student in order to be able to use it. There are links for it somewhere, or just Google it.

Note that I haven't done a SPICE simulation on it, which the program is more or less capable of doing. It's pretty slick, really.

Attachments

• 6.8 KB Views: 19

nomurphy

Joined Aug 8, 2005
567
Hey Sarge,

How do you get a positive output from an inverting amp when the input is positive? The output will try to go negative, but will hardly reach ground with only a positive supply. It will take a negative input voltage for the output to go positive.

===============================

Attached is a similar, less complicated circuit, but it requires a negative supply that should be equal to the positive op amp supply. The op amp will need to drive the 10mA or so that is set by the 120 ohm resistor on the regulator. Also, I am not showing any bypass caps that may be required.

Attachments

• 29.5 KB Views: 25

simf14

Joined Jul 27, 2007
43
Wow, no wonder the Rhinos flew for so long with guys like you looking after 'em.

I hope I have been following along. The Vs1 and Pin3 grounds are separate from the 10V ground correct? I modified the JPG to demonstrate what I am talking about. If I combine the DA converter ground and the 10V I'll blow the DA right? I can also use 12V... just modify the resistors accordingly.

Met the CO of VMFAT 101 SharpShooters last weekend at a Marine/Navy charity function. Nice guy. Did you ever meet any of those guys?

Thanks again!!!

cp out

PS NoMurphy Thanks for the input! Lets see what Sarge thinks...I can easily get a 12V+ and 12V- power supply if necessary. I have a 12V+ regulated power supply that puts out 13.8V DC. right now.

Attachments

• 55.8 KB Views: 16

SgtWookie

Joined Jul 17, 2007
22,230
Hey Sarge,

How do you get a positive output from an inverting amp when the input is positive? The output will try to go negative, but will hardly reach ground with only a positive supply. It will take a negative input voltage for the output to go positive.
Actually, it shouldn't try to go negative - it'll stay within the "rails". It would've helped a lot if I hadn't forgotten a 100k resistor that goes from pin 3 to V+
Attached is a similar, less complicated circuit, but it requires a negative supply that should be equal to the positive op amp supply. The op amp will need to drive the 10mA or so that is set by the 120 ohm resistor on the regulator. Also, I am not showing any bypass caps that may be required.
Well, I put the bypass caps in there for a reason - to prevent the oscillations that are virtually certain to occur if the output leads are more than a few inches long. And if he's working on a simulator, leads can get VERY long. The 1N4001 diodes are in there to protect the Vreg from cap discharge at power down - that's right out of the datasheet. If he fails to put in the bypass caps to start with, he might wind up destroying some very expensive equipment.

The 2n2222 is basically in there as a cheap "fuse", as it can sink 10x more current than the 741 op amp can, and little soldering to replace in case D1 shorts and to better withstand C1's discharge upon shutdown. Additionally, if the bypass caps aren't large enough, it will protect the more complicated 741 area, and provide an easy "break point" to use to troubleshoot the circuit. Yank Q1 out, and they're separate.

SgtWookie

Joined Jul 17, 2007
22,230
Wow, no wonder the Rhinos flew for so long with guys like you looking after 'em.
We had to work our asses off at it - we had a lot of "pigs" that had been ridden hard and put up wet over in Vietnam - 15 miles of wiring in those babies, and lots of places they could get frayed. I could go on for hours (and usually do, so I'll shut up about it now )

I hope I have been following along. The Vs1 and Pin3 grounds are separate from the 10V ground correct?
Nope! Ground is ground is ground! You'll have to ground one side of the circuit anyway. Well, actually - you could use one of the inputs to Pin 2, and the other to Pin 3. The op amp will pick up on the difference between the two signals.

Change the 1k resistor to ground in there on pin 3 to 100K, and add another resistor of the same value to your V+.
I modified the JPG to demonstrate what I am talking about. If I combine the DA converter ground and the 10V I'll blow the DA right? I can also use 12V... just modify the resistors accordingly.
No, the 741 has an imput resistance of 300k or higher. That's plenty of isolation.
Met the CO of VMFAT 101 SharpShooters last weekend at a Marine/Navy charity function. Nice guy. Did you ever meet any of those guys?
Cool! You in Yuma? Or is VMFAT-101 in Miramar now?

Yeah, I meet some of those guys A Captain I worked for (he was Maint Chief in '77-'79) just retired a bit ago. Deputy Commandant, Marine Aviation, LTGen. Great guy. Nickname is "Hawg" Another Marine I served with when he was a butterbar is now a General over at 1st Marine Division. We obviously had some pretty sharp zeroes in our outfit

My step-Grandpa was a pilot as well - flew F-4U Corsairs in the Pacific with VMF-215, shot down 18 Zeroes and 2 Bettys, four of those Zeros in one brief melee. Got a Navy Cross for that tour. I have two copies of it, one signed by SECNAV James Forrestal, the other temporary citation signed by Fleet Admiral Halsey.
Here's a newspaper clipping of Grandpa from the spring of '44:

Thanks again!!!

cp out

PS NoMurphy Thanks for the input! Lets see what Sarge thinks...I can easily get a 12V+ and 12V- power supply if necessary. I have a 12V+ regulated power supply that puts out 13.8V DC. right now.
Hey, if you can get a +- 12v supply, go for it! I was just trying to make do with what you said you had, plus a few parts, hopefully without letting the smoke out of anything!

SgtWookie

Joined Jul 17, 2007
22,230
OK, here's an updated schematic (attached)

Attachments

• 76.8 KB Views: 24

nanovate

Joined May 7, 2007
666
Or is VMFAT-101 in Miramar now?
Yes they moved up with the rest of the squadrons from El Toro

simf14

Joined Jul 27, 2007
43
Thank you so much Sarge, gonna try the circuit this week and come back and report to this forum my success (or failure) Friday. I am based in Aliso Viejo Ca if your ever around. My email is flightlinemail@cox.net and I can send out a small PowerPt presentation to anyone interested in the flight simulator I am building in my garage...oh and a big thank you to everyone so far for the help! What an awe inspiring story about you and your Dad.

simf14

Joined Jul 27, 2007
43
Sarge blew two of the LM741s. Whenever I applied 12v + power to Pin7 and ground to Pin4 the thing got hot...I am pretty sure that I have the pins correct and I isolated the 741 circuit for testing.

nanovate

Joined May 7, 2007
666
You might need a resistor on the base of Q1 to limit the current. The LM741 doesn't like to be operated too close to the rails. Can you put a small negative voltage on the V- pin?