<?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>Skywired</title>
	<atom:link href="http://skywired.net/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://skywired.net/blog</link>
	<description>Electronics, DSP, and ham radio</description>
	<lastBuildDate>Sat, 19 Jan 2013 04:13:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Some thoughts on the K5BCQ Si570 signal source</title>
		<link>http://skywired.net/blog/2012/11/some-thoughts-on-the-k5bcq-si570-signal-source/</link>
		<comments>http://skywired.net/blog/2012/11/some-thoughts-on-the-k5bcq-si570-signal-source/#comments</comments>
		<pubDate>Mon, 19 Nov 2012 03:34:09 +0000</pubDate>
		<dc:creator>Stephen Trier</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[front panel]]></category>
		<category><![CDATA[kit]]></category>
		<category><![CDATA[R2]]></category>
		<category><![CDATA[Si570]]></category>
		<category><![CDATA[T2]]></category>
		<category><![CDATA[VFO]]></category>

		<guid isPermaLink="false">http://skywired.net/blog/?p=1055</guid>
		<description><![CDATA[For the last few months, I&#8217;ve been working on building a radio from a pair of kits old enough to vote: KK7B&#8217;s R2 receiver and T2 transmitter. A complete transceiver built from these kits needs some other pieces, including a &#8230; <a href="http://skywired.net/blog/2012/11/some-thoughts-on-the-k5bcq-si570-signal-source/">Continue reading <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

More posts like this one:<ol>
<li><a href='http://skywired.net/blog/2012/10/an-si570-vfo-for-the-r2t2-transceiver-project/' rel='bookmark' title='An Si570 VFO for the R2/T2 transceiver project'>An Si570 VFO for the R2/T2 transceiver project</a></li>
<li><a href='http://skywired.net/blog/2011/09/cool-open-source-hardware-demos-from-ohs-2011/' rel='bookmark' title='Cool open source hardware demos from OHS 2011'>Cool open source hardware demos from OHS 2011</a></li>
<li><a href='http://skywired.net/blog/2012/01/building-a-kk7b-r2-phasing-receiver/' rel='bookmark' title='Building a KK7B R2 phasing receiver'>Building a KK7B R2 phasing receiver</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>For the last few months, I&#8217;ve been working on <a title="KK7B R2/T2 Transceiver" href="http://skywired.net/blog/projects/kk7b-r2t2-transceiver/">building a radio from a pair of kits old enough to vote: KK7B&#8217;s R2 receiver and T2 transmitter</a>. A complete transceiver built from these kits needs some other pieces, including a VFO (variable frequency oscillator). After looking around a bit, I picked <a title="An Si570 VFO for the R2/T2 transceiver project" href="http://skywired.net/blog/2012/10/an-si570-vfo-for-the-r2t2-transceiver-project/">an Si570 signal source kit</a> from Kees Talen K5BCQ and John Fisher K5JHF.</p>
<p><img class="alignnone size-full wp-image-1057" title="17 Hz off at 10 MHz. Not bad!" src="http://skywired.net/blog/wp-content/uploads/2012/11/IMG_6034.jpg" alt="Si570 signal source and frequency counter, showing 17 Hz difference at 10 MHz" width="600" height="450" /></p>
<p>I&#8217;m not going to try to review the kit, because Jack Smith wrote <a href="http://www.cliftonlaboratories.com/si570_kit_from_k5bcq.htm">the canonical review of it already</a>. Instead, I will share some impressions of the kit.</p>
<p>First off, the PCB layout has not gotten better. There are some crazy things about it, including through-hole parts mounted on opposite sides of the board, such that <a title="Working slowly on the R2/T2 radio" href="http://skywired.net/blog/2012/10/working-slowly-on-the-r2t2-radio/">one component prevents access to the terminals for another</a>. The layout of the output circuit is also odd. In an effort to provide for many different output options, apparently while keeping trace lengths to a minimum, the output section is crowded and hard to navigate.</p>
<p>I had to do only a little debugging after assembly. The first problem was that the two pads at the ends of the Si570 were not well-soldered. Jack Smith ran into the same problem. My second problem was a little more subtle. I fired up the circuit and saw output at the right frequency, but 0.5 V in amplitude. I purchased the CMOS output option, so it should have been a 3.3 V square wave. Tracing out the circuit, I found that the signal was getting knocked down when it passed through a DC blocking capacitor. Oddly enough, I noticed that when my &#8216;scope probe pushed down on the right spot on the capacitor, the output jumped up to 3.3 V. I probably fractured the cap with the heat of soldering. I had changed my mind about capacitive coupling anyway, so I replaced the cap with a 0 ohm resistor and now I get the output I expect.</p>
<p><img title="Waveform from the Si570 VFO" src="http://skywired.net/blog/wp-content/uploads/2012/11/IMG_6029.jpg" alt="Waveform from the Si570 VFO" width="600" height="450" /></p>
<p>The &#8216;scope shot shows the output, which is a reasonably clean 3.3 V CMOS signal. There is almost a volt of overshoot on the transitions, which is a little concerning, but I am not too worried about it at this point. The CMOS edges are fast, making overshoot understandable, and the size of the overshoot is likely to change as the VFO is integrated into the radio. I will worry about it later.</p>
<p>All in all, I have to say that the board works a treat. It is awesome to see 1 Hz tuning resolution and crystal oscillator stability coming out of a tiny 8-pin surface-mount part. I measured the frequency as being off by about 14 to 17 Hz at 10 MHz, which works out to about 1.7 ppm. Drift is confined to that 3 Hz range, at least when sitting on my basement workbench. The board does have a provision to calibrate out the frequency error, which I have not used yet. This much error really doesn&#8217;t matter.</p>
<p>The microcontroller firmware with the kit works well. The user interface is slightly unusual, with a decimal point used as an input cursor, but it works fine in practice. I do wish there was a way to configure band limits. The board has provisions for band selection, with up to eight bands possible. However, regardless of the band selection, the device will tune over its entire range. In a multi-band radio that is a poor idea, because it would be too easy to transmit at the wrong frequency and damage the final amplifier. With hundreds of on-board memories (100 per band, minus 20 reserved for setup), it would be nice if a few configuration memories were used to choose tuning limits for each band.</p>
<p>Over all I am happy with the board. It will serve just fine as my VFO.</p>
<div class='yarpp-related-rss'>
<p>More posts like this one:</p><ol>
<li><a href='http://skywired.net/blog/2012/10/an-si570-vfo-for-the-r2t2-transceiver-project/' rel='bookmark' title='An Si570 VFO for the R2/T2 transceiver project'>An Si570 VFO for the R2/T2 transceiver project</a></li>
<li><a href='http://skywired.net/blog/2011/09/cool-open-source-hardware-demos-from-ohs-2011/' rel='bookmark' title='Cool open source hardware demos from OHS 2011'>Cool open source hardware demos from OHS 2011</a></li>
<li><a href='http://skywired.net/blog/2012/01/building-a-kk7b-r2-phasing-receiver/' rel='bookmark' title='Building a KK7B R2 phasing receiver'>Building a KK7B R2 phasing receiver</a></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://skywired.net/blog/2012/11/some-thoughts-on-the-k5bcq-si570-signal-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working slowly on the R2/T2 radio</title>
		<link>http://skywired.net/blog/2012/10/working-slowly-on-the-r2t2-radio/</link>
		<comments>http://skywired.net/blog/2012/10/working-slowly-on-the-r2t2-radio/#comments</comments>
		<pubDate>Tue, 23 Oct 2012 02:12:03 +0000</pubDate>
		<dc:creator>Stephen Trier</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[kit]]></category>
		<category><![CDATA[oscilloscope]]></category>
		<category><![CDATA[Si570]]></category>
		<category><![CDATA[synthesizer]]></category>
		<category><![CDATA[VFO]]></category>

		<guid isPermaLink="false">http://skywired.net/blog/?p=1030</guid>
		<description><![CDATA[I was at my workbench when my son came downstairs to talk and hang out. A budding reader, he soon started singing the A-B-C song with the letters mixed up. It crossed my mind that this was odd, but I &#8230; <a href="http://skywired.net/blog/2012/10/working-slowly-on-the-r2t2-radio/">Continue reading <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

More posts like this one:<ol>
<li><a href='http://skywired.net/blog/2011/02/fpga-breakout-pcb-layout/' rel='bookmark' title='FPGA Breakout Board Layout'>FPGA Breakout Board Layout</a></li>
<li><a href='http://skywired.net/blog/2011/04/fpga-breakout-board-pcb-errors/' rel='bookmark' title='FPGA breakout board PCB errors'>FPGA breakout board PCB errors</a></li>
<li><a href='http://skywired.net/blog/2011/06/the-fpga-level-shifter-not-entirely-crazy/' rel='bookmark' title='The FPGA level shifter: not entirely crazy!'>The FPGA level shifter: not entirely crazy!</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>I was at my workbench when my son came downstairs to talk and hang out. A budding reader, he soon started singing the A-B-C song with the letters mixed up. It crossed my mind that this was odd, but I didn&#8217;t think much about it until I heard</p>
<p><img class="aligncenter size-full wp-image-1031" title="ac-dc-gnd" src="http://skywired.net/blog/wp-content/uploads/2012/10/ac-dc-gnd.png" alt="" width="310" height="122" /></p>
<p>That rang a bell, and suddenly I realized he was singing my oscilloscope&#8217;s front panel. Music by Mother Goose, lyrics by <a href="http://tektronix.com/">Tektronix</a>.</p>
<p><img class="aligncenter size-full wp-image-1036" title="IMG_5683" src="http://skywired.net/blog/wp-content/uploads/2012/10/IMG_5683.jpg" alt="" width="640" height="480" /></p>
<p>When he came downstairs, I was working on assembling the <a title="An Si570 VFO for the R2/T2 transceiver project" href="http://skywired.net/blog/2012/10/an-si570-vfo-for-the-r2t2-transceiver-project/">K5JHF/K5BCQ Si570 synthesizer kit</a>. It turned out to be a bit fiddly, but it is a decent kit. That said, I would not lay out a PCB like this one. It has a number of vias in the middle of pads, and while that&#8217;s not a big problem for hand-soldering, I would avoid it in a PCB as <a href="http://blog.screamingcircuits.com/2011/07/via-shifting.html">a matter of good practice</a>. You never know who might decide to use solder paste and reflow to assemble the board, and then those vias will be trouble.</p>
<p><img class="aligncenter size-full wp-image-1035" title="IMG_5681" src="http://skywired.net/blog/wp-content/uploads/2012/10/IMG_5681.jpg" alt="" width="640" height="481" /></p>
<p>Worse, though, is the positioning of the connector for the LCD. It is laid out smack in the middle of the footprint for the microcontroller, but on the opposite side of the board. If you look at the big black socket in the picture above, you will see the back side of the microcontroller&#8217;s pins poking through the board on either side of it. This positioning means one has to solder the header on one side of the board, then insert the micro on top of the pins one just soldered, flip over the board and solder the micro&#8217;s pins next to the header. The header pins are non-serviceable once the microcontroller is installed, and the microcontroller won&#8217;t be easy to get out, either. DIP desoldering tools won&#8217;t fit with the header in the way. I&#8217;m not sure why the board is laid out this way, except that it makes the board a little smaller. Maybe that was the only concern.</p>
<p>At this point, it&#8217;s fully assembled except for the encoder/switch, which is about half wired. What am I doing blogging? I could be soldering!</p>
<div class='yarpp-related-rss'>
<p>More posts like this one:</p><ol>
<li><a href='http://skywired.net/blog/2011/02/fpga-breakout-pcb-layout/' rel='bookmark' title='FPGA Breakout Board Layout'>FPGA Breakout Board Layout</a></li>
<li><a href='http://skywired.net/blog/2011/04/fpga-breakout-board-pcb-errors/' rel='bookmark' title='FPGA breakout board PCB errors'>FPGA breakout board PCB errors</a></li>
<li><a href='http://skywired.net/blog/2011/06/the-fpga-level-shifter-not-entirely-crazy/' rel='bookmark' title='The FPGA level shifter: not entirely crazy!'>The FPGA level shifter: not entirely crazy!</a></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://skywired.net/blog/2012/10/working-slowly-on-the-r2t2-radio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An Si570 VFO for the R2/T2 transceiver project</title>
		<link>http://skywired.net/blog/2012/10/an-si570-vfo-for-the-r2t2-transceiver-project/</link>
		<comments>http://skywired.net/blog/2012/10/an-si570-vfo-for-the-r2t2-transceiver-project/#comments</comments>
		<pubDate>Mon, 15 Oct 2012 00:47:55 +0000</pubDate>
		<dc:creator>Stephen Trier</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[front panel]]></category>
		<category><![CDATA[kit]]></category>
		<category><![CDATA[R2]]></category>
		<category><![CDATA[Si570]]></category>
		<category><![CDATA[T2]]></category>
		<category><![CDATA[transceiver]]></category>
		<category><![CDATA[VFO]]></category>

		<guid isPermaLink="false">http://skywired.net/blog/?p=1011</guid>
		<description><![CDATA[I&#8217;m continuing to work on my R2/T2 transceiver project as time allows. My goal is to get on the air before the sunspot cycle peak passes. That gives me a little time yet, but at the rate I get things &#8230; <a href="http://skywired.net/blog/2012/10/an-si570-vfo-for-the-r2t2-transceiver-project/">Continue reading <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

More posts like this one:<ol>
<li><a href='http://skywired.net/blog/2012/11/some-thoughts-on-the-k5bcq-si570-signal-source/' rel='bookmark' title='Some thoughts on the K5BCQ Si570 signal source'>Some thoughts on the K5BCQ Si570 signal source</a></li>
<li><a href='http://skywired.net/blog/2012/06/an-enclosure-for-the-r2t2-transceiver/' rel='bookmark' title='An enclosure for the R2/T2 transceiver'>An enclosure for the R2/T2 transceiver</a></li>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-n8wes-cw-transceiver/' rel='bookmark' title='FDIM 2012: N8WE&#8217;s CW transceiver'>FDIM 2012: N8WE&#8217;s CW transceiver</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m continuing to work on my <a title="KK7B R2/T2 Transceiver" href="http://skywired.net/blog/projects/kk7b-r2t2-transceiver/">R2/T2 transceiver</a> project as time allows. My goal is to get on the air before the sunspot cycle peak passes. That gives me a little time yet, but at the rate I get things built around here, it&#8217;s going to be a close race.</p>
<p>Even when building a radio from kits, as I am here, there are many decisions to be made. When I bought the <a href="http://www.kangaus.com/kk7b.htm">KK7B R2 and T2 kits</a>, I had no thoughts about what to use for a local oscillator. Technology has advanced mightily since then, and now I have the option of an Si570 frequency synthesizer. This little chip provides a precise, low-noise  digital clock at programmable frequencies between 3.5 MHz and 1.4 GHz, depending on the variant one buys.</p>
<p><img class="alignnone size-full wp-image-1023" title="Si570 kit parts" src="http://skywired.net/blog/wp-content/uploads/2012/10/IMG_5523.jpg" alt="" width="640" height="409" /></p>
<p>After looking around a bit, I picked John Fisher K5JHF and Kees Talen K5BCQ&#8217;s <a href="http://www.qsl.net/k/k5bcq/Kits/Kits.html">SI570 controller/frequency generator kit</a>. Once it arrived, I had trouble figuring out how to fit it into my case. <a title="An enclosure for the R2/T2 transceiver" href="http://skywired.net/blog/2012/06/an-enclosure-for-the-r2t2-transceiver/">This case has a 0.125&#8243; thick aluminum front panel.</a> The threaded bushing on the kit&#8217;s encoder/switch was not long enough for this thick panel and a mounting nut, let alone a washer. There were also some mechanical things I didn&#8217;t like about the circuit board. I thought a bit about designing a new board for the parts from the kit, but I decided I could fix the worst of the problems with a new encoder. A little browsing at Mouser turned up an extremely similar model that had the longer bushing I needed. It even has the same footprint.</p>
<p><img class="alignnone size-full wp-image-1024" title="Two encoder/switches" src="http://skywired.net/blog/wp-content/uploads/2012/10/IMG_5542.jpg" alt="" width="640" height="481" /></p>
<p>I&#8217;m a little stumped by how similar they are. The Mouser one (on the right) is from Bourns, but looking over the data sheet, I couldn&#8217;t find a model with a bushing and shaft length matching the one from the kit. The body of both units is essentially identical. Hopefully they are electrically close enough, too. I had to guess at how many pulses per rotation it should have.</p>
<p>I&#8217;m still chewing on another mechanical question. The kit is designed to have the PCB soldered to one end of the LCD, with the encoder mounted off the PCB, on the right of the LCD. I want to have the tuning knob centered below the LCD, so the PCB is going to have to stay with either the LCB or the encoder, and the other will have to be connected with wires. My initial thought was to mount the encoder on the PCB and wire the LCD remotely, but I&#8217;m beginning to favor mounting the PCB on the LCD and running wires to the encoder. The connection between the PCB and LCD will involve high-frequency digital signals, while the connection to the encoder is analog switch closures that have less potential for RF interference. It would be better to have the LCD signals cover a shorter distance so they radiate less.</p>
<p>On top of that, putting the PCB and the LCD together will make it easier to surround them with a shield.</p>
<p>All this rambling aside, yes, I&#8217;m making slow progress on the R2/T2 rig. When I&#8217;m working on a project, sometimes I spend a lot of time doing and other times I spend my time thinking. I&#8217;m a little out of my element with the mechanical design of the radio, so lately I&#8217;ve been planning the design carefully.</p>
<div class='yarpp-related-rss'>
<p>More posts like this one:</p><ol>
<li><a href='http://skywired.net/blog/2012/11/some-thoughts-on-the-k5bcq-si570-signal-source/' rel='bookmark' title='Some thoughts on the K5BCQ Si570 signal source'>Some thoughts on the K5BCQ Si570 signal source</a></li>
<li><a href='http://skywired.net/blog/2012/06/an-enclosure-for-the-r2t2-transceiver/' rel='bookmark' title='An enclosure for the R2/T2 transceiver'>An enclosure for the R2/T2 transceiver</a></li>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-n8wes-cw-transceiver/' rel='bookmark' title='FDIM 2012: N8WE&#8217;s CW transceiver'>FDIM 2012: N8WE&#8217;s CW transceiver</a></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://skywired.net/blog/2012/10/an-si570-vfo-for-the-r2t2-transceiver-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Going Forth, or maybe not.</title>
		<link>http://skywired.net/blog/2012/09/going-forth-or-maybe-not/</link>
		<comments>http://skywired.net/blog/2012/09/going-forth-or-maybe-not/#comments</comments>
		<pubDate>Sat, 22 Sep 2012 12:02:20 +0000</pubDate>
		<dc:creator>Stephen Trier</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Forth]]></category>
		<category><![CDATA[FPGA]]></category>
		<category><![CDATA[R2]]></category>
		<category><![CDATA[T2]]></category>
		<category><![CDATA[Verilog]]></category>

		<guid isPermaLink="false">http://skywired.net/blog/?p=978</guid>
		<description><![CDATA[Over the years, I keep coming back to the Forth programming language. I admire its lean design and very efficient use of resources, but oh, is it ever quirky. My most recent return was motivated by James Bowman&#8217;s J1 Forth &#8230; <a href="http://skywired.net/blog/2012/09/going-forth-or-maybe-not/">Continue reading <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

More posts like this one:<ol>
<li><a href='http://skywired.net/blog/2012/09/rethinking-arduino-a-review/' rel='bookmark' title='Rethinking Arduino: A review'>Rethinking Arduino: A review</a></li>
<li><a href='http://skywired.net/blog/2011/08/a-morse-code-keyer-in-vhdl/' rel='bookmark' title='A Morse code keyer in VHDL'>A Morse code keyer in VHDL</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Over the years, I keep coming back to the Forth programming language. I admire its lean design and very efficient use of resources, but oh, is it ever quirky. My most recent return was motivated by James Bowman&#8217;s <a href="http://www.excamera.com/sphinx/fpga-j1.html">J1 Forth CPU</a>, a small but blazingly fast FPGA-based processor.</p>
<p>My ambivalence with Forth started back in the 1980&#8242;s, when an engineer named Tom Harsch mentored a very young me in digital electronics and computer architecture. Tom is an all-around engineer, versed in both hardware and software. He had a fondness for Forth, and he introduced it to me. Or perhaps I should say</p>
<p style="padding-left: 30px;">ME FORTH TOM INTRODUCED</p>
<p>You see, the very first quirk one runs into when encountering Forth is its use of postfix notation to represent operations. While mainstream languages like BASIC and C would have syntax resembling this,</p>
<p style="padding-left: 30px;">print 2 + 3</p>
<p>Or this,</p>
<p style="padding-left: 30px;">printf(&#8220;%d\n&#8221;, 2 + 3);</p>
<p>Forth, in common with German, likes its verbs last. Here&#8217;s the Forth version:</p>
<p style="padding-left: 30px;">2 3 + .</p>
<p>Don&#8217;t overlook that period, &#8220;.&#8221;, at the end. In Forth, that does not end a sentence; it is the command for printing a number.</p>
<p>Postfix notation is intellectually appealing, for several reasons. In postfix, every operation can be expressed with the same basic syntax, so there is no longer a need to distinguish between infix operators (+, -, *, etc.), unary prefix operators (like negation, -), and function calls. They all fit the same basic syntactic framework. Another advantage is that it maps very simply onto a stack-based processor model, which in turn can be implemented reasonably efficiently on many traditional CPUs or which really flies on dedicated hardware.</p>
<p>Forth uses postfix notation to permit the implementation of a simple compiler, which is usually built right into the run-time environment. The simplicity of the compiler results in further bizarre constructs, like the IF&#8230;ELSE&#8230;THEN statement. Not only are &#8220;ELSE&#8221; and &#8220;THEN&#8221; ordered backwards from pretty much every other language in the world, thanks to postfix notation, the &#8220;THEN&#8221; keyword comes after the code for the ELSE:</p>
<p style="padding-left: 30px;">( condition ) IF ( then-actions ) ELSE ( else-actions ) THEN</p>
<p>On the bright side, this did give rise to a classic bumper sticker from the Forth Interest Group:</p>
<p style="padding-left: 30px;">FORTH LOVE IF HONK THEN</p>
<p>Defining a function is straightforward, if you don&#8217;t mind punctuation:</p>
<p style="padding-left: 30px;">: 2times 2 * ;</p>
<p>The colon (:) command defines a new &#8220;word&#8221; for the language. The next text, &#8220;2times&#8221;, is the name of the new word. That is followed by the instructions for the word and a semicolon (;) that ends the definition.</p>
<p>So what does this new word do? It multiplies whatever number came before it by 2. &#8220;5 2times .&#8221; is equivalent to &#8220;5 2 * .&#8221; and prints the number 10.</p>
<p>This syntax is admirably compact and naturally lends itself to a functional style. On the other hand, what is the name of the word doing <em>after</em> the colon?  In a postfix language, I would expect to quote the name and the function body, then use the defining word. Something like this:</p>
<p>&#8217;2times (2 *) :</p>
<p>Flip that around and add a &#8220;lambda&#8221; and it starts to look like LISP, but that&#8217;s a subject for another time. In Forth, this kind of quirkiness, where everything is postfix except for the parts that aren&#8217;t, is standard. It keeps Forth&#8217;s compiler simple, but at a cost in elegance.</p>
<p>Syntactic quirkiness aside, Forth has a  few things going for it. First, it makes extremely efficient use of machine resources. A reasonable Forth environment can fit in 4K of RAM and include a compiler, an interpreter, and room for a small application. A full-featured environment is larger, but still takes less resources than equivalent functionality in other languages. Forth is generally fairly speedy, too.</p>
<p>Forth is extremely versatile. The compiler is implemented in an extensible way. You can define Forth words that alter how the compiler works, giving another way to work at higher levels of abstraction.</p>
<p>The philosophy behind Forth encourages programs to be organized in a hierarchy of small, simple functions. Each layer of functions builds a higher level of abstraction than the one that lies below it. I like this kind of well-factored programming, and it would be nice to work in a language that encourages it.</p>
<p>That brings me to the <a href="http://www.excamera.com/sphinx/fpga-j1.html">J1 Forth CPU</a>. This compact Verilog core is a work of brilliance, particularly in the way it uses the FPGA&#8217;s dual-port RAM in a carefully designed data path to achieve a high instruction rate. The instruction set architecture is pretty much pure Forth, and the implementation was written to be fast. James Bowman&#8217;s <a href="http://www.excamera.com/files/j1.pdf">paper on the J1 (pdf</a>) is well worth a read, and so is the <a href="http://www.excamera.com/files/j1demo/verilog/j1.v">Verilog source code</a>.</p>
<p>Ever since I read the J1 paper, I&#8217;ve been itching to find a use for it. (Yes, I know, that&#8217;s a solution in search of a problem&#8230;) My oft-delayed <a title="KK7B R2/T2 Transceiver" href="http://skywired.net/blog/projects/kk7b-r2t2-transceiver/">R2/T2 transceiver project</a> offered a chance. As I thought about what to put on the front panel, my mind strayed to thoughts of touch-panel LCDs. Wouldn&#8217;t it be nice to be able to defer most of the user interface decisions to software? It&#8217;s much easier to move a button on a screen than to un-drill a hole. eBay has a number of nice touch panels that would fit my chosen case perfectly.</p>
<p>Besides, I&#8217;ve been getting in a bit of a rut lately. Though there was a time when I learned every language I could find, lately I&#8217;ve been using C almost all the time. How better to shake things up than by implementing a touch-screen user interface in Forth?  My favorite way to learn a new language is to dive into a major project. In fact, I learned C by writing a text editor. Next I learned C++ by writing two text editors. Then I learned Tcl by writing a text editor, and Prolog by writing tax software. (Go figure.)</p>
<p>Eventually I came to my senses. First off, I&#8217;m so busy these days that I&#8217;m finding it hard to spend any time on the R2/T2, let alone write graphics software for it. A more serious problem, though, is that <a title="A3PN250 FPGA Breakout Board" href="http://skywired.net/blog/projects/a3pn250-fpga-breakout-board/">the Actel FPGA I have handy</a> has only 6K of RAM and limited capability for ROM or flash. To do the graphical user interface, I would want fonts in two sizes, and the J1 on this FPGA would not be able to store even one. I was brainstorming ways to extend the J1&#8242;s address space into off-FPGA storage when I had <a title="Rethinking Arduino: A review" href="http://skywired.net/blog/2012/09/rethinking-arduino-a-review/">my Arduino epiphany</a>. It does not make sense to spend time engineering complex font storage when a cheap, off-the-shelf processor has 32K of flash and the gcc C compiler at the ready.</p>
<p>Even with the Arduino standing by, I can&#8217;t get avoid being busy. No, the R2/T2 will have to make do with switches and knobs. Maybe in the future I can replace them with a touchscreen.</p>
<p>That settled, only one problem remains: I no longer have a problem for the J1 and Forth to solve.</p>
<p>Oh, well&#8230;</p>
<p><strong>Updated 1/18/13</strong> to correct the IF&#8230;ELSE&#8230;THEN syntax.</p>
<div class='yarpp-related-rss'>
<p>More posts like this one:</p><ol>
<li><a href='http://skywired.net/blog/2012/09/rethinking-arduino-a-review/' rel='bookmark' title='Rethinking Arduino: A review'>Rethinking Arduino: A review</a></li>
<li><a href='http://skywired.net/blog/2011/08/a-morse-code-keyer-in-vhdl/' rel='bookmark' title='A Morse code keyer in VHDL'>A Morse code keyer in VHDL</a></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://skywired.net/blog/2012/09/going-forth-or-maybe-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rethinking Arduino: A review</title>
		<link>http://skywired.net/blog/2012/09/rethinking-arduino-a-review/</link>
		<comments>http://skywired.net/blog/2012/09/rethinking-arduino-a-review/#comments</comments>
		<pubDate>Wed, 12 Sep 2012 02:26:20 +0000</pubDate>
		<dc:creator>Stephen Trier</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[ATmega328]]></category>
		<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[open source hardware]]></category>

		<guid isPermaLink="false">http://skywired.net/blog/?p=989</guid>
		<description><![CDATA[I&#8217;ll admit it, I was wrong. I&#8217;m an engineer by profession, and one for whom designing a microcontroller-based PC board is old hat. I used to look down my nose at Arduino. Its populist appeal and simplified programming language made &#8230; <a href="http://skywired.net/blog/2012/09/rethinking-arduino-a-review/">Continue reading <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

More posts like this one:<ol>
<li><a href='http://skywired.net/blog/2011/11/bus-pirate-review/' rel='bookmark' title='Bus Pirate review'>Bus Pirate review</a></li>
<li><a href='http://skywired.net/blog/2011/07/papilio-one-xilinx-fpga-breakout-board/' rel='bookmark' title='Papilio One Xilinx FPGA breakout board'>Papilio One Xilinx FPGA breakout board</a></li>
<li><a href='http://skywired.net/blog/2011/09/open-hardware-summit-2011/' rel='bookmark' title='Open Hardware Summit 2011'>Open Hardware Summit 2011</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ll admit it, I was wrong. I&#8217;m an engineer by profession, and one for whom designing a microcontroller-based PC board is old hat. I used to look down my nose at <a href="http://arduino.cc/">Arduino</a>. Its populist appeal and simplified programming language made it a toy in my eyes. I have worked with other boards with similar goals of broad appeal that were poorly designed, with compromises that made the boards unusuable or that overstressed components, making them unreliable. Above all though, &#8220;<em>real&#8221;</em> engineers design boards for microcontrollers, and they program the microcontrollers using JTAG connections and arcane syntax &#8212; or so I thought.</p>
<p><img class="alignnone size-full wp-image-995" title="Arduino Uno, top side" src="http://skywired.net/blog/wp-content/uploads/2012/09/IMG_6148-001.jpg" alt="Arduino Uno circuit board" width="800" height="674" /></p>
<p>Then a few weeks ago, I was given an Arduino. My perspective has shifted. Arduinos may be populist, they may be the <em>Radio Shack Engineer&#8217;s Notebook</em> of the microcontroller world, but they&#8217;re also well-designed development boards worthy of any engineer&#8217;s attention.</p>
<p>My Arduino came as part of <a href="https://www.sparkfun.com/products/11226">a Sparkfun starter kit</a>, which includes a breadboard, hookup wires, an RGB LED, packs of 1K and 10K resistors, and some fun sensors to play with, including a touch-sensitive resistor and a bend sensor. It amounts to a microcontroller-based building set, and would particularly appeal to anyone who wants to experiment with microcontrollers without having a specific project in mind. Though my son and daughter will be too young for the kit for a few more years, it caught my eye as exactly the sort of thing I might give to one of them to help them learn about what goes on inside a computer.</p>
<p><img class="alignnone size-full wp-image-996" title="Sparkfun Starter Kit contents" src="http://skywired.net/blog/wp-content/uploads/2012/09/IMG_6152-001.jpg" alt="Sparkfun Starter Kit contents" width="800" height="600" /></p>
<p>I set the accessories aside and focused on the Arduino, an Uno model in this kit. Arduino&#8217;s current foundation model, the Uno includes a <a href="http://www.atmel.com/devices/atmega328.aspx">Atmel Atmega328</a> microcontroller, on-board power supplies (5V and 3.3V), a USB serial interface, a general-purpose LED, and female sockets that break out the microcontroller pins.</p>
<p>The Atmel processor is surprisingly speedy. It has an 8-bit CPU running at 16 MHz, which was plenty of processing power for the things I was trying to do. Perhaps the biggest limitation of the processor is its 2K of RAM. The 32K of flash on-board is great, and conservative programming techniques can fit a surprising amount of functionality into 2K of RAM, but sometimes it&#8217;s easier and faster to use a controller with more RAM.</p>
<p>The USB serial interface was a surprise as well. It is implemented by a second, smaller Atmel CPU, programmed to operate as USB-to-serial interface chip akin to the popular <a href="http://www.ftdichip.com/FTProducts.htm">FTDI FT232 family</a>. According to Arduino&#8217;s creators, the Atmel CPU was less expensive than the FTDI equivalent. Beyond being an interface, the second CPU has a USB bootloader and an ICSP (in-circuit serial programming) header of its own, so it can be reprogrammed just like the Atmega328. The USB CPU is in a tiny QFN package, and most of its I/O lines are not brought out. Still, the ability to reprogram it opens up a lot of interesting possibilities.</p>
<p>Arduino&#8217;s native programming environment uses a simplified C-like language. Since I&#8217;m comfortable with standard C and prefer test-driven development, I followed Nick Christensen&#8217;s detailed instructions on <a href="http://spin.atomicobject.com/2012/02/24/tdd-comes-to-arduino/">how to set up an Arduino development environment with gcc, Unity, and CMock</a>. The gcc compiler is an industry standard tool these days, and I like Unity and CMock for unit testing.</p>
<p>Then I found out I was a snob. The Arduino wasn&#8217;t a toy. As I dug into its schematic and capabilities, I found a well-designed little development board. It was designed with cost-reduction in mind, for sure, but without losing sight of giving access to the entire capabilities of the processor. One processor pin drives an LED, for instance, but that line is also brought out to a header, making it available for other uses. The analog input pins are brought out without analog buffering, so they are available for digital I/O. Even the serial interface pins used to download code over USB can be repurposed.</p>
<p>There are other low-cost development boards, some directly competing with Arduino and others aiming for a slightly different audience. Here Arduino&#8217;s advantage is its popularity. Between <a href="http://www.radioshack.com/search/index.jsp?kwCatId=&amp;kw=arduino&amp;origkw=arduino&amp;sr=1">Radio Shack</a> and <a href="http://microcenter.com/product/389827/Arduino_Main_Board">Micro Center</a>, I can buy an original or cloned Arduino at retail from at least four stores within three miles of my house. That is surely not true for the entire world, but Arduino and software-compatible clones are also readily available online.</p>
<p>For my last small project, when I needed a microcontroller, I picked an inexpensive MSP430F2011 because TI&#8217;s <a href="http://www.ti.com/tool/ez430-f2013">EZ430 USB stick</a> (which was a freebie from TI) could serve as the programmer. Next time, there&#8217;s a good chance I will use a genuine Arduino, one of the clones, or maybe just use these development tools with a plain Atmega328.</p>
<p>Yep, Arduino is worth a look, even for those used to the traditional &#8220;professional&#8221; world of microcontroller design.</p>
<div class='yarpp-related-rss'>
<p>More posts like this one:</p><ol>
<li><a href='http://skywired.net/blog/2011/11/bus-pirate-review/' rel='bookmark' title='Bus Pirate review'>Bus Pirate review</a></li>
<li><a href='http://skywired.net/blog/2011/07/papilio-one-xilinx-fpga-breakout-board/' rel='bookmark' title='Papilio One Xilinx FPGA breakout board'>Papilio One Xilinx FPGA breakout board</a></li>
<li><a href='http://skywired.net/blog/2011/09/open-hardware-summit-2011/' rel='bookmark' title='Open Hardware Summit 2011'>Open Hardware Summit 2011</a></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://skywired.net/blog/2012/09/rethinking-arduino-a-review/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FDIM 2012: WB9LPU&#8217;s QuadraBug fully automatic key</title>
		<link>http://skywired.net/blog/2012/08/fdim-2012-wb9lpus-quadrabug-fully-automatic-key/</link>
		<comments>http://skywired.net/blog/2012/08/fdim-2012-wb9lpus-quadrabug-fully-automatic-key/#comments</comments>
		<pubDate>Wed, 22 Aug 2012 22:58:34 +0000</pubDate>
		<dc:creator>Stephen Trier</dc:creator>
				<category><![CDATA[Everything Else]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[FDIM]]></category>
		<category><![CDATA[Morse code]]></category>

		<guid isPermaLink="false">http://skywired.net/blog/?p=984</guid>
		<description><![CDATA[This year&#8217;s Four Days in May at the Dayton Hamvention was full of sights to see. One amazing little piece of amateur engineering was Rich Meiss, WB9LPU&#8217;s &#8220;QuadraBug&#8221;, a mechanical key in the spirit of the Vibroplex Bug, but with &#8230; <a href="http://skywired.net/blog/2012/08/fdim-2012-wb9lpus-quadrabug-fully-automatic-key/">Continue reading <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

More posts like this one:<ol>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-hamos/' rel='bookmark' title='FDIM 2012: HamOS'>FDIM 2012: HamOS</a></li>
<li><a href='http://skywired.net/blog/2011/06/iambic-keyer-in-verilog/' rel='bookmark' title='Iambic keyer in Verilog'>Iambic keyer in Verilog</a></li>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-n8wes-cw-transceiver/' rel='bookmark' title='FDIM 2012: N8WE&#8217;s CW transceiver'>FDIM 2012: N8WE&#8217;s CW transceiver</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>This year&#8217;s <a href="http://www.fdim.qrparci.org/">Four Days in May</a> at the <a href="http://www.hamvention.org/">Dayton Hamvention</a> was full of sights to see. One amazing little piece of amateur engineering was Rich Meiss, WB9LPU&#8217;s &#8220;QuadraBug&#8221;, a mechanical key in the spirit of the Vibroplex Bug, but with fully automatic keying of both dits and dahs. (A bug has automatic dits, but manual dahs.)</p>
<p><a href="http://skywired.net/blog/wp-content/uploads/2012/06/IMG_5988.jpg"><img class="alignnone size-full wp-image-894" title="WB9LPU Quadrabug" src="http://skywired.net/blog/wp-content/uploads/2012/06/IMG_5988.jpg" alt="" width="800" height="600" /></a></p>
<p>Tom Perrera has put together <a href="http://w1tp.com/mrm.htm">a nice overview of Rich&#8217;s keys</a>, starting from simple straight keys and working up to novel automatic keys like this.</p>
<p>My mechanical skills are limited. I have a lot of respect for those who can imagine and construct fine machines like this.</p>
<div class='yarpp-related-rss'>
<p>More posts like this one:</p><ol>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-hamos/' rel='bookmark' title='FDIM 2012: HamOS'>FDIM 2012: HamOS</a></li>
<li><a href='http://skywired.net/blog/2011/06/iambic-keyer-in-verilog/' rel='bookmark' title='Iambic keyer in Verilog'>Iambic keyer in Verilog</a></li>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-n8wes-cw-transceiver/' rel='bookmark' title='FDIM 2012: N8WE&#8217;s CW transceiver'>FDIM 2012: N8WE&#8217;s CW transceiver</a></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://skywired.net/blog/2012/08/fdim-2012-wb9lpus-quadrabug-fully-automatic-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FDIM 2012: AA2JZ&#8217;s 40m transceiver</title>
		<link>http://skywired.net/blog/2012/08/fdim-2012-aa2jzs-40m-transceiver/</link>
		<comments>http://skywired.net/blog/2012/08/fdim-2012-aa2jzs-40m-transceiver/#comments</comments>
		<pubDate>Fri, 17 Aug 2012 02:36:43 +0000</pubDate>
		<dc:creator>Stephen Trier</dc:creator>
				<category><![CDATA[Everything Else]]></category>
		<category><![CDATA[40m]]></category>
		<category><![CDATA[FDIM]]></category>
		<category><![CDATA[Manhattan]]></category>
		<category><![CDATA[NE602]]></category>
		<category><![CDATA[PIC]]></category>
		<category><![CDATA[transceiver]]></category>

		<guid isPermaLink="false">http://skywired.net/blog/?p=981</guid>
		<description><![CDATA[At this year&#8217;s Dayton Hamvention, I attended the Four Days In May QRP event put on by QRP-ARCI. A number of projects were on display, including this transceiver. Carl Herbert, AA2JZ designed and built this 40m transceiver, drawing on the &#8230; <a href="http://skywired.net/blog/2012/08/fdim-2012-aa2jzs-40m-transceiver/">Continue reading <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

More posts like this one:<ol>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-n8wes-cw-transceiver/' rel='bookmark' title='FDIM 2012: N8WE&#8217;s CW transceiver'>FDIM 2012: N8WE&#8217;s CW transceiver</a></li>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-the-yadi-micropower-digital-interface/' rel='bookmark' title='FDIM 2012: The YADI micropower digital interface'>FDIM 2012: The YADI micropower digital interface</a></li>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-hamos/' rel='bookmark' title='FDIM 2012: HamOS'>FDIM 2012: HamOS</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>At this year&#8217;s Dayton Hamvention, I attended the Four Days In May QRP event put on by QRP-ARCI. A number of projects were on display, including this transceiver.</p>
<p><a href="http://skywired.net/blog/wp-content/uploads/2012/06/IMG_5947.jpg"><img class="alignnone size-full wp-image-879" title="IMG_5947" src="http://skywired.net/blog/wp-content/uploads/2012/06/IMG_5947.jpg" alt="" width="800" height="600" /></a></p>
<p>Carl Herbert, AA2JZ designed and built this 40m transceiver, drawing on the NW8020 as a source of inspiration. It uses NE602 mixers and two PIC microcontrollers, and includes a keyer and a frequency counter.</p>
<p><a href="http://skywired.net/blog/wp-content/uploads/2012/06/IMG_5950.jpg"><img class="alignnone size-full wp-image-880" title="IMG_5950" src="http://skywired.net/blog/wp-content/uploads/2012/06/IMG_5950.jpg" alt="" width="800" height="600" /></a></p>
<p>I was impressed by Carl&#8217;s tidy Manhattan-style assembly technique, in which small pieces of copperclad board (PCB material) are glued down and used as points to which wires and component leads are soldered. Most impressive is that he used the same technique for the chips. Carl must have a lot of patience to be able to position the little &#8220;nibbles&#8221; of copperclad at 0.1&#8243; spacing to take the IC leads.</p>
<div class='yarpp-related-rss'>
<p>More posts like this one:</p><ol>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-n8wes-cw-transceiver/' rel='bookmark' title='FDIM 2012: N8WE&#8217;s CW transceiver'>FDIM 2012: N8WE&#8217;s CW transceiver</a></li>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-the-yadi-micropower-digital-interface/' rel='bookmark' title='FDIM 2012: The YADI micropower digital interface'>FDIM 2012: The YADI micropower digital interface</a></li>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-hamos/' rel='bookmark' title='FDIM 2012: HamOS'>FDIM 2012: HamOS</a></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://skywired.net/blog/2012/08/fdim-2012-aa2jzs-40m-transceiver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Delta-Sigma Works, part 3: The controls-system perspective</title>
		<link>http://skywired.net/blog/2012/07/how-delta-sigma-works-part-3-the-controls-system-perspective/</link>
		<comments>http://skywired.net/blog/2012/07/how-delta-sigma-works-part-3-the-controls-system-perspective/#comments</comments>
		<pubDate>Thu, 05 Jul 2012 02:58:28 +0000</pubDate>
		<dc:creator>Stephen Trier</dc:creator>
				<category><![CDATA[Design Notes]]></category>
		<category><![CDATA[controls system]]></category>
		<category><![CDATA[delta-sigma]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[theory]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://skywired.net/blog/?p=969</guid>
		<description><![CDATA[This post is part of a series on delta-sigma techniques: data converters, modulators, and more. A complete list of posts in the series are in the How Delta-Sigma Works tutorial page. In the first installment of How Delta-Sigma Works, I presented &#8230; <a href="http://skywired.net/blog/2012/07/how-delta-sigma-works-part-3-the-controls-system-perspective/">Continue reading <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

More posts like this one:<ol>
<li><a href='http://skywired.net/blog/2011/05/introducing-the-delta-sigma-modulator/' rel='bookmark' title='How Delta Sigma Works, part 1: Introducing the Delta Sigma Modulator'>How Delta Sigma Works, part 1: Introducing the Delta Sigma Modulator</a></li>
<li><a href='http://skywired.net/blog/2011/07/how-delta-sigma-works-anti-aliasing-advantage/' rel='bookmark' title='How Delta-Sigma Works, part 2: The Anti-Aliasing Advantage'>How Delta-Sigma Works, part 2: The Anti-Aliasing Advantage</a></li>
<li><a href='http://skywired.net/blog/tutorials/how-delta-sigma-works/' rel='bookmark' title='How Delta Sigma Works'>How Delta Sigma Works</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p><em>This post is part of a series on delta-sigma techniques: data converters, modulators, and more. A complete list of posts in the series are in the <a title="How Delta Sigma Works" href="http://skywired.net/blog/tutorials/how-delta-sigma-works/">How Delta-Sigma Works</a> tutorial page.</em></p>
<p>In the first installment of <a title="How Delta Sigma Works" href="http://skywired.net/blog/tutorials/how-delta-sigma-works/">How Delta-Sigma Works</a>, I presented the basic <a title="How Delta Sigma Works, part 1: Introducing the Delta Sigma Modulator" href="http://skywired.net/blog/2011/05/introducing-the-delta-sigma-modulator/">first-order delta-sigma converter loop</a>. Now it is time to begin digging a little deeper and look at how the loop works. To do this, we will need the mathematical tools of closed-loop control systems. Even without the mathematics, thinking about a delta-sigma modulator as a closed-loop controller can bring insight into how it works.</p>
<p>In engineering, closed-loop control is often used to keep a system working at a setpoint despite environmental disturbances or variations in the system itself. A furnace thermostat is a simple closed-loop controller, turning on the heat when the temperature drops below a setpoint and turning it back off when the temperature is above. Another example is vehicle cruise control. Unlike a thermostat, which usually has a binary output (on/off), cruise control adjusts the engine fuel control to maintain a roughly constant speed. In my car, it does this by physically moving the gas pedal. The environmental variations cruise control can encounter include hills, the quality of the fuel, and headwinds or tailwinds. The closed-loop controller adjusts the gas pedal as needed to maintain constant speed despite these effects.</p>
<p>A simple closed-loop control system can be drawn as in the figure below. The reference input, <em>r</em>, is the command input to the controller. In the thermostat example, <em>r</em> is the setpoint temperature, while for cruise control, it is the set speed. The output, <em>y</em>, is the controlled value. This is not necessarily in the same units as the reference input <em>r</em>. For example, in the cruise control, <em>y</em> might be a direct measurement of speed, or it might be something else related, such as a cumulative count of revolutions of the vehicle&#8217;s wheels.</p>
<p><a href="http://skywired.net/blog/wp-content/uploads/2012/07/delta-sigma-3-2.png"><img title="delta-sigma-3-2" src="http://skywired.net/blog/wp-content/uploads/2012/07/delta-sigma-3-2.png" alt="Basic closed-loop control system" width="570" height="300" /></a></p>
<p>In between the input <em>r</em> and the output <em>y</em> is the control loop. At the bottom of the loop, in its feedback path, a block <em>h</em> processes the output <em>y</em> into a form that is subtracted from the input <em>r</em> to create an error signal <em>e</em>. This error signal is an indication of how far the controller is from the desired operating point. The goal of a controller design is to keep <em>e</em> near, if not at, 0. The feedback block <em>h</em> can represent many different things. In the example of a cruise control system with the output <em>y</em> in units of distance, <em>h</em> might calculate speed by computing the derivative of <em>y</em>. In other systems, <em>h</em> might simply scale the value to convert its units. If <em>y</em> and <em>r</em> are already in the same units, such as in a thermostat example, <em>h</em> can pass through <em>y</em> unchanged (<img src='http://s0.wp.com/latex.php?latex=h+%3D+y&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='h = y' title='h = y' class='latex' />).</p>
<p>Now that the error signal has been calculated, it is processed by the controller gc, the output of which goes to the &#8220;plant&#8221; being controlled. (To a controls engineer, anything being controlled, whether a car, a heating system, or a giant factory, is a plant.) The plant is represented by the box <em>g<sub>p</sub></em>. The processing in the controller <em>g<sub>c</sub></em> is easy to grasp. The controller calculates some function of its input in order to find the command it should give the plant.</p>
<p>What happens in this plant, <em>g<sub>p</sub></em>, may be a little harder to imagine. The function <em>g<sub>p</sub></em> is a mathematical model of the physics of the actual plant. It may be calculated from basic principles (a physicist&#8217;s delight!), or it may be an empirical model derived from the inputs and outputs of the actual plant. In any event, a reasonable guess at the function <em>g<sub>p</sub></em> is necessary before one can design a closed-loop controller.</p>
<p>A delta-sigma modulator also has a closed loop, which suggests that perhaps insight can be gained by comparing it to a controller. The first-order delta-sigma analog-to-digital converter from the first installment, is shown again below.</p>
<p><a href="http://skywired.net/blog/wp-content/uploads/2012/07/delta-sigma-1-1.corrected.png"><img title="delta-sigma-1-1.corrected" src="http://skywired.net/blog/wp-content/uploads/2012/07/delta-sigma-1-1.corrected.png" alt="First-order delta-sigma modulator" width="760" height="300" /></a></p>
<p>The resemblance to a closed-loop controller is clear when one groups the blocks as in the next figure. The subtractor has the same function in both diagrams, comparing the input to the output. The integrator functions as the controller, <em>g<sub>c</sub></em>, and the analog-to-digital convertor and its register are the plant, <em>g<sub>p</sub></em>, being controlled. The digital-to-analog converter is the feedback path, <em>h</em>.</p>
<p><a href="http://skywired.net/blog/wp-content/uploads/2012/07/delta-sigma-3-3.png"><img title="delta-sigma-3-3" src="http://skywired.net/blog/wp-content/uploads/2012/07/delta-sigma-3-3.png" alt="Grouping the delta-sigma elements by analogy to the closed-loop controller" width="740" height="380" /></a></p>
<p>This grouping gives immediate insight into how the delta-sigma modulator does its magic: It is a linear controller for an analog-to-digital converter, which is the plant. The controller is always trying to drive that plant&#8217;s output as close as possible to the setpoint, and does so by adding up (integrating) the error signal. Also, since the integrator is adding up the history of the error signal, it can be seen that although the output at any given moment may not equal the input, the long-term average will be equal. That integrator will try to keep the long-term average of the error, <em>e</em>, equal to 0.</p>
<p>There are many controllers that can control a given plant. PID (proportional-integral-derivative) controllers are simple and very popular, while more sophisticated controllers can be designed using other techniques. If a delta-sigma modulator is a control loop, it is reasonable to ask if controllers other than an single integrator will result in a better-performing modulator. In fact, other control functions can be used in delta-sigma modulators and can give lower noise or more desirable characteristics in the frequency domain.</p>
<p>Finally, one should not get too carried away with a linear control model. Analog-to-digital and digital-to-analog converters are inherently non-linear, while the mathematics of control theory primarily deals with linear systems. Assuming linear behavior will get us a long way towards understanding delta-sigma techniques, but it is important not to take the analogy too far.</p>
<p>Next in this series: Noise shaping, the frequency-domain secret behind delta-sigma data converters.</p>
<div class='yarpp-related-rss'>
<p>More posts like this one:</p><ol>
<li><a href='http://skywired.net/blog/2011/05/introducing-the-delta-sigma-modulator/' rel='bookmark' title='How Delta Sigma Works, part 1: Introducing the Delta Sigma Modulator'>How Delta Sigma Works, part 1: Introducing the Delta Sigma Modulator</a></li>
<li><a href='http://skywired.net/blog/2011/07/how-delta-sigma-works-anti-aliasing-advantage/' rel='bookmark' title='How Delta-Sigma Works, part 2: The Anti-Aliasing Advantage'>How Delta-Sigma Works, part 2: The Anti-Aliasing Advantage</a></li>
<li><a href='http://skywired.net/blog/tutorials/how-delta-sigma-works/' rel='bookmark' title='How Delta Sigma Works'>How Delta Sigma Works</a></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://skywired.net/blog/2012/07/how-delta-sigma-works-part-3-the-controls-system-perspective/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>FDIM 2012: A field strength meter built onto a Harbor Freight DMM</title>
		<link>http://skywired.net/blog/2012/06/fdim-2012-a-field-strength-meter-built-onto-a-harbor-freight-dmm/</link>
		<comments>http://skywired.net/blog/2012/06/fdim-2012-a-field-strength-meter-built-onto-a-harbor-freight-dmm/#comments</comments>
		<pubDate>Wed, 27 Jun 2012 13:00:58 +0000</pubDate>
		<dc:creator>Stephen Trier</dc:creator>
				<category><![CDATA[Everything Else]]></category>
		<category><![CDATA[DMM]]></category>
		<category><![CDATA[field strength meter]]></category>
		<category><![CDATA[homebrew]]></category>

		<guid isPermaLink="false">http://skywired.net/blog/?p=906</guid>
		<description><![CDATA[Continuing the series on neat projects I saw at the Four Days In May, here is a litle field strength meter built onto the side of a cheap Harbor Freight DMM by Dana Browne AD5VC. Dana&#8217;s inspiration for the little &#8230; <a href="http://skywired.net/blog/2012/06/fdim-2012-a-field-strength-meter-built-onto-a-harbor-freight-dmm/">Continue reading <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

More posts like this one:<ol>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-n8wes-cw-transceiver/' rel='bookmark' title='FDIM 2012: N8WE&#8217;s CW transceiver'>FDIM 2012: N8WE&#8217;s CW transceiver</a></li>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-hamos/' rel='bookmark' title='FDIM 2012: HamOS'>FDIM 2012: HamOS</a></li>
<li><a href='http://skywired.net/blog/2012/08/fdim-2012-aa2jzs-40m-transceiver/' rel='bookmark' title='FDIM 2012: AA2JZ&#8217;s 40m transceiver'>FDIM 2012: AA2JZ&#8217;s 40m transceiver</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Continuing the series on neat projects I saw at the <a href="http://www.fdim.qrparci.org/">Four Days In May</a>, here is a litle field strength meter built onto the side of a cheap Harbor Freight DMM by Dana Browne AD5VC.</p>
<p><a href="http://skywired.net/blog/wp-content/uploads/2012/06/IMG_5935.jpg"><img class="alignnone size-full wp-image-877" title="ADC5VC field strength meter" src="http://skywired.net/blog/wp-content/uploads/2012/06/IMG_5935.jpg" alt="ADC5VC field strength meter" width="800" height="600" /></a></p>
<p>Dana&#8217;s inspiration for the little field strength meter came when he was teaching a radio class to college students and wanted to show them the pattern of a Yagi-Uda antenna. He explained that cheap digital multimeters like this Harbor Freight model were readily available in the physics lab, so he built the field-strength circuit and  a little plug-in adapter using the DMM as the readout.</p>
<p>Though I don&#8217;t see much need for a field-strength meter in my shack, I admire Dana&#8217;s inventiveness in coming up with a solution that is cheap, convenient, and inexpensive.</p>
<div class='yarpp-related-rss'>
<p>More posts like this one:</p><ol>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-n8wes-cw-transceiver/' rel='bookmark' title='FDIM 2012: N8WE&#8217;s CW transceiver'>FDIM 2012: N8WE&#8217;s CW transceiver</a></li>
<li><a href='http://skywired.net/blog/2012/06/fdim-2012-hamos/' rel='bookmark' title='FDIM 2012: HamOS'>FDIM 2012: HamOS</a></li>
<li><a href='http://skywired.net/blog/2012/08/fdim-2012-aa2jzs-40m-transceiver/' rel='bookmark' title='FDIM 2012: AA2JZ&#8217;s 40m transceiver'>FDIM 2012: AA2JZ&#8217;s 40m transceiver</a></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://skywired.net/blog/2012/06/fdim-2012-a-field-strength-meter-built-onto-a-harbor-freight-dmm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New contact form</title>
		<link>http://skywired.net/blog/2012/06/new-contact-form/</link>
		<comments>http://skywired.net/blog/2012/06/new-contact-form/#comments</comments>
		<pubDate>Mon, 25 Jun 2012 21:31:55 +0000</pubDate>
		<dc:creator>Stephen Trier</dc:creator>
				<category><![CDATA[Skywired News]]></category>
		<category><![CDATA[Skywired]]></category>

		<guid isPermaLink="false">http://skywired.net/blog/?p=948</guid>
		<description><![CDATA[I&#8217;ve added a Contact form to the site menu bar, next to the About link. If you need to get in touch with me for whatever reason, and don&#8217;t want it to be a public comment, this is the place. &#8230; <a href="http://skywired.net/blog/2012/06/new-contact-form/">Continue reading <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

More posts like this one:<ol>
<li><a href='http://skywired.net/blog/contact/' rel='bookmark' title='Contact'>Contact</a></li>
<li><a href='http://skywired.net/blog/2011/04/soldering-in-comic-form/' rel='bookmark' title='Soldering in comic form!'>Soldering in comic form!</a></li>
<li><a href='http://skywired.net/blog/projects/iambic-keyer-core/' rel='bookmark' title='Iambic Keyer Core'>Iambic Keyer Core</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve added a Contact form to the site menu bar, next to the About link. If you need to get in touch with me for whatever reason, and don&#8217;t want it to be a public comment, this is the place.</p>
<p>Thanks for reading skywired.net.</p>
<div class='yarpp-related-rss'>
<p>More posts like this one:</p><ol>
<li><a href='http://skywired.net/blog/contact/' rel='bookmark' title='Contact'>Contact</a></li>
<li><a href='http://skywired.net/blog/2011/04/soldering-in-comic-form/' rel='bookmark' title='Soldering in comic form!'>Soldering in comic form!</a></li>
<li><a href='http://skywired.net/blog/projects/iambic-keyer-core/' rel='bookmark' title='Iambic Keyer Core'>Iambic Keyer Core</a></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://skywired.net/blog/2012/06/new-contact-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
