Read -5/+5 volts signal

Gibbo877

New Member
Good day all,

sorry,

I have a question:

I must read with readadc a signal that is variant between -5/+5 volts, is this possible using readadc command, or I have to change all my project?!?!:(

Please, HELP ME!!!

Big huge from Italy

Gibbo
 

Xarren

Member
Might be a much easier way to do it, but if you dont find any, how about connecting one pic between the 0 and -5 rail, one between the 0 and 5 rail, and have them communicate using serout, sending the value of ADC?
 

MartinM57

Moderator
PICAXE cannot measure negative voltages - only 0v to 5v.

I'm afraid you'll have to go to analogue circuitry first....

Consider using a simple op-amp circuit to add 5 volts to the input signal so that it goes from 0v to 10v, then a potential divider (divide by 2) to bring it down to the 0v to 5v range. http://www.national.com/an/AN/AN-31.pdf is usually offered as a good reference to find op-amp circuits.

Then you can interpret the READADC value back to the original input voltage

EDIT: Good idea SS - point out threads where this has been exhausted before, rather than answering from scratch :)
 

womai

Senior Member
Very easy: connect two 10 kOhm resistors in series between your +5V supply and your signal input. Connect the center of this divider to your Picaxe's ADC pin:

Signal Input --- 10 kOhm - x - 10 kOhm - Vcc=+5V

Picaxe ADC input connects to node "x".

A +5V input signal will result in +5V at the ADC. a -5V input will result in 0V at the ADC. Problem solved.

Wolfgang
 

MartinM57

Moderator
Very simple - I like it....but I'd like to know a bit more about the signal source before I stuck a 5v power supply into its output even if it was a 20K source impedance.

Gibbo - what piece of equipment is sending out the -5v/+5v signal you wish to measure?
 

womai

Senior Member
Valid question - even though my assumption would be the since the thing apparently sources up to +5V, it should be fine driving into +5V.
 

Gibbo877

New Member
This signal came from an interface pcb connected with a PC with RS232.

Thanks :):D all for your interesting reply
 

moxhamj

New Member
Good question BB. If you are reading RS232, you could use a max232 and Serin. You could even replicate the 22k/10k download circuit and read in directly with serin. Womai's circuit is very cunning too, and adc ought to work for slow baud rates. Either way, this could be done with two resistors.
 

Gibbo877

New Member
Hi All,

Sorry Dr Acula and BB, may be I was not so clear.

+-5 volts is coming from an interface PCB, and this interface PCB is controlled by the PC.

WOMAI, thanks a lot for your valid idea!!!:D

I've tryed...and it's working good.:D

easy and practice....How I like...

Many thanks.
 
Top