Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

generating analog outputs with microcontroller

Status
Not open for further replies.

solace76

Newbie level 4
Newbie level 4
Joined
Jul 18, 2005
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,344
Hello friends,
I want to generate a 4-20mA or 0-20ma outputs using a microcontroller, I have tried using the on chip 10bit PWM generator of the PIC16F72 and was getting a 1khz PWM wave, however how do I get a current output from this. Any ideas, or any other way of going about his circuit.

Best Regards,
Solace76
 

The priciple of this operation will be like this: your microcontroller will generate a voltage, say, in the 0-5V range, using a PWM or DAC, and this voltage will be used by an external circuit, based on an opamp, to convert 0-5v to 0(4)-20mA.
Have a look at this current source:
http://www.discovercircuits.com/PDF-FILES/NewPDF/CURRENTSOURCE1.pdf
Instead of a potentiometer you will be feeding this opamp (can be any other type, 358 will do ..) from the PWM ..
Regards,
IanP
 

    solace76

    Points: 2
    Helpful Answer Positive Rating
The PWM output can be converted to a DC voltage by it running through a low pass filter. A simple RC filter should suffice if you don't need fast response. There are many ICs available that will convert a voltage to a 4-20 mA output. An example is the Analog Devices AD693. The DC input would have to be scaled to match the voltage input range requirements of the IC.
Regards,
Kral
 

thank you for your replies, the circuit shown from the discover circuits site shows a 12 V supply connected to the transistor and op-amp, cant I use a 5V supply and do the same since I have only a single supply circuit. I can use a rail to rail op-amp though.
Secondly I prefer not to use any of Analog Devices IC's as they are quite expensive out here.
Thanks anyway,
Regards,
Solace76
 

As opamp you can use LM741 or CA3140, both will work correctly at 5V supply. Other option is LM358 (dual). This IC can be supplied of almost 3V..
In this application you don't need expensive stuff from AD. Any general usage opamp capable of working in low-volt conditions can do the job.
Now, as far as 5V supply is concerned, it can be to low to operate at 20mA end, as usually one uses 250Ω termination resistor to achieve, for example, 5V for AD conversion, and that leaves no margin at all. The lowest voltage used in such a circuit should go up to at least 8V..
Regards,
IanP
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top