Shop OBEX P1 Docs P2 Docs Learn Events
L239D with Stepper and Basic Stamp — Parallax Forums

L239D with Stepper and Basic Stamp

hobergenixhobergenix Posts: 3
edited 2012-09-29 08:14 in BASIC Stamp
I have the Basic Stamp hooked up to the L239D driver chip and am driving the 12V stepper I bought
from Parallax with no problem. I would like to drive another stepper useing the L239D. The motor I want to
drive is 2.8V with a coil phase resistance of about 1.65 ohms. Is it possible to drive this motor and would
I need some power resistors added to the circuit between the motor and the L239D.

Mike

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-09-27 05:55
    Seems PJ confused the L239D with the L298. That link might confuse the issue.

    The problem with controlling motors and steppers with solid-state devices in general is that there is a certain amount of voltage drop in the motor control circuitry. Since transistors have about 0.7v drop each and an H-bridge uses two, the drop can be 1.4v. If Darlington transistors are used, this doubles the H-bridge to 2.8v consumed before the motor gets anything to drive it.

    If you use a 5V power supply and have to deduct 2.8v for control, the results are a 2.2v for motor drive. One either has to have a higher voltage power supply to the motor, or find a motor that will work at a less voltage. The choice is up to you. I suspect you only need a half-H-bridge and the voltage drop would be 1.4 V with a Darlington in that case.

    Frankly, you have 2.8 volts at 1.65 ohms. That would seem to indicate 2.8/1.65 = 1.7amps; which is way over the L293d limit of 600ma. It is also over the L298 limit of 1000ma.

    You could use TIP120 Darlingtons driven directly from your microprocessor and powered by(2.8+1.4) say 4.2 VDC. If you go to a higher voltage for powering the stepper, you have to insert a power resistor to dump the extra power by restricting current or using PWM to restrict the actual power delivered to the motor. My guess is you are going to use a 5VDC supply with 2 or more amps as you need power to each coil separately

    In any event, forget using an L293d or an L298 chip. With this stepper, you need more amps than either can deliver. The TIP120 is a good fit as it will handle up to 3amps nicely and has protective fly back diodes. And if you need the compliment, there is the TIP125. Both can be easily driven directly form a microcontroller.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2012-09-27 09:25
    No, no confusion, grist for the mill. It's like a lot of stuff around here: Some will say "yes, you can", some will say "no, you can't".
    At any rate, it's zombie tech - like TIP120s.

    [Putting the diode across the transistor is OK for the transistor's sake, but that does nothing for the power supply. So the diode should always be across the coil / winding.]
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-09-27 11:12
    That is a very good point PJ. Still, this particular stepper motor seems too power hungry for a chip solution, unless there is something more modern and hefty that the L239 or L298.

    I am curious what the stepper motor has in the way of how many coils and how many wires. The TIP120 and TIP125 are cheap, available, and easy to interface is such a situation. They will even run relatively cool.
  • hobergenixhobergenix Posts: 3
    edited 2012-09-27 12:05
    The way it is set up is that the L239d has 12v input to the chip for the stepper motor power. My Board of Education
    proto board is powered with a 12v wall wart. Their is a jumper on the board that makes the 12v avaible on a few header
    pins as Vin for the L239d chip that drives the stepper motor. The schematic I am useing is on page 150 of the StampWorks
    manual.

    I would like to try useing another stepper motor that has a coil voltage of 2.8v and I think the phase resistance was something like
    1.65 ohms. I was wondering if I could put some power resistors into the circuit I could bring the current down enough to safely
    drive the new stepper motor. My other question woud be is if their needs to be a higher current power supply used to make this
    work.


    Seems PJ confused the L239D with the L298. That link might confuse the issue.

    The problem with controlling motors and steppers with solid-state devices in general is that there is a certain amount of voltage drop in the motor control circuitry. Since transistors have about 0.7v drop each and an H-bridge uses two, the drop can be 1.4v. If Darlington transistors are used, this doubles the H-bridge to 2.8v consumed before the motor gets anything to drive it.

    If you use a 5V power supply and have to deduct 2.8v for control, the results are a 2.2v for motor drive. One either has to have a higher voltage power supply to the motor, or find a motor that will work at a less voltage. The choice is up to you. I suspect you only need a half-H-bridge and the voltage drop would be 1.4 V with a Darlington in that case.

    Frankly, you have 2.8 volts at 1.65 ohms. That would seem to indicate 2.8/1.65 = 1.7amps; which is way over the L293d limit of 600ma. It is also over the L298 limit of 1000ma.

    You could use TIP120 Darlingtons driven directly from your microprocessor and powered by(2.8+1.4) say 4.2 VDC. If you go to a higher voltage for powering the stepper, you have to insert a power resistor to dump the extra power by restricting current or using PWM to restrict the actual power delivered to the motor. My guess is you are going to use a 5VDC supply with 2 or more amps as you need power to each coil separately

    In any event, forget using an L293d or an L298 chip. With this stepper, you need more amps than either can deliver. The TIP120 is a good fit as it will handle up to 3amps nicely and has protective fly back diodes. And if you need the compliment, there is the TIP125. Both can be easily driven directly form a microcontroller.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2012-09-27 19:29
    I figure, power resistors to "bring the current down enough" = definite No.
    A motor limits its own current, sort of like a light bulb.
    It's the over-voltage that results damage.
    Ever used resistors to pad down the supply voltage for a lamp?
    [You don't see that much.]
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-09-27 23:10
    At some point in every electronics hobbyist learning curve, you have to just accept that what you need to learn is how to go from a control signal of 5V (or 3.3V) at less than 20 ma through a circuit that amplifies that signal to provide enough appropriate power to do something quite useful.

    Motors have their limitations. One is the maximum voltage, another is the maximum current. Together VxI=Watts of power consumed. Generally, going over the voltage destroys the motor due to lack of proper insulation, going over the amps with a higher voltage is going to cause over heating and heat destruction. What you want to do is to make the motor reside in a comfortable range according to its ratings.

    The realization that you need to learn more usually comes when a mechanical solution requires a motor with some real power. 743 Watts roughly equals 1 horsepower, so you can always gage your motor size in watts to see where it fits in. 1.7amps at 2.8 volts is not really that much, less that 5 watts - but it is outside the range of the L239 and the L298.

    The other problem here is that you really need a 4.2 volt power supply, not a 12 volt power supply and it needs to provide a few amps. If you have 12 volt supply at 500ma, it may be dropped to 4.2 volts. But without going through a conversion to AC and through a transformer and back to DC, you are never going to get more than the 500ma, even if you are successful in dropping the 12 volts down to 4.2 volts with an LM317.

    So the second part of this learning curve is when to get serious about providing the RIGHT power supply to a project.

    Of course, you could avoid the whole learning exercise and just stick with 12V steppers and the L293. After all 12V at 500ma can provide 6 watts of mechanical power.
  • hobergenixhobergenix Posts: 3
    edited 2012-09-28 23:33

    I have learned a lot. I think I will go with a NEMA-17 motor that is rated for my L239D driver chip.
    Right now I am new to microcontrollers and am having a blast. I plan on useing the motor to drive
    a small trolley back and forth on some Makerslide. Today I added a optical sensor to the setup and
    was able to modify the code to stop the motor when tripped. I am learing one step at a time!

    I have taken a look online and ebay and have run across a lot of step motor driver boards that are
    very cheap.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-09-29 08:14
    I did a bit of re-reading about the L298 chip. It will handle two amps, not just one.

    But it has quite a bit of internal voltage drop in the h-bridge and you would need to supply 7.7volts for a 2.8 volt stepper. That is a hefty 4.9 voltage drop at 2 amps!!!

    With some steppers, a UNL2803 will work nicely - each output is 60ma and up to 30 volts. But what ever you do, you have to what the voltage drops that occur in the control circuitry. So the power supply is as must an issue as the control board and the motor voltage.

    Parallax has some stepper motor control boards that handle more current and more voltage.
Sign In or Register to comment.