How to invert polarity of voltage accross dc motor?

Thread Starter


Joined Jun 5, 2019
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?

Thread Starter


Joined Jun 5, 2019
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.


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


Joined Feb 20, 2016
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.