Forum Update - Announcement about May 10th, 2018 update and your password.

DC Motor control

I am trying to control 2 dc motors (KEDA 1000 v brushless ) using an H-Bridge Dual motor drive MC 33926 but can't figure out the wiring. There are 3 leads from the motor so not sure where they go, the Parallax tutorial just seems to cover the Arduino board examples. I also bought a Parallax X Rotor 20 A Electronic Speed Controller but again can't find any wiring or code examples. Any help would be appreciated, thanks.


  • 12 Comments sorted by Date Added Votes
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 21,842
    edited February 18 Vote Up0Vote Down
    The H-bridge drive is designed for brushed DC motors or steppers and won't work with your motor. The Parallax ESC is the one you want to use. The red and black wires go to your battery. The three sockets at the end go to your motor. You will need to crimp bullet connectors onto your motor leads to make the connections. The black/white twisted cable goes to your servo output (either an RC receiver or your microcontroller): black to ground, white to the control output. If, when you control the motor, it turns in the opposite direction of the one you want, swap any two of the motor wires connected to the ESC.

    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Thanks Phil, I will give it a shot.
  • I plugged the motor to the Parallax ESC and ran the red and black leads to a 9 volt battery and the black and white leads to my Board Of Education (Rev D). Next I ran the following program but all I got was a musical tone and a slight movement of the motor. I then replaced the motor and ESC with a Parallax Standard Servo and the motor responded properly. I think I am on the right path but have hit a roadblock here, any help would be appreciated.
    Here is the program:
    'Program Name ServoTest.bs2
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    counter VAR Word
    DEBUG "Counterclockwise 10 o'clock", CR
    FOR counter = 1 TO 150
    PULSOUT 14, 1000
    PAUSE 20
    DEBUG "Clockwise 2 o'clock", CR
    FOR counter = 1 TO 150
    PULSOUT 14, 500
    PAUSE 20
    DEBUG "Center 12 o'clock", CR
    FOR counter = 1 TO 150
    PULSOUT 14, 750
    PAUSE 20
    DEBUG "All done."
  • A 9 volt battery probably will not cut it. The is very little current to move the motor. You need a 2 cell or better yet a 3 cell Li-Po battery.

    Also see this:
    Eureka!!! With some tests I found out that the pulse width had to be above 800 for my ESC to recognize it. I tested from 800 to 1500. With 1500 not being a good idea because I drained the heck out of the battery. I am going to charge it for a few hours and run some other tests.

    Make sure your connections are like this, (Reciever is replaced by your BOE)

    640 x 262 - 29K
    Infernal Machine
  • Thanks!!
  • I am wanting to get a chassis with two 9v dc motors. Should I use this technique, or relays to provide and cut power?
  • The ESC gives you much finer control over the power going to the motors than the simple on/off a relay does.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • Thanks!
  • GenetixGenetix Posts: 1,197
    edited April 13 Vote Up0Vote Down

    An ESC is a lot more efficient than a relay especially when you are using batteries that have a limited energy capacity.
  • Here is a good ESC for a good price. Remember to purchase an ESC for Brushed motor, not Brushless
    Infernal Machine
  • You could also use the Parallax dc motor controller as well. It works up to 3 amps: Dual Motor Driver MC33926

    I have used it on 6 volt tank I had laying around. Worked great.

  • Alright, then.
Sign In or Register to comment.