Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

0-10V, 4-20mA conversion to 0-5V

Status
Not open for further replies.
hi ericgibbs,

I need to convert PWM pulses into 0 to 10V linear analog output.

Spec:
PWM Amplitude : 5V
PWM frequency : 100hz to 1khz

thank you
dhanash
 
hi d,
Look at the link posted in post #43, by MikeMl
E
 
hi ericgibbs,

I saw the post #43. i have some doubts as follows,

1.What type opamp used?
2.What will be the output current for 0 to 10v?
3.Is it possible linear output voltage from 0v to 10v corresponds to 0% to 100% PWM dutycycle?

thank you,
dhanash.
 
hi.

1.What type opamp used?
A good specification, single supply OPA, with a power supply voltage of at least 12Volts
Which types of OPA's do you have available.?

2.What will be the output current for 0 to 10v?
A typical OPA would be in the order of 15mA to 20mA max.
How much current do you want.?

3.Is it possible linear output voltage from 0v to 10v corresponds to 0% to 100% PWM dutycycle?
Yes..

E
 
Hi ericgibbs,

1. I am using LM358N op amp. Please suggest me what type of op amp should i use?
2. I need 500mA or 1 amps for 0 to 10v output. This is going to be connect to other product as reference voltage. In order to eliminate voltage drop, i have to increase the current rating.

Thank you

dhanash
 
hi,
Use a modified version of the post #33 circuit as posted by MikeMl.
Checkout the OP162 dual OPA.

You say a 0v to 10v signal for Vout, so remove the 5v Offset and increase the overall gain.
This will give you a Vout of 0v thru 10v at approx 10mA max.

The low current Vout 0v thru 10v DC signal will have to drive a DC coupled amplifier capable of driving a 10R load, you are asking for 10Vdc at 1Amp .

I would suggest you look at the option of using an off the shelf, DC coupled audio amp IC, capable of say least 20Watts into 10R, it will require a dual +/-12V supply.

E
 
I have a similar question for gaining full resolution when the measured voltage differential is less then 5v.

Such as Arduino input with an external voltage that only varies between 3 and 3.65v
Digital resolution below 3v and between 3.65 and 5v is lost.

The only solution I could come up with for such problem, would be to amplify the input voltage for a variation of 5v, and compare the lowest voltage to a reference in order to start output from zero volts.

Is there a low voltage solution?
 
Last edited:
I have a similar question for gaining full resolution when the measured voltage differential is less then 5v.

Such as Arduino input with an external voltage that only varies between 3 and 3.65v
Digital resolution below 3v and between 3.65 and 5v is lost.

The only solution I could come up with for such problem, would be to amplify the input voltage for a variation of 5v, and compare the lowest voltage to a reference in order to start output from zero volts.

Is there a low voltage solution?

You can make an opamp based pre-amplifier that has independently adjustable gain and independently adjustable offset. ADs such as inside an Arduino are ratiometric with respect to their own internal reference (the Vdd rail inside the Arduino). To make the offset of the pre-amp track variations in the Arduino's Vdd, the Arduino's reference must be used to derive the pre-amp's offset.

The internet is full of circuits that do this the wrong way! The worst thing to do is to introduce yet another reference into this mix.
 
Last edited:
I like the idea of independent op-amp with on chip reference, as it can be readjusted for different sensors or applications.
the Arduino's reference must be used to derive the pre-amp's offset.
The biasing circuit should provide its own reference on the same IC for thermal compensation or tracking.

Noticed all the forums have members obsessed with the right to know what everything does.
It should be the posters question, but often the poster gets interrogated by a ridiculous number of Administrators or leaches chasing ideas.
My introduction to the Electronic Forums. LOL
 
I like the idea of independent op-amp with on chip reference, as it can be readjusted for different sensors or applications.
Only if that reference is also used as the reference for the AD. In the case of an Arduino, an external reference is not possible, so the Arduino reference (Vdd pin) must be used as the reference to establish the offset in the preamp. If you use two independent references, they will not track each other...

The biasing circuit should provide its own reference on the same IC for thermal compensation or tracking.
No, for the reason stated.

Noticed all the forums have members obsessed with the right to know what everything does.
It should be the posters question, but often the poster gets interrogated by a ridiculous number of Administrators or leaches chasing ideas.
My introduction to the Electronic Forums. LOL
What does this have to do with the topic being discussed? If you think know the answer before you post a question, why post?
 
I have a similar question for gaining full resolution when the measured voltage differential is less then 5v.

Such as Arduino input with an external voltage that only varies between 3 and 3.65v
Digital resolution below 3v and between 3.65 and 5v is lost.

The only solution I could come up with for such problem, would be to amplify the input voltage for a variation of 5v, and compare the lowest voltage to a reference in order to start output from zero volts.

Is there a low voltage solution?

This can be done with a single, low-voltage, rail-to-rail opamp. You need a gain of (3.65-3.00)/5.00 = 7.69. I was lazy, so I did the math to only 3 sig figures.

Note how I correctly employed the Arduino's AD reference to create the offset. In the second version, V3 and R3, R4 is the Thevenin equivalent of V2 and R1.

D34.png
 
This can be done with a single, low-voltage, rail-to-rail opamp. You need a gain of (3.65-3.00)/5.00 = 7.69. I was lazy, so I did the math to only 3 sig figures.

Note how I correctly employed the Arduino's AD reference to create the offset. In the second version, V3 and R3, R4 is the Thevenin equivalent of V2 and R1.

