Hi everyone.
I'd like to switch relay on/of using Sharp IR proximity sensor GP2D120XJ00F ( 3 wires:Vcc,GND, Vo) and PIC 16F886 chip.
Both sensor and relay are powered by 5V, relay current is 27mA.
Sensor's output varies between 0.2V-2.9V.
Are any resistor needed on PIC's input /output? Can I connect relay directly to PIC's output?
Would anyone be able to provide a simple circuit, I'm not sure how to make connections.
and a code to switch relay on for 2sec. when there is reflection detected by sensor.
Any help much appreciated
I'd like to switch relay on/of using Sharp IR proximity sensor GP2D120XJ00F ( 3 wires:Vcc,GND, Vo) and PIC 16F886 chip.
Both sensor and relay are powered by 5V, relay current is 27mA.
Sensor's output varies between 0.2V-2.9V.
Are any resistor needed on PIC's input /output? Can I connect relay directly to PIC's output?
Would anyone be able to provide a simple circuit, I'm not sure how to make connections.
and a code to switch relay on for 2sec. when there is reflection detected by sensor.
Any help much appreciated