Shop OBEX P1 Docs P2 Docs Learn Events
Measuring IR Sensor Voltage — Parallax Forums

Measuring IR Sensor Voltage

TebosTebos Posts: 11
edited 2009-10-30 18:18 in Accessories
How can I measure the voltage going into a pin?· Im useing a IR sensor to detect an object but the 1.4 low limit is to close to object.· I want to measure the voltage as it gets closer to object so i can make it stop.· Thanks for any info·

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-10-24 04:17
    You can use an ADC chip or a couple of parts and RCTIME. It's in the stamp editor help files.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • TebosTebos Posts: 11
    edited 2009-10-30 18:06
    I was hoping there was a way to do it with code?· If it can detect 1.4 and below there has to be away to detect other voltages.· thanks for any info, plz provide links =).·
  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-30 18:18
    Use the "app-notes" link on the bottom of this page: www.emesystems.com.

    There's a section on the RCTIME statement and part of that describes how to measure voltages using two resistors, a capacitor, and the RCTIME statement.

    The 1.4V switching threshold is fixed, but varies somewhat with temperature and power supply voltage (and has some variation chip to chip). It is not adjustable. You could use a voltage divider to reduce higher voltages to the switching threshold (see the Wikipedia for an explanation of voltage dividers).
Sign In or Register to comment.