Power needs, motor drivers, and more..

Posted on
  • Hey guys,
    I'm pretty new to this world of electronics and hardware hacking in general, and I'm working on a project to build a simple 3-wheeled robot that can be controlled over internet.

    So far, I was able to get it to work, but not so reliably as I want it to, and I am guessing I have powering issues (or wiring perhaps?).

    My setup is as follows:

    1. Espruino board
    2. Adafruit CC3000
    3. H-Bridge Motor Driver 1A SN754410 (pin-compatible with L293D)
    4. HC-SR04
    5. 2x MG-6-48 Gear Motors

    The CC3000, distance sensor and even the motor driver are wired via the breadboard (even thou the Espruino tutorials sort of implied the motor driver goes soldered into the prototyping area).

    I have only one power source for everything, either my computer via USB, or a LiPo battery 1400mAh.

    If I power it directly via USB with my computer, the whole thing works, but one annoying issue: Usually when I fire a command ("FORWARD", "LEFT", etc), the motors don't really kick in, and I have to literally push it a bit. Once they starts moving, everything keeps on rolling fine.

    Now, if I power it via battery, the thing doesn't seem to have power to do anything. Sometimes I have to lift it from the ground for it to start rolling.

    So, in summary, my questions are:

    1. Is it ok to wire the motor driver via the breadboard instead of the prototyping area, or is this actually a source of trouble?
    2. Why could it be that even when powered via my computer's USB the are issues to kick in the engines?
    3. I assume the battery pack I'm using is not enough, right? What's the "proper" solution for this? Buy a battery with higher higher current? Or can I power the motors from one power source (e.g. the 4xAA pack that comes with the kit) and the Espruino with a different one, like the LiPo battery?

    Thanks a bunch in advance, and sorry if some of the questions are extremely dumb! :)

    Cheers
    gonzalo

  • Can you post how you have it wired?

  • Sure thing. I don't have a fritzing diagram yet (shame on me!), but here are some pictures of the wiring:
    https://www.dropbox.com/sc/49vw5s0ekcs3s­p8/AADpYuMGe5I6zjTJ2xILwOtLa

  • Alright! I've done my homework, here's the diagram :)


    2 Attachments

  • It sounds like you're not providing an appropriate voltage for the motors; if you say it came with 4xAA battery pack (6v) - I'd assume that's the voltage the motors are meant to be run at.

    On USB power, it would be getting 4.3v (there's a diode on the 5v), and on a 1S lipo, around 3.7v - This would explain the low torque you're observing. Run it off a battery pack (connected to the battery connector) that supplies around 6v, and it should perform much better. Since you want to use a rechargable LiPo battery, I'd be inclined to use a boost converter to step it up to the desired voltage - you can get them on ebay for dirt cheap.

  • Thanks Doctor! Switching to the 4xAA battery pack indeed gave it a much better torque!

    May I ask a couple additional noob questions?

    1. If I replace the battery pack with a 9V battery will I get even better results? Or I will just burn something? (Am I being extremely naive in thinking more V == better torque?)
    2. That boost converter you said, most the ones I find seem to output 5V (like this LiPower Boost Converter). This one seems to be regulable up to 35V this one. Is that the one you mean?
    3. Instead of the boost converter, would it also work to get this 2C LiPo battery?

    Thx!

  • and one more question: when it drives forward or back, it is always slightly turning to one side. I tried adjusting wheels, inverting them, removing sensors, etc, but to no avail. I suspect something in the wiring makes one engine get a tad less power than the other, is that again related to the voltage and will be fixed by one of the options I asked before? Or is there a wiring problem, like powering from the wrong pin or the like?

    1. Higher voltage will result in higher current, and thus more torque - HOWEVER a 9V battery can't put out as much current as a AA battery will, so you might not get 9V under load (depends on how much current the batteries draw). While the Espruino will be fine with that on Vbat (make sure the L293D doesn't put that full voltage onto any of the pins of the Espruino - I don't expect it would though), but I don't know on the motors (they probably will be okay, but they might not be, particularly if you're heavily loading down the motor.

    2. Yeah, I mean like the second one you linked to. Except purchased on ebay for one tenth the price with free shipping (for the identical item). http://www.ebay.com/itm/DC-DC-Adjustable­-Step-up-boost-Power-Converter-Module-XL­6009-Replace-LM2577-/310717070508?pt=LH_­DefaultDomain_0&hash=item48582e3cac Search term for that was "Adjustable boost converter"; I'd get more than one. All it takes is a momentary short circuit to let the smoke out of those cheap converters.

    3. You could use two LiPo batteries in series (a so called 2S configuration). That battery is a single cell battery rated at 2C (That is, it can be discharged at a rate sufficient to discharge the battery in half of an hour, in the case of that battery, that means 4A). It still only puts out 4.2V full charge (~3.7 for most of it's discharge cycle).

  • Thx a lot!

    I was reading up a lot more on the veering question, and it seems it is quite a common problem, and not so easy to solve it as it seems.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Power needs, motor drivers, and more..

Posted by Avatar for gnz @gnz

Actions