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.

Comments

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.

-Phil

Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery

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
NEXT
DEBUG "Clockwise 2 o'clock", CR
FOR counter = 1 TO 150
PULSOUT 14, 500
PAUSE 20
NEXT
DEBUG "Center 12 o'clock", CR
FOR counter = 1 TO 150
PULSOUT 14, 750
PAUSE 20
NEXT
DEBUG "All done."
END

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)

Probably not. The issue is the amount of current drawn. Even though the motors are rated at the same voltage as used by the Stamps (5V) and the Propeller (3.3V), most logic gates, including the I/O pins of pretty much all microcontrollers, can only output 20-30mA. This is enough to light an LED or drive a low-current relay coil, but not much else. In addition, I/O pins are usually arranged in groups of 8 and there are separate maximum current limits for these groups and for the device as a whole.

There are all sorts of buffers that can be driven by an I/O pin and can, in turn, handle currents on the order of 1A. Parallax sells the 2N3904 NPN transistor which can handle up to 200mA. Look at the Nuts & Volts Column #6 for examples. You'll also need what's called a flyback diode, something like a 1N4001. This prevents the collapsing magnetic field of the motor (when it's switched off) from frying the transistor and maybe the microcontroller too as a reverse voltage spike is produced by the motor windings.

With bottle-cap tires(with rubberbands and rubber cement for traction), est. 0.75 in. dia. That's about 2.4 in circumference, so you would travel about 2.4 in per rotation. I'm going to say 15,000 rpm(about 1,500 under max.), so that's 36,000 inches traveled in a minute. 6,000 in. per second. I'm thinking that there is better, safer work for these guys in r/c planes.

The greatest thing about logic is that, once you have followed the thought train, it is then your own.

You reverse the polarity of the power source by using an H-Bridge driver. The L293D has 4 half bridges in it which you can use to control two separate reversible motors (see the link to the L293D datasheet on that page).