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 or 4-20mA to 0-5V convertion

Status
Not open for further replies.

Gaby

New Member
Hi all,

I am making a microcontroller circuit that measure the in a fuel tank.
The problem is that the pressure sensor outputs 0-10 Volts, and my microcontroller (PIC18) has analog inputs that takes 0-5 Volts only.
Is there a way better that voltage divider to make this conversion?
and if the voltage divider is the answer, what is the best values for the two resistors ?
if my input is 4-20mA, how to convert it into 0-5v ?

Thank you in advance
Best Regards;
 
4~20mA conversion is the easiest in my view... A low PPM 250 ohm resistor across the input pin gives 5v at 20mA.. BUT!! at 4mA you will get around 1 volt.... So a software conversion is necessary..

The voltage divider also is an easy option... Two 1k ~ 5k resistors should suffice...
 
A transistor is a better option IMHO. Just sayin'. ;)

In the diagram below, size Rb for a value which provides the best response from the sensor. You can also use lower values for Rc (such as 470R) as well.

**broken link removed**
 
Last edited:
Nope, the resistor at the measuring end is the right option for 4-20 mA or 0-20 mA. 249 or 250 ohms. You get 1 to 5V or 0-5V. You also get less of a quantization error when you use 1 to 5 and you know if the sensor is disconnected, With current the length of the wire doesn't matter, Current mode also eliminates ground loops.

Ins and outs are mixed up here.

I think you want to convert 0-10 V to 4-20 mA or 0-20 mA. Those conditioners are commercially available. 4-20 mA is usually better. The conversion to current needs to be done near the sensor.
 
A transistor is a better option IMHO. Just sayin'. ;)

In the diagram below, size Rb for a value which provides the best response from the sensor. You can also use lower values for Rc (such as 470R) as well.

**broken link removed**
There are a few issues with the transistor circuit. It will not read until the input voltage has got to to about 0.6 V. Also the output is very dependent on the gain of the transistor. The gain is not constant, as it varies with temperature and current, and there is a large variation between transistors, so at best you would have a circuit that needs Rb to be adjusted for each transistor.

You would be far better to use a 4-20 mA transducer and a 250 Ω resistor to convert the current into 1 - 5 V.

It is also a good idea to put a resistor / capacitor network between the 1 - 5 V input and your microcontroller. The resistor will help to protect your microcontroller if the the voltage does exceed 5 V, and noise will be filtered by the capacitor.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top