Shop OBEX P1 Docs P2 Docs Learn Events
Propeller for Bi-polar stepping motor — Parallax Forums

Propeller for Bi-polar stepping motor

jamieZjamieZ Posts: 4
edited 2006-11-01 22:38 in Propeller 1
Hi all.

··· I am new to this forum, so please don't hit me so hard if i asked a stupid question.

··· I am in the process of developing a XYZ robot which will consume the chip about 3000+pcs each year at the first year, and the propeller chip looks to be a perfect choice for the application; however, i have some concerns before i dig myself into the SPIN code.

··· I am just wondering if I can use this one to direct drive 3 bipolar stepping motor, not using any other stepping motor driver chip.

··· I understand I can configure two pin in one cog as step/direction output, but that way, we have to buy another driver chip, which is about $5 dollar in large quantity. that will add another $15 and extra PCB space for the design, which is our low cost consumer machine cannot bare.

··· Please, any advise will be welcome, I am open to any suggestions.

··· Thank you very much
Jamie

Comments

  • jamieZjamieZ Posts: 4
    edited 2006-11-01 19:38
    By the way, it must be Bi-polar, not uni-polar
    Thanks
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-11-01 20:05
    Unless the motor is really wimpy, you won't be able to drive the coils directly with the Propeller. To drive a bipolar stepper, you'll need two "full-H-bridges". You can make these yourself with transistors to drive from the Propeller pins, but you've got to be extremely careful about cross conduction. Corss conduction is a temporary short condition across one side of the bridge when its "direction" changes. It can fry your driver transistors. Most integrated driver chips address this issue internally through the use of "break-before-make" delays. Some even provide the protection diodes internally, along with the switching needed for PWM-driven microstepping. Personally, I think that integrated H-bridge drivers are worth the money. But don't waste your hard-earned cash on integrated front ends for them. The Propeller can easily handle the stepping logic and PWM for microstepping on its own.

    -Phil
  • jamieZjamieZ Posts: 4
    edited 2006-11-01 20:15
    Thanks a lot Phil.

    I think in the PWM objects, it offer some sort of current limiting setting which will be pretty helpful.

    The motor i am driving need about 3A RMS current, so I need 4 exteranl MOS-FET anyways. any I am trying to see if there is anyway I can eliminate the driver chip.

    I have seen couple of people use this chip to drive a unipolar motor without any problem. Is the Cross conduction only happen on H-bridges or it exists on the unipolar driver as well. I think for unipolar drive it is pretty straight forward for implementation, but for bi-polar it is really so much different.

    Thanks for the input.

    Jamie
  • T ChapT Chap Posts: 4,223
    edited 2006-11-01 20:32
    A simple solution is an IR2184 mosfer driver that protects against shoot through as mentioned. The Propeller can eaily manage 3 motors(step/dir) and even read 3 encoders if desired, including PWM in whatever configuration you like. With the 2184, you use 4 N channel mosfets. You can run logic level mosfets right off the driver. Either way you go, you have to have something similar to this list

    3 Hbridges=

    12 mosfets
    1 Propeller
    3 2184's or 3 of some other hbridge driver (stick with 2184 imo)
    12 heat sinks if needed?
    3 sense resistors wattage depends on your current
    1 quad comparator ie LM339
    PWM circuit by some method, a few ic's, usually AND gates
    Trim pot to set current threshold


    PWM signal can be generated by Propeller, but implementation is based on your needs, current, voltages, but you didn't mention those details. This could be managed by a few IC's. For best performance you need to hit the motors with over twice the rated voltage, then chop the current. If they were very tiny motors that didn't require signidficant torque, then maybe you could get away with using the rated voltage on the motors with not PWM chopper.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-11-01 20:38
    Jamie,

    Cross-conduction is not an issue with unipolar drives since the current direction in a winding never reverses. However, two full-H bridges will set you back eight MOSFETS (four for each winding), compared with four total for unipolar drives. Still, I much prefer bipolar steppers. You get more torque per cubic inch, since both windings are always energized. Theoretically, you could drive each of the eight MOSFETs with a separate Propeller pin (through appropriate MOSFET drivers*) and handle the anti-cross-conduction timing in software. But I don't recommend it. You'll end up destroying a lot of transistors before the code is debugged.

    Another issue I forgot to mention is current regulation. For the best torque, you need to drive a 5V motor, say, with 24V and monitor the current so you can chop the drive to keep it constant. This is because the motor coils exhibit a high inductance, and it's quicker to get current started flowing with a higher drive voltage. But sustained driving with such an overvoltage will burn out the motor. A less efficient method is what's called "L-4R", wherein power resistors are put in series with the motor windings. But for that you'd need monster heat sinks for the kind of current you're talking about. You could do the current monitoring and chopping in software, but again, you'll burn up a lot of components during the debugging.

    -Phil

    *The MOSFET drivers are required -- at least for the P-channel devices since the Propeller can't turn them off if they have higher than a 3.3V coil supply. They may also be needed for the N-channel MOSFETs, since 3.3V is not high enough to turn most MOSFETs fully "on".
  • T ChapT Chap Posts: 4,223
    edited 2006-11-01 22:12
    Phil thanks for the correcton on the required mosfets on Hbrdiges, I am doing a uni board right now and lost track of whats' what.

    The 2184 is suited to the Biploar hbridge as it has a charge pump to the the gate voltage higher than the rail as needed on the high side for nfets. Whereas using P channel on the highside has it's own issues to deal with. If you can use uni, it is simpler all the way around, less parts, realestate.

    Keep in mind if you are using the motors where they will always be braked when not in use, that will required constant PWM chopping and there are noise issues related to a motor sitting still( max current) and oscillation noise. I like to set motors up to turn off if not in use, unless they are really holding something in place like an object suspended on a timing belt.
  • jamieZjamieZ Posts: 4
    edited 2006-11-01 22:27
    Thanks a lot for the input.

    I was pretty sure i was going to finish the application myself, but now, i think it is a much better idea to have someone work it out for me.

    Is there anyway I can have somebody to workout the electronics on a paid basis.

    I understand, it will be an insulting to offer any kind of price for this sort of intellgent work.

    I am developing a machine which need 3 stepping motor, one keyboard scan, couple of home sensor. real time calculation for motor operation. later it will have to communicate with a storage memery stack to fetch the data and run the motor accordingly.

    I cannot fully disclosure the function of the device for the obvoise reason.

    I don't know if anybody will be interested in something like that.

    Please email me at zzhengu@hotmail.com

    I really appriate all the help

    Thanks
    Jamie
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-11-01 22:38
    Originator99,

    I completely forgot about using n-channel MOSFETs on the high side, too. Thanks for the reminder! The modern charge-pump drivers make that possible, and the n-channel devices usually have better characteristics than their p-channel brethren.

    -Phil
Sign In or Register to comment.