0
\$\begingroup\$

I want to make two projects that use a 12v input, a solenoid valve and a electrical lock. Both need a 12v current to work. I've seen some exemples for both projects that use a relay and an Arduino to activate mechanisms that need more than the 5v Arduino´s output. I was wondering, however, if I could use a Step-up Power Converter connected directly to Arduino´s Digital Pin. Is it possible? And is it safe?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Please draw a schematic or block diagram of what you are trying to create. \$\endgroup\$
    – winny
    Sep 13, 2018 at 17:51
  • \$\begingroup\$ There is no such thing as 12V current ….you can have a 12V supply, and you can draw current from the supply. What power do you need to provide for the load? Consider both the voltage and the current here to get the power. And NO, DIO pins on an MCU cannot supply any significant power. \$\endgroup\$ Sep 13, 2018 at 18:59

3 Answers 3

3
\$\begingroup\$

A relay (solid-state relay or FET) is the best way to switch high voltage from low voltage.

Arduino has low current output not meant to do what you're describing. It's not possible. Use a relay or a FET. It is even safer to use an optocoupler for isolation.

\$\endgroup\$
2
\$\begingroup\$

if I could use a Step-up Power Converter connected directly to Arduino´s Digital Pin. Is it possible? That will not work, the Arduino's outputs cannot deliver enough current. An Arduino's output can deliver around 10 mA and that's enough to light up an LED but little more than that.

In theory a 5 V to 12 V Step up converter can be designed and made but at 10 mA input current the output current needs to stay below 5 mA and that's also very a small current. It is by far not enough to power some mechanism with a motor.

And is it safe? Define "safe". Safe in my definition is "will it harm/kill people" the answer is no. If your definition is, will it damage anything (like an Arduino), the answer is no because an Arduino's output can only deliver such a small current that nothing can get damaged, the current is too small.

But you're looking at the wrong solution. You need to see the output of the Arduino not as the source of power but as a signal to control the power. You can use a module with a relay like this:

enter image description here

The GND, VCC and signal connect to the Arduino. The signal is the output from the Arduino, VCC and GND simply connect to the 5 V supply that the Arduino uses. When connected like that the Arduino can control the switch in the relay, you can connect that in series with a 12 V power supply to power almost any module that needs 12 V with a high current. The relay shows how much voltage and current it can safely switch.

\$\endgroup\$
2
  • \$\begingroup\$ Could I use a MOSFET instead of a relay as a logical switch? \$\endgroup\$ Sep 14, 2018 at 11:29
  • 1
    \$\begingroup\$ Yes you can but you have to do that in a particular way, I mean, use a proven schematic. Look for examples how to do that. The other answer shows how to use an NPN transistor. If you replace that NPN with a suitable NMOS transistor that can work as well. Note how that switches the - (minus) side of the load. Usually that's no issue. If it is then you might need to use a PNP or a PMOS, that needs a slightly more complex schematic. \$\endgroup\$ Sep 14, 2018 at 12:33
1
\$\begingroup\$

You really should provide some sort of sketch of what you're trying to accomplish. If you're trying to drive a high-current device with a logic pin, the terminology for what you need is a "driver".

There are a variety of approaches, the simplest probably being a simple bipolar transistor.

hhttps://i.stack.imgur.com/PcHjc.png

\$\endgroup\$

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.