<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>New Race of Robot Overlords</title>
		<link>http://www.allegro.cc/forums/view/598584</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 14 Dec 2008 15:40:26 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, only kinda.</p><p>What kind of hardware would be required to run a small electric motor or two from a USB port, assuming I wanted to affect things like speed?  How would I go about setting that up, assuming I had all the hardware?  In case the device can&#39;t be powered by USB (or it wouldn&#39;t provide enough juice, whatever) what alternative would you suggest?  My aim is to have as little hardware as necessary on the external device. </p><p>This means that I <i>wouldn&#39;t</i> like to have the USB port sending commands to a smaller module on the device, which then controlled things itself.  I&#39;d like to make a completely basic controlling connection between the USB connector and the hardware, the same way that the microprocessor(or something else, not an expert) has direct, low-level access to activating and disabling the attached devices.</p><p>Hope that was vague enough. Thanks.</p><p>[add]wallpower = no_good.  Portability is important.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Anomie)</author>
		<pubDate>Fri, 12 Dec 2008 10:27:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If it can&#39;t be powered by the USB connector I would use a DC connection jack. Then you could buy one of the voltage converters from RadioShack or the like and plug it in. This way you could have steady power, such as 9V or 5V, that plugs into the wall, instead of the computer.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (someone972)</author>
		<pubDate>Fri, 12 Dec 2008 10:44:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you need to control exactly how fast the the motor turns, you should look into using a <a href="http://en.wikipedia.org/wiki/Stepper_motor">stepper motor.</a></p><p>Edit: The more power it consumes the bigger the battery it will need, and it depends on if you need high voltage or high current or both, to what kind of battery would be most suitable.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Timorg)</author>
		<pubDate>Fri, 12 Dec 2008 11:43:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Just a simple google search gave me this <a> http://www.elecfree.com/electronic/control-stepping-motor-via-usb-interface/</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ixilom)</author>
		<pubDate>Fri, 12 Dec 2008 13:25:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
