![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| 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 | |
| |
| | (permalink) |
| 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. | |
| |
| | (permalink) |
| 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 | |
| |
| | (permalink) |
| 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. | |
| |
| | (permalink) |
| 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? | |
| |
| | (permalink) | |
| Quote:
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/ | ||
| |
| | (permalink) |
| 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 | |
| |
| | (permalink) | |
| Quote:
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 | ||
| |
| | (permalink) |
| 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/ | |
| |
| | (permalink) | |
| Quote:
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. | ||
| |
| | (permalink) |
| 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/ | |
| |
| | (permalink) | |
| Quote:
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 | ||
| |
| | (permalink) | |
| Quote:
>>> 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/ | ||
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| 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 |