Shop OBEX P1 Docs P2 Docs Learn Events
Stepper motor controlers — Parallax Forums
«1

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-06-26 12:27
    In principle, yes.
    But I am not going to visit all the web sites, collect all the technical data, and read all the fine print for you.

    That's the way you can be sure. It is a DIY hobby.

    Sorry if I seem curt, I don't mean to be insulting.

    I do strongly suggest you always buy the L298D that has a board provided with it. The pins won't line up with a regular perf board. So it will cost you more than it is worth to design and build a custom board.

    I do see your caption above is "Stepper motor controllers",
    the L298D will do that as well, but the boards are configured mainly for two H-bridges.

    It may or may not require modifications to work as a stepper motor controller. Read everything if you need to be sure.
  • whiteoxewhiteoxe Posts: 794
    edited 2014-06-26 12:39
    no offense taken at all from u loopy..its 5am, i knew i was being a bit lazy lying here in bed, thx for the reply.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-06-26 12:46
    Sparkfun's verison with board is $34.00 USD. Sorry if you bought those instead.

    The L298 has been around a long time and can be gotten cheapest on EBay. There are the L298D and several other version letters. So documentation details can be a tedious research product.

    And the truth is these all have been replaced by MOSfet devices that run much cooler. Pololu sells those on very tiny boards competitively priced, and they are easier to use for low voltage DC motors.

    Be wary of anything that Arduino supports in larger quantity. It seems much of it is old solutions that have a backlog of inventory that nobody in the industry used. Newer and better h-bridges exist for very reasonable prices.

    Sparkfun? Well, I haven't found much savings there.
  • whiteoxewhiteoxe Posts: 794
    edited 2014-06-26 13:13
    I saw the expensive sparkfun controller but the link was for a $2.95 motor controller, just a chip ?? I have three of the last ebay link. They are boards and $3.33 each !

    I would have purchased Pololu except by the time Ive paid postage they end up over $25.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-06-26 13:48
    If you're going to get a L298N get a cheap ebay board like the one in the third link. It has all the diodes and includes a 5V regulator. I have a bunch myself. My Rover 5 projects use the cheap L298N boards.

    I agree with Loppy's suggestion of getting the chip on a board but it is possible to fit the bare chip into a breadboard.

    attachment.php?attachmentid=90113&d=1330445543

    The above (taken from this post) shows the L298N chips in a breadboard. As you can see, the wiring is a mess.
  • whiteoxewhiteoxe Posts: 794
    edited 2014-06-26 15:24
    I did get the ones in the 3rd link. I'm amazed you can build up a breadboard like that ;)
  • ercoerco Posts: 20,256
    edited 2014-06-26 16:29
    You're a madman with that almost-beautiful rat's nest of a breadboard, DD. Of course, you may have permanently bent the spring contacts with those giant pins, so keep it together!
  • whiteoxewhiteoxe Posts: 794
    edited 2014-06-26 18:06
    damn Erco, I paid $3.13 for the same ones :)
  • ercoerco Posts: 20,256
    edited 2014-06-26 18:08
    I love hanging out with all you rich guys in this forum that don't mind paying a little extra. :)
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-06-26 19:31
    Best way to get the lowest price on EBay is to have your view set to Price: Lowest + Shipping first.
  • whiteoxewhiteoxe Posts: 794
    edited 2014-06-26 20:59
    I wanted to get the Pololu but it was about $10 or $15 and the postage was the same. I really cant figure out how the ones i got for $3.33 had free shipping ?
  • ercoerco Posts: 20,256
    edited 2014-06-26 21:03
    whiteoxe wrote: »
    I really cant figure out how the ones i got for $3.33 had free shipping ?
  • whiteoxewhiteoxe Posts: 794
    edited 2014-06-26 21:11
    I get it, they are collecting my information to later target me with other products ?
  • whiteoxewhiteoxe Posts: 794
    edited 2014-06-26 21:59
    Just out of Curiosity, do these little chips do the same thing as the boards , they cost more !! http://www.farnell.com/datasheets/120417.pdf
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-06-26 23:26
    whiteoxe wrote: »
    I saw the expensive sparkfun controller but the link was for a $2.95 motor controller, just a chip ?? I have three of the last ebay link. They are boards and $3.33 each !

    I would have purchased Pololu except by the time Ive paid postage they end up over $25.

    Pololu or Parallax, I have similar high shipping cost problems as I live in Taiwan. But I usually just think, save, and wait until I get a big enough order so that the shipping is spread over several items.

    It is a different world for Parallax users outside the USA... parts may be harder to afford and so on. And of course for many there is a language barrier.

    The SN754410 is an alternative to the L293. It is NOT a MOSfet device, so it has the same voltage drop and heat issues of the L293 and L298. It really doesn't matter if the internal logic is MOSfet when the final power stage is BJT. I think that is the case with this, but I can't find the details to confirm.

    In general, all the MOSfet H-bridge and stepper motor devices that are newer technology are sold only in SMD packages, not DIPs or other through-hold configurations.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-06-26 23:34
    erco wrote: »
    I love hanging out with all you rich guys in this forum that don't mind paying a little extra. :)

    Yeah, the guy that dies with the most expensive toys is the winner. Right?
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-06-26 23:36
    Duane Degn wrote: »
    If you're going to get a L298N get a cheap ebay board like the one in the third link. It has all the diodes and includes a 5V regulator. I have a bunch myself. My Rover 5 projects use the cheap L298N boards.

    I agree with Loppy's suggestion of getting the chip on a board but it is possible to fit the bare chip into a breadboard.

    attachment.php?attachmentid=90113&d=1330445543

    The above (taken from this post) shows the L298N chips in a breadboard. As you can see, the wiring is a mess.

    Gawd!!!!!!!!!!!!!! Pure, compulsive insanity.

    I actually paid about $35USD each for my L298 chips with board in kit form... long, long ago from Solarbotics... plus shipping.

    I enjoyed them at the time and they are worth exploring. But for a tiny robot they get extremely hot and quickly go through batteries. I have moved on to wanting better. So I ignore the L293, the L298, and their clones.
  • whiteoxewhiteoxe Posts: 794
    edited 2014-06-30 01:11
    I've got serious slow internet today, they tell me it will be fixed in next couple of hours.
    So Ive been soldering up a few parts on the robot im making from bits off ebay and bitds from PJ.

    My Motor Controller l298n did not come with any drawings as i guess most dont . But this evening Im having trouble fiding a schematic. Ive decided to use the Arduino intstead of The prop board or the Pi. Never Used the Arduino before so i opened up the box and powered it up. I think I can just download the code easily.

    The motor mcontroller seems to need to power sources, 5V (i think the arduino can provide that )and 12 volt , I can supply that 12 volts but I a think 6 volts should power the motors. I already have fitted 4 x AA battery box to thre robot platform. Im not positive how to wire it up.

    The three screws are power inputs I guess one is for the the 5V and One for the 6 or 12 volt. The third must be ground ?

    The other two pair of screws are obviously for the motors.

    If you have a the time and a fast internet can you post me a schematic or drawing of some kind ?

    my Motor controller
    http://www.ebay.com.au/itm/Dual-H-Bridge-DC-Stepper-Motor-Drive-Controller-Board-Module-Arduino-L298N-BY-/200991688684?pt=AU_B_I_Electrical_Test_Equipment&hash=item2ecc09c7ec

    Im in for a late night and i hope ive got it all going by midnight !
  • whiteoxewhiteoxe Posts: 794
    edited 2014-06-30 04:38
    L298N PIC.jpg
    Ive set up the motor controller as in the picture. The mootor controller and arduinio lights up when they are tuned on. But Im not sure about the how to connect ENA and ENB BOTH OUTSIDE OF THE ENA1,2,3,4 PINS. or WHY THERE IS NOTHING CONNECTED TO THE blue 5v SCREW TERMINAL,

    Ill give it a rest for awhile but I hope someone can explain some of this to me. Ive typed a message in the picture if you do click on it !

    Thx, Mike.
    1024 x 421 - 65K
  • whiteoxewhiteoxe Posts: 794
    edited 2014-06-30 04:57
    L298N PIC second pic.jpg
    Just still searching for answers.
    819 x 460 - 143K
  • whiteoxewhiteoxe Posts: 794
    edited 2014-06-30 05:49
    DSC00454.jpg
    DSC00455.jpg


    Just a couple of photos before i head to bed ;)
    1024 x 680 - 107K
    1024 x 680 - 97K
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-06-30 09:10
    The board has a 5V regulator on it. You don't need to (nor want to) provide it with 5V.

    On my Rover 5 projects I use the 5V from one of the regulators to power the QuickStart board. I always disconnect the 5V line when programming the QuickStart but I leave a ground line connected to the motor controller since the microcontroller and motor controller need to have a shared common line (as do the sensors and almost anything else one would use with a microcontroller).

    I haven't looked at the connection diagram yet. I'll look at it and let you know if there are any changes needed.
  • whiteoxewhiteoxe Posts: 794
    edited 2014-06-30 09:34
    NEW WAY TO CONNECT THE MOTOR CONTROLLER.png


    i FOUND THIS DIAGRAM FOR THE SAME MOTOR CONTROLER. tHE WIRING LOOKS different this time. One ground is going to the Raqspberry and it looks like the Raspberry is suppliying the 5V screw connecter. As its only driving one motor, it looks like theyu are only connecting the in1, in2 to the Raspberry and the yellow wires look like they might be going to the ENA. Unfortunatly, when i google my device most schematics are so detailed and big that they dont help me much at my stage of understanding.
  • whiteoxewhiteoxe Posts: 794
    edited 2014-06-30 09:59
    I had a quick search of pololu motor controllers. They give much easier to understand drawings on how to make the thing work.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-06-30 10:09
    I added some notes to the ebay photo.

    attachment.php?attachmentid=109421&d=1404146906

    As I mentioned earlier, the 5V line can be used to power other low current devices. The RPi diagram you posted is not a good solution. The Pi pulls too much power and it's not a good idea to parallel voltage regulators like that.

    The two jumpers on the right side of the photo are used when driving stepper motors or when using drive/brake PWM technique (bad idea with L298). These two jumpers should be removed. The rear pins under the jumpers are 5V sources and may be used to power low current 5V devices.

    The two forward pins under these jumpers are the enable pins (ENA and ENB). These are the pins that get pulsed to control the speed of the motors.

    To make motors turn use these pins states:
    MotorA       ENA  IN1  IN2 
    Forward     High High Low
    Reverse     High Low  High
    Coast       Low   X    X     "X" means it can be high or low
    Brake       High Low  Low    (If both IN1 and IN2 are high, it will also brake)
    

    A similar table could be made for motor B.

    What you want the program to do is to hold the 'IN" pins high or low depending on which direction to travel and pulse the enable ("EN") pin to control the speed.
    500 x 500 - 111K
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-06-30 10:17
    whiteoxe wrote: »
    I had a quick search of pololu motor controllers. They give much easier to understand drawings on how to make the thing work.

    Pololu makes and sells good stuff IMO.

    I've currently using their MC33926 dual driver board in a couple of projects.

    My encoder plus PWM code can drive these h-bridges but if you're not using encoders, it's a bit overkill.

    There are lots of ways to generate a PWM on a Propeller (and other microcontrollers).
  • whiteoxewhiteoxe Posts: 794
    edited 2014-06-30 12:15
    Well thank you Duane for making it so much clearer. That 5V was one thing that i was a bit stuck on along with the (ENA and ENB).. I had to get another device or powerpack for the Arduino, I think Ill use that instead of the prop board and simpleIDE, but i could change my mind. As the battery box holding 8 batteries was less than 4 bucks I bought that instead of a powerpack. The electronics shop is just around the corner, i took in the the Arduino and the Motor controller and the store fellow told me I needed to power them both. I was going to power the 5v screw connector with the arduino. So thanks for clearing that up too.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-06-30 13:01
    One thing erco told me which really helped was to use a low PWM frequency. I use 200Hz on my robots with L298N motor controllers and it seems to work well. If you use higher frequencies (around 20kHz) you'll get much worse performance. If you use frequencies between 200Hz and 20kHz, you'll go crazy from the noise it makes. 20kHz is above what we can hear but the controller doesn't like it. 200Hz is low enough not to be irritating. 1kHz sounds awful.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-06-30 14:54
    Not sure if you are aware of it or not but something I discovered a LONG time ago. Make sure tie all of your grounds to your MCU. I had stepper controller problems and once I tied all grounds to the MCU all worked well.
Sign In or Register to comment.