<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Spinning the DC Servos</title>
	<atom:link href="http://www.anderswallin.net/2007/11/spinning-the-dc-servos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anderswallin.net/2007/11/spinning-the-dc-servos/</link>
	<description></description>
	<pubDate>Sun, 23 Nov 2008 13:11:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Tero</title>
		<link>http://www.anderswallin.net/2007/11/spinning-the-dc-servos/#comment-27537</link>
		<dc:creator>Tero</dc:creator>
		<pubDate>Thu, 08 Nov 2007 21:05:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.anderswallin.net/2007/11/spinning-the-dc-servos/#comment-27537</guid>
		<description>The deadband is probably caused by MOSFET deadtimes which causes crossover distiortion. 

This actually happens at the point where motor current crosses zero, not at voltage zero. So if you have running motor and start reversing direction, you get distortion in different place of curve.</description>
		<content:encoded><![CDATA[<p>The deadband is probably caused by MOSFET deadtimes which causes crossover distiortion. </p>
<p>This actually happens at the point where motor current crosses zero, not at voltage zero. So if you have running motor and start reversing direction, you get distortion in different place of curve.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anders</title>
		<link>http://www.anderswallin.net/2007/11/spinning-the-dc-servos/#comment-27367</link>
		<dc:creator>Anders</dc:creator>
		<pubDate>Tue, 06 Nov 2007 19:53:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.anderswallin.net/2007/11/spinning-the-dc-servos/#comment-27367</guid>
		<description>A question by email on how I got the m5i20 FPGA configured for 50 kHz PWM output. My reply:


The "normal" FPGA config that you get with the m5i20 driver by specifying loadFpga=1 in your HAL file is the Hostmot-4 config with maximum PWM rate of 32 kHz.

If you have the standard amp from Jon it wants a 50 kHz PWM signal.
You can load an FPGA config that goes up to 100 kHz PWM by following the instructions in the Readme here:
http://cvs.linuxcnc.org/cvs/emc2/src/hal/drivers/m5i20/
(or emc2/src/hal/drivers/m5i20/ on your local install)

basically you load the config with
m5i20cfg hostmot5_4eh.bit 0
you need to be in the directory with the bit files when you do that:
emc2/src/hal/drivers/m5i20/bit/

remember now when you load the m5i20 driver from your HAL file you should specify loadFpga=0, otherwise you overwrite the FPGA with the 32kHz config again.

The m5i20 has not been updated for the 100 kHz PWM bit files, so the timing information you specify is in a slightly weird format. Basically as the old bit-file assumed a 33 MHz PWM clock and accepted the PWM rate as an integer between 0 and 32000, now that we have a PWM clock of 100 MHz everything is going to get multiplied by three, so to get the 50 kHz PWM you want you need to specify dacRate=16666

hope this helps,

Anders</description>
		<content:encoded><![CDATA[<p>A question by email on how I got the m5i20 FPGA configured for 50 kHz PWM output. My reply:</p>
<p>The &#8220;normal&#8221; FPGA config that you get with the m5i20 driver by specifying loadFpga=1 in your HAL file is the Hostmot-4 config with maximum PWM rate of 32 kHz.</p>
<p>If you have the standard amp from Jon it wants a 50 kHz PWM signal.<br />
You can load an FPGA config that goes up to 100 kHz PWM by following the instructions in the Readme here:<br />
<a href="http://cvs.linuxcnc.org/cvs/emc2/src/hal/drivers/m5i20/" rel="nofollow">http://cvs.linuxcnc.org/cvs/emc2/src/hal/drivers/m5i20/</a><br />
(or emc2/src/hal/drivers/m5i20/ on your local install)</p>
<p>basically you load the config with<br />
m5i20cfg hostmot5_4eh.bit 0<br />
you need to be in the directory with the bit files when you do that:<br />
emc2/src/hal/drivers/m5i20/bit/</p>
<p>remember now when you load the m5i20 driver from your HAL file you should specify loadFpga=0, otherwise you overwrite the FPGA with the 32kHz config again.</p>
<p>The m5i20 has not been updated for the 100 kHz PWM bit files, so the timing information you specify is in a slightly weird format. Basically as the old bit-file assumed a 33 MHz PWM clock and accepted the PWM rate as an integer between 0 and 32000, now that we have a PWM clock of 100 MHz everything is going to get multiplied by three, so to get the 50 kHz PWM you want you need to specify dacRate=16666</p>
<p>hope this helps,</p>
<p>Anders</p>
]]></content:encoded>
	</item>
</channel>
</rss>
