Photon gate controller

I’m trying to use the photon to control a gate operator, I have tested this with 2 different control boards, one of them worked great without additional hardware, the other has voltage going between the NO and C terminals, causing the photon to activate the relay at all times without any signal being given by me. Is there a way to isolate this voltage so that the photon sees the inputs as true “dry contacts”? I’ve tried putting a diode inline and it seems to kill all signals being passed through.

@Mjones, a schematic would be very helpful :grinning:

Hi @Mjones

If you have a system you want to control with a “wet” relay (current flowing at all times) then you should add another relay to the Photon side to control that set of contacts to make it “dry”.

How is it between N/C and C?

Are these mechanical relays? If so give 'em some whacking to get the contacts loose.

I don’t have a schematic drawn up, it is using the A5 pin and gnd from the photon, going to the NO, and C terminals on the board. The manufacturer is sharing the common for the inputs with the ground for accessory power, which doesn’t cause a problem normally, but it seems the photon is taking the voltage either as a signal or its just messing with the components.

I dont have anything that requires a “wet” relay, its just bleedover voltage from the accessory power. Everything else in my industry is dry contacts, and the minimal voltage doesn’t interfere with them, but I assume the transistors on the photon don’t like the voltage.

@Mjones, can you sketch a schematic? Are you using A5 as an analog or digital input on the Photon. From the sounds of it, the A5 pin may be floating causing erroneous readings. Or, you may have a floating ground problem (grounds not common to both circuits) which will lead to the same problem.

I’m still trying to figure out how you have everything powered and what you mean by “bleedover voltage” and “I assume the transistors on the photon don’t like the voltage”!

I’ve tried using the A5 pin as a digital or analog write, directly to the NO of my circuit, and GND pin on the photon to the GND/common of the board. I’m powering the photon with the micro USB cable, the accessory power of the board is irrelevant to the photon other than the voltage coming through the terminals. I’ll draw up a schematic at lunch and upload so you can get a better idea of what im doing.

This is a very basic schematic, but it shows the connections, you can see the GND on the control board is right next to the +24v accessory input, thats because it is also the -24v input.

You need a relay.

1 Like

@Mjones, I partly agree with @bko since nowhere did you indicate what “OPEN INPUT” voltage or condition is required to actually control the gate! It is obviously NOT a direct connection to a Photon GPIO pin. Can you provide more details?

No voltage is required to activate the gate, the control board has a relay for each input, open, safety, close, etc, you can take two wires and touch them together to give the gate an open signal. Using the A5 and GND pins worked fine on my garage door opener. Can anyone recommend a relay or draw a rough schematic of how it should work?

@Mjones, your garage door opener and your gate controller clearly work differently thus the reason it does not work.

[quote=“Mjones, post:12, topic:19015”]
you can take two wires and touch them together
[/quote] Which two wires might those be? I ask because the recommend solution may be a transistor or a relay depending on your response.

1 Like

Looking at my drawing, if you take the photon out of the picture and touch the wires connected to “open inputs” and GND together, the gate will open.

I’d guess in your case touching your two wires together is like adding a switch between the two wires over which current will flow, but the Photon is no such switch (in this case you’d usually use a relay).

To test this theory just frist measure if and what voltage stands between your “open input” and GND.
If this is less or equal 5V measure the current through the “switch”. If it’s greater than 5V you might have blown your Photon pin already.

@Mjones, based on your description, a relay is the correct solution. I recommend an inexpensive opto-isolated relay board you can find on eBay or Aliexpress like this one:,searchweb201644_4_10001_10002_10005_10006_10003_10004_62,searchweb201560_6,searchweb1451318400_6150

You power the relays (DC+, DC-) via the Photon’s Vin and GND pins (assuming your are powering via USB) and can connect the relay control (IN1, IN2) directly to a Photon GPIO since they are opto-isolated. The NO relay contacts connect between the gate controller GND and the control input. With this approach there is no need to have the Photon GND tied to the gate controller GND.

1 Like

Thanks @peekay123 I’ll order one of these today, hopefully I can get something working by next week.

1 Like