Proximity sensors are common enough in automation projects that we hardly give them a second thought—pick something with specs that match the function and move on. But they can be difficult to adjust properly, and the job becomes more difficult if they are located in a far corner.
But where the challenge lies, there is also opportunity, eg [Ido Gendel] Show us with This remote controlled proximity sensor. The story behind this clever little hack starts with an off-the-shelf sensor, the kind with an IR LED and a phototransistor pointed in the same direction that gives a digital output when the light bouncing back to the phototransistor crosses a certain threshold. It was setting the threshold that gave [Ido]Customer problem, so [Ido] I decided to build a programmable alternative to make the job easier.
The first attempt at this used an OBP732 inverter transmitter and an ATtiny202 microcontroller and had three pads on the PCB for programming. This still requires physical contact for programming, though [Ido] He had the idea of using the sensor for wireless infrared programming. The microcontroller in the second version has been converted to an ATtiny212, and two components have been added to control the power of the LED so that the sensor can perform dual tasks. A programmer using the same sensor and a USB-to-UART adapter completes the system, and allows the sensor threshold to be set just by pointing the programmer in its general direction from up to 25 cm away.
We think getting multiple uses from a single sensor is pretty smart, so be sure to use this one. This isn’t the first time we’ve featured one of these [Ido]for its projects, but it’s been a long time — this one-hour-a-day Saturday was the most recent, but you can clearly see the roots of the sensor project in this mouse pointer data encoder that goes all the way back to 2015.
“Reader. Infuriatingly humble coffee enthusiast. Future teen idol. Tv nerd. Explorer. Organizer. Twitter aficionado. Evil music fanatic.”