<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>andreas.goelzer.de &#187; motor</title>
	<atom:link href="http://andreas.goelzer.de/tag/motor/feed" rel="self" type="application/rss+xml" />
	<link>http://andreas.goelzer.de</link>
	<description>Electronics and small programs and other stuff</description>
	<lastBuildDate>Tue, 29 Nov 2011 21:08:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>usbmot</title>
		<link>http://andreas.goelzer.de/usbmot</link>
		<comments>http://andreas.goelzer.de/usbmot#comments</comments>
		<pubDate>Mon, 03 Nov 2008 20:01:06 +0000</pubDate>
		<dc:creator>Andreas Goelzer</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[motor]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://andreas.goelzer.de/?p=41</guid>
		<description><![CDATA[This device connects to a computer&#8217;s usb port and controls two small electric motors using the L293D. The atmega microcontroller uses the firmware-only USB driver from objective development. Device description The usbmot device controls up to two small motors, 600 &#8230; <a href="http://andreas.goelzer.de/usbmot">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This device connects to a computer&#8217;s usb port and controls two small electric motors using the <a href="http://www.st.com/stonline/products/literature/ds/1330.pdf">L293D</a>. The atmega microcontroller uses the firmware-only <a href="http://www.obdev.at/products/avrusb/">USB driver</a> from objective development.</p>
<h4>Device description</h4>
<p>The usbmot device controls up to two small motors, 600 mA current each, 1.2 A peak each, with an atmel atmega microcontroller connected to some host device via USB. The speed of the motors can be controlled with PWM.</p>
<h4>Compiling</h4>
<p>Both firmware and host software are in the software package at the end of this page. In order to recompile the firmware, you will need an avr build chain (for example avr-gcc and avrdude), which you probably have if you found this page. To compile the host software, you will need a c++-compiler and the qt development package.</p>
<p>To compile the firmware, change into the firmware folder. Then edit the makefile and adjust device type and programmer. In order to remake the hex file, type &#8220;make hex&#8221;, and to transfer it to the device, type &#8220;make flash&#8221; (jumper 1-1 needs to be set).</p>
<p>To compile the host software, change into the qusbmot folder. You will need <a href="http://trolltech.com/products">qt</a> and <a href="http://libusb.sourceforge.net/">libusb</a> with their respective tools and header files to successfully compile. If both are properly installed, typing &#8220;qmake &#038;&#038; make&#8221; should compile the program, which can then be executed by typing &#8220;./qusbmot&#8221;.</p>
<h4>Usable AVR Microcontrollers</h4>
<p>So far I&#8217;ve used this board only with an atmega 168. Due to pin compatibility, it should work with at least an atmega 8, 48, 88, 168. Since 12 MHz speed are needed, the low-voltage versions will not work. The firmware size is about 2 kiB, so all are a bit oversized, but in low quantities this is no problem.</p>
<h4>USBAsp roots</h4>
<p>The PCB is based on the <a href="http://www.fischl.de/usbasp/">USBAsp</a> Layout. It can still be used as a programmer, however the USBAsp Firmware has to be modified since I changed the USB port and pins to use the output compare pins for PWM.</p>
<h4>Jumper description</h4>
<ul>
<li><b>JP 1-1: Self programming: </b>Needs to be set in order to program the device, and must not be set if the device is operating. Sorry, this is a bit inconvenient, a residue of the usbasp roots.</li>
<li><b>JP 1-2: Programmer Power: </b>Powers the device logic from the Programmers power source.</li>
<li><b>JP 5: coupled power: </b> Connects the motor and logic voltages. Might work for really small motors(take care that the current of the motor is much higher when under heavy load) or strong USB power sources.</li>
</ul>
<h4>Two red LEDs hack</h4>
<p>When all that separated my board from completion were the two 3V6 Z-diodes, I asked for help in the <a href="http://www.mikrocontroller.net/">mikrocontroller.net</a> &#8211; chat, and Loetmichel told me the 3.6 V Zener diodes can be replaced by 2 red LEDs each. If incorporated into the PCB, this might even look really nice, and add some information.</p>
<h4>Free pins</h4>
<p>in the pcb, some of the atmega&#8217;s pins are connected to pinheads, so the board can be extended. I&#8217;ve tested a rather crude servo control for PC2&#8230;PC5, but unfortunately, if there is activity on the usb bus, the timing will get disturbed and the servos will move without being told so. I guess one could use the two 8-bit timers with their pwm pins to avoid being disturbed by the high-level usb interrupt, maybe in the next version. If however you can live with a bad servo control, try the &#8220;trunk&#8221; package.</p>
<h4>Board problems</h4>
<ul>
<li>JP 5 is too close to the power connector.</li>
<li>The L293D is a bit old and can only power rather small motors. There are some nice <a href="http://www.roboternetz.de/wissen/index.php/Getriebemotoren_Ansteuerung#Noch_mehr_Power_gew.C3.BCnscht.3F">automotive ICs</a>, but unfortunately, those chips aren&#8217;t that easily available. Another Problem of the L293D is the low allowed pwm frequency &#8211; with 5 kHz in a region that is acoustically displeasing.</li>
<li>The holes for screws are placed randomly.</li>
<li>Setting the jumpers for programming is not that comfortable. I guess I will use a USB bootloader for the next version, saves some wires, too</li>
<li>Probably a lot more.</li>
</ul>
<h4>License and warnings</h4>
<p>The software for both the microcontroller and the host is available under the terms of the <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>, in the hope that it might be useful for someone out there. In Addition to the terms of the GPL, obdev, who provide the firmware-only usb driver, kindly ask and require <a href="http://www.obdev.at/products/avrusb/license.html">additional terms</a> that especially apply as long as the shared obdev vid/pid pair is used.</p>
<p>The atmega, especially if powered by 5 Volts as in this device, cannot comply to the electrical part of the USB standard. Nevertheless, it works well with a large range of computers. However, there is no guarantee that it will not destroy your USB controller or your entire computer, so keep in mind the last sentence of the GPL: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.</p>
<p><p><a href='photos/elektronik/usbmot//coll.png'><img class='photofiles_thumb' src='thumbs/elektronik/usbmot//coll.png.thumb_small.png' alt='link to photos/elektronik/usbmot//coll.png' height='100' width='100' title=''/></a> <a href='photos/elektronik/usbmot//usbmot.png'><img class='photofiles_thumb' src='thumbs/elektronik/usbmot//usbmot.png.thumb_small.png' alt='link to photos/elektronik/usbmot//usbmot.png' height='100' width='100' title=''/></a> <a href='photos/elektronik/usbmot//usbmot_assembly_diagram.png'><img class='photofiles_thumb' src='thumbs/elektronik/usbmot//usbmot_assembly_diagram.png.thumb_small.png' alt='link to photos/elektronik/usbmot//usbmot_assembly_diagram.png' height='100' width='100' title=''/></a> <a href='photos/elektronik/usbmot//usbmot_in_action.jpg'><img class='photofiles_thumb' src='thumbs/elektronik/usbmot//usbmot_in_action.jpg.thumb_small.png' alt='link to photos/elektronik/usbmot//usbmot_in_action.jpg' height='100' width='100' title=''/></a> <a href='photos/elektronik/usbmot//usbmot_screenshot.png'><img class='photofiles_thumb' src='thumbs/elektronik/usbmot//usbmot_screenshot.png.thumb_small.png' alt='link to photos/elektronik/usbmot//usbmot_screenshot.png' height='100' width='100' title=''/></a> </p><br />
<hr /><a href='http://andreas.goelzer.de/download/usbmot_software.tar.bz2'><img src="http://andreas.goelzer.de/wp-content/plugins/kfile/fileicons/file-compressed.png" width="16" height="16" alt="filetype" class="icon16" /> usbmot_software.tar.bz2</a> (723.15 kiB, 2008-11-03)<br/><a href='http://andreas.goelzer.de/download/usbmot_trunk.tar.bz2'><img src="http://andreas.goelzer.de/wp-content/plugins/kfile/fileicons/file-compressed.png" width="16" height="16" alt="filetype" class="icon16" /> usbmot_trunk.tar.bz2</a> (759.19 kiB, 2008-11-21)<br/><a href='http://andreas.goelzer.de/download/usbmot_schematic.pdf'><img src="http://andreas.goelzer.de/wp-content/plugins/kfile/fileicons/file-pdf.png" width="16" height="16" alt="filetype" class="icon16" /> usbmot_schematic.pdf</a> (93.99 kiB, 2008-10-29)<br/><a href='http://andreas.goelzer.de/download/usbmot_pcb.pdf'><img src="http://andreas.goelzer.de/wp-content/plugins/kfile/fileicons/file-pdf.png" width="16" height="16" alt="filetype" class="icon16" /> usbmot_pcb.pdf</a> (194.58 kiB, 2008-10-29)<br/><a href='http://andreas.goelzer.de/download/usbmot_eagle_pcb.tar.bz2'><img src="http://andreas.goelzer.de/wp-content/plugins/kfile/fileicons/file-compressed.png" width="16" height="16" alt="filetype" class="icon16" /> usbmot_eagle_pcb.tar.bz2</a> (73.22 kiB, 2008-11-21)<br/><hr /></p>
]]></content:encoded>
			<wfw:commentRss>http://andreas.goelzer.de/usbmot/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/5 queries in 0.223 seconds using disk: basic
Object Caching 242/242 objects using disk: basic

Served from: andreas.goelzer.de @ 2012-02-05 05:32:13 -->
