Author Topic: Making a motor go backwards based on a microcontroller's output  (Read 854 times)

0 Members and 1 Guest are viewing this topic.

Offline vediguyTopic starter

  • Newbie
  • Posts: 1
  • Country: gb
Making a motor go backwards based on a microcontroller's output
« on: October 13, 2024, 02:55:32 pm »
Creating a similar robot to that of a beebot used in primary schools, where you input different instructions (forwards, backwards, left and right) and then press the "go" button where it follows those instructions. An issue I'm pretty confused upon is how to make the motor to go backwards, I know its got something to do with reversing the polarity but unsure how to create it, using circuit wizard to design this project as well.
 

Offline ozcar

  • Frequent Contributor
  • **
  • Posts: 353
  • Country: au
Re: Making a motor go backwards based on a microcontroller's output
« Reply #1 on: October 13, 2024, 03:06:58 pm »
Try looking up "H-bridge".
 

Offline Andy Chee

  • Super Contributor
  • ***
  • Posts: 1399
  • Country: au
Re: Making a motor go backwards based on a microcontroller's output
« Reply #2 on: October 13, 2024, 03:07:37 pm »
Do you know what kind of motor you will be using?  This will have a direct bearing on the circuit topology and control methodology.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4767
  • Country: nl
Re: Making a motor go backwards based on a microcontroller's output
« Reply #3 on: October 13, 2024, 04:12:40 pm »
For a DC motor with brushes there are motor driver ic's that incorporate a full H bridge that controls the motor. By using PWM the speed can be controlled and with the bridge the polarity of the voltage on the motor can be reversed.

Texas Instruments has several to select from. https://www.ti.com/motor-drivers/brushed-dc-bdc-drivers/overview.html Other companies make similar ic's and in the Arduino world this driver is used a lot. See https://www.techmonkeybusiness.com/articles/Using_MX1508_DC_Motor_Controller.html

This basically is the simplest type of motor to control. Lots of examples on how to do this can be found online.

Then there are brushless DC motors (bldc) that need three phase driving which is a bit more difficult and in the RC world often ESC modules are used for this. https://nl.aliexpress.com/item/1005005983306835.html

Leaves AC motors which are in a league of their own, so not going in to these.

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 4010
  • Country: nl
Re: Making a motor go backwards based on a microcontroller's output
« Reply #4 on: October 14, 2024, 11:04:04 am »
H-bridges for smaller motors are often integrated in motor driver IC's. An ancient version is the L298, but it's really obsolete. It's big and bulky and needs a heatsink too. It's outperformed by for example the A4950 in SOIC. Such H-bridge IC's usually also have a built in method for measuring or limiting the motor current.

For DIY you can also buy breakout boards for such IC's. Another popular one is the L9110. It's only fit for small DC motors, but it's not very expensive.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf