2

Author Topic: Safe way to plug stepper motor in the usb port  (Read 2784 times)

0 Members and 1 Guest are viewing this topic.

Offline alexanderTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 0
Safe way to plug stepper motor in the usb port
« on: July 20, 2010, 05:40:50 AM »
Hi all.

Excuse my English.

I have the following circuit to drive an unipolar stepper motor (I've used in a parallel port project).



But now I don't know an way to plug the circuit in a safe way to my usb port.

I mean, I don't have any idea how and where to put an optocoupler.

I think I have to put an optocoupler to each usb terminal but I really don't know how to draw the circuit.

Is there a generic optocoupler switch circuit? Something so dumb that always I need to avoid problems with "high tension" I cut the wire, put one cut connection connected with pin 01 of optocoupler and the other cut connection with the pin02 of optocoupler and that's all?

Could someone help me?

Sorry if it's a dumb question, I'm almost a software speciallist and I don't know much skills of electronic stuff...

[]s
Alexander
Brazil

Offline Conscripted

  • Robot Overlord
  • ****
  • Posts: 291
  • Helpful? 10
Re: Safe way to plug stepper motor in the usb port
« Reply #1 on: July 20, 2010, 07:03:59 AM »
Hello.

I don't think this is going to work the way you intend it to. USB is a very different configuration then a parallel port. The four pins on a USB cable are power, ground and two wires for data. I think you will need to add something between the USB cable and your ULN2003.

Good luck with your project
Conscripted

Offline amando96

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 1
Re: Safe way to plug stepper motor in the usb port
« Reply #2 on: July 20, 2010, 07:06:16 AM »
Exactly, you will need a micro controller.

Though you can buy USB to parallel port converters, might be cheaper, but can't tell you for certain that it will work.
Rorcle, 60% complete
AATV, 5% complete

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
Re: Safe way to plug stepper motor in the usb port
« Reply #3 on: July 20, 2010, 07:57:22 AM »
Hi all.
I have the following circuit to drive an unipolar stepper motor (I've used in a parallel port project).
But now I don't know an way to plug the circuit in a safe way to my usb port.


You can control a stepper motor via USB by adding a USBmicro device like a U401, U421, U451 to your interface circuit.

http://www.usbmicro.com/




U401⁄U421⁄U451 USB I⁄O Interface

The U401⁄U421⁄U451 provides a simple digital i⁄o interface for the PC (Win⁄Linux) or Mac (OSX). Sixteen i⁄o lines from the microcontroller are provided. Commands can be sent to the U401⁄U421⁄U451 that change the i⁄o lines from input to output. I⁄O lines can be individually selected as inputs or outputs. The U401⁄U421⁄U451 supports commands to read the ports, and if the ports are set to output, to write to the ports.

The U401⁄U421⁄U451 is an interface to SPI devices. The firmware on the U401⁄U421⁄U451 provides generic access to read and write SPI devices. The SPI clock rate can be adjusted to 62.5 kHz, 500 kHz, 1 MHz, or 2 MHz. Because additional pins are available as generic i⁄o, the U401 can use these lines as slave select lines and address multiple SPI devices.

The SPI subsystem of the U401⁄U421⁄U451 can be used as a master to communicate with SPI devices such as EEPROMS and A⁄D converters. The U401⁄U421⁄U451 can also be used as a SPI slave to a microcontroller that uses the U401⁄U421⁄U451 as a gateway to the PC (Win⁄Linux) or Mac (OSX) . A PIC or an AVR, for example, can act as a SPI master to communicate data with the U401⁄U421⁄U451, which can then transfer the data to a PC (Win⁄Linux) or Mac (OSX) application.

The U401⁄U421 is a convenient way to interface a standard Hitachi-type of intelligent LCD controller to USB. The commands that support communication to the LCD module are the "standard" LCD commands. Standard commands include writing characters to the display, and controlling the display.

USB interfacing is simple with the U401⁄U421⁄U451 - There are no USB drivers to write and there is no device firmware to develop. There are sample applications that will get you started in minutes. The sample code is available to change for your application. 
« Last Edit: July 20, 2010, 07:59:11 AM by GearMotion »

Offline alexanderTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 0
Re: Safe way to plug stepper motor in the usb port
« Reply #4 on: July 20, 2010, 08:42:54 AM »
My god!

I've forgotten to say: I already have an USB card controller, exactly an USBmicro U421.

So, at this time I can send the signals exactly as I was using parallel port.

The sittuation is: with parallel port and a old computer, I've never thought about security, but now I'm using my new notebook, I don't want to burn my motherboard with motor circuit failures.

The circuit that I've shown works, but... you know, 12V around my new notebook... scary.

So, any help?

[]s
Alexander
Brazil

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
Re: Safe way to plug stepper motor in the usb port
« Reply #5 on: July 20, 2010, 08:47:04 AM »
Plug a hub into your notebook, then the U421 into the hub. The hub will help isolate problems from getting to your notebook.

It isn't a perfect isolation, but if you damage a low cost hub instead of your notebook it is less to replace.

 


Get Your Ad Here

data_list