Hi Ericgibbs,
1. For previous post , PWM pulse amplitude is about 2v and frequency will be 0 to 15khz.
2. Now, I want to convert 0 to 5v to linear PWM pulses (voltage to frequency conversion) then PWM pulses to 0 to 5v (frequency to voltage conversion) .
The LM358 is a very crappy opamp. Making your own differential amp vs buying an instrumentation amp requires >0.1% matching of R1 to R3 and matching R2 to R4. The common-mode range of the circuit above is very limited (always above gnd)
Hi, the following image explains my doubt about the previous question.
I have seen in several forums that use the second solution (using a LM358). If the result is identical than the first solution, why a lot offer the second solution?
Hi, the following image explains my doubt about the previous question.
I have seen in several forums that use the second solution (using a LM358). If the result is identical than the first solution, why a lot offer the second solution?
There is a gross error in the diagram to the right, above. IN+0 should not be grounded, but left floating. If it is, then connecting R5 in-series with the 4-20mA loop allows the loop to be "floating" w-r-t-gnd. Without the ground, then you need the differential amplifier and the intrinsic common-mode range of the diff amp eliminates the common-mode noise that might exist between the loop and the microprocessor's AD input.
The left circuit, above, has no common-mode noise suppression at all, and imposes the requirement that the loop be grounded to the microprocessor power supply, which obviates all of the advantages of using a 4-20mA loop.
There is less of a problem with ground loops occuring with your second circuit. It really does depend on where you put the resistor.
One easy way to avoid some of the mess is to use pseudo differential voltage inputs for reading the output of some instrument and an isolated current source for the voltage input.
I had an application that i didn't follow through (wasn't allowed to fix it). The devices (6 Mass Flow Controllers) were powered by a +-15 V supply and a +5V supply.
The setpoint was a potentiometer (effectively isolated), the return was at the MFC for each unit. Trying to add control (0-5 V out), ended up with a really bad ground loop.
So, the powers that be, bought a solution (one was already used) and reduced the amount of controlled controller from 10 to 8. So, I missed the ground loop issue, when trying to convert a home made controller to both manual and computer control.
I would use the right-hand option without jumper W1 in place.. The sensor power supply common will be tied to Arduino GND. The 4-20mA loop will be returned to the sensor-end of the sensor's power supply common. I would use an integrated instrumentation amp like a INA122 instead of a LM358, thereby eliminating the need to precisely match resistors.
hi ct,
The simple left hand side circuit will work OK.
Most current loop cabling is screened overall, so ensure that the earthing on the screen and low side signal wire is correct at the 250R.
It is common practice to have the 250R, 1V thru 5Vout conditioned by a OPA in order to remove the 1V offset and then set the Span so that 4mA is 0V and 20mA is say 5V. Any noise filtering is also included in this OPA's circuitry