I wanted to expand my Raspberry Pi robot and bought 2x 4 way channel infrared boards with adjustable distance, but I didn't research if I would actually be able to connect these to the raspberry without a analog to digital convertor of some sort. Here are a few pictures of the IR board along with the description from the online seller:
Description:
- Working voltage: DC 3.3V-5V
- Working current: try to choose more than 1A power supply
- Working temperature: - 10oC - +50oC
- Mounting aperture: M3 screws
- Detection range: 1mm to 60 CM adjustable, the closer the performance more stable, white reflects the farthest distance.
- Size: in the control panel of 42mm x 38mm x 12mm (length x width x height)
- Small forward 25mm x 12mm x 12mm (length x width x height)
- Output interface: 6 wire interface (1234 to 4 signal output ends, + positive power, - for the negative power is ground)
- The output signal: TTL level (can be directly connected to I/0 microcontroller, infrared light reflected back to the sensor induction, the red indicator light, output low level; no infrared light, the indicator light does not shine, the output high.)
In my understanding the TTL means that the output from the control board is Digital, but I am not sure about that. Can anyone tell me:
- if this(outputs) can be directly connected to the raspberry pi GPIOs?
- if it can, what resistors should I use to protect the Pi?
- if this can be powered from the cheap L298N motor drivers(I am using one to drive 2 DC motors)?
I am using RPi.GPIO library for my project, if that matters.
Many thanks in advance for any comments/replies.
Cheers!
UPDATE: I was finally able to measure the output:
Input 3.3V - Output signal High=3.2-3.3V Low=0.2-0.3V
Input 5V - Output signal High=4.9-5V Low=0.2-0.3V
Can I accept it as safe to connect to Pi(probablt with just a resistor) when supplying 3.3V?