Hi Mike,

Very appreciative.

I have been studying multiple fields, at the expense of missing a few basic details.
My knowledge of Arduino is down to ten minutes reading.

What I didn't pick up on was that a set AREF voltage is divided into 1024, as the default 5v would be.
If I have understood this correctly, it seems to negate any point of lifting the "High" input level to 5v.
Pretty sure I am still missing something here.

Great work with the op-amps, I see in the first example the bias input is feed with 3.45v.
Is this set by Arduino or from an external source.

What influence would chosen op-amp have on accuracy,
Any suggestion for a common economical op-amp to do this task?

Time to reevaluate, given I was not aware of the Arduino functions.
 
Last edited:
3.45V is the voltage that when subtracted from the input range causes the output to span 0V to 5V. It is based solely on what works with the amplifier configuration shown on the left. The circuit on the right was derived from the one on the left so that the offset could be obtained from the 5V reference from the Arduino's AD. Notice that no other reference is required...

TI, Analog, Linear, Microchip all have suitable rail-to-rail amplifiers.
 
3.45V is the voltage that when subtracted from the input range causes the output to span 0V to 5V. It is based solely on what works with the amplifier configuration shown on the left. The circuit on the right was derived from the one on the left so that the offset could be obtained from the 5V reference from the Arduino's AD. Notice that no other reference is required...

Thanks for confirming this, I am still reading up on things.
Discussion of where I am at:
Arduino Micro comes with onboard 5v regulator.
So we power Arduino with 9v battery as opposed to 5v USB cable.
Arduino 5v reference is internal, not the 5v regulated supply that runs IC?

What Arduino pin do you use for op-amp 5v reference?
 
In more capable microprocessors, they usually have a pin which can be used for an external reference for the AD, or to make the internal reference accessible external to the microprocessor. In the case of the chip used in the Arduino Uno and mini, the reference for the AD is the Vdd pin, which is fed from the on-board regulator. That is why I derived the 3.45V reference ratiometrically from the Arduino's Vdd pin.
 
In more capable microprocessors, they usually have a pin which can be used for an external reference for the AD, or to make the internal reference accessible external to the microprocessor. In the case of the chip used in the Arduino Uno and mini, the reference for the AD is the Vdd pin, which is fed from the on-board regulator. That is why I derived the 3.45V reference ratiometrically from the Arduino's Vdd pin.

Learning everything as I go, so many mistakes along the way.

Just talking out loud, for the sake of conversation.
When designing a circuit for this function, an external references accuracy would need to be compared to Arduino Micro on-board regulator.
In this context it leaves the question if the TSM102A IC with 0.4% reference precision,
would be more accurate for the job.

Further choice, there is:
LM611 adj. 1.2 - 6.3v
±0.6% reference precision.

TSM103W 2.5v fixed
±0.4% OR ±0.7% reference precision.

NCP4300A 2.6v fixed
±0.5% reference precision.

LTC1541 1.2v fixed
±0.4% reference precision.
 
Last edited:
hi G,
This link explains the detail of Arduino AREF.
While it is possible to adjust the AREF to give 1024 ADC increments over a measured Analog input voltage which is less than Vdd.
The circuit posted by Mike, is the one I would use, especially in your case for removing the 3v Offset and spanning the +0.65 signal to 0v thru +5v

https://www.arduino.cc/en/Reference/analogReference

E
 
In more capable microprocessors, they usually have a pin which can be used for an external reference for the AD, or to make the internal reference accessible external to the microprocessor. In the case of the chip used in the Arduino Uno and mini, the reference for the AD is the Vdd pin, which is fed from the on-board regulator. That is why I derived the 3.45V reference ratiometrically from the Arduino's Vdd pin.

Arduino MICRO Schematic
https://www.arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
+5v REG NCP1117-5
https://www.onsemi.com/pub/Collateral/NCP1117-D.PDF

The NCP1117 series contains nine fixed output voltages of 1.5 V,
1.8 V, 1.9 V, 2.0 V, 2.5 V, 2.85 V, 3.3 V, 5.0 V, and 12 V

2lwaaoh.jpg


Is load regulation accuracy in mV.
How do you make a comparison between the NCP1117 regulator accuracy against IC like TSM102A with 0.4% reference precision?
 
I have never done it, but it looks like you could use an external reference of your choice, use it to produce the offset in the preamp, and then also use it inside the Atmega32 for the A/D by setting it up for an external reference. In that case, the choice of actual Vref is dictated by what the Atmega wants.
 
I have never done it, but it looks like you could use an external reference of your choice, use it to produce the offset in the preamp, and then also use it inside the Atmega32 for the A/D by setting it up for an external reference. In that case, the choice of actual Vref is dictated by what the Atmega wants.

Definitely worth investigation, just looking at reference for op-amp offset at this stage.
I have been looking at the accuracy for price of voltage reference IC.

LM4030 - $1.88
https://www.ti.com/lit/ds/symlink/lm4030.pdf
Accuracy 0.05%
Voltage Options 2.5V, 4.096V

LT1027 - $12.67
https://www.farnell.com/datasheets/1639138.pdf
Output Voltage = Min 4.9990v, Typ 5.000v, Max 5.0010v
Intended for use in 12- to 16-bit A-to-D and D-to-A systems.


LM4030 - at $1.88 seems like a reasonable option.
LT1027 - at $12.67 is a bit rich for me.

Please add any reference IC with good accuracy for $.

Cheers
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top