Saturday, September 09, 2006


Motor spinup

Well, the motor spins.

I wrote a simple program that spins the motor one direction for a second, then spins the motor in the other direction for a second, and repeats infinidum.

Unfortunately, the motor only wants to spin in one direction.

If I reverse the voltage manually by connecting the motor directly to the voltage inputs, it works.

If I remove the motor from the H-Bridge, and measure the voltage there, it's reversing the voltage.

But, if I connect everything together, the motor pulses every second, but continue to spin the same direction. If I measure the voltage coming out of the H-Bridge, it's magically no longer is reversing every second.

Something from the motor must be getting back into the input electronics. I'm not sure what -- the power on the motor is pretty isolated (H-Bridge runs on 5V, the circuit driving the H-Bridge runs on 3V, and the motor runs on 12V). The capacitor on the motor should be soaking any back EMF, so I'm just not sure what's going on at this point.

I'm going to need to solve this problem before I start in figuring out how to get the encoder hooked up.

It also appears I've fried the NAND gate that triggers the enable ports on the H-Bridge. I must have shorted something trying to debug the voltages. After this, I might just decide to avoid the NAND gate altogether, and just drive the EN pin with it's own output from the CPU. This means I'll only have enough ports to drive 3 motors. Seeing that there may be better solutions anyway for synchronization, I think I'm going to go back to the one CPU per motor, more inline with standard RepRap.

It's simple, the H-bridge is possesed!

Could the current drain to the motor be causing something unholy?
I'm very happy that somebody is taking on the design of an H-bridge from discrete parts for RepRap and I'm incredibly happy that it isn't me. :-)

I got really close to taking this project on back when I was working on the Frankenmotors. I had nightmares that pretty much matched beagle's hands-on experience as he describes it. Had it been me, though, I think that at least one small fire and possible a sharp bang or two with an arpeggio of burned insulation stink and white smoke would have been in the offing.
Post a Comment

Links to this post:

Create a Link

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to
Posts [Atom]