Disaster – 2 Photons damaged

So I have a door entry wiegand keypad (12v) that connects to an Arduino.

The Arduino is then connected to 3 latch relays (EA2-5 T) these are 5 volts and the Arduino only gives out a HIGH for 20 milliseconds to set the relay (this will then activate a door strike (I have added diodes across the door strike) for 10seconds [12v]).

digitalWrite(frontopen, HIGH);

delay(20); //pulse latch relay to open door

digitalWrite(frontopen, LOW);

and 10 seconds later the Arduino will pulse a HIGH for another 20 miliseconds to reset the latch relay and lock the door.

I connect the coils of the latch relay direct to the Output pins of the arduino. (I do use diodes across both coils).

I have used these latch relays with Arduino for many years without any problems. They have saved me from messing with transistors and resistors to protect my Arduino as I thought the 20 milisecond pulse put very little strain on the ardunio vs 10 seconds. Less components to solder.

I use a 12v adaptor which powers the key pad (12v), powers the electric strikes (12v) and the Arduino can handle 12v so I just power it with that!

The problem is not with the arduino –

I moved this exact setup to a photon. (Swapped out the Arduino)

The photon will only accept a max of 5v – fine, so I used a 7805 to bring it down to 5v. I did not bother to use the 2 capacitors across Vin and Vout of the 7805.

Everything seemed to work well for a few minutes – then the 7805 de-soldered itself it got that hot. I found out I should never leave those capacitors off!

A bit later I found out my Photon was also fried! I put it down to the 7805 failing and giving out more than 5v perhaps. I read up on buck converters and ordered some.

The next day I braved it and used my second photon – not taking risks I decided to power through the micro usb and use a 5v power supply.

Disaster, second photon fried! – But why??? Any ideas?

Circuit worked well for a while.

As I was using 2 separate power supplies I knew I had to tie the negatives together or the wiegand serial would not work. There are 2 GND pins on the Photon and I used both of them. I noticed the way I had wired it one of the GND pins was acting as the negative for all of the door strikes, could that have damaged it?

Are the 2 GND pins common?

(can’t afford any more fried photons. Can I place an ammeter between the pins or something to try and track down the problem? also, I think 1 of the negatives broke off the 1 latch relay, not sure if that could have caused it. The arduino could open that door but the photon could not, the other doors were fine.


@rmim, the Photon GPIO pins can only provide 3.3v and at most 20mA of current. The Arduino GPIO pins provide 5v and a maximum 40mA current. You cannot drive the relay directly from the Photon and will need to use a driving transistor (bipolar or mosfet) to drive the relay.

The 7805 absolutely needs the input and output capacitors or it can oscillate and self-destruct as you found out.

As for grounds, the strikes are powered through the relay and does not need to be common with the Photon GND. You need to keep the 12V supply AWAY from the Photon. I am assuming your relay ground is connected to the Photon ground which is necessary. I am not sure how you configured the (single) diode across the relay. This diode provide protection from inductive kickback voltage produced by the relay coil as it is de-energized.

Using the USB to power the Photon and relay, you will want to:

  • Make sure to use a good quality USB power supply that can supply 1A
  • Add a large (470uF) capacitor between the Vin pin and GND of the Photon to handle current spikes
  • Use a transistor to drive the relay from the Photon GPIO pin (see diagram). Instead of 3.3V use Vin (approx 5v). The D1 diode can be whatever you are currently using. You can use a 390 ohm resistor for R1 if the relay doesn’t close firmly.



I realize after the fact this might not be super helpful, but I wonder if this would be a good use for the relay shield ( https://store.particle.io/products/relay-shield ), you can run your 12v line through those relays, and let the shield power the relays and your photon safely.


Thanks for the reply peekay.

the Photon GPIO pins can only provide 3.3v and at most 20mA of current. The Arduino GPIO pins provide 5v and a maximum 40mA current. You cannot drive the relay directly from the Photon and will need to use a driving transistor (bipolar or mosfet) to drive the relay.

Yes i'm somewhat aware of this - but I only recently learnt the photon is 3.3v and now you have made me aware it 20mA.

But i'm not driving a relay - Im pulsing a latch relay for 20ms. Can damage be done in that short time? [I have just tested the latch relay and it draws 27mA].

Yes I have used diodes on all coils and hopefully got them the right way, its been working fine with the Arduino.

Im thinking my electric strikes which probably draws 100mA (per strike, 2 normally run at once for 10 seconds) took it's negative from the photon as I seemed to have grounded it to that and that's why it fried it?

That's why im wondering how are the two GND pins on the photon are wired up.

What puzzles me I have never had a problem with the Arduino, I did the same to that, it also has 2 GND pins.

Thanks for the reply Dave.

That’s exactly what im trying to avoid. It’s too big. The latch relays I have are smaller than the tip of your finger.

And I hate soldering transistors and resistors as I dont really bother with PCB, too much work, too many pieces. Without a PCB using transistors is messy as the legs are not insulated and so you have to insulate them somehow or risk shorts.

I saw this mini CNC machine just to make small PCB and it looked really interesting but it’s a lot to figure out before you get it working.

I might have to look for a nice optoisolator if it can connect directly to the strike.

tried to do some tests:

At rest everything (arduino, key pad, 4ch remote receiver) uses 70mA. When the electric strikes operate (2 at the same time) the current jumps to 700mA.

I wanted to try and see what was passing through just the arduino but I can seem to get anything meaningful:

I disconnected both of the negatives but the arduino still seems to stay on. I tried to see how much current passed trough the negative lead but I dont get any reading.

edit: did the test on the positive lead (again strangely the red light did not go off but dimmed) so at rest 20mA and when the doors open it quickly flashes to about 45mA for about half a second.

Are those numbers enough to fry my photon? (remembering the 45mA (or maybe it’s more and my equipment cant register it as it so fast) is for 20mili seconds only). - It’s not frying my arduino nano, its been working for about a year and is used at least 10 times a day.

Im thinking I cant risk any more photons, maybe I will leave the arduino in place and just use the photon for the online stuff. Need to get arduino and photon to talk to each other.

@rmim, the “negative” you refer to are really ground (where electrons return TO). The fact that you “disconnected both the negatives” and things stayed on indicates you have some other path to ground in your circuit. I suggest you take a picture of your setup and share it here. A schematic of your setup would also be nice.

thank you for reply peekay.

mmm not sure how useful a photo would be. it’s a bit of a mess as I have not used a PCB.

I will try to see if I can use a free drawing software and do a schematic

1 Like

@rmim, you could also take a picture of a hand-drawn schematic and post that.

only showing 1 latch relay (there are 3 in total wired similarly) and all flyback diodes left off diagram but they are there on all coils.

and the other unlabeled coil is the door strike.

instead of grounding the other side of the door strike at the power supply, I have grounded it to the arduino GRD - does that make a difference? Aren’t all grounds the same wherever you ground from?


Use a transistor to drive the relay from the Photon GPIO pin

Thinking of using a MOSFET ( FQP30N06L) what's the threshold of this device? Will it work with the photon? 3.3v?

If you want to know about the Photon it would be good to see how you intended to wire the Photon - not the Arduino Nano.
However, even with the Nano neither it nor the Photon would accept the 12V supply directly applied to its Vcc input.
If that schematic is accurate I’d not be surprised to see magic smoke, on the other hand if the schematic isn’t accurate there is little use in posting it :wink:

Thanks for the reply ScruffR.

Yes this is how I have wired my Nano - I thought the the Vin was 6-20v for the nano, this is what I have read. It’s been working like this for a long time no problems.

My photon I would use a 7805 or the new buck converters I got (as I have read that’s 5v only). But apart from that it would be wired similar. Where I have used D12 and D11 on the Nano they would be mapped to D6 and D5 on the photon. The GND I have used in a similar manner and I was wondering if that was the problem.

My schematic is accurate to what it is like now and has been running fine in this fashion for a while.

edit - opps, I think I drew my schematic wrong. 1 sec

made a slight mistake - this is how it should be

That depends on the make - you obviously didn't go for a cheap clone :+1:
But the Photon definetly doesn't accept that kind of voltage on Vin.

While both GND pins are connected together on the Photon (and on the Nano) it's no good idea to have any voltage spikes the are introduced on the GND side of the relays to go through the controller board. Donate some extra wires to connect the relay GND to the supply directly.
Also add some extra filter caps between the Photon and your 5V/GND output of the regulator/converter (as close to the Photon as possible).

And can you provide the exact type of the realays you're using?
Without that it's hard to say whether your D11/D12 (Photon D5/D6) wiring can work without risk.
Adding a FET (or BJT) would be a safer bet in any case tho'.

Im using these this cute little orange EA2 5T NFG latch relays only pulsed for 20mili seconds. They seem to draw 27mA

Is there anything obvious why this circuit would kill my photon? (just the blue led D7 is lighting up now. seems dead apart from that. it's getting warm very quick when powered)

what about the remote relay. it’s powered by 12v and I have used it to pull down D5 which has been pulled up in software.

This table suggests you should need a FET/BJT to power the coils

The operating voltage of 3.75V for the 5T version you have is well beyond the maximum voltage the GPIOs can supply - if it works it’s just a fluke but not within specs.
The coil resistance would suggest a current draw of ~19mA which would be within specs for the GPIO but may be too little for reliable switching (nominal operating power of 140mW would require 42mA @ 3.3V).

In your schematic we can also not see any flyback diodes.

A dim blue D7 LED is often caused by some brown-out condition which may well be in connection with poor quality supply power (you may able to revive these Photons as shown here)

To sum it up

  • don’t feed GND through the board
  • add flyback
  • use FET/BJT to power the coils
  • add filter and buffer caps

Thank you very much for the help ScruffR.

The fly back diodes are there but found it tricky to draw them.

I’m going to stop being lazy and use capacitors and get some prototype soldering boards.
Will order the FET now, plus it will be less work using them only 3 legs compared to the latch relays (I dont need resistors for them like BJT?)


I was not planning to power the coils of a relay with the FET - I was planning to power the electric strike direct (which is another coil but much higher current). Can it handle that? About 300mA