0
\$\begingroup\$

I have a 12V motor which can be rotated forward or backward based on the polarity. I would like to control it with Raspberry Pi's GPIO ports. So that by switching 2 GPIO ports on Rpi I would be able to either run th emoto forward, backward or have it stopped.

From my understanding, the best for this purpose is to use 2 contact relay such as HK19F-2C, 3V and hook it up that it provides either positive or negative polarity to the motor.

I have however problem with figuring out how to connect the relay, motor and Rpi together. There will be separate 12V power source for the motors.

Could you please help me with figuring out how to connect everything together? I need a schematics how to connect this properly.

Relay schematics

\$\endgroup\$
6
  • \$\begingroup\$ The only question you have is if we can help. Yes we can. But you have not said what help you need and with what exactly. Please ask a question about the subject itself. Edit a question in. \$\endgroup\$ Commented May 12, 2024 at 19:33
  • \$\begingroup\$ Hi @Justme. Thank you for your comment. I have clarified that I need help with the schematicts of the circuit. \$\endgroup\$ Commented May 12, 2024 at 20:45
  • \$\begingroup\$ So what help you need with the schematics? Also, driving relays with GPIO ports is such a common thing that there must be questions about that already, with answers. Have you tried to find similar questions, or why don't the already asked questions cover what you need? \$\endgroup\$ Commented May 12, 2024 at 20:50
  • \$\begingroup\$ Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. \$\endgroup\$ Commented May 12, 2024 at 21:42
  • \$\begingroup\$ use a relay module, not just a relay ... you will require a relay module that contains a minimum of two relays \$\endgroup\$ Commented May 12, 2024 at 22:59

1 Answer 1

1
\$\begingroup\$

Two relays are to be switched via two GPIO ports.

A dual-relay module should suffice.

Here's the schematic.

enter image description here

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.