Author Topic: 4-20mA to 0-18V Converter Help!  (Read 3736 times)

0 Members and 1 Guest are viewing this topic.

Offline SurdykajTopic starter

  • Newbie
  • Posts: 2
  • Country: us
4-20mA to 0-18V Converter Help!
« on: July 23, 2015, 01:55:21 pm »
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!
 

Offline ehilarioc

  • Contributor
  • Posts: 17
  • Country: pe
Re: 4-20mA to 0-18V Converter Help!
« Reply #1 on: July 23, 2015, 03:33:39 pm »
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.

 

Offline SurdykajTopic starter

  • Newbie
  • Posts: 2
  • Country: us
Re: 4-20mA to 0-18V Converter Help!
« Reply #2 on: July 23, 2015, 04:42:45 pm »
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
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: 4-20mA to 0-18V Converter Help!
« Reply #3 on: July 23, 2015, 05:04:26 pm »
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:
Quote
5V. This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.

You 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.
« Last Edit: July 23, 2015, 05:09:05 pm by alsetalokin4017 »
The easiest person to fool is yourself. -- Richard Feynman
 

Offline oldway

  • Super Contributor
  • ***
  • !
  • Posts: 2172
Re: 4-20mA to 0-18V Converter Help!
« Reply #4 on: July 23, 2015, 06:37:58 pm »
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.
 

Offline commie

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: gb
Re: 4-20mA to 0-18V Converter Help!
« Reply #5 on: July 23, 2015, 09:52:04 pm »
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.
Good post :-+
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->