4-20mA to 0-18V Converter Help! - Page 1
Forum section: electronics / projects

author: Surdykaj
author_rank: Newbie
timestamp: July 23, 2015, 01:55:21 pm
content: Disclaimer: I'm by no means an electronics engineer, but do dabble in it from time to time; although not enough to even consider myself a hobbyist.I am at a company right now and am designing a custom test rig to simulate very large machine PLC controls. Part of the design is to use a small DC motor to simulate the operation of the real AC motor used on the machine. Attempting to keep the cost as low as possible, I decided to spin my own, customized, bare bones circuit to create the operation that I need.I am attempting to use a 4-20mA signal from the PLC to control the DC motor voltage level from ~0 to 18V, corresponding to a minimum RPM used for jog speed, and a maximum RPM used for run speed. The full load current of the motor is 1.5A. I have sketched up this circuit but do not have the parts to test it and would like to receive input before I do purchase parts as again I am not an electronics engineer and if I'm missing or not doing something that is critical, I'd like to be able to adjust before.I attempted to simulate it with discrete components in MultiSim and found that the final output buffer had a minimum output voltage of 3.14 V. Without knowing a better way to level shift that for a low cost, I decided to whack in a high forward voltage drop diode to null the minimum voltage to effectively zero. I can already here Dave, and probably others screaming bloody murder! Although if there is a better more efficient, and effective way to null this voltage please say so!Thanks if you got this far and I appreciate any help ahead of time.Sincerely, struggling controls engineer!

author: ehilarioc
author_rank: Contributor
timestamp: July 23, 2015, 03:33:39 pm
content: To control the speed of the motor I'd use a H bridge and a pwm controller, with that you can control speed and direction of the motor.After that being said, A digital solution would be a lot easier.use a 250 ohm resistor to turn the 4-20mA into 1-5V (or modify the resistor for a lower voltage if needed) and read it with an ADC of a microcontroller (atmega, pic,etc). Then, use the read value to modifiy the duty cycle of a pwm signal that you can use to drive a H bridge for the motor.A full analog solution is a little more complicated.you need a circuit that converts 4-20mA into 0-5v (or other value), a sawtooth oscillator and a comparator to make a pwm signal, and finally the H bridge.The 4-20mA to 0-5V is simple, just with an opamp and a some resistors you can do that, there are plenty circuits on the web. Then you feed the comparator with the voltage signal and the oscillator output to get a pwm signal that controls the H bridge.

author: Surdykaj
author_rank: Newbie
timestamp: July 23, 2015, 04:42:45 pm
content: Ehilarioc,First thank you for your suggestion, that was actually my first idea before i did anything but did not want to get involved with configuring, programming, etc, of the MCU because I have absolutely no experience with raw chips and how to set them up.You are right as this is the easiest way so I decided just to purchase an Arduino Uno and use that as its already got all the peripherals and what not. I've attached an updated schematic so you can see.Thanks a lot!Alex

author: alsetalokin4017
author_rank: Super Contributor
timestamp: July 23, 2015, 05:04:26 pm
content: The Arduino "5V" power pin is actually supposed to be an output pin, that is designed to supply external circuitry with power _from_ the built-in 5VDC regulator on the Arduino board. I think you should be powering the Arduino itself with the 12 volt output of your 7812 VR, to the "Vin" pin on the Arduino board, or directly to the "Vraw" center pin of the power connector on the Arduino board.From the official Arduino website:QuoteYou can also find "motor controller shields" that will drive motors using H-bridge controllers, handling everything in your schematic that is to the right of the Arduino itself. The shields just plug right onto the Arduino itself and have higher-current outputs to drive motors from a separate supply than what the Arduino itself is using.

author: oldway
author_rank: Super Contributor
timestamp: July 23, 2015, 06:37:58 pm
content: This small DC motor has to work 4 quadrants or not ?If not, with 1.5A max load and 18V max, It is possible to make a linear drive, far more easy.Using a 24V power supply, max dissipation would be 36W...Still possible.

author: commie
author_rank: Frequent Contributor
timestamp: July 23, 2015, 09:52:04 pm
content: Quote from: ehilarioc on July 23, 2015, 03:33:39 pmGood post