SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
#167458
sorry i didn't make myself clear.Previously i was using current transformer having a resistor parallel connected. The current is supplied from a 230/12v transformer (not the current transformer) and the output of the transformer is going through the current transformer's hole to measure the current.

Currently i am using function generator replacing the current transformer for testing purpose. I directly supply voltage from the function gen to the input connecting the 1.5kohms. the circuit im using is still this: https://forum.sparkfun.com/viewtopic.ph ... 15#p129154.

when the function gen supply 1vpp the output of the op amp is 3.10vdc. when its 5vpp the output is 3.97vdc.

The end product will be monitoring home appliance plugged into the socket outlet but the transmitter (4-20mA) required it to be dc voltage. I read online the best way to have 4-20mA is to have 1-5vdc and using a 250ohms resistor.

Thank you!
By jremington
#167459
the circuit im using is still this: viewtopic.php?f=14&t=28775&start=15#p129154.
The gain of that circuit is about 62/1.5 or about 40. So, when you apply 1 V (peak) AC to the input, the output should be 40 VDC. That is clearly impossible. However, if you provide 50 millivolts peak, you should get about 2 VDC output.

Again, how are you powering this circuit?

You can use a +/- 10 V split power supply to avoid problems with saturating at less than 5V output. Be sure to connect the power supply common terminal (0V)to the op amp circuit ground.
By Mee_n_Mac
#167461
If the OP sticks with a burden resistor of 100ohms, then for a 5A RMS max current he'll get 0.0958*5A RMS*1.414 pk/RMS = 0.677v pk CT output. Ideally this would then make 5v DC at the circuit output (which is not = the op-amp output). This means R1 should be 9.0k - 9.2k, not 1.5k ... given a wider than +5v and -5v supply or a rail-to-rail op-amp.
By DCward
#167465
Im back to test on the current transformer. The only change to the circuit is the 63kohms is replaced with 100kohms and the 1.5kohms is replaced by 1800ohms. By putting a 560ohms resistor parallel with the CT, the voltage across the resistor is 2.4v to 2.7vac at 5-5.2A (AC). Is this normal to be unstable since they is no physical connection to the current transformer, only a wire from the 230/12v transformer is going through the hole of the CT to measure the current. The output of the circuit is now around 5vdc. Why the function gen at 3v supply only give the output at 3.5vdc?

I'm not sure if it is correct, to calculate the voltage of the burden resistor I have to divide the 5A primary current by 1000 since the CT is ratio of 1:1000. So 5/1000= 0.005 and the burden resistor is 560ohms so to calculate the voltage of the burden, i use V=IR.
0.005 x 560= 2.85VAC ?

to calculate the circuit output: the gain is 100k/1800=55, and the input voltage (burden resistor) is 2.85VAC so 2.85x55? that will be very high output dc voltage but the actual test circuit output is 5vdc
By Mee_n_Mac
#167469
When you say "vac" I don't know what you mean, volts peak, volts peak-peak or volts RMS. We know it'll be AC not DC.

With regard to the circuit values, the gain (I'll stick w/gain = R2/R1 for the moment even if that's not quite right) of the original circuit was too high for the expected CT output. I made a mistake above and said R1 should be ~9k, it should be more like 4k if the CT behaves as mentioned. See the plot below and notice the huge "ripple" when the input is too large or the "gain" too big for that input.
(click on to open)
precision_rect_1.jpg
Now see the sim results w/R2 = 100k and the gain reduced, given the expected max signal (burden = 100 ohms).
(click on to open)
precision_rect_2.jpg
Lastly I would say you can increase the burden and get more voltage from the CT but at some point you'll saturate the transformer and the output won't be linear for higher currents. You can test this by using different burdens and ramping the measured current from 0.1 A RMS to 5.0 A RMS for each burden. At some point you may see you don't get the expected voltage at the higher currents. Be watchful for the power dissipated in the burden. Pick your burden then set the gain of the op-amp circuit accordingly.
You do not have the required permissions to view the files attached to this post.
#167539
Sorry, the input voltage is volts peak-peak. Thanks to you guys i now understand a lot more compared with few days ago.
Few more question, I put across a 250ohms resistor at the circuit output thinking that using ohms law, the current output will be 4-20ohms with 1-5vdc output, but the actual current output is very small, around 4mA at 5vdc which is also when the input current is at 5A. But a 50ohms resistor give out 20mA at 5V which is also when the input current is 5A. why is this happening?

The measured voltage across the resistor is 0.9V and the measured pin 1 (output) is 0.95V. The voltage actually drop to so low from 5v?

Thank you!
By jremington
#167541
I put across a 250ohms resistor at the circuit output
I have no idea what you mean by this. You should just measure a voltage at the circuit output, using a high impedance voltmeter. That voltage will be some linear function of the current in the primary circuit of the CT.