this
</p></div></div><p>
That&#39;s looking like the USB port sending commands to a microcontroller, which then does stuff itself.  This is how most people are handling it, but I&#39;m looking to get rid of the external controller in the scheme.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Anomie)</author>
		<pubDate>Sat, 13 Dec 2008 00:41:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>How do you intend to <a href="http://en.wikipedia.org/wiki/USB#USB_packets">handle the USB packets</a> at your device?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Crazy Photon)</author>
		<pubDate>Sat, 13 Dec 2008 04:17:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I don&#39;t intend to send real &#39;information&#39; to the device, just something like &#39;x pin on usb connector 1 is active - activate connection between device_part a and power source&#39;...if that&#39;s at all possible in hardware alone.</p><p>[edit] But looking at what the pins actually do, it looks like I may only be able to send signals through one or two pins per port.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Anomie)</author>
		<pubDate>Sat, 13 Dec 2008 06:05:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Simply? You can&#39;t. A USB connection requires a microcontroller to both recognize the device and transmit data.</p><p>Use a parallel port because you can turn the pins on/off individually. If you just want on/off control, flip transisters or relays with the control line (the parallel port) which then turns the power lines on or off. </p><p>If you want precise positions, use a microcontroller and convert the <i>serial port</i> data to pulse width modulation (which steppers use).</p><p>Either way, the USB port is useless for simple tasks.</p><p><b>Also</b>, I wouldn&#39;t recommend powering it off the USB port. It&#39;s not built to power things like motors, save for small low-torque ones on hard drives. You can google for the current limit on the USB 1.1/2.0 specification if you like. But if it&#39;s a motor, I&#39;d go for a 12-volt powersupply. You can even take it from your computer&#39;s powersupply (easy for desktop, less so but possible for a laptop).</p><p><b>Lastly</b>, If you don&#39;t have serial, get a serial or parallel USB connector. I&#39;ve never used one, but they sell them.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Chris Katko)</author>
		<pubDate>Sat, 13 Dec 2008 06:50:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you want to do something like that, go with the parallel port or the serial port. You can easily program what each pin sends / receives.8-)</p><p>Edit:<br />Good to see you back Chris.:D
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Don Freeman)</author>
		<pubDate>Sat, 13 Dec 2008 07:38:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think I could get by with a simple on/off.  Why is it that things like &quot;convert[ing] the serial port data to pulse width modulation&quot; invariably require a separate microcontroller?  Is there no way that things like this can be done from the computer&#39;s processor?  Or is it just a matter of having less clumsy output?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Anomie)</author>
		<pubDate>Sat, 13 Dec 2008 08:41:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Something else you might have to watch out for is voltage differentials - the stepper motor might be expecting a different voltage or amperage than a direct connection to the serial / parallel port might provide. This may be the reason for the microcontrollers, but I really don&#39;t know that much about this kind of stuff, so don&#39;t take my word on this as professional by any means.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sat, 13 Dec 2008 10:35:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You shouldn&#39;t need a micro controller, you would be doing all the work in your code...hopefully. You can take a look at how Linux does this with it&#39;s serial port drivers in the kernel. You can use that as a basis for your study. The micro controller really only helps with the handshaking process: to let the computer know when the data was sent, if it arrived correctly, if the device is ready, etc. Since you are designing this, you must take this all into consideration. You WILL need to have transformers or another such mechanism to handle the extra current. I&#39;ve seen things that where designed for this kind of work, but it&#39;s been a while since my last experimentations into such things.:-/ Here is some useful links to get you going. <a href="http://www.beyondlogic.org/serial/serial1.htm">Serial port</a>, <a href="http://www.aggsoft.com/rs232-pinout-cable/pinout-and-signal.htm">Serial port</a> and <a href="http://www.beyondlogic.org/spp/parallel.htm">Parallel port</a> and <a href="http://www.beyondlogic.org/ecp/ecp.htm">Parallel port</a>. BeyondLogic is a good site with a lot of information on interfacing your computer with other things. What happened to the good old days when people could tinker around and create their own hardware relatively cheap...:-/ I&#39;m glad to see there are still people like me out there.:D8-)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Don Freeman)</author>
		<pubDate>Sat, 13 Dec 2008 11:51:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hooking up motor directly to the serial or parallel port will invariably result in the receiver/transmitter chip frying, so don&#39;t. Same goes for relays. You should always use an external power supply and a Darlington, as serial and parallel ports arent meant for supplying peripheral power and even the USB bus supplies only a mere 200mA of current so if you power a relay or motor off USB, every time it&#39;s triggered there&#39;s a risk you get to reboot your computer to get your USB peripherals working again (the current drain of an engaged relay coil can be 50mA or more and for motors it can be anything really, usually too much, and the excess current drain causes the USB host controller to shut down).</p><p>What you should do is to hook up the motor via a Darlington array to a microcontroller, and program that microcontroller to do your bidding instead of a bulky computer.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jhuuskon)</author>
		<pubDate>Sat, 13 Dec 2008 15:23:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Just to try and make this as clear as I can, my ideal situation (as I see it now) would be:</p><p>1. Incomplete circuit(s) between power source and device(s).<br />2. Manipulation of circuit(s) by attached computer, such that any recognizable activation of a certain pin would complete a certain circuit and activate a certain device.</p><p>It seems to me that my computer should be able to handle this task as well as any delegated microcontroller. I&#39;m hoping there&#39;s just some construct in circuitry that completes a circuit on detecting an electrical signal from some other source (I assume any &#39;active&#39; pin has <i>some</i> electrical activity...anyone care to verify that one for me?) And, well, I&#39;m poor.  My goal is to make this work with as little specialized equipment as possible. Gotta be resourceful!</p><div class="quote_container"><div class="title">Don said:</div><div class="quote"><p>
 useful links
