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.

4-20mA & 1-5V PIC input

Status
Not open for further replies.
M

mikesmixes

Guest
I need to build a simple circuit that can connect to the A/D of a PIC. the circuit must be able to accept both 4-20mA and 1-5V. I was thinking of some sort of op-amp circuit. Any ideas?? Thanks
 
Is the 20mA referenced to ground?
0 to 20 mA will make 0-5 volts. If the PIC has 5 volt supply then 0-255 value.
0 to 5 volts will also read 0 to 255.
I bet you want something more complicated.

----*--/\/\/\----ADC in
| 10k
/
\
/ 250
\
|
----*-----------gnd
10k resistor is for input protection.
 
Thanks. I dont need something more complicated if thats going to work. And yes the 4-20mA is referenced to ground. In the past, I have used a 250ohm 0.1% resistor to convert 4-20mA to 1-5V for the ADC. However now i need to connect 1-5Vdc to the same input (should there be a voltage signal instead of a current one), so what you saying is the addition of the 10k shall protect the i/p and as a result that circuit will work?

Thanks
M
 
Sorry the “graphics” looks bad. It looked fine when I wrote it.
You could put a jumper on the board to remove the 250 ohm resistor when measuring voltage. How much power can you get from the voltage you want to measure?
The 10k resistor (or less) is there to save the PIC. What happens when some one puts 10 volts on the input?
You could put a capacitor from ADC input to ground. The 10k and cap will make a filter to remove some noise.
 
The protection is another thing, like you say, what if 10V in applied??
This device is going to be enclosed so the input circuit needs to be fixed, ie we cant use a jumper.

Is there no op-amp circuit that could be used for this aswell as protecting from overvoltage?
 
mikesmixes said:
The protection is another thing, like you say, what if 10V in applied??
This device is going to be enclosed so the input circuit needs to be fixed, ie we cant use a jumper.

Is there no op-amp circuit that could be used for this aswell as protecting from overvoltage?

hi,
Whats the output impedance of the 1V to 5V sensor, that is, what minimum load resistance is specified.?
Also whats the sensor power supply voltage operating range?

Are you working on pressure sensors [depth]?
 
In the 20mA mode there is a 250 ohm resistor.
In the measure voltage mode: Can the voltage you want to measure drive 250 ohms? OR In voltage mode must the input resistance be 10Mohms?
If you must have 250 ohms some times and high impedance other times why not have the PIC switch on/out the 250 ohms resistor. I am thinking about a very small MOSFET. Gate to output pin on PIC. Source to GND. Drain to 250 ohm resistor.
MOSFET=20 to 50 volts, logic-level, 5-10 ohms when closed, 200-1000ma
 
Output

mikesmixes said:
I need to build a simple circuit that can connect to the A/D of a PIC. the circuit must be able to accept both 4-20mA and 1-5V. I was thinking of some sort of op-amp circuit. Any ideas?? Thanks

Hi, this is my area of iterest. i've got a related question.

How are going to reproduce this input on the output side ? on LCD or may be on 7-segments ? can i have the program part related to the output ( that will accept A/D input and give the mentioned output )

thanks
 
hi,
Are you asking how to read the PIC's ADC input and display the result on a
LCD/LED display, if so we need to know more about the application.

Which PIC are you using, which assembler, what are the are the ADC input voltages etc...... whats the project?
 
Sorry for diverting the subject

ericgibbs said:
hi,
Are you asking how to read the PIC's ADC input and display the result on a
LCD/LED display, if so we need to know more about the application.

Which PIC are you using, which assembler, what are the are the ADC input voltages etc...... whats the project?
YES thats my question ( How to read the ADC input ) and as i discussed this somewhere in this forum, it is just a panel meter wich will recive 4 to 20 ma ( Or 1 to 5v using 250:eek:hm: ) and read the output as percentage from 0 to 100 % on an LCD or two 7-segments LED. and i am using 16F876.
Thanks


Sorry to the thread starter Miksmixes for diverting the subject i hope he shared me the interst.:eek:
 
Last edited:
hi,
Have you looked thru these tutorials of Nigel's



They are a good start off point.
 
yes

ericgibbs said:
hi,
Have you looked thru these tutorials of Nigel's



They are a good start off point.

Hi,
yes i've printed out most of them but read some of them, so which one answers my requests? :confused:

thanks
 
aljamri said:
Hi,
yes i've printed out most of them but read some of them, so which one answers my requests? :confused:

thanks

hi,
>>> YES thats my question ( How to read the ADC input )

This one:

It covers the ADC section.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top