1
\$\begingroup\$

I've been gaining understanding about using relays to control PWM signal (ON/OFF).

Setup: Pixhawk generates PWM signals and sends it to motor controllers to control the 24V DC motor's speed.

Goal: To place a relay in between the Pixhawk and motor controllers to turn the spinning motors ON/OFF by controlling (turning ON/OFF) the PWM signal. Functioning of the Relay will be controlled using an Arduino. One relay for one motor.

What kind of relay is recommended to be used with this setup?

Any help will be appreciated. Thank you!

\$\endgroup\$
5
  • 2
    \$\begingroup\$ Any relay should work. Another question is if a relay is even the correct component for this. \$\endgroup\$
    – Justme
    Jan 10, 2022 at 17:45
  • \$\begingroup\$ Just be sure the motor will turn off in the absence of a PWM signal. Some (e.g. fans) will default to 100% if the PWM input is allowed to float. A pulldown resistor may fix this but it depends on your specific controller. \$\endgroup\$
    – vir
    Jan 10, 2022 at 17:51
  • \$\begingroup\$ Since the PWM is just a signal, you can use some type of small signal relay. You can also use an electronic component such as a transistor. You might even be able to use a logic gate with an enable pin. What is the voltage of the PWM signal? Not 24 V, I don't think. Isn't it a 5V signal or something? \$\endgroup\$
    – mkeith
    Jan 10, 2022 at 17:53
  • \$\begingroup\$ There is probably a way to "tell" this "Pixhawk" to not generate PWM when desired. \$\endgroup\$
    – Eugene Sh.
    Jan 10, 2022 at 18:08
  • \$\begingroup\$ Thank you very much everyone for your input! It's a great discussion and helps me get a direction. \$\endgroup\$
    – Jakob.1992
    Jan 10, 2022 at 19:46

1 Answer 1

1
\$\begingroup\$

You can use whatever relay you want.

There are a few considerations to take into account to make an optimal choice :

  • choose a relay working on a voltage you already have (nb : the 3.3V from arduino will not serve, the 5V from the arduino regulator might or might not serve depending on the relay, but it's best to avoid it)
  • you can't directly connect the coil of the relay to the arduino (it would destroy the arduino (too much current + voltage spikes)). So either you use a relay with the required extra components (at least, free-wheeling diode and some kind of transistor), or you buy an Relay module made directly for use with Arduino (which probably includes those extra components)
  • if you care about power consumption, think if you want a normally open or normally closed relay (depending the state you want as default and/or the one you spend more time in). If you switch only rarely, you can also take a bistable relay (but those are a litle bit more complicated to use).
\$\endgroup\$
1
  • \$\begingroup\$ Thanks Sandro! I'll take these considerations into account going forward. Appreciate it. \$\endgroup\$
    – Jakob.1992
    Jan 10, 2022 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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