1

My project involves using ATTINY to control a 5v relay (specifically JZC-11F and will be ground triggered) in an automotive setting.

I keep seeing the warnings of powering a relay from the same source as the ATTINY (or arduino), everything I can find says you need a completely separate source.

I'm still working on a 12~v to 5v power circuit that is safe from the issues that arise from being in an automotive setting (load dumps, noisy, reverse polarity protection..etc) but saying I have that figured out and I have a clean 5v source for power, do I have to duplicate that circuit just for the relay? or are there a ways of preventing the relay from eventually shorting out the ATTINY?

Plan B: What if I scratch the whole 5v relay and set it up to trigger an external standard 12v automotive relay (this is probably more ideal)? Is the ATTINY capable of triggering a 12v relay via ground? if not what are the recommended ways of making this happen?

side note: I'm know code I don't know EE but I'm trying. The end goal is to combine everything onto a custom pcb, so any suggestions about the 12v-5 using an off the shelf car usb adapter or a premade board are unnecessary (seems to be the go-to answer on that subject). I have a separate post regarding that circuit so if at all possible please stick to the relay questions.

4
  • This question may be more appropriate for EE stack exchange. It will all depend on how beefy is your 5 V power source, on how much current the relay uses, and on your supply decoupling capacitors. Aug 4, 2018 at 8:48
  • Why not use a solid state relay? Often they work on 5V/the output pins of a microcontroller.
    – Paul
    Aug 4, 2018 at 9:58
  • @Paul: most solid state relays are for AC (triac-based) and won't work in automotive application. a MOSFET or MOSFET-based SSR designed for DC would work.
    – dandavis
    Aug 4, 2018 at 19:43
  • @EdgarBonet shooting for 5v 500mA, the relay I mentioned has a coil draw of 40mA and attiny is around 13mA
    – dawm
    Aug 4, 2018 at 21:34

1 Answer 1

1

do I have to duplicate that circuit just for the relay?

No, not really, no.

Is the ATTINY capable of triggering a 12v relay via ground?

The ATTtiny is capable of triggering a transistor - the transistor is capable of triggering a 12V relay.

Unless your relay is incredibly high powered and the coil takes (and generates through back-EMF) massive amounts of current, there really is no problem running it alongside a small microcontroller. Just be sure you have the flyback diode, and maybe a damping capacitor as well to absorb noise.

TBH you're probably going to be getting more noise from contact spark than you are from the relay's coil.

1
  • Decided to drop the onboard relay and go with an external 12v relay w/ built in diode (301-1C-C-D1)
    – dawm
    Aug 5, 2018 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.