Cheapest way for project

I am a noob and have an idea for first project. Need help navigating through all the options. :wink:

Requirements for project

12v DC constant power for device to use

12v relay minimal amps very low draw

State 1) When 12v DC missing on input port - Relay closed so 12v flows through relay

State 2) When 12v DC present on input port - Relay opens after 5 min - then stay open till State 1

This is an Arduino forum. Arduinos are 5v devices. There is a swag of 5v relays popular with Arduino users. Also, those Arduinos that have on board regulators have crude ones and running them on 12v, isn't such a good idea. You might be better off using a decent 5v regulator and feed them 5v directly.

Yes, Arduino devices operate with 5 volts and some 3.3 volts, but that does not mean they can't interact with the rest of the world that may not operate on these two limited voltages. Wouldn't it be boring if we could only work with the outside world only if it was at 5 volts.

I will assume you are using an Arduino that uses 5 Volts internally. Meaning you can supply more than 5 volts to the power input on the Arduino because they have voltage regulators that will provide 5 volts internally when more than 5 volts is input.

Inputting 12 volts directly to one of the analog input ports would probably damage the microcontroller, so you need to reduce the voltage. Look up voltage dividers to understand how you would be able to measure the 12 volt or larger signal. Voltage dividers are usually constructed with 2 resistors and the output of the divider is a simple ratio of the input voltage.

There are lots of relays that can be used to switch the 12 volt load, you seem to indicate that the amperage draw of the load is low, if it is low enough you can probably just use a transistor or for more efficiency a mosfet.

I realize I have not given you the solution, instead I have given you a number of key issues that you can use Google to investigate further. This forum would probably be happy to help you if have questions after you have taken time to investigate voltage dividers and had questions about them. So Google voltage dividers, and using transistors as switches as a starting point.

Hope this helps,
wade

Not a problem.
First, can use simple voltage divider to get 12V input down to 5V to detect when 12V signal is active or not.
Could also use a simple transistor to buffer the 12V, use it to drive the base of an NPN transistor, emitter to Gnd, collector to input pin of the Arduino to pull it low when 12V is present.

Then use a hardware buffer to energize the relay coil. Can be a simple NPN transistor, maybe a N-channel MOSFET, depends on how much current is needed.

Will need a few resistors as well.
Hard to offer more without more relay & 12V info (like it's source - automobile? could be nasty 14V, 16V or higher spikes).

Yes auto so right could be 12 to 16 volts

Tell us more.
A mosfet (NO power draw when open of closed), could be more suitable than a relay.
An Arduino might not be needed for the requirements you have given.
Leo..

I agree that a transistor (FET type, logic level) beats a relay.

Iโ€™m guessing that the Arduino is for the timer, it also senses the input line.

0 or 12V -----<| diode blocking the 12V ------- 5V pullup ------- Arduino input pin.

If the 0 or 12V is 0 the pullup gets drained. If itโ€™s 12V the Arduino sees 5V.

A voltage divider is a constant current loss but true it only takes 2 resistors to make one. Iโ€™d still rather use the diode and pullup resistor.

State 1) When 12v DC missing on input port - Relay closed so 12v flows through relay

State 2) When 12v DC present on input port - Relay opens after 5 min - then stay open till State 1

This looks like it needs a rethink. Where is the 12V measured, before or after the relay?
Because if before the relay then how will 12V flow if 12V is missing? If after the relay it will turn OFF and ON every 5 minutes.