Use two resistors in series (in the 4K ohm - range) as a voltage divider. Connect the PICs A/D input to the junction. That way, your PIC will see an input of 0-5V.
Use two resistors in series (in the 4K ohm - range) as a voltage divider. Connect the PICs A/D input to the junction. That way, your PIC will see an input of 0-5V.
Charles Linquist
Charles hit the nail on the head.
Code:0-10v input ----------+ | _|_ | | |R| |_| | | +--------- PIC ADC Input (0-5v) | _|_ | | |R| |_| | | | Ground
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
There are two good links on the matter thanks to Darrel:
http://www.picbasic.co.uk/forum/showthread.php?p=2010
http://www.pbpgroup.com/modules/wfse...p?articleid=25
Ioannis
thank youactually it seems quite obvious, why didn't I think of it, but thanks...
but what if I want to use the 0 - 10 volts as an output...
it only sends out 0 - 5 volts...
is there some kind of transistor that when the base opens in the range of 0 - 5V, the transistor slowly opens, and sends out (from collector to emitter) a range of 0 - 10Volts... or is there another way??
Hi,
a little search on this forum could have raised Our Friend Darrel had designed a more than fair tool for such voltage dividers calculations.
and overall some idiotproof items included ...
...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
the PIC only sends out 0-5 volts, but the PC needs to receive 0 - 10 volts... just like its sends 0 - 10 volts...
how can I send a signal of 0 - 10 Volts to the PC, when I use a PIC that only sends out 0-5 volts..
So.......
Are you trying to make a digital output (0 or 5v) from the PIC into an analog (0-10v) output to the PC? Why would a PC need to receive 0-10v? (I smell an RS232 question coming up in the next reply)
For what reason? A PC doesn't usually have an A/D converter on it...at least not one that the average joe can use with any success...unless you've got a PCI/ISA D/A card of some sort.
You should make sure that more than five volts not to be loaded to microcontrollers pin otherwise it could become foul. For example if for any case you have more than 10V as an input you will get more than 5V on the resistor and on PIC as well, so it is not bed to think about some zener diode on PIC ADC input. Or maybe is better to use a scheme with comparator LM239 which will sharply cut any voltage bigger than Vcc ref+ loaded on pin 6 of LM239.
Regards
Last edited by Robinzon Kruso; - 11th February 2008 at 10:44.
ah, yes, I see.... if the voltage over the pin exceeds 5 V, the zener will pull the pin to 0...
it is yet a prototype, but when I make a final design, I should probably add it for safety...
thanks...
I think my prototype is ready for testing, Thanks all
slayerizer, The zener does not pull the pin to 0 volts but, starts to conduct at the breakover voltage it is designed for. It will then maintain that voltage as long as the power of the component is not exceeded. In other word it is acting as a limiter....
Dave Purola,
N8NTA
Yes but not like a switch! It is like a normal diode in characteristics slightly steeper. But has a knee. That means if voltage is increasing above about 4,3Volts the zener might start to conduct and spoil the readings of the ADC.
I may have not stated correctly in engineering terms. If anyone with native english understood, please help here.
Ioannis
Bookmarks