Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 6th September 2007, 02:13 PM   (permalink)
mikesmixes
Default 4-20mA & 1-5V PIC input

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
 
Old 6th September 2007, 02:41 PM   (permalink)
Default

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.
ronsimpson is offline  
Old 6th September 2007, 02:59 PM   (permalink)
mikesmixes
Default

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
 
Old 6th September 2007, 03:08 PM   (permalink)
Default

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.
ronsimpson is offline  
Old 6th September 2007, 03:19 PM   (permalink)
mikesmixes
Default

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?
 
Old 6th September 2007, 03:42 PM   (permalink)
Default

Quote:
Originally Posted by mikesmixes
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]?
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now  
Old 6th September 2007, 03:43 PM   (permalink)
Default

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
ronsimpson is offline  
Old 12th September 2007, 04:21 PM   (permalink)
Default Output

Quote:
Originally Posted by mikesmixes
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
__________________
Its what your friend in Your mind, what you in your friends mind
aljamri is offline  
Old 12th September 2007, 05:42 PM   (permalink)
Default

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?
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now  
Old 12th September 2007, 07:22 PM   (permalink)
Default Sorry for diverting the subject

Quote:
Originally Posted by ericgibbs
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 250hm: ) 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.
__________________
Its what your friend in Your mind, what you in your friends mind

Last edited by aljamri; 12th September 2007 at 07:26 PM.
aljamri is offline  
Old 12th September 2007, 07:27 PM   (permalink)
Default

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

http://www.winpicprog.co.uk/

They are a good start off point.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now  
Old 13th September 2007, 02:16 PM   (permalink)
Default yes

Quote:
Originally Posted by ericgibbs
hi,
Have you looked thru these tutorials of Nigel's

http://www.winpicprog.co.uk/

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?

thanks
__________________
Its what your friend in Your mind, what you in your friends mind
aljamri is offline  
Old 13th September 2007, 02:24 PM   (permalink)
Default

Quote:
Originally Posted by aljamri
Hi,
yes i've printed out most of them but read some of them, so which one answers my requests?

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

This one: http://www.winpicprog.co.uk/pic_tutorial11.htm

It covers the ADC section.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
Using Oscilloscopes mechie Electronic Theory 9 29th November 2007 10:49 PM
Output = Input - Problems adamthole Micro Controllers 20 24th April 2007 05:09 AM
uuffff how doess this stupid ting work lol cyprio7 General Electronics Chat 7 9th October 2005 07:56 PM
Measure DC offset, Hum, DBs gain, Oscillation walters General Electronics Chat 21 7th June 2005 04:01 AM
convert input resistance to different output, but how?! pcoghlan Electronic Projects Design/Ideas/Reviews 7 9th July 2004 11:00 PM



All times are GMT. The time now is 06:37 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker