Shop OBEX P1 Docs P2 Docs Learn Events
usb motors — Parallax Forums

usb motors

lobolobo Posts: 100
edited 2007-11-24 09:36 in General Discussion
a have several motors and would like to connect a usb cable to them, to connect them to my pc. My question is how do i do this? can somebody show me a schematic?· Every motor only have black and red cable i need to know how to connect a usb cable to them

thank you for your help.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-24 05:56
    You need a motor controller with a USB connection. There are several kinds of motors: servo motors, stepper motors, and DC motors. The DC motors are the only ones with only two wires. Parallax carries several kinds of motor controllers for DC motors, but they all require logic level serial connections. They do sell USB to serial adapters and you could combine the two to get a USB to DC motor controller. Look at the Pololu controller and the USB2SER adapter:

    www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/txtSearch/pololu/List/1/ProductID/71/Default.aspx?SortField=ProductName%2cProductName

    www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/txtSearch/usb2ser/List/1/ProductID/32/Default.aspx?SortField=ProductName%2cProductName
  • lobolobo Posts: 100
    edited 2007-11-24 06:08
    i understand that, but i wanted to see if anyone hade a schematic to create ones own circuit to make a dc motor into a usb motor so that i could just connect does thoes wires to the newly created usb circuit and then connect a usb wire to it and connect the other end to the pc...
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-24 06:20
    There is no simple circuit to do what you want. The circuit that Parallax uses for their PropPlug is about as simple as it gets for a USB to serial converter. Download their documentation to have a look at it.

    For the motor control, you really need some kind of microcontroller plus what's called an H-bridge. Again, Pololu's is pretty simple. You could make your own motor controller using an SX microcontroller with an H-bridge.

    You could check the various hobby electronics magazines for other possibilities. I know Circuit Cellar and Nuts and Volts have had designs for USB controlled devices, but I don't remember seeing a DC motor controller. You'd need an H-bridge anyway since that's the only way to control the current involved.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-11-24 07:40
    lobo -

    Please remember that if you're planning to POWER these motors from a USB port that there is a very limited amount of power available from the port itself. Also remember that motors have quite a bit of amperage draw on start-up, and that there may well be a back-EMF issue when they are shutdown. Either of these conditions could blow a USB port apart if they're powered directly from the USB port. If you were planning to supply power to the motor(s)separately (separate power supply) and just use the USB port to control the motor, that's a different story.

    Jan Alexson's "USB Port Complete" is probably the best book for learning about USB ports, and what you can do with them SAFELY. Here is a link to that book: http://www.lvr.com/usbc.htm

    Jan's books are easy to read, and quite comprehensive in their content. Below is a link to the USB Section of her web site: http://www.lvr.com/usb.htm

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • kjennejohnkjennejohn Posts: 171
    edited 2007-11-24 09:36
    Even if someone supplied a schematic, it would involve a microntroller, so you'd need a compiler, a suitable programmer, and programming skills. Or someone might supply the source code, so you'd need an assembler and a suitable programmer. Or someone might supply the .HEX code, but you'd need the programmer. And after you program the uprocessor, you'd have to make the board from the schematic. If you have no experience with circuits and/or programming, may I suggest a prebuilt, inexpensive commercial unit easy enough for a hobbyist to run right out of the box (after you supply the USB cable)? I googled "USB motor controller" and found:

    http://www.pc-control.co.uk/motorbee_info.htm

    For 28 Pounds ($56 or so) this does the whole job. You install the control software, plug this into a USB port and connect a battery or DC power supply along with your motor(s), DC or servo, at the motor connector, and have at it. The page above has a link to a manual. Download that and read it. Also, it has some digital inputs and outputs to use with your design. You can even automate the motor control sequences. If you have to buy all the equipment to build a unit from a schematic and program the processor from scratch it would cost you more. H*ll, I might buy one of these things myself. I imagine it will run relays and LEDs as well, it lends itself to all kinds of projects. One possible downside: it runs on Windows 2000 or higher, according to the manual. Does this mean Win9x is out of the question...?

    You could always do the Google search yourself and check this out further.

    Happy hollidays!

    kenjj
Sign In or Register to comment.