Hi all, I’m hoping someone will share insight with me. My garage is not very deep. I am trying to set up a threshold beam in my garage that if broken I can use HA to turn on a light. (Yes, a tennis ball on a string is much easier, but where is the fun in that?) So, if the beam is broken, a red light is on.
I am trying to set up a E-936-S45RRGQ photoelectric beam sensor with an ESP-WROOM-32 board (it does not support internal pull-ups.) The ESP32 board is talking to HA just fine. I’m powering the ESP board via USB connection.
I am powering the beam sensor with a 12VDC power supply. (Brown and blue wires).
The beam sensor test light comes on when the beam is aligned correctly and goes off if I break the beam. Seco-larm tech support tells me that the relay output is a dry (no power) contact.
I have the white wire (com) connected to a GND on the ESP32 and the black wire (normally closed) connected to GPIO35. If the beam is connected, the power between GND and GPIO35 is 0 VDC, if the beam is broken the power floats between about .4 and .7VDC.
I am inexperienced with ESP32 and electronics. My gut tells me that when the beam is connected, I need to see about 3.3V. But, I’m not sure how to deliver that.
Most likely a wiring issue. Double check that White is connected to the board GND (not the beam sensor power supply ground). And that Black is connected to GPIO32.
If you have a multimeter you can also check the continuity between black and white as you break the beam to make sure it is working.
It is always possible I have wired up something wrong. And, I have been tinkering with this for a few weeks before I was ready to embarrass myself by asking for help.
In my current wiring, I seem to have continuity between white and gray.
I’m using a cheap E3F-R2P1 optoreflective sensor from AliEx with a PNP output to turn on a light in a storage space and with this code. I can’t remember why I made the binary sensor internal and used a separate template switch but it works.
Get a short piece of wire and carefully short the solder pads for P32 to GND directly on the dev board. Not on the screw terminal carrier board it is plugged into.
Does that cause the log to show the binary sensor turned off?
One more thing I just remembered. There is a dev boards that can not be powered properly via USB. You have to supply power via the 5V pin. Unfortunately I can’t find the forum post about this to compare it with yours. But it looks familiar…
Tom, I really appreciate your sticking to this and all of your suggestions. All of the moderators and contributors here are what really makes Home Assistant successful. I can usually answer my own questions by searching. I was about to try another ESP32 board.
I think it is solved. I had taken the wiring apart and rewired everything a couple of times, but each time I think I had the polarity reversed. I finally tried it the other way. The Seco-larm documentation says the power input is non-polarized. But, I’m betting that only applies to AC.