# How to invert polarity of voltage accross dc motor?

Thread Starter

#### Hentaifan69420

Joined Jun 5, 2019
14
Hi all!

I am a total noob, so i apologize if i am missing something obvious.

I would like to know if there is any way to invert polarity of a power supplied to a motor preferably using relays, because i have them, but antyhing will do. I have a rc car, which i would like to convert to a car that i can control through the web (i have a raspberry pi). But i have a problem. The steering of the rc car is controlled by the polarity of the voltage which is applied to it so like:

This makes the wheels turn left from drivers perspective:

+ -----------------------------------------------|-------------------------|
| Motor |-------|||||
- ------------------------------------------------|-------------------------|

and when i invert the polarity, the wheels then turn right from drivers perspective:

- --------------------------------...

+ ------------------------------...

(or well the right and left turning is quite arbitrary depending if you think the turning of the tyres from where, but well)

So i am just thinking how can i invert the polarity of the voltage, which is applied to the motor?

#### ericgibbs

Joined Jan 29, 2010
18,630
hi H,
You could use a couple of SPDT relays or a 'H' Bridge.
What is the signal control source for the motors
E

Thread Starter

#### Hentaifan69420

Joined Jun 5, 2019
14
Oh. I did not know about that. Thank you very much!

Thread Starter

#### Hentaifan69420

Joined Jun 5, 2019
14
Well i do not have the L298N, but i will try with the H bridge thing first and if it does not work out, then i will try that.

Edit: I mean i will make my own H bridge first with the relays i have already.

#### Dodgydave

Joined Jun 22, 2012
11,234
You can use two Spdt relays or one DPDT relay.

#### MaxHeadRoom

Joined Jul 18, 2013
28,500
You can also reproduce the schematic in Dave's post with One DPDT relay, both have the characteristic however, of No OFF position.
Max.

#### dendad

Joined Feb 20, 2016
4,426
The circuit @Dodgydave posted has an off position. 2 in fact.
It drives the motor if one OR the other relay is operated. If none or both relays are operated, the motor stops.
So 2xSPDT switches can be used in place of the relays if manual operation is wanted.
And if the setup has limit switches in series with the motor, a diode across each switch in the reverse direction will allow the motor to run back the other way.