If you want to change the precision rectifier gain, you need to change the resistor ratio, as has already been described.
By Mee_n_Mac
#167542
What device is intended to be driven by the circuit ? This was replaced with a 250 ohm resistor, at the circuit output (as shown below), where you also measured 5v ? I suspect you assumed the 5v, based on prior measurements. Also ... how did you arrive at 4 mA ?
(click to open)
precision_rect_ckt.jpg
What I found out was that the output is very sensitive to loading. Here's the output with a 25k, nevermind a 250 ohm, resistor (as shown above).
(click to open)
precision_rect_2_loaded.jpg
So adding another op-amp (they usually come as a dual or a quad anyway) as a unity gain buffer is one way to solve that problem.
(click to open)
precision_rect_ckt_mod.jpg
So forgetting the above fix, what did you end up with for a CT burden and op-amp design ?
You do not have the required permissions to view the files attached to this post.
By Mee_n_Mac
#167543
DCward wrote: The measured voltage across the resistor is 0.9V and the measured pin 1 (output) is 0.95V. The voltage actually drop to so low from 5v?

Thank you!
That's the output the simulation shows as well. I'm a bit surprised but for half a cycle the output is NOT driven (hard) through diode D2, and 250 ohms is a lot smaller than 100k, setting up a pretty fierce voltage divider.
By DCward
#167548
jremington wrote:
I put across a 250ohms resistor at the circuit output
I have no idea what you mean by this. You should just measure a voltage at the circuit output, using a high impedance voltmeter. That voltage will be some linear function of the current in the primary circuit of the CT.

If you want to change the precision rectifier gain, you need to change the resistor ratio, as has already been described.
Sorry i am not clear with myself, the measured output is 5vdc with there is no resistor connected to the output. but when a 250ohms is connected to the output is voltage across the 250 resistor is around 1.65vdc and the voltage at the output pin 1 is around 1.65vdc too. I am expecting the output current to be 0-20mA if i put across a 250ohms resistor but the actual output current is only 0-4mA.
Mee_n_Mac wrote:What device is intended to be driven by the circuit ? This was replaced with a 250 ohm resistor, at the circuit output (as shown below), where you also measured 5v ? I suspect you assumed the 5v, based on prior measurements. Also ... how did you arrive at 4 mA ?
I am trying get 4-20mA for a transmitter. The transmitter is able to detect range between 4-20mA and im using it to sense if there is any load connected/ over current to the socket outlet. The 5vdc measurement is measured from the circuit output with respect to ground. The 4mA is measured series with the 250ohms. The burden of the CT is now 4.7kohms, measured voltage across the 4.7kohms is 5.10vpp when the primary current is 5A. The op amp design is same as what u created but the 4kohms resistor is changed to 1.8kohms resistor and the op amp used is LM324.

I will try the unity gain buffer circuit asap when im back to lab. LM324 is able to do it right? i read that its a quad op amp
By Mee_n_Mac
#167566
DCward wrote:. The op amp design is same as what u created but the 4kohms resistor is changed to 1.8kohms resistor
Why ? With the CT output as large as it is, the gain needs to be less, not more. You're undoubtedly driving the op-amp into saturation (supplies are +/-5v ?). Add the buffer and the 250 ohms. Verify you're getting 20 mA and ~5v output w/the 5A input to the CT. Then reduce that input to 2.5A. See what the output is. Then go back and read this ...
https://forum.sparkfun.com/viewtopic.ph ... 66#p167469
By DCward
#167570
Mee_n_Mac wrote:
DCward wrote:. The op amp design is same as what u created but the 4kohms resistor is changed to 1.8kohms resistor
Why ? With the CT output as large as it is, the gain needs to be less, not more. You're undoubtedly driving the op-amp into saturation (supplies are +/-5v ?). Add the buffer and the 250 ohms. Verify you're getting 20 mA and ~5v output w/the 5A input to the CT. Then reduce that input to 2.5A. See what the output is. Then go back and read this ...
https://forum.sparkfun.com/viewtopic.ph ... 66#p167469
Just tried the buffer tried with both 1.8k and 4kohms resistor using LM324 and the output voltage without any at the output resistor is 1.5vdc, but probably it is the circuit connection. I was in a rush as the lab is closing. I read about the high ripple when the gain is very high but when i change it to 4kohms, the output became 3.9vdc. I will re verify again replacing the 1.8k to 4kohms.

edit: O NO found out that lab is close today. going to wait for next week again which is sad
By Mee_n_Mac
#167606
DCward wrote:I read about the high ripple when the gain is very high but when i change it to 4kohms, the output became 3.9vdc. I will re verify again replacing the 1.8k to 4kohms.
If your supply voltages are +/-5v, then you're lucky to get 3.9v. As noted before the LM324 is not a "rail-to-rail" type op-amp. That's why I used +/-7v in my simulations w/a similar op-amp.
By DCward
#167786
Just reconnect the unity gain buffer circuit, the value of the resistor, capacitor is the same as the what Mee_n_Mac drew.
at 5v supply to the circuit, using the 100ohms burden, the circuit output is 1.2vdc and at 4.5kohms, the circuit output is 1.07vdc(smaller)? when the supply is around 9.2v to the circuit, using the 100 ohms burden, the circuit output is 4.90vdc and when the burden is 4.5kohms the circuit output is 5.20vdc.

For the circuit output current, with 250ohms resistor connecting the output, both 100ohms and 4.5kohms burden give around 10mA. When the 250ohms resistor changed to 50ohms resistor, the output current is is 23mA for 100ohms burden and 25mA for 4.5kohms burden. The supply voltage to the circuit requires around 9v to reach 20mA, is this normal?
Last edited by DCward on Mon Jan 27, 2014 11:37 pm, edited 1 time in total.