</p></div></div><p>
Thanks, those&#39;re definitely going to come in handy.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Anomie)</author>
		<pubDate>Sat, 13 Dec 2008 16:55:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Simple. Connect the data pins from the parallel port to the input pins of a Darlington array, and connect your peripherals to the outputs of the Darlingtons. Just remember that parallel port only supplies +5v and source current can be anything from 6mA to 20mA, so you&#39;ll need to check the datasheets so you&#39;re not sinking more current the port provides (there is no spec on how much but you shouldn&#39;t expect it to be more than 6mA) or you can bet your <span class="cuss"><span>ass</span></span> the receiver/transmitter chip will fry.</p><p>If you want to do it accross serial or USB port you WILL need to hook up a microcontroller too and start drafting a communications protocol.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jhuuskon)</author>
		<pubDate>Sat, 13 Dec 2008 20:52:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, I found <a href="http://en.wikipedia.org/wiki/Darlington_transistor">this</a>, so I assume that by &#39;Darlington array&#39; you just mean an array of these transistors.  I&#39;m  not sure how it would work.</p><p>http://www.allegro.cc/files/attachment/597280</p><p>It seems like the power source would have a constant circuit with the device, and would just get a little boost if the pin was active.  Should I cut down the flow from the power source, to the extent that it needs that boost to activate the device?  That seems a little wasteful.</p><p>[edit] Or does the power-in break at those connections if the pin is inactive?<br />[edit2] Well, I guess what I&#39;ve been looking for this whole time is the transistor.  It&#39;s a neat little thing! Is the Darlington necessary here because the signal from a parallel pin is too weak to flip the connection on?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Anomie)</author>
		<pubDate>Sun, 14 Dec 2008 02:02:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It&#39;s a neat security measure. If whatever is at the output overloads the output stage and it burns into a shorted state, it has a smaller chance of frying whatever is at the input side as they are separate transistors. With a single transistor there is a risk that an overload shorts the transistor and the power source starts pumping current into the input, causing the receiver/transistor die a sudden, painful and foul smelling death.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jhuuskon)</author>
		<pubDate>Sun, 14 Dec 2008 03:21:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
causing the receiver/transistor die a sudden, painful and foul smelling death.
</p></div></div><p>
That&#39;d be...bad.  So what else would I need to set this up? I&#39;ve got a couple standard rechargeable 9v or 12v batteries for RC cars (can&#39;t remember which...they&#39;re packed away someplace...I might actually have one of each or something).  Would a straight connection between the battery and the device be okay? (going through the transistors like that)</p><p>Is there some particular type of Darlington transistor that I need? I found a page with a bunch of different types, most of them being around $0.40, but some being as high as $1.50.  Any particular motor anyone would suggest, being that the stepper motors are out?</p><p>[edit] Or...I could cannibalize the RC cars for motors?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Anomie)</author>
		<pubDate>Sun, 14 Dec 2008 04:52:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>A direct connection to the batteries should be fine. As for the transistors just make sure that they can handle the current and voltage of the batteries, most will.</p><p>EDIT: Make sure that the motor can support the maximum amount of voltage that you will be feeding it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (someone972)</author>
		<pubDate>Sun, 14 Dec 2008 05:20:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well you need to make sure the switching semiconductors (transistors or darlingtons) are voltage compatible with the parallel port. Also make sure the power input and output can take the voltage you are supplying. Consult the datasheets.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jhuuskon)</author>
		<pubDate>Sun, 14 Dec 2008 05:34:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>My battery (could only find one of them) is an old 9.6V NiCd.  I couldn&#39;t find any amperage information.</p><p>So just a couple more questions:<br />1. Do I need to worry about the voltage from the pin and the battery simultaneously getting at the device(s)?</p><p>2. How safe is it to flicker the power to the pin to simulate a slower speed on a motor? Would that work at all?</p><p>3. I have no parallel ports.  Would you trust a USB-to-parallel converter, or could any other sort of output accomplish this?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Anomie)</author>
		<pubDate>Sun, 14 Dec 2008 11:52:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>1.nope.<br />2. It&#39;s called pulse width modulation. It&#39;s not that dangerous.<br />3. If you can get it working.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jhuuskon)</author>
		<pubDate>Sun, 14 Dec 2008 15:29:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>1. Cool.<br />2. Awesome!<br />3. Wish me luck.</p><p>Thanks everybody.  Cookie time.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Anomie)</author>
		<pubDate>Sun, 14 Dec 2008 15:40:26 +0000</pubDate>
	</item>
</rss>
