I've just bought a couple of Infrared avoidance sensors, that I plan to use in a project, and they've come without any instructions. I've searched the web, but can find anything anywhere. I'd just like to know how to connect it to the Arduino (UNO), and what signals I can get from it! I don't really want to guess, and blow it up, or my UNOI board. Although the sensor was very cheap!
This is the sensor.
In anyone has any ideas, I'd be really grateful.
Here's a wild guess.
Put 5V across the red and green, and measure the voltage between the yellow and green. It seems from that fact that they say the distance is adjustable, that the output voltage will be digital, switching between 5V and 0V (or 0V and 5V) at a certain distance. I surmise that the distance is set by that screw on the bottom.
Or, if not digital, the voltage may vary (as opposed to switch) between 0 and 5 at a range of distances.
Reach for your voltmeter......
Does that look like some kind of wiring pic on the silver band?
Update: My local supplier has this one, very similar but not the same part number. It's as I surmised: yellow is a digital output, active low so pull it up with a resistor. (In Arduino-Land we can do that with the internal resistor and
pinMode(myPin, INPUT_PULLUP); )
Trigger distance is adjusted by the little screw as I thought.
That's great, thanks a lot. I've wired it up, and it works exactly like that! I had forgotten about the internal pull-up resistor (only been playing with the Arduino for a few weeks), so thanks for the reminder.
I can't believe how cheap these things are, especially if you buy them directly from China. But then, they don't come come with instructions!
... and about the wiring diagram on the silver band:
Yes, it is, but it's all in Chinese. However, I guessed what it might be, and used Google translate to get the Chinese Characters for "red", 'yellow", and "blue", and they matched the characters on the circuit! Very educational. Languages and electronics in one evening.
Languages and electronics in one evening.
Love it when a plan comes together.