Shop OBEX P1 Docs P2 Docs Learn Events
BoeBot to something much bigger help needed — Parallax Forums

BoeBot to something much bigger help needed

JimGJimG Posts: 84
edited 2009-11-09 19:26 in Robotics
I have fiddled around building, dismantling, rebuilding a BoeBot til I am moderately comfortable with it.· Now what I wan to do is use the same basic robot electronics and programming but manage a pair of motors out of a Fisher Price Jeep that I salvaged?· The motors are 12VDC motors and should be prefect candidates for my project.· The motors can draw up to 100A at a complete stall so I know I am going to want to fuse the lines to them so they pop a fuse rather than all my electronics.· Beyond that, I am almost completely lost as to how to use the BoeBot electronics to manage these motors through some other group of components.· Can you guys help point me in the right direction?· Is an H-bridge something I should be looking at?·· Is my ignorance showing properly?

Jim

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-10-27 01:17
    ·Is an H-bridge something I should be looking at?·· YES, this is a way to safely control high amp DC motors from the stamp.

    Is my ignorance showing properly? Yes but that will fade with time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • JimGJimG Posts: 84
    edited 2009-10-27 02:15
    Stephen,

    Thanks for the confirmation.· Now, ya got a good suggestion of what to start looking at H-bridges for the hobbiest that I wn't have to get a second mortgage to buy?

    Jim
  • TimmooreTimmoore Posts: 1,031
    edited 2009-10-27 02:45
    If its the type of motor I think they are - looks similar to http://andymark.biz/am-0316.html attached to a fairly large plastic gearbox? Yes they can take a fair bit of current when stalled but they can't take stalling for very long before they overheat so you want to make sure you dont stall them. Controllers for that sort of power are not cheap. FIRST (usfirst.org) often use these motors. One of the motor controllers they use are http://www.ifirobotics.com/speed-controller-selection-guide.shtml in particular the 883. It take a servo type input that the stamp can output.
    I am not sure if I would start with that big a motor - if something goes wrong there is a lot of power floating around - I have seen those motors smoke and a bot with that sort of power can hurt. I would get some experience with DC motors and H-Bridges with a small motor such as http://www.pololu.com/catalog/category/51 and a L293D h-bridge
  • JimGJimG Posts: 84
    edited 2009-10-27 02:53
    Timmoore,



    I don't doubt that you are correct.· The issue is that I have these motors and don't have to go buy more and then have to figure out the gears and all of the other things from the get-go.· I can mount these under somthing and be on my way.· Over a period of time I am going to take the "from-scratch" approach but am trying to get a foothold without having to spend anymore than I have to.· Now, I realize that the cost of the H-bridges for the motors I have might end up being more thatn the cost of buying new motrs, with appropriate gearing, etc., and samll H-bridges.· I have to figure that out yet.

    BTW, the moters are: http://www.mabuchi-motor.co.jp/cgi-bin/catalog/e_catalog.cgi?CAT_ID=rs_550pcvc·these guys.

    Jim
  • TimmooreTimmoore Posts: 1,031
    edited 2009-10-27 03:13
    Some suggestions

    http://www.robotshop.us/robotshop-rover-arduino-tank-kit-5.html
    http://www.robotshop.us/dfrobot-4wd-arduino-mobile-platform-4.html

    They are both fairly cheap - the 2nd is $41, you get a chassis and motors. The motors can be driven with a L293D which is $2-3 or a small controller.
    I have used both: the 1st goes together easily, the 2nd comes put together. You get a chance to try H-Bridges etc without the worry of building a chassis that works.

    Another option is to take your boe-bot and replace the servos with http://www.solarbotics.com/products/gm4/
    This looks like a servo but is a normal DC motor that will need a H-bridge to control
    I have used similar motors before - they tend to be slow but no worse than a servo will be.

    Are you planning on use the stamp to control it? I haven't used a stamp and dont know if it can generate the 2 PWMs you need or whether you will need something like a PWMPAL
  • ZootZoot Posts: 2,227
    edited 2009-10-27 05:18
    JimG's motors are *big*. Check the specs. By "jeep" I bet he means a ride-in kid's electric jeep, not a small remote-controlled toy.

    In any case, JimG, you need some very, very beefy H-bridges/motor controller. Will not come cheap. An integrated controller (i.e. one you can pulse like it was a servo, or that you can communicate with serially) will add even more to the cost. If it were me, I would probably pick up a pair of high-current full H-bridges on a board and set up something like an SX to run them (via PWM). Even so, a board in the current range will probably run $150-$250 -- and you need two of them.

    Of course, if speed control is not an issue, heavy-duty relays (salvaged?) might do, but even so, 100A is hefty and you'd still need driver circuits (or something like a darlington array IC) to trigger the relays from a micro like a Stamp.

    That said, you could purchase your own components and roll-your-own H-bridges, but given the requirements it might be better to purchase made units -- you'll save huge amounts of time and frustration. THEN, for your next project, build your own given that you'll know what they are and how to use them smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • agfaagfa Posts: 295
    edited 2009-10-27 12:31
    I built a bot using motors from a·kids riding toy.· These motors stalled at 8 amps, though.· To stay in my budget, I combined relays for directional control, transistors for motor drive, and a small pololu Hbridge to generate PWM.· 2 large transistors, 4 salvaged relays, and a·small Hbridge·were a lot cheaper than a pair of large·Hbridges.· If I had to do it over I would use a MOSFETs instead of a transistors,·the transistors I used were inefficient and ran very hot.
  • PrettybirdPrettybird Posts: 269
    edited 2009-10-27 13:32
    Just starting on H bridges. I am now experimenting with a H bridge similar to the LM298 but they eat up I/O and the stamp can't provide a PWM pulse for speed. Experimenting with a 555timer and TTL logic gates for now but may end up going with the Pololu chip. No external parts needed but a different kind of programming. Lots to learn. Sounds like you need a battle bot DC motor control or something industrial.


    Post Edited (Prettybird) : 10/27/2009 1:46:47 PM GMT
  • JimGJimG Posts: 84
    edited 2009-10-27 16:10
    Thanks guys, for the various replies. It is starting to look like I have bitten off more than I can afford to chew. Me thinks I better find some smaller motors. What a shame, these are real beauties and I think I can probably get more with a simple ad on Craigslist...where I got these for nothing.

    Jim
  • JimGJimG Posts: 84
    edited 2009-11-04 03:36
    Prettybird,

    You can generalte PWM with a Basic STAMP.· Take a look at the PULSOUT command.

    Jim, K6JMG
  • allanlane5allanlane5 Posts: 3,815
    edited 2009-11-04 22:01
    Sorry, "JimG", while you CAN generate PWM with a BS2, it's really hard to generate TWO channels of PWM at the same time, with reliable timing. PULSOUT is designed for controlling Servo's, not for creating an H-Bridge driving signal for two motors.
  • JimGJimG Posts: 84
    edited 2009-11-04 22:25
    Allenlane,

    I am NOT challenging you, I just am ignorant. Help me understand, please. If I issue to PULSOUT staments on right after the other are you saying that there is a timing issue because they are not issued at the same moment in time? If that is the case how is this done with any other chip short of multithreading?

    Jim
  • ZootZoot Posts: 2,227
    edited 2009-11-04 23:19
    JimG - It's a question of timing, not whether or not the pulses are staggered. Servo pulses are sent every ~20ms, and by definition, the pulses don't have to be consistently spaced (usually anywhere from 15ms-30ms or even higher will work before the servo is either over-driven or stops reading signal).

    PWM for H-bridges and the like are much much higher frequency, and are duty cycle based, so the PWM really needs to be very fast, very tight, consistent. Even with some clever coding to simulate it, the Stamp isn't fast enough to do this reliably, nor would there be any time left over for other tasks. On a fast micro with deterministic timing (say an SX or PIC or AVR using interrupts or a Prop with multiple cogs), the PWM state (high/low) and duty lengths of the output pins can be tightly maintained while there is still plenty of time in the mainline program for other tasks -- like reading sensors, updating servo/motor values, outputting to displays, etc.

    For example, technically this code would drive two full H-bridges in one direction then the other.

    idx VAR Word
    
    OUTA = %0000
    DIRA = %1111
    
    
    Forward_Half_Speed:
      FOR idx = 0 TO 1000
          OUTA = %0101
          OUTA = %0000
      NEXT
    Forward_Full_Speed:
      FOR idx = 0 TO 1000
          OUTA = %0101
          OUTA = %0101 ' to even try to get consistent timing
      NEXT
    Left_Forward_Right_Backward_Half_Speed:
      FOR idx = 0 TO 1000
          OUTA = %1001
          OUTA = %0000
      NEXT
    
    
    
    



    The problem is that times will not be consistent (the loop on the "next" will take a bit more time then writing the two values to the output pins). And slow. And 1000 *what* in the loop? The loop is not 1000 *anything* such as milliseconds, or clock cycles -- it's just 1000 of however long it takes the particular Stamp to execute one iteration of the loop. Lastly, you would have no time between changing/updating outputs to do other things.

    For the novice user, and when $$ is less of an issue, there are standalone PWM modules like the PWMPal, and other pre-programmed chips. Otherwise -- as I and many have done -- you can program a separate micro to be your own home-brew motor controller, that accepts commands from the host (a Stamp or other micro) via serial or the like, and outputs/updates things like PWM, encoder counts, etc.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php


    Post Edited (Zoot) : 11/4/2009 11:27:04 PM GMT
  • JimGJimG Posts: 84
    edited 2009-11-04 23:47
    Well, pooh; I thought I was making such wonderful headway.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim, K6JMG

    www.spinochio.com

    //

    ·
  • mikedivmikediv Posts: 825
    edited 2009-11-05 00:07
    Couldn't you just use high amp transistors? JimG I hear you I picked up an old kids car at the dump and salvaged the motors they are very heavy duty before I pulled it apart the car pulled me around the driveway I weigh 245Lbs .
    I was thinking of just using some big can transistors behind my prop control board .. Wouldnt this work?
  • ZootZoot Posts: 2,227
    edited 2009-11-05 00:34
    JimG has two separate issues -- the need for a *way* heavy duty H-bridge or similar driver for very, very high current motors; the need for a control system to run the H-bridge.

    JimG -- for what it's worth, if you built the driver portion, the sample code above, or something similar, would certainly suffice for testing the hardware and seeing if it drives your motors, gets hot, burns, etc smile.gif, then you can get clever (or not) with how to send the control signals you need to the driver.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • JimGJimG Posts: 84
    edited 2009-11-05 01:29
    Zoot,

    Just FYI, I have set tehbig motors aside in favor of a couple of small motors salvaged from printers. I have to other robotic motors with gear trains and wheels ont eh way. The stobe-bought jobs draw about 1A at stall. I am driving the with a L298 chip. I want to drive th eL298 with the STAMP but am starting to see that that isn't going to work.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim, K6JMG

    www.spinochio.com

    //

    ·
  • ZootZoot Posts: 2,227
    edited 2009-11-05 04:06
    You could still try simple code like what I posted to drive the control pins of the H-bridges in the L298. Just to see if your motors drive.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • JimGJimG Posts: 84
    edited 2009-11-05 04:14
    Zoot,

    I'm doing it with just PULSOUT commands but will try the code you werer kind enough to post tomorrow. Just so you know, I am setting the motor pins high or low as is appropriate and pulsing the enable pin on the L298.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim, K6JMG

    www.spinochio.com

    //

    ·
  • ZootZoot Posts: 2,227
    edited 2009-11-05 04:23
    I would just tie the enable pins high and use the 1A/2A inputs for driving each side of the H-bridge and 3A/4A for the other side. That's what my sample code is designed to do. If you look at where the nibble for the OUT pins are set, each pair of A inputs to the H-bridge is either 1 or 0, but both are never 1.

    00 = off
    01 = forward (or reverse depending on how motor is wired)
    10 = reverse

    So by switching rapidly between 01 and 00, for example, you get a speed.

    Pin0 => 1A ' motor 1
    Pin1 => 2A ' motor 1

    Pin2 => 3A ' motor 2
    Pin3 => 4A ' motor 2

    You could wire up a switch to both enable pins which would give you a "kill" switch that could be tiny as it doesn't have to handle the actual motor current.

    Setting pins for direction and then sending PWM to enable is nice, but takes an extra pin for each motor (6 total instead of 4). Over-the-counter motor driver modules often have some NAND logic glue chips that handle setting the two direction pins with one master input pin (direction=0 or direction=1) and a separate master input pin for PWM (speed). This saves the host from needing more pins and absolutely prevents a programming error from driving both sides of the H-bridge high at the same time (not really a problem in an intergrated IC like the L29X series, which shuts down upon such an input error).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • ercoerco Posts: 20,256
    edited 2009-11-05 19:11
    JimG: That's a huge jump from a BoeBot to 100A stall motors. No baby steps for you! Those Power Wheels motors are very fast & torquey, do you really need that much power? If not, you may be overbuilding/overcomplicating things, which usually costs in dollars and time.

    I'm also upsizing from Boebot/Scribbler, but in a more manageable step. I found small 24V, 1A stall gearmotors that I'll be operating at 12V, 500 mA stall. I want a slow & careful platform for indoor navigation. Lots of choices for CHEAP motor control with these low-power motors, anything from a $30 dual motor controller to bang-bang relays. And my battery is a cheap gel cell, brand new for $14. Something to consider, based on your needs.

    I started a Robotics thread under $10 gearmotor. My chassis is complete, and should be driveable in a few days. I'll post some pics & vids when I can.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • JimGJimG Posts: 84
    edited 2009-11-05 20:13
    Erco,

    You go!!

    As I mentioned in this thread somewhere, I have put the big motors on the shelf for the time being and ordered a couple of 1A motors with gear assemblies and wheels to play with. The issue remains as to how to drive the L298 which in turn drives the motors. I have some suggestions that I am following up on but am always open to alternate ideas. I may end up (sacrilege) using a BaasicATOM instead of the STAMP.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim, K6JMG

    www.spinochio.com

    //

    ·
  • TimmooreTimmoore Posts: 1,031
    edited 2009-11-05 20:36
    I use the prop to drive a couple of L298s. That is pretty straight forward, I just connected the pwm and INX pins to the prop and the rest is software. The prop generate the pwm signals and controls the direction pins.
  • JimGJimG Posts: 84
    edited 2009-11-05 20:40
    I may have to move to the Propeller.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim, K6JMG

    www.spinochio.com

    //

    ·
  • MacGeek117MacGeek117 Posts: 747
    edited 2009-11-09 00:24
    @JimG: Moving to the Prop may not be a bad. (although I may be a bit biased!)
    With 8 cores of processing power and those new 6.25 MHz crystals you'd be hard pressed to have speed issues!
    RoboGeek

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    BS2: $49


    SX48 Protoboard: $10

    Propeller Protoboard: Priceless

    www.apple.com

    www.parallax.com

    www.goldmine-elec.com

    www.expresspcb.com

    www.jameco.com
  • P!-RoP!-Ro Posts: 1,189
    edited 2009-11-09 00:39
    get the propmod sd--no i'm not biased it's just the best

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PG
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-11-09 19:26
    Totally agree smile.gif

    I also use my Propteus board (link in sig) for my robots - I designed it for easy prototyping and 12 servo's.
    RoboGeek said...
    @JimG: Moving to the Prop may not be a bad. (although I may be a bit biased!)
    With 8 cores of processing power and those new 6.25 MHz crystals you'd be hard pressed to have speed issues!
    RoboGeek
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheusdual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory IO board kit $89.95, both kits $189.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
Sign In or Register to comment.