12v to Arduino input using standard Songle relay. Am I ok?

I bought a cheapo RFID reader on eBay that outputs 12v when a valid key fob is presented. It came with a 12v Songle relay.

Will it damage my Arduino if I connect the switching side of the relay to a 5v regulated power supply and to the digital input of the Arduino? I found lots of results on related topics and am reading up on zener diode, 7805, etc but since I don’t have any of those at the moment I figured I’d ask about this relay.

Relays are unwieldy, the contacts bounce and relays intended for relatively high power AC circuits might not make good connections for low voltage circuits.

A much better approach would be to use the 12 V output to trigger an optoisolator. You will need a suitable current liming resistor (say 1K ohms) for the input LED. Make sure the polarity is correct or the LED will be destroyed.

The emitter of the optoisolator output can be connected to the Arduino ground, and the collector to an input with the input pullup resistor turned on.

Ok thanks! It seemed ok (5V) based on my multimeter measurements so I’m glad I asked. I’ve been learning about the optoisolator from previous searches so will definitely go that route.

The simplest route would be to make a voltage divider from 2 resistors or a potentiometer. You also need to make sure the RFID reader ground is connected to the Arduino ground.

https://learn.sparkfun.com/tutorials/voltage-dividers

Or use a 5 volt zener diode.

https://learn.sparkfun.com/tutorials/di … 1422685831

Or go w/the opto-coupler. Also covered in the above link.

Or use the relay contacts as you did with the photoeye detector, w/the caveats noted above. One plus of the last 2 ways is that the grounds don’t need to be connected together.