piclist 2001\10\18\112119a >
Thread: CHEAP voltage sensing??
www.piclist.com/techref/power.htm?key=voltage
flavicon
face BY : Mike Blakey email (remove spam text)



If you can afford a comparator (I believe National do a very nice simple small one
LM111).

Use one output pin to output a PWM waveform varying from 1/255 to 255/255, fed to a
simple cap this will give you a 0 to 5v varying analogue voltage to one pin of the
comparator. your sensor goes to the other comparator input. the comparator output
goes to a PIC input pin, you now have a 0 to 5v AtoD. by checking the input after
changing the PWM frequency (plus a little settling time) you will now have a 8 bit
value. You may also need some digital filtering/averaging to reduce your component
count too. you only need 2 pins, one cap, one resistor and one LM111.

Hope that helps.



********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestEraseMEspamEraseMEmitvma.mit.edu


<"011018151037Z.WT07878. 12*/PN=Mike.Blakey/OU=Technical/OU=NOTES/O=BAe MAA/PRMD=BAE/ADMD=GOLD 400/C=GB/"@MHS>

See also: www.piclist.com/techref/power.htm?key=voltage
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) CHEAP voltage sensing??

month overview.

new search...