<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1672783022634900449</id><updated>2011-10-15T03:45:04.490-07:00</updated><category term='loop anetnna'/><category term='regenerative'/><category term='Introduction 9/1/2008'/><category term='programming'/><category term='crystal'/><category term='barometer'/><category term='grinding'/><category term='PIC'/><category term='FT-243'/><category term='Nixie'/><category term='electronics'/><category term='Si570'/><category term='receiver'/><category term='Arduino'/><category term='antenna'/><category term='clock'/><category term='homebrew'/><category term='multi-turn loop'/><category term='synthesizer'/><category term='MP3H6115A'/><category term='DAC sine wave generator'/><category term='regen'/><category term='DDS'/><category term='NO-DDS'/><category term='ham'/><category term='altimeter'/><category term='timing'/><category term='glowbug'/><title type='text'>ham electronic homebrewer</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-1805821113183707398</id><published>2011-10-07T19:15:00.000-07:00</published><updated>2011-10-07T19:15:15.424-07:00</updated><title type='text'>Sputnik transmitter</title><content type='html'>For my latest, I've put aside my AVR programming and a few other projects to participate in an activity commemorating the October 4, 1957 launch of Sputnik 1, and with it, the space age. It's the brainchild of the master of archaic radio technology Mike Rainey AA1TJ, whose original post is here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://aa1tj.blogspot.com/2011/07/sputnik-qso-party-transmitter-prototype.html"&gt;http://aa1tj.blogspot.com/2011/07/sputnik-qso-party-transmitter-prototype.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Mike supplied me with the the two Russian "pencil tubes", a 21.060MHz crystal and a vague instruction to do something with them. I reproduced the transmitter shown in the schematic of the above link to the best of my ability. &amp;nbsp;Initially, I had trouble getting oscillation, so I reduced the size of the "lower" feedback capacitor to get it to go. &amp;nbsp;Eventually I got all the way down to 10pF, tormenting the crystal all the way up to 21.065MHz. &amp;nbsp;I had problems with low output, sometimes less than 100mW and was suspicious of my plate RF chokes so eventually went to a 1k resistor on the oscillator plate and a resonant tank on the amplifier. &amp;nbsp;That put me up to 200mW.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-qYexpm9VWVM/To-rAq1AvgI/AAAAAAAAHIc/jOi2JxB4lLM/s1600/sputnik+inside+3+%2528752+x+500%2529.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="http://2.bp.blogspot.com/-qYexpm9VWVM/To-rAq1AvgI/AAAAAAAAHIc/jOi2JxB4lLM/s320/sputnik+inside+3+%2528752+x+500%2529.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Here's a picture of it. &amp;nbsp;The tubes have wire leads which I soldered to a terminal strip. For keying, I did what Michael suggested and keyed the PA plate while leaving the oscillator running. &amp;nbsp;The little perf board has a TTL reed relay for keying. &amp;nbsp;By this time I'd already made my power cable for B+ and filament and realized I needed 5V for the relay. &amp;nbsp;Rather than rebuild that cable, I added the 9V battery and a 78L05. &amp;nbsp;A little foresight could have been helpful.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;On the air!&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;I got it ready just in time for the October 4th start date. &amp;nbsp;I was fairly amazed to make four QSOs on a Tuesday afternoon with just 200mW out. They were:&lt;br /&gt;&lt;br /&gt;N2JJ in NY&lt;br /&gt;W1PID in NH&lt;br /&gt;W5RZ 10 miles up the road&lt;br /&gt;WB8YYY in MD&lt;br /&gt;&lt;br /&gt;N2JJ recorded my simulated 54 year old transmitter on his Droid phone and sent me the audio file!&lt;br /&gt;W5RZ wished me "DSW".&lt;br /&gt;WB8YYY gave me a 238 RST, one of the strangest I've had.&lt;br /&gt;&lt;br /&gt;Inspired by this project, I've done a lot of reading on Sputnik. &amp;nbsp;I remember very well when it was announced on the news in 1957. &amp;nbsp;We ran out and looked at the sky.&lt;br /&gt;&lt;br /&gt;Some of the ideas I and maybe others had weren't really correct. &amp;nbsp;First, while the exact time of the launch wasn't known (the Soviets were pretty secretive), it was generally known in the US that the Soviets were very close to making their attempt. The US was also pretty close to launching, with an intended satellite launch planned during the IGY (International&amp;nbsp;Geophysical&amp;nbsp;Year) of 1957. It actually succeeded in January 1958. &amp;nbsp;But the possibly underestimated reaction of the public and media to Sputnik expedited the program a great deal.&lt;br /&gt;&lt;br /&gt;Sputnik transmitted on 20 MHz, allowing ham operators and shortwave listeners worldwide to hear its beeps. Michael chose the 21 MHz ham band for our project to get reasonably close. The American satellites transmitted above 100MHz, which required somewhat more exotic receiving equipment to hear.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-1805821113183707398?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/1805821113183707398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=1805821113183707398' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/1805821113183707398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/1805821113183707398'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2011/10/sputnik-transmitter.html' title='Sputnik transmitter'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-qYexpm9VWVM/To-rAq1AvgI/AAAAAAAAHIc/jOi2JxB4lLM/s72-c/sputnik+inside+3+%2528752+x+500%2529.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-7823417189649345385</id><published>2011-08-19T12:43:00.000-07:00</published><updated>2011-08-19T12:43:17.788-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='altimeter'/><category scheme='http://www.blogger.com/atom/ns#' term='MP3H6115A'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='barometer'/><title type='text'>Barometer - Altimeter</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-yau-cWu0d_Y/Tk6xk6IEUYI/AAAAAAAAG60/g1_HMo_U8Gg/s1600/inch+mercury.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="http://2.bp.blogspot.com/-yau-cWu0d_Y/Tk6xk6IEUYI/AAAAAAAAG60/g1_HMo_U8Gg/s320/inch+mercury.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;For some reason I've thought for a while that it would be fun to build (or even buy) a barometer. &amp;nbsp;A friend had this cool military surplus altimeter he put on the seat of his car while driving through the mountains and you could see the elevation go up and down. That was pretty cool. &amp;nbsp;Barometric pressure is interesting too. &amp;nbsp;Can you predict a storm by seeing a rapid drop?&lt;br /&gt;&lt;br /&gt;So I finally ran across this chip, or sensor on a chip, by&amp;nbsp;&lt;span class="Apple-style-span" style="font-size: 16px; line-height: 18px;"&gt;Freescale, the MP3H6115A pressure sensor chip. It cost $9.15 from Mouser. The chip is SMT, 8-pin SSOP package.&lt;span&gt;&amp;nbsp; &lt;/span&gt;It has 0.05” pin spacing, but the row-to-row width is wider than SOIC packages, so a different adapter or board pattern is needed.&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;It has an output of 15 to 115kPa or 2.2 to 16.7 psia.&amp;nbsp;&lt;/span&gt;Supply voltage is 2.7 to 3.3 VDC, typically 3.0 VDC.&lt;span&gt;&amp;nbsp; &lt;/span&gt;Output is in ratio to supply voltage, so it must be known and regulated.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;In the photo you see I soldered the chip to a little adapter board and glued that to a scrap piece of PC board on which I also mounted a 3.3V regulator.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;Only three pins are used: supply, ground, and output. So you just take that output to the ADC input of your micro and Bob's-your-uncle, instant barometer. &amp;nbsp;Altimeter. &amp;nbsp;Whatever.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;You'll need some floating point routines in the program. &amp;nbsp;I used my Arduino board which has an ATmega168 MCU, I think. &amp;nbsp;You program it in C. &amp;nbsp;I'm trying to expand beyond assembler so this is a good project for me. The formula for pressure from output voltage is:&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 18px;"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;P = (Vout/Vs +0.095)/0.009 kPa &amp;nbsp;(Vs is the supply voltage.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: 18px;"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="line-height: 115%;"&gt;Since the output is in kPa or kilo-Pascals, I did a further&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;conversion&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="line-height: 115%;"&gt;&amp;nbsp;to inches of mercury (inHg), more familiar to me. &amp;nbsp;BTW, normal barometric pressure is about 101.3kPa.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="line-height: 115%;"&gt;I first just hooked the thing to my DMM and converted voltage readings to inHg with Excel or my calculator. &amp;nbsp;I pulled up the local airport's data on the web and compared readings. &amp;nbsp;They were off a bit more than I expected, but then I learned that airports convert their reading to sea level equivalent, making it somewhat higher. &amp;nbsp;After compensating for the difference between sea level and our airport's altitude of about 380 ft. I was closer. &amp;nbsp;In the end I did a small fudge factor to get closer yet. I also have access to atmospheric pressure at my friendly local power plant for calibration purposes.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="line-height: 115%;"&gt;Converting to altitude is more complicated. Rigorous formulas are complex and factor in a number of things like ambient temperature and relative humidity. &amp;nbsp;I opted for one that was simpler:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="line-height: 115%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;Z = (1-(P/29.9247)^0.19)/22.558E-6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;Where Z is altitude in meters and P is pressure in inHg. &amp;nbsp;I converted the result to feet for display.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;My display is a 4-digit 7-segment display surplus from a set-top box, BTW. &amp;nbsp;I like the look of red 7-segment numerals, but it has a few issues: &amp;nbsp;No decimal point, hard to see in outdoor light, can't make many alphabetic characters.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;I make my program display pressure in inHg for about 1.5s, then text approximating "inHg" for 0.75s, then feet altitude for 1.5s and text "ASL" for 0.75s and repeat.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;One curious result I noticed initially was that the display would show 380 feet for a while, then jump to 350 feet, alternating between the two. &amp;nbsp;I finally realized that this is the limitation of my 10 bit ADC. &amp;nbsp;One part in 1024 is equivalent to about 30 feet of elevation here in Russellville. &amp;nbsp;I tricked my way out of that a bit by putting in an averaging routine that uses the average of 5 readings taken over a 5 second period. &amp;nbsp;Now I get smoother changes and some artificial interpolation but my response time to a step change has been reduced to the 5 seconds it takes to fill the buffer.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;Today I gave it a trial run in the Miata to the top of Mt. Nebo. &amp;nbsp;My local elevation is 380 feet. &amp;nbsp;When I got to the sign at the top of the mountain saying "Elevation 1800 feet", my altimeter was displaying 1749 ASL. &amp;nbsp;So, pretty good. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;BTW, I looked at a week's worth of barometic data and saw that the equivalent elevation change between the high and low readings was 186 feet. &amp;nbsp;So I might reasonably expect extremes to make my altitude reading off by up to +/- 93 feet if I haven't entered any compensation.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: 16px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-size: 16px; line-height: 18px;"&gt;Will this project ever make it into a box with a dedicated MCU chip? &amp;nbsp;Maybe.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-7823417189649345385?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/7823417189649345385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=7823417189649345385' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/7823417189649345385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/7823417189649345385'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2011/08/barometer-altimeter.html' title='Barometer - Altimeter'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-yau-cWu0d_Y/Tk6xk6IEUYI/AAAAAAAAG60/g1_HMo_U8Gg/s72-c/inch+mercury.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-2290417051354286039</id><published>2011-03-26T17:58:00.000-07:00</published><updated>2011-03-26T17:58:36.784-07:00</updated><title type='text'>PIC powered filaments - my first PWR / switching project.</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh5.googleusercontent.com/-ODrlLl47VM4/TY53ZJeiBmI/AAAAAAAAGjQ/0VPQIL49_is/s1600/PWM+board.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="https://lh5.googleusercontent.com/-ODrlLl47VM4/TY53ZJeiBmI/AAAAAAAAGjQ/0VPQIL49_is/s320/PWM+board.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;This project satisfies a couple things I'd been wanting to try - 1) using PWM on the PIC, and 2) trying my hand at a switching power supply circuit.&lt;br /&gt;&lt;br /&gt;I should say that I first tried the Arduino board, but it's C-language front end only allowed a PWM frequency of about 500 Hz. &amp;nbsp;I felt the need for a higher frequency / shorter period. &amp;nbsp;So back to the PIC, and I chose a favorite, the 16F88. &amp;nbsp;It has 18 pins and incorporates ADC, PWM and lots of other good stuff. &amp;nbsp;To make sure I could get the PWM speed I wanted, I used a 20MHz crystal instead of one of the very handy built-in oscillators.&lt;br /&gt;&lt;br /&gt;First I worked on learning to get the PIC working in the PWM mode. &amp;nbsp;It didn't take long to be able to produce a "demand" output voltage of good accuracy that I could measure with a DMM and/or see on the scope. &amp;nbsp;I used a simple RC filter on the output pin to convert the pulse train to DC.&lt;br /&gt;&lt;br /&gt;PWM is pulse-width modulation. &amp;nbsp;For example, if I set it for 25% output, the output pin will be HIGH for 25% of the selected period and LOW for the remaining 75%, and repeat. &amp;nbsp;Good for power supply voltage regulation. &amp;nbsp;(Similar methods are even used in your digital (CD, MP3) music players to generate audio.)&lt;br /&gt;&lt;br /&gt;Now, what about the switching circuit components? &amp;nbsp;I scanned several references (complicated!) and came up with a simple appearing "buck" circuit. &amp;nbsp;The PIC controls a pass transistor that "charges" a series inductor during the ON time, through the load, and when the PIC turns off, the inductor continues to source current through the load with a diode providing the conduction path that opened when the pass transistor turned OFF.&lt;br /&gt;&lt;br /&gt;The references indicated that design of PWM circuits is pretty complex and not likely to work with homebrew hacker techniques. &amp;nbsp;I decided to play with my proposed circuit in LTSpice for a while before risking blowing stuff up, since I was pretty clueless. &amp;nbsp;That helped me a lot. &amp;nbsp;I just simulated the PWM pulse drive from the PIC with a square wave source, changing the duty cycle manually until the output voltage was right. &lt;br /&gt;&lt;br /&gt;I was using a 20us (microsecond) period, which is the total ON plus OFF time for one cycle. &amp;nbsp;Things were looking good and I was thinking it ought to work, but then I started using LTSpice to look at the dissipation in components such as my transistor. &amp;nbsp;Wow, it was dissipating twice as much as my load. My overall efficiency must have been about 25%. &amp;nbsp;Looking closer, it appeared that the losses occur during switching periods, the rise and fall times. &amp;nbsp;When fully ON or OFF there's no device dissipation, which of course is what makes switching power supplies attractive. Do I somehow have to figure out how to make those rise and fall times smaller? &amp;nbsp;Fortunately, no.&lt;br /&gt;&lt;br /&gt;It occurred that my efficiency is related to the number of switching transitions (OFF to ON, ON to OFF) per unit time. &amp;nbsp;So maybe my period is too short. &amp;nbsp;I had just assumed that faster was better. &amp;nbsp;I cranked down the period in my simulation and efficiency improved considerably. &amp;nbsp;I eventually went all the way from 50kHz PWM frequency down to 4.88kHz. So maybe I could have skipped the 20MHz crystal and just used the internal 4MHz oscillator.&lt;br /&gt;&lt;br /&gt;One negative is that the peak transistor current gets larger as the ON time stretches out. &amp;nbsp;More inductance can help. &amp;nbsp;My transistor has a rating of 1A continuous and 3A peak and I was trying to hold to that.&lt;br /&gt;&lt;br /&gt;Now I'll show the schematic and discuss the component selections-&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh5.googleusercontent.com/-MHv_DIyT7b0/TY58b2abhfI/AAAAAAAAGjU/lFttIISRxiw/s1600/PWM_CKT.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="157" src="https://lh5.googleusercontent.com/-MHv_DIyT7b0/TY58b2abhfI/AAAAAAAAGjU/lFttIISRxiw/s320/PWM_CKT.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;I originally wanted to use full wave rectified voltage right off the AC line, like PC supplies do. &amp;nbsp;But that would give me about 170VDC and I didn't have a PNP transistor to handle that with margin. &amp;nbsp;My closest shot was the TIP30C, rated 100VDC. &amp;nbsp;So for my experiment I also had to build a power supply of about 50VDC output. &amp;nbsp;I have a good junk box, so no problem.&lt;br /&gt;&lt;br /&gt;Next comes the diode, I guess it's a commutating diode. &amp;nbsp;I think it needs to be one of those "fast" diodes used in switching supplies and capable of 2A or more. &amp;nbsp;Junkbox to the rescue again, I have a RHRP860 rated "hyperfast" at 8A and 600V. &amp;nbsp;It's in a TO220 package like my transistor. &amp;nbsp;The cathode of the diode and the collector of the transistor are both on the metal mounting tabs of their packages, so I could bolt both to the same heat sink and board area to make that connection.&lt;br /&gt;&lt;br /&gt;Next comes Q2, which switches the main transistor ON and OFF by grounding and opening its base circuit. &amp;nbsp;When this transistor is OFF, it sees the full supply voltage, so I wanted a small transistor that could take fairly high voltage as I look forward to my 170 volt version. &amp;nbsp;The MPSA43 is a small transistor in a TO92 package that can take 300 volts.&lt;br /&gt;&lt;br /&gt;Finally the inductor. &amp;nbsp;Books and articles indicate that this can be critical. &amp;nbsp;I picked one from my junk box which seemed to have heavy enough wire and measured 933uH. &amp;nbsp;I have no idea of the intended use although I suspected it was part of a switcher of some kind. &amp;nbsp;I should mention that the inductor should not saturate at maximum current. &amp;nbsp;A recent project of mine was a saturation tester similar to that made by Alan Yates, VK2ZAY.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vk2zay.net/article/200"&gt;http://www.vk2zay.net/article/200&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vk2zay.net/article/200"&gt;&lt;/a&gt;I may document mine here one of these days. &amp;nbsp;Anyway, I had tested this inductor and it could go several amps without saturating.&lt;br /&gt;&lt;br /&gt;That network of three resistors and two capacitors between the output and the PIC's ADC input does two things. &amp;nbsp;First, it's a /2 voltage divider since 6.3 volts would over-range my PIC's 0 to 5 volt ADC input. &amp;nbsp;And second, it's an RC filter to smooth out any ripple on the output so the PIC gets a consistent average reading.&lt;br /&gt;&lt;br /&gt;I lashed everything together, including the power supply, PIC board, switching circuit and a 10 ohm load with a 6.3 volt #44 bulb in parallel. &amp;nbsp;(My setpoint in software is 6.3 volts.) &amp;nbsp;Somewhat to my amazement, the lamp came up to normal brilliance and my DMM measured 6.27 volts. And nothing blew up, smoked, or made scary noises. &amp;nbsp;My homemade sheet metal heat sink got to about 125F near the transistor and diode -- not too bad. &amp;nbsp;I added a second 10 ohm load in parallel to get closer to my desired output of a bit over 1.5A and all was good. &amp;nbsp;Regulation with load changes looks good, and as I ran the input voltage from 35V to 65V the output voltage did not waver.&lt;br /&gt;&lt;br /&gt;My PIC software changes the output duty cycle in 5% steps until output voltage gets within 10% of setpoint, then slows to the minimum step of about 0.1%. &amp;nbsp;Updates occur about every 5 milliseconds.&lt;br /&gt;&lt;br /&gt;It occurs to me that if I power on the PIC before the big supply, the PIC will run up to maximum duty cycle trying to get to setpoint. &amp;nbsp;Then when the main P/S suddenly comes on, output may go high before the PIC is able to sense the overshoot and run the duty cycle back down. &amp;nbsp;Or maybe not. &amp;nbsp;But I may add another input to give a "power supply voltage normal" signal which would be required before the PIC comes off zero.&lt;br /&gt;&lt;br /&gt;Let me show you the drive signal from the PIC, as read at the collector of Q2. &amp;nbsp;When the voltage goes low, it allows base current to flow out of PNP transistor Q1, turning it ON. &amp;nbsp;You can click these pictures to make them larger, BTW.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh6.googleusercontent.com/-6Yp_M8kMwlk/TY6DVDTDfAI/AAAAAAAAGjY/EJyXvNx4IWA/s1600/PWM+drive+waveform.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="https://lh6.googleusercontent.com/-6Yp_M8kMwlk/TY6DVDTDfAI/AAAAAAAAGjY/EJyXvNx4IWA/s320/PWM+drive+waveform.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;What's it all for? &amp;nbsp;This one is just an experiment, but one application is in making power supplies for tube type equipment. &amp;nbsp;Both the B+ (high voltage or plate supply) and filament supplies are getting harder to come by for someone without a huge junk box. &amp;nbsp;I'm seeing several approaches. &amp;nbsp;One guy took a 12V to 240V auto inverter and rectified the output to give about 250VDC. &amp;nbsp;Most of us have 12VDC available. &amp;nbsp;But inverters with 240VAC output are not common in the USA. &amp;nbsp;I think using switchers for both the HV and filament voltages could be interesting although I can see that a purist might insist that everything be authentically from the period, including power supplies. &lt;br /&gt;&lt;br /&gt;Using such a power supply for filament voltage could have a couple advantages. &amp;nbsp;I recently checked an old tube type power supply and found that my filament voltage which was supposed to be nominally 6.3 volts was actually 6.8 volts. &amp;nbsp;The &amp;nbsp;could be due to having less load on the transformer than it is rated for, but it's partly due to the rise in house line voltage over the years. &amp;nbsp;People still say "one-ten" and "two-twenty", but probably for the last 30 to 40 years, actual house voltages have been 120 and 240 volts. &amp;nbsp;Hard on antique tube gear.&lt;br /&gt;&lt;br /&gt;Another value a PIC controlled supply could give would be a "soft start" feature, bringing the filaments up slowly instead of hitting them cold with full voltage.&lt;br /&gt;&lt;br /&gt;But if the PIC controlled supply fails, it might destroy some rare tubes it was supposed to protect. &amp;nbsp;In such cases some kind of protection in software or hardware might be advised.&lt;br /&gt;&lt;br /&gt;73-&lt;br /&gt;&lt;br /&gt;Nick, WA5BDU&lt;br /&gt;3/26/2011&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-2290417051354286039?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/2290417051354286039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=2290417051354286039' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/2290417051354286039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/2290417051354286039'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2011/03/pic-powered-filaments-my-first-pwr.html' title='PIC powered filaments - my first PWR / switching project.'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh5.googleusercontent.com/-ODrlLl47VM4/TY53ZJeiBmI/AAAAAAAAGjQ/0VPQIL49_is/s72-c/PWM+board.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-5871887300668506298</id><published>2011-03-14T12:46:00.000-07:00</published><updated>2011-03-14T12:46:09.745-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FT-243'/><category scheme='http://www.blogger.com/atom/ns#' term='grinding'/><category scheme='http://www.blogger.com/atom/ns#' term='crystal'/><title type='text'>FT243 crystal grinding</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh6.googleusercontent.com/-9rF4TT_mF9o/TX5l4Ekv4cI/AAAAAAAAGiU/MqaoLYXS0Sg/s1600/Crystal+grinding+with+blank.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="https://lh6.googleusercontent.com/-9rF4TT_mF9o/TX5l4Ekv4cI/AAAAAAAAGiU/MqaoLYXS0Sg/s320/Crystal+grinding+with+blank.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Back in 2006, I was highly impressed by a crystal grinding workshop given at the OzarkCon QRP convention. Unfortunately, I didn't participate directly and missed some of the details. &amp;nbsp;It was impressive though that crystal resonant frequencies were raised much farther than I'd thought possible. &amp;nbsp;Possibly 50 to 100 kHz or more, IIRC.&lt;br /&gt;&lt;br /&gt;So now I have a "new" DX-20 and I see that my FT-243 crystal cache includes a couple of worthless (to me) 40 meter crystals on 7073.33 kHz and 7080 kHz, in the data mode area between lower CW segments and a slow speed (usually) segment just below the phone band starting at 7125 kHz. &amp;nbsp;Could I raise these crystal by 40 to 50 kHz for use in that higher CW segment.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Grinding agent?&lt;/b&gt;&amp;nbsp;&amp;nbsp;I searched the grocery store and came up with some Comet cleanser and some Colgate toothpaste which include silica in its ingredients. &amp;nbsp;It's a problem that these days, scouring powders want to be "scratch free" and don't include good abrasives in them. &amp;nbsp;I also bought an 8x10 inch piece of glass (Hobby Lobby, for a picture frame) as a working surface. &amp;nbsp;The idea is to wet the glass, add the abrasive agent, and grind your crystal using a figure-8 motion with your finger tip moving the crystal.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Monitoring the frequency?&lt;/b&gt;&amp;nbsp;&amp;nbsp;Another cool thing about the OzarkCon workshop was that it included oscillators and frequency counters ... you just cleaned up a crystal in progress, sat it on a ground electrode, and sat a second, weighted electrode on top of it to check the frequency. &amp;nbsp;Much better than re-assembling the whole thing and plugging it into an oscillator having a FT-243 connector. &amp;nbsp;I built an oscillator from Experimental Methods In Radio Frequency Design (EMRFD), figure 4.23. &amp;nbsp;I later changed the top (base to emitter) capacitor from 470p to 220p in hopes of increasing gain and getting a reading if the crystal became reluctant to oscillate.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh4.googleusercontent.com/-wEpwPgiUvk8/TX5pVFkxWvI/AAAAAAAAGiY/fRR7WVlTVHo/s1600/DSC_0005.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="https://lh4.googleusercontent.com/-wEpwPgiUvk8/TX5pVFkxWvI/AAAAAAAAGiY/fRR7WVlTVHo/s320/DSC_0005.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Above you see the corner of my oscillator with the crystal blank, two electrodes from the FT-243 holder, my own top electrode (made from circuit board material) with the wire attached. &amp;nbsp;To check, I sandwich all four items and clamp with the orange and black clamp (or a clothes pin). &amp;nbsp;Initially I did not use the internal silver colored electrodes, but after I learned that they are machined to contact the crystal on its corners and let the middle section free to vibrate, I started using them in the stack.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Early results -&lt;/b&gt;&amp;nbsp;The Comet was OK to use. &amp;nbsp;The toothpaste tended to stick the crystal to the glass so I'd have to pry it loose. &amp;nbsp;I also tried Turtle Wax auto buffing compound. &amp;nbsp;It was very slick and my finger kept slipping off the crystal. &amp;nbsp;None of them ground the crystal fast enough. Doing lots of figure 8s only moved the frequency a few hundred hertz. &amp;nbsp;I also tried some crocus cloth. &amp;nbsp;It discolored the crystal and made it quit oscillating until I ground it some more with abrasive compound.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Better / faster results -&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;I did some web searches and found Dave's Crystal Grinding Page, where he documented doing a lot of the same stuff I was doing, plus coming up with a better abrasive compound -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 10.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;"&gt;&lt;a href="http://home.netcom.com/~wa4qal/crystal.htm"&gt;http://home.netcom.com/~wa4qal/crystal.htm&lt;/a&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The better compound was Dremel Polishing Compound. &amp;nbsp;I went out and got some to try. &amp;nbsp;It's kind of a putty and didn't want to mix with water, instead forming globs and sticking to the crystal. &amp;nbsp;Then I added a few drops of dish washing liquid to the mix and it spread out nicely. &amp;nbsp;This time I was able to move a crystal 15 kHz fairly quickly. &amp;nbsp;I ground on it some more and ... it quit oscillating! &amp;nbsp;(This was before I changed the feedback capacitors, so who knows?). &amp;nbsp;I ground some more to try to bring it back, but no luck.&lt;br /&gt;&lt;br /&gt;Next I went to my remaining crystal, ground a while, read the frequency, looking good. &amp;nbsp;Figured out about how many more figure-8s I'd need to reach my target and did about half of that. &amp;nbsp;Checked and ... I've over shot and am in the phone band at 7138 kHz. &amp;nbsp;One crystal dead, one useless to a CW operator. &amp;nbsp;But wait?&lt;br /&gt;&lt;br /&gt;Tried the dead crystal in the DX-20 and the good news is that it came to life. &amp;nbsp;The bad news is that it is also at about 7138 kHz.&lt;br /&gt;&lt;br /&gt;Someone on the 4SQRP list put me on to Hans Summers' page on what he called crystal "penning", meaning you &lt;u&gt;lower&lt;/u&gt; the frequency by painting the crystal with a Sharpie marker. &amp;nbsp;I'd heard of the pencil lead trick before but didn't think it would do 15 kHz. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.hanssummers.com/penning.html"&gt;http://www.hanssummers.com/penning.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I tried the formerly dead crystal first, but discovered yet another mistake to make. &amp;nbsp;Trying to get the stack of electrodes and crystal aligned and clamped, I broke a corner off the crystal. &amp;nbsp;No more rabbits to pull out of the hat for this one.&lt;br /&gt;&lt;br /&gt;Now the remaining crystal. &amp;nbsp;I blacked about 80% of one face and the frequency dropped about 8 kHz. &amp;nbsp;Promising. &amp;nbsp;Did the same on the other face and got right down to the edge of the phone band. &amp;nbsp;I just need a few more kHz. &amp;nbsp;BTW, you have to allow some time, maybe 30 minutes to an hour, for the ink to try or the crystal might not oscillate.&lt;br /&gt;&lt;br /&gt;So I fully inked both faces. &amp;nbsp;It didn't want to oscillate even after an hour's worth of drying. &amp;nbsp;The ink looked kind of lumpy, so I&amp;nbsp;polished&amp;nbsp;both faces on a sheet of typing paper. &amp;nbsp;Now it's oscillating on 7122.7 kHz in the DX-20, close to my original target. &lt;br /&gt;&lt;br /&gt;So there you have it. &amp;nbsp;Everyone talks about over-shooting, you decide to be careful, but do it anyway. &amp;nbsp;So be more careful -- that's probably better than resorting to "penning".&lt;br /&gt;&lt;br /&gt;Another post-script ... another 4SQRP poster said Bon Ami cleanser works well. &amp;nbsp;I'm not sure you can get it in Arkansas, but I'm keeping an eye out.&lt;br /&gt;&lt;br /&gt;That's it, happy grinding ...&lt;br /&gt;&lt;br /&gt;Nick, WA5BDU&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-5871887300668506298?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/5871887300668506298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=5871887300668506298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/5871887300668506298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/5871887300668506298'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2011/03/ft243-crystal-grinding.html' title='FT243 crystal grinding'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh6.googleusercontent.com/-9rF4TT_mF9o/TX5l4Ekv4cI/AAAAAAAAGiU/MqaoLYXS0Sg/s72-c/Crystal+grinding+with+blank.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-2568229868995054149</id><published>2011-01-02T18:44:00.000-08:00</published><updated>2011-01-08T12:48:48.317-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='regen'/><category scheme='http://www.blogger.com/atom/ns#' term='homebrew'/><category scheme='http://www.blogger.com/atom/ns#' term='regenerative'/><category scheme='http://www.blogger.com/atom/ns#' term='glowbug'/><category scheme='http://www.blogger.com/atom/ns#' term='receiver'/><category scheme='http://www.blogger.com/atom/ns#' term='ham'/><title type='text'>2-tube regenerative receiver</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_FzEkQwBUXbE/TSEwoKX3LgI/AAAAAAAAGU8/Aq16oenVM7I/s1600/Regen+receiver+2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="http://3.bp.blogspot.com/_FzEkQwBUXbE/TSEwoKX3LgI/AAAAAAAAGU8/Aq16oenVM7I/s320/Regen+receiver+2.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;I built this regenerative receiver in the summer of 2010 after Dayton. &amp;nbsp;I'd built a simple transistor regen previously, but wanted to try a more serious version using tubes. &amp;nbsp;Calling it a 2-tube receiver is a little misleading since the two tubes are dual section types (tetrode and triode). &amp;nbsp;So it's more like a 4-tube radio. &amp;nbsp;This allows some isolation between the antenna and the regen stage and from detector to audio stages. &lt;br /&gt;The design is by David Newkirk WJ1Z and appears in the September 1992 QST and in the ARRL book "QRP Power". I used the suggested method of obtaining B+ by connecting a couple of 240 to 24 VAC transformers back to back. This gave me 120 volts to 12 volts and back to 120 volts, but now isolated from ground (house system neutral), which is why you do this. I wound up with 110 VDC B+, a little low because my transfomers designed for 240 VAC but used at 120 VAC have more impedance than a 120 VAC transformer would. &amp;nbsp;No big deal. &amp;nbsp;Also the clever regulator using a neon bulb wouldn't work because it doesn't fire that low. &amp;nbsp;But I found that it wasn't needed as my voltage was steady. &amp;nbsp;I used a separate 120 to 12 volt transformer for the filaments.&lt;br /&gt;I didn't make many changes from the design of the article, the main one change being the tuning range. &amp;nbsp;The design is for about a 2 MHz range to include some SW BC plus 40 meters. &amp;nbsp;I wasn't interested in SW BC and wanted the better tuning rate and better stability I'd get by restricting the range. &amp;nbsp;I changed the frequency determining capacitors to give me a range of 6900 kHz to 7350 kHz. The main tuning is reasonably smooth and the fine / bandspread tuning allows getting the desired note on CW and tuning in understandable SSB.&lt;br /&gt;The claims made in the article proved to be accurate. &amp;nbsp;I don't see any hand capacity effects and the regeneration control is smooth. &amp;nbsp;There's a little more stuff to fiddle with, but really the use of this receiver is not much more fussy than that of the S-40A sitting behind it as I write this. &amp;nbsp;The RF attenuator at the input is quite useful when overly strong signals tend to make the signal "tear" or "block", if you know what I mean. &amp;nbsp;Just back off on the RF control and everything is fine again. &amp;nbsp;I find that I can pretty much "set and forget" the regen control, although optimizing for selectivity and sensitivity might be useful for weak signal work.&lt;br /&gt;I built the receiver on a big chassis to give me plenty of room and I'm glad I did that. &amp;nbsp;I did have some issues with stability and microphonics initially, before I narrowed the tuning range. &amp;nbsp;I also put the tank toroid and several associated capacitors on a perf board and rigidly mounted it, plus made some connecting wiring in the frequency determining areas more heavy and provided more sturdy mounting points. Also "potted" the toroid with hot glue. All that helped a great deal.&lt;br /&gt;I considered adding another tube so I'd have enough audio to drive a speaker. &amp;nbsp;But it drives my modern low-Z phones really well and if I want a speaker, I plug in some totally incongruous little powered MP3 / cell phone speakers by LG which do a great job.&lt;br /&gt;The white triangles around the main tuning knob indicate 50 kHz steps from 7000 up. &amp;nbsp;I've replaced them with slightly less ugly but definitely less ambiguous labels showing 50 kHz points from 7000 through 7250 kHz.&lt;br /&gt;There you have it - another project to check off my list: a tube type, good performing regenerative receiver.&lt;br /&gt;&lt;br /&gt;Nick, WA5BDU&lt;br /&gt;January 2, 2011&lt;br /&gt;&lt;br /&gt;I got an actual comment (!) suggesting a photo of the wiring under the chassis would be useful. &amp;nbsp;I'd considered that initially and now I'm going to add one-&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_FzEkQwBUXbE/TSjLJt_1BwI/AAAAAAAAGVA/flqsfcXU8SI/s1600/Regen+wiring+2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="http://4.bp.blogspot.com/_FzEkQwBUXbE/TSjLJt_1BwI/AAAAAAAAGVA/flqsfcXU8SI/s320/Regen+wiring+2.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;There you have it. &amp;nbsp;Of interest, I think is the little perf board left of the fine tuning capacitor. &amp;nbsp;I added this to stabilize things. &amp;nbsp;It's mounted solidly with four standoffs, not something I'd normally do. &amp;nbsp;It contains the toroid and several frequency range setting caps including one trimmer. &amp;nbsp;Note heavy wire leaving this board to solid tie points also added in the interest of stability. The main tuning capacitor is smaller than the one for fine tuning and is visible above the perf board.&lt;br /&gt;Otherwise, the schematic was interesting with it's use of multiple stages of R-C filtering in the B+ and screen voltage sections. &amp;nbsp;So you see lots of electrolytics. &amp;nbsp;Center left is the "70 volt" audio transformer used to match audio amplifier section down to modern, relatively low impedance phones or earbuds. In the lower right corner is the input or antenna trimmer capacitor and its associated ferrite toroid inductor just inward from it. The capacitor is screw adjusted from the top side through a hole. &amp;nbsp;It's pretty much set and forget though, so didn't need to be accessible.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-2568229868995054149?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/2568229868995054149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=2568229868995054149' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/2568229868995054149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/2568229868995054149'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2011/01/2-tube-regenerative-receiver.html' title='2-tube regenerative receiver'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_FzEkQwBUXbE/TSEwoKX3LgI/AAAAAAAAGU8/Aq16oenVM7I/s72-c/Regen+receiver+2.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-2485217092445231209</id><published>2010-04-22T18:05:00.000-07:00</published><updated>2010-04-22T18:05:44.742-07:00</updated><title type='text'>RF output current meter for QRP TX</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_FzEkQwBUXbE/S9Ds2U8AXrI/AAAAAAAAF9Q/bsB-9URjBeQ/s1600/RF+current+circuit.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_FzEkQwBUXbE/S9Ds2U8AXrI/AAAAAAAAF9Q/bsB-9URjBeQ/s320/RF+current+circuit.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin-bottom: 6.0pt;"&gt;My latest project has been a two-tube crystal controlled 5 watt transmitter. (I wound up with 4 watts.) &amp;nbsp;But I'm not ready to describe it yet so I'll just talk about the metering. &amp;nbsp;Initially I was going to use the technique of putting an incandescent lamp in series with the final amplifier plate supply and tune for minimum to indicate resonance.&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 6.0pt;"&gt;I noticed that using the plate current indication lamp on the tube TX wasn’t effective at all in tuning for maximum output power.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;There was not a good sharp dip.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;So I decided to try measuring the output current at the antenna jack and tuning for maximum.&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 6.0pt;"&gt;Four watts is about 285 mA rms or 20 volts peak into 50 ohms.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;I used an FT50-43 core with 23 turns on it for a 23:1 current reduction.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;First I wanted to use an LED indicator.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;A problem is that after a couple mA of current, it’s hard to detect any further increase in brightness.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;So I needed to scale my current.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;I put a 100 ohm pot in series with 200 ohms fixed as a shunt.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;The 200 ohms is for a “zero” threshold to get the LED to turn on and the pot is a sensitivity control.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;I also had a 0.22 uF capacitor across the output.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;The transformer secondary goes through a 1N914 to the positive “bus” output which goes to the LED, capacitor, and sensitivity control / shunt.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;I tried it on the rig but didn’t like it.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;Too hard to see the peak output.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;I might get 3 to 3.5 watts out using the LED but by using the watt meter I could fine tune to 4 watts.&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 6.0pt;"&gt;I’d been modeling all this on LTSpice.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;I decided to use a junkbox 300 uA horizontal meter with 845 ohms of resistance.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;I found that about a 25 ohm shunt would do the job so I bypassed the 200 ohm resistor.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;I’d hoped not to use a meter since mounting them is a pain.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;I’m not about to cut a hole to fit the meter so I’ll use some ugly method.&lt;/div&gt;&lt;div class="MsoNormal"&gt;Another thing I considered was to have the DC voltage from my detector drive an incandescent bulb using an amplifier, probably a transistor, as some sort of DC current amp. I’d tune for maximum brightness.&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;I think an incandescent would work better than an LED for this purpose.&amp;nbsp;&lt;/span&gt;But then I’d need a DC supply, etc. &amp;nbsp;So meter it is. &amp;nbsp;The circuit is trivial, but here it is -&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_FzEkQwBUXbE/S9DwnUQ_hiI/AAAAAAAAF-Y/fFot6-npSDg/s1600/RF+current+metering.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_FzEkQwBUXbE/S9DwnUQ_hiI/AAAAAAAAF-Y/fFot6-npSDg/s320/RF+current+metering.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-2485217092445231209?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/2485217092445231209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=2485217092445231209' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/2485217092445231209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/2485217092445231209'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2010/04/rf-output-current-meter-for-qrp-tx.html' title='RF output current meter for QRP TX'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_FzEkQwBUXbE/S9Ds2U8AXrI/AAAAAAAAF9Q/bsB-9URjBeQ/s72-c/RF+current+circuit.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-153579047914450880</id><published>2010-03-27T19:47:00.000-07:00</published><updated>2010-03-28T07:14:20.272-07:00</updated><title type='text'>Measuring high resistances with a MOSFET</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_FzEkQwBUXbE/S66vyiRxDII/AAAAAAAAF04/tfp65l9vbds/s1600/MOSFET+R+measure+I.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="213" src="http://4.bp.blogspot.com/_FzEkQwBUXbE/S66vyiRxDII/AAAAAAAAF04/tfp65l9vbds/s320/MOSFET+R+measure+I.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;There was a discussion on the Elecraft list about those static charge dissipating grounding mats used for electronic construction, and what kind of resistance might or should be seen between two points on such a surface. &amp;nbsp;The fact is, it can be in the hundreds or thousands of megohms or higher and so is beyond the measurement range of a typical DMM. &amp;nbsp;(My best DMM has a 2000M-ohm scale, higher than I expected but still too low.)&lt;br /&gt;Anyway, it put me in mind of an experiment I'd done a while ago to measure how long a capacitor could hold a charge. &amp;nbsp;With a high quality capacitor it's difficult to do because a typical 10 M-ohm voltmeter will drain the voltage off in short order. &amp;nbsp;So the trick is to connect the capacitor to the gate of a MOSFET, which has extremely high resistance, and charge the capacitor and put the voltmeter on the drain side of the MOSFET.&lt;br /&gt;The effect on the drain circuit is hardly linear, but there's a sharp transition where the MOSFET comes out of saturation as the capacitor eventually charges toward zero volts. &amp;nbsp;You can measure that transition gate voltage before hand and when the drain voltage rises to a certain reference point, you're there.&lt;br /&gt;I was surprised at how long a certain film (I think) 0.22 uF capacitor held a charge. &amp;nbsp;It had gone about four days when I accidentally discharged it, so even now I'm not sure. After that I tried an ordinary 0.1 uf ceramic disk and it held its charge for two days.&lt;br /&gt;OK, so I know the self-discharge rate of the 0.22 uF capacitor was very slow, so I could use it to test large resistances and assume essentially all of the discharge was due to the external resistance. &amp;nbsp;My circuit is simple enough to describe in words. &amp;nbsp;A resistor, say 20k, from +12.7 VDC battery to the drain of the 2N7000 MOSFET. &amp;nbsp;The source goes to ground. &amp;nbsp;The gate goes to the capacitor and the other end of the capacitor goes to ground. The external resistance being "measured" goes from gate to ground, in parallel with the capacitor.&lt;br /&gt;The MOSFET's channel is ON when the gate voltage goes positive and OFF when gate voltage is zero. &amp;nbsp;So I measured that from a range of 10 V to about 2.25 V gate voltage, the MOSFET was fully on and drain voltage was near zero. &amp;nbsp;Below 2.25 V gate voltage, the drain voltage started to rise and was at 8 V with 1.92 &amp;nbsp;V on the gate and 12.5 V with 1.52 V on the gate. &amp;nbsp;So when I see somewhere from 8 to 12 V on the drain, I know the capacitor has discharged to 1.5 to 2 VDC.&lt;br /&gt;I set up a spreadsheet to figure resistance from V-initial, V-final, C and time 't', in seconds. &amp;nbsp;Its uses the equation&lt;br /&gt;&amp;nbsp;&amp;nbsp;R = -t / (C*ln(Vf / Vi))&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Experiments&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Turns out I don't actually have one of those anti-static pads but I do have some other stuff I wondered about. For one, those black foam rectangles you see ICs embedded in or affixed to, in the case of SMT. &amp;nbsp;Another material is those shiny semi-transparent envelopes that the stuff we buy from Mouser or Digi-Key comes packed in.&lt;br /&gt;I took a chunk of the black stuff, that used by AD to pack an AD9851 DDS chip in and stuck #18 solid wire electrodes in it lengthwise, about 1 inch apart and 1.5 inches deep and connected that across my capacitor. &amp;nbsp;Connected the battery and then used a separate supply &amp;nbsp;to charge the 0.22 uF capacitor to 10 VDC, at which time the drain voltage jumped from 12.5 VDC to 0 VDC. &amp;nbsp;It took about 3 hours and 15 minutes for the voltage to start climbing and it quickly reached 11.8 VDC at 3 hours, 22 minutes. &amp;nbsp;I inferred a gate voltage of ~1.85 volts from my earlier characterization of the 2N7000 and my spreadsheet spit out a value of 3.26E10 ohms, or 32.6 G-ohms between those electrodes.&lt;br /&gt;Next I took one of those anti-static envelopes and inserted a couple pieces of circuit board material, about 1x2 inches as electrodes, spacing their long sides about 1/4 inch apart. &amp;nbsp;So the conduction path is more or less across that 1/4 inch. &amp;nbsp;I set a couple pieces of non-conductive "stuff" on top of the envelope to increase the contact area and started the timing thing again. &amp;nbsp;This time it took 25 minutes &amp;amp; 22 seconds for the capacitor to discharge to the "threshold" region of about 1.9 V on the gate. &amp;nbsp;The calculated resistance was 4.2E9 or 4.2 G-ohms. &amp;nbsp;About one tenth of the reading with the black foam.&lt;br /&gt;But it was interesting that I checked out a couple of other pieces of black spongy foam and measured resistances in the kilohms with my DMM, far too low to require my method. &lt;br /&gt;My final experiment was a "control" test. &amp;nbsp;The biggest resistor I have is marked 66 M-ohms at 10% tolerance. &amp;nbsp;I connected it to the gizmo and saw the drain voltage quickly transition at 24 seconds. &amp;nbsp;Spreadsheet says, 67.8 M-ohms. &amp;nbsp;So I think the accuracy is pretty good.&lt;br /&gt;&lt;br /&gt;In the interest of scientific rigor, I should say that I just arbitrarily measured the resistance between two points, or two electrodes. &amp;nbsp;If I were being rigorous, I would have made things more complicated and attempted to measure volume or surface resistivity of the material. &amp;nbsp;But my intent was just to answer the question, "I wonder what the resistance is between these two electrodes in or on this anti-static material?"&lt;br /&gt;&lt;br /&gt;BTW, the 0.22 uF capacitor was just what I pulled out of the box. &amp;nbsp;To keep the times from being excessively long, a capacitor an order of magnitude or so smaller would be a good idea, after verifying that its self discharge rate is appropriately long.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Nick, WA5BDU&lt;br /&gt;3/27/2010&lt;br /&gt;&lt;br /&gt;Here's an edit. &amp;nbsp;It was suggested that a schematic would be a good idea, however simple this thing may be. &amp;nbsp;I guess that's true:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_FzEkQwBUXbE/S69i_rm5GGI/AAAAAAAAF1Y/JgwDxg22e2Y/s1600/MOSFET+resistance+measure.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_FzEkQwBUXbE/S69i_rm5GGI/AAAAAAAAF1Y/JgwDxg22e2Y/s320/MOSFET+resistance+measure.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;So there's one. &amp;nbsp;I charged C1 to 10 V to start the measurement, but there's no reason you couldn't just touch the battery positive to it to charge it. &amp;nbsp;As long as you know the initial and final voltages, you're good. &amp;nbsp;Another option would be to charge C1 to a value of the final target "threshold" voltage divided by 0.37. &amp;nbsp;Since a capacitor will discharge to 37% of its initial voltage in one time constant, it simplifies the math of finding Rx. &amp;nbsp;Like this -&lt;br /&gt;&lt;br /&gt;tau = RC &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (tau is one time constant)&lt;br /&gt;&lt;br /&gt;so, R = tau / C&lt;br /&gt;&lt;br /&gt;3/28/2010&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-153579047914450880?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/153579047914450880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=153579047914450880' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/153579047914450880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/153579047914450880'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2010/03/measuring-high-resistances-with-mosfet.html' title='Measuring high resistances with a MOSFET'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_FzEkQwBUXbE/S66vyiRxDII/AAAAAAAAF04/tfp65l9vbds/s72-c/MOSFET+R+measure+I.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-4993290062554418719</id><published>2010-02-27T19:22:00.000-08:00</published><updated>2010-02-27T19:22:38.925-08:00</updated><title type='text'>2-meter FM receiver with MC3362 chip and Si570 synthesizer</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_FzEkQwBUXbE/S4nep6CjRWI/AAAAAAAAFtM/f9aStjRCEgA/s1600-h/2M_RX.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="213" src="http://2.bp.blogspot.com/_FzEkQwBUXbE/S4nep6CjRWI/AAAAAAAAFtM/f9aStjRCEgA/s320/2M_RX.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;I discussed the Si570 and controlling it with my Arduino in an earlier post. &amp;nbsp;The fact that it can reach 160 MHz made me think of using it for 2 meters (146 MHz). &amp;nbsp;I tried to homebrew a 2-meter FM rig back around 1979 / 1980 with limited success and always wanted to give it another shot. &amp;nbsp;Plus, I've seen many articles about using the various integrated radio chips for ham use and was intrigued. &amp;nbsp;Most of the articles diverted the VHF / FM chips for usage on HF receiving CW and/or SSB. &amp;nbsp;That sounds great, but I wanted to try one in its "native" mode first.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;The MC3362 isn't a car radio chip, as I'd thought at first. &amp;nbsp;It was intended for 49.7 MHz FM (was that toy walkie-talkies? &amp;nbsp;Or cordless phones?) and ~160 MHz weather receivers and even for ham radio.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Rather than describe all the details here, I'll link to my web page, which seems better suited for such things -&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://pages.suddenlink.net/wa5bdu/2M_RX.html"&gt;http://pages.suddenlink.net/wa5bdu/2M_RX.html&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;And I want to include the link to my schematic in JPG format -&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://pages.suddenlink.net/wa5bdu/2M_FM_receiver.jpg"&gt;http://pages.suddenlink.net/wa5bdu/2M_FM_receiver.jpg&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Yeah, it works. &amp;nbsp;Sounds pretty good. &amp;nbsp;Now if I could just come up with a companion transmitter, I'll have finished that 1979 project at last.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Right now I'm working on a crystal oscillator 1st LO so I can make it independent of the Si570, although limited to frequencies I have crystals for.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-4993290062554418719?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/4993290062554418719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=4993290062554418719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/4993290062554418719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/4993290062554418719'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2010/02/2-meter-fm-receiver-with-mc3362-chip.html' title='2-meter FM receiver with MC3362 chip and Si570 synthesizer'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_FzEkQwBUXbE/S4nep6CjRWI/AAAAAAAAFtM/f9aStjRCEgA/s72-c/2M_RX.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-707371165896761159</id><published>2009-11-01T13:27:00.001-08:00</published><updated>2009-11-01T15:07:10.055-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DDS'/><category scheme='http://www.blogger.com/atom/ns#' term='PIC'/><category scheme='http://www.blogger.com/atom/ns#' term='NO-DDS'/><category scheme='http://www.blogger.com/atom/ns#' term='DAC sine wave generator'/><title type='text'>No-DDS DDS</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FzEkQwBUXbE/Su4OjYBRPjI/AAAAAAAADwQ/Q7ITfzkSBrQ/s1600-h/No-DDS+scje,atoc.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 242px; height: 320px;" src="http://3.bp.blogspot.com/_FzEkQwBUXbE/Su4OjYBRPjI/AAAAAAAADwQ/Q7ITfzkSBrQ/s320/No-DDS+scje,atoc.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5399269004169788978" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FzEkQwBUXbE/Su4FWk128wI/AAAAAAAADwI/GKhxWIS-s58/s1600-h/DSC_0015.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="http://1.bp.blogspot.com/_FzEkQwBUXbE/Su4FWk128wI/AAAAAAAADwI/GKhxWIS-s58/s320/DSC_0015.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5399258888668640002" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FzEkQwBUXbE/Su4ASNrrdaI/AAAAAAAADwA/q8sWzm_URtE/s1600-h/DSC_0010.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="http://4.bp.blogspot.com/_FzEkQwBUXbE/Su4ASNrrdaI/AAAAAAAADwA/q8sWzm_URtE/s320/DSC_0010.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5399253316174312866" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FzEkQwBUXbE/Su3-GFcjOqI/AAAAAAAADv4/1Fimra6WkPg/s1600-h/NO-DDS+SCOP+20KHZ.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="http://3.bp.blogspot.com/_FzEkQwBUXbE/Su3-GFcjOqI/AAAAAAAADv4/1Fimra6WkPg/s320/NO-DDS+SCOP+20KHZ.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5399250908781689506" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;b&gt;A DDS using a PIC and a DAC chip ...&lt;/b&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;p class="MsoNormal"&gt;First, I apologize for having all the pictures piled up at the top.  Someday I'll figure out how to insert them at the proper locations in the flow of the text.&lt;/p&gt;&lt;p class="MsoNormal"&gt;Frequency synthesizers using the DDS (Direct Digital Synthesis) technique are lots of fun and I’ve built, let’s see … , four of them as stand-alone boards.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;I thought it would be fun to build one not by using an integrated DDS chip, but rather by using a microcontroller (PIC) and a DAC chip.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Obviously I wouldn’t be achieving RF speeds, but this is just for the learning experience.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt;How does a DDS work?&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt;Let’s start with the output device, which is a DAC or digital to analog converter. It takes as input a binary number with a maximum value depending on the number of bits and outputs a voltage proportional to that number.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;In my case it’s an 8 bit number having a range of 0 to 255, so my DAC has an output range of 256 discrete voltages in equal steps.&lt;span style="mso-spacerun:yes"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Within my PIC’s program, here’s the task at hand:&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;The program runs in a loop that sends the proper voltage info (0 to 255) to the DAC each time through. One run through the loop always takes the same amount of time, 4 microseconds in my case.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;I want to produce a sine wave of a specified frequency.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;So I need to know, for each 4 microsecond advance in time, where I am in the 360 degree period of a sine wave of the desired frequency.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Knowing that, I can look up the closest value of the sine wave in a table (there’s not enough time to calculate it) and put that out to the DAC.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;This is how any frequency up to the upper limit can be generated even though the loop is outputting numbers at a constant rate.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;That upper limit is the based on sampling theory which says that with a minimum of two samples per cycle, the sine wave can be recovered.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;In practice a bit more than two is considered the actual limit.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;With my 4 u-sec loop time, I’d need 8 u-sec to send out two samples and my theoretical limit would be 1/8E-6 or 125,000 Hz.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt;Cutting to the chase on the mechanics of this thing … I need a number called the Phase Increment which I call “PI”.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;It’s how much the phase angle of the sine wave advances with each trip through the loop in the PIC. (Don’t confuse it with pi = 3.14159 …)&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The data (for a sine wave) is a 256 sample look-up table.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Therefore, 256 = 360 degrees.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;For greater accuracy, 24 bits are used to allow a high precision phase increment.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The frequency of operation for the DDS is&lt;/p&gt;  &lt;p class="MsoNormal"&gt;f = PI*fclock/2^24&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;where fclock is the effective "frequency" of the program loop which is 1/T, where T is the time it takes to execute it, or 250,000 Hz in my case.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;So, PI = f*2^24/fclock&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I have to use the above to calculate a new PI every time I change the DDS output frequency. The PI is added to a phase accumulator in each passage through the loop.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Since there are only 256 samples, only the most significant byte is examined to point to a sample in the table.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Consider my 24-bit phase accumulator to be an integer plus fraction where the high byte (MSD) represents a full cycle (360 degrees) and the other 16 bits are fractional parts of a cycle.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;To write the DDS loop, I need a 3-byte accumulator and a 3-byte PI.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Calculation of the PI is done outside the loop, so assume it's known.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Here's what the main loop does:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Add the PI to the accumulator.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;The MSD will be the current phase angle of the sine wave to 8-bit accuracy.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;(MSD is the most significant digit, also known as the high byte of the 24-bit number.)&lt;/li&gt;&lt;li&gt;Take the MSD of the accumulator and use it to look up the corresponding value of the sine wave in a table.&lt;/li&gt;&lt;li&gt;Put that value out to the DAC&lt;/li&gt;&lt;li&gt;Repeat&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;        &lt;p class="MsoNormal"&gt;So the only bit of information supplied from &lt;i style="mso-bidi-font-style:normal"&gt;outside&lt;/i&gt; the loop is the PI.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;When the external control routines want to change the frequency of the DDS, it just alters the PI.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;b&gt;Hardware details -&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;b&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;I decided to use a DAC chip I have in my junkbox, which is an AD7530 10-bit ADC. ($1.35 from B.G. Micro.)  I'll tie the two highest bits to ground and my maximum output will be 1/4&lt;/span&gt;&lt;sup&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;th&lt;/span&gt;&lt;/sup&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; of what it would be using all bits.  Yes, I had enough bits in my calculation to use all 10, but that would make my update routine take longer and lower my maximum frequency.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;I wasn’t sure how to apply this chip.  The data sheet shows using an inverting op-amp on the output, which it appears is really necessary.  This means I need a negative supply, unfortunately.  Plus the chip needs +15V to power it.  So now I need +15V, +5V (PIC) and negative for Vref.  Vref can be positive or negative, but since the op-amp inverts it, I'm going with negative so I'll have a positive output.  I'll also us the negative Vref on the negative op-amp supply so I won't require a rail-to-rail op-amp to get to 0 volts.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;For the negative supply, I took a wall wart rated 9V at 200mA which puts out 14.5 V no load.  Took that through 200&lt;/span&gt;&lt;span style="font-family:Symbol;mso-ascii-font-family: &amp;quot;Times New Roman&amp;quot;;mso-hansi-font-family:&amp;quot;Times New Roman&amp;quot;;mso-char-type:symbol; mso-symbol-font-family:Symbol;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;W&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; to a 10 V zener to get about -9.79 volts as a reference.  Experimenting on a breadboard, I get +2.45 volts out with all 8 lines high, close to the expected value.  The step is about 10 mV per bit.  My op-amp is currently a 4558.  It's GBP is over 3 MHz, but open loop gain goes from 100 dB at low frequency down to 30 dB at 100,000 Hz, so I'm not sure if it's fast enough or not.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;The 2.45 volt maximum output might need a little boost, so I could use the other half of the 4558 for that, with a gain of&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; 2. &lt;/span&gt;&lt;span style="mso-spacerun:yes"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;I'll add a photo of the board here ... &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;Well, guess I can't add it here.  Everything goes to the top it seems.  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Schematic -&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;Which is no doubt going to happen to the schematic when I add it too ...  I keep reading the "help" on this Google Blogger thing but it's not much help to me.  But it's free and it works, to a degree.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;Anyway, the schematic is in here somewhere.  Mostly it's a connection diagram, but some details are presented in schematic form.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;One of my favorite parts isn't part of the No-DDS at all but is the RS-232 to TTL interface.  This is the two 2N7000 MOSFET circuits shown at the bottom.  I've fooled with a lot of level translation circuits, especially the MAX232 chips and that family.  I like this one because it uses a two dime active devices and two resistors and takes less connections than a MAX232, though to be fair, the chip does two conversions in each direction.  One drawback of the circuit is that the signal out to the RS232 device doesn't go negative.  Maybe I could have made that happen in the No-DDS circuit, since I do have negative voltage available.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif; "&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Controlling it - the PC software interface ...&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-size:large;"&gt;I needed a way to tell the PIC what frequency to generate, so I altered an old piece of DOS software I'd written earlier.  A slight problem was in how to get the PIC's attention.  The update loop needs to be as tight as possible, so it can't afford to poll for external input.  The logical thing then is to use an interrupt.  But I discovered that all the lines that were interrupt capable, I'd already used for I/O with the DAC.  So I wondered if using the -MCLR line would work.  This effectively forces the PIC to re-boot every time that line is actuated.  It turned out to work OK.  When the PC software wants to get the PIC's attention, it bangs the -MCLR line.  The PIC restarts and part of the start-up code is for it to check its serial port for incoming data.  That data will be the new PI, which will be stored before the PIC goes permanently (until the next restart) into the update loop.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-size:large;"&gt;I'm putting in a picture of the DOS screen.  Some of the fields aren't used, since this program was developed to control full featured RF DDSs that were used as VFOs.  I wrote this program in 8088/8086 assembly language using the A86 shareware assembler.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Conclusions&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; font-size: medium;"&gt;It worked pretty well.  That rope-like waveform appearance was due to my scope acting up a bit.  Like the 1-bit sine generator, I built this thing but am not sure why.  I think I thought it would be fun, and I guess it sort of was.  I combined a little electronics, a little PIC programming, and a little PC programming to produce a circuit that worked as imagined.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-size: medium; font-weight: normal;"&gt;-Nick&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-size: medium; font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span"  style=" font-weight: normal;font-size:large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/b&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-707371165896761159?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/707371165896761159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=707371165896761159' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/707371165896761159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/707371165896761159'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2009/11/no-dds-dds.html' title='No-DDS DDS'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_FzEkQwBUXbE/Su4OjYBRPjI/AAAAAAAADwQ/Q7ITfzkSBrQ/s72-c/No-DDS+scje,atoc.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-6543522729143213955</id><published>2009-10-01T17:28:00.000-07:00</published><updated>2009-11-21T18:45:44.364-08:00</updated><title type='text'>1-bit PIC sine wave generator</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span style="color: #0000ee;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_FzEkQwBUXbE/SsVJd7NNqQI/AAAAAAAADuY/oKGrJGTWu4U/s1600-h/1-bit+sine+3+cycles+2.jpg.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5387793307676813570" src="http://4.bp.blogspot.com/_FzEkQwBUXbE/SsVJd7NNqQI/AAAAAAAADuY/oKGrJGTWu4U/s400/1-bit+sine+3+cycles+2.jpg.JPG" style="float: right; margin-bottom: 10px; margin-left: 10px; margin-right: 0px; margin-top: 0px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium; font-weight: normal;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium; font-weight: normal;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: medium; font-weight: normal;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: 800;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;"&gt;&lt;b&gt;Above is the digitally synthesized sine wave.&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;This is one of those “because I can” projects.  Can I generate a sine wave using a simple PIC employing no PWM and no DAC, no software timers or interrupts, just turning an output pin on and off?  We all know it can be done because our music players boast of the 1-bit DACs inside.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="MsoNormal"&gt;Simplistically, we know if our output pin puts out 5 volts when ON and 0 volts when OFF, a 50% duty cycle should give us an average output voltage of 2.5.  But the actual method is a little cleverer than that, which is what makes it fun. I picked it up from Glen Leinweber, VE3DNL, a great ham tinkerer in the realms of RF and programming.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;The sequence of ones and zeroes is first calculated “off line” using a simple program in a high level language, QBASIC in my case.  Variables track the integral under the sine (actually cosine in my case) curve and the integrated value of all the bits generated previously.  If the value of the integrated bits is less than that of the cosine curve, the next bit is made a 1 and if it is more, the next bit is a 0.  In this way, the average value of the bit stream is tracking the value of the cosine wave as closely as possible.  Glen says this technique is an example of something called “sigma-delta coding”.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;There are some practical considerations related to our MCU chip, a 12F629 in my case.  My processor is running at 1 MHz and it can toggle my output pin in one execution cycle or 1 microsecond.  Naturally, I want my bits as narrow as possible for fine resolution.  The limitation is on the amount of program memory I have, which is 1024 bytes for the 12F629.  The program will simply output all the bits for one cycle and then repeat.  So the period of the cycle determines the program’s length.  Say I wanted a 1,000 Hz output.  The period is 1 millisecond, so I’d need roughly 1,000 instructions plus a little overhead.  You can see that lower pitched tones require more memory as their period is longer.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;I wanted to do an “A” musical note at 440 Hz but it wouldn’t fit so I wound up at “D” (587 Hz).  Even this wouldn’t fit without a little trickery since its period is 1,703 microseconds.  Turns out that there are long streams of 1s or 0s where the sine wave is at its positive and negative peaks.  So I can save memory by calling delay routines repetitively.  Actually, one routine with multiple entry points is even better.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Want to write a ~1000 line program by staring at a printout of 1,703 ones and zeros and writing the code to produce them?  Me neither.  So my QBASIC program also gets to write the bulk of the source code. After the bit sequence is stored in an array, the program then examines it for repeats and writes the code to implement the bit sequence efficiently.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;I also wanted a way to turn the output on or off in response to user input (telegraph key?) on another pin.  To do this, I just wrote the code to sense the pin and if its state tells me to turn the sound off, I configure the output pin to be an input instead of an output. Each time through the code, it reads the control pin and configures the output pin accordingly. The sound generating code continues to run as always.  I had to count the number of cycles this code took and then insert it in place of an equal number of “time wasting” cycles in an area where the output pin is not changing.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;OK, say I get it running.  How do I look at the output and verify that I’ve achieved my goal?  If I just look at the output pin with my o’scope, I’ll see a pulse train of varying density.  So just as I did in software, I have to integrate the pulse train in hardware by connecting a resistor and capacitor to the pin.  Here’s the tricky part:  the R/C network is a low pass filter, and with enough filtering even a square wave can be turned into a perfect sine.  So to make sure I’m not “cheating”, I make sure the corner frequency of my filter is much higher than my fundamental frequency.  The proof is in the pictures, with a shot of several cycles showing a nice sine wave, but a close-in zoom of part of the cycles show the jaggies caused by the individual bit transitions.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_FzEkQwBUXbE/SwikMFQ-HiI/AAAAAAAADxM/oifCUnfOOns/s1600/1-bit+sine+zoom+with+jaggies.jpg.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_FzEkQwBUXbE/SwikMFQ-HiI/AAAAAAAADxM/oifCUnfOOns/s320/1-bit+sine+zoom+with+jaggies.jpg.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-align: center;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-align: center;"&gt;&lt;b&gt;In this "magnified" view, you can see the jaggies that betray the sine wave's digital origin&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="text-align: center;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt;A fun variation might be to do a more complex waveform – say the sum of sine waves of 1,000 Hz and 1,500 Hz.  The period would be that of the difference frequency, 500 Hz and the resultant would be something you couldn’t fake with low pass filtering.  Combining two musically related notes would be even better – easier on the ears.&lt;/o:p&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt;One more relevant bit of info.  Most PICs these days include high speed and fairly accurate internal oscillators you can use and save the price of a crystal and two I/O pins.  The thing is pretty accurate, but has frequency trimming registers if you want to get closer.  My ‘D’ note started off 8 Hz low with the factory value and I was able to trim it to within 1 Hz.&lt;/o:p&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt;What’s it good for?  Don’t you hate that question?  But I guess it’s a stable audio sine wave source for the price ($2 or so?) of a simple PIC chip.  Not too flexible though – to change the frequency you have to re-run your QBASIC program to generate revised source code and then re-program the chip.&lt;/o:p&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Update:  I decided I should make my PIC program and my QBASIC program accessible, which was easier to do on my web page than in this blog.  So go to my site using this link and near (or at) the bottom of the table of stuff is the link to my 1-bit sine page.  Scroll down through all the text you've already seen and you see the links to the two files.&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;a href="http://pages.suddenlink.net/wa5bdu/radio.htm"&gt;http://pages.suddenlink.net/wa5bdu/radio.htm&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt; &lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;            &lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-6543522729143213955?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/6543522729143213955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=6543522729143213955' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/6543522729143213955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/6543522729143213955'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2009/10/1-bit-pic-sine-wave-generator.html' title='1-bit PIC sine wave generator'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_FzEkQwBUXbE/SsVJd7NNqQI/AAAAAAAADuY/oKGrJGTWu4U/s72-c/1-bit+sine+3+cycles+2.jpg.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-6683762288057968227</id><published>2009-09-27T07:00:00.000-07:00</published><updated>2009-09-27T08:36:14.630-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='electronics'/><category scheme='http://www.blogger.com/atom/ns#' term='PIC'/><category scheme='http://www.blogger.com/atom/ns#' term='clock'/><category scheme='http://www.blogger.com/atom/ns#' term='timing'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Nixie'/><title type='text'>My Nixie Clock</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FzEkQwBUXbE/Sr9wt2r7BlI/AAAAAAAADuA/L3r_keCBZCg/s1600-h/Nixie+Clock.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 266px;" src="http://4.bp.blogspot.com/_FzEkQwBUXbE/Sr9wt2r7BlI/AAAAAAAADuA/L3r_keCBZCg/s400/Nixie+Clock.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5386147612434564690" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;div style="text-align: left;"&gt;I bought a digital volt-ohm meter for $5 at a ham flea market years ago.  It is probably about 1970 vintage and uses old fashioned Nixie display tubes. These tubes have long since been replaced with 7-segment LEDs and then LCDs, and then pixel based LCDs.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Nixies are a favorite among hobbyists who like archaic parts because of the visual appeal of the display.  Each numeral is individually "drawn" from a gas discharge tube, rather than being crudely constructed from segments or dots. The VOM has three Nixie tubes with 0-9 plus decimal point, plus a single neon tube for the MSD (1 or off).  So it is a 3-1/2 digit device with range from 0000 to 1999.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;A. Hardware approach ...&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;div style="text-align: left;"&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Plan 1 was to let the PIC generate a DC voltage equivalent to the time in millivolts, for example 10:35 is 1035mV, and input that to the meter.  The PIC would use its PWM module to generate voltages.  Unfortunately, the PWM is only 10 bits, a resolution of one part in 1024.  I need one part in 1259 so I couldn't be accurate right to the minute.  Also there would be some accuracy issues resulting in a little uncertainty in the 1's minute digit.  The advantage would be that there would be no modification to the VOM at all. &lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Plan 2 required investigating how the VOM works.  I could have the PIC put BCD data right to the three Nixie driver chips (if I have their data), but it might be nice to have an easier way that doesn't require 12 data lines and cutting a bunch of traces.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Each Nixie has three chips in front of it.  First is a 7441B Nixie driver, fairly standard.  Next is a SN7075N and behind it is a SN7090N.  Probably TTL chips 7475 and 7490 before the industry standardized on 7400 series numbering for TTL devices.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;The VOM works this:  It clears the counters to zeroes, then starts a ramp generator and at the same time gates on a string of pulses to the units digit counter.  The ramp generator and unknown voltage both go to a comparator. When the ramp voltage becomes equal to the unknown voltage, a logic signal is generated which gates off the pulse train to the counter. At the same time or just after, the latch signal is given to the 7075 to update the display.&lt;/div&gt;&lt;div style="text-align: left;"&gt;Next, a clear signal is given to the counters and the next measurement starts. &lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Initially, I was going to monitor the DMM's "clear" line, and after it was asserted, I would substitute my pulse string, virus like, for its own, in the available window.  For example, if it's 8:37 AM (or PM), I send 837 pulses and the DMM is none the wiser.  I'd have to sneak them in fast enough to be finished before the DMM generated its "latch" pulse.  Due to technical difficulties too tedious to describe here, I wound up having to take control of both the clear and latch lines form the PIC.  Easy enough except my idea of keeping things minimalist by using an 8-pin 12F629 chip severely challenged me for my I/O needs as the project progressed.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;B. The software ...&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;I was initially going to use a 32,768 (2^15) hertz "watch crystal" for my PIC's timebase, just because that approach seems to go with clocks.  You divide it down to 1 Hz and -- Bob's your uncle -- you're there.  But that speed was too slow to allow me to jam my train of pulses (maximum of 1259) into the available window.  So I went to a 455 kHz crystal and to a method of calculating 1 second intervals that's lots cooler.  Here we go ...&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;span class="Apple-style-span" style="white-space: normal;"&gt;This uses a technique I found on the web described by&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Roman Black, based on an idea by Bob Ammerman.  It uses a&lt;/div&gt;&lt;div style="text-align: left;"&gt;method based on the Bresenham algorithm which produces&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;intervals that average exactly a second, although there&lt;/div&gt;&lt;div style="text-align: left;"&gt;may be some small jitter (which can be calculated) in each&lt;/div&gt;&lt;div style="text-align: left;"&gt;second's time.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;It will work like this. My clock speed is 455,000/4 or&lt;/div&gt;&lt;div style="text-align: left;"&gt;113,750Hz.  I put that number into a 24 bit variable. I set&lt;/div&gt;&lt;div style="text-align: left;"&gt;timer 0 to interrupt every 256 counts. At each interrupt,&lt;/div&gt;&lt;div style="text-align: left;"&gt;I subtract 256 from the variable. When the variable becomes&lt;/div&gt;&lt;div style="text-align: left;"&gt;less than 256, I add 113,750 to it and increment the seconds&lt;/div&gt;&lt;div style="text-align: left;"&gt;count.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Obviously, over time my *average* second takes 113,750 counts,&lt;/div&gt;&lt;div style="text-align: left;"&gt;which would be perfect. But each individual second could be&lt;/div&gt;&lt;div style="text-align: left;"&gt;off by as much as 256, so my maximum jitter is 256/113,750 or &lt;/div&gt;&lt;div style="text-align: left;"&gt;0.23%. If I used a 1MHz clock and interrupted every 128&lt;/div&gt;&lt;div style="text-align: left;"&gt;counts, jitter would be 0.0128%, but 0.23% is plenty good for&lt;/div&gt;&lt;div style="text-align: left;"&gt;this application. My Nixie clock won't show individual &lt;/div&gt;&lt;div style="text-align: left;"&gt;seconds and over 60 seconds the errors should cancel pretty well.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;(What's the accuracy over longer periods, assuming a perfectly&lt;/div&gt;&lt;div style="text-align: left;"&gt;accurate crystal?  Well, the uncertainty is never larger than&lt;/div&gt;&lt;div style="text-align: left;"&gt;256 counts at any given time.  So for a full minute, the jitter&lt;/div&gt;&lt;div style="text-align: left;"&gt;would be 0.23% / 60, for an hour, it's 0.23% / 3600, and so on.&lt;/div&gt;&lt;div style="text-align: left;"&gt;That's why it's said to approach perfect accuracy over time.)&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span" style="white-space: pre; "&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;div style="text-align: left;"&gt;Black said you can do this for any crystal frequency.  I'd&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;say that's true, but since the PIC clock is Fxtal / 4, if &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;that division didn't yield an integer, you'd want to trim&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;the crystal's frequency (+/-3 Hz maximum) to produce an integral&lt;/div&gt;&lt;div style="text-align: left;"&gt;count.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;C. Summary ...&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Nick's Law says that any programming or hardware project will be two to ten times more complicated than originally envisioned.  This one fell comfortably within those boundaries. The clock works great.  A clock doesn't have to do much, right?  But it keeps good time and doesn't lock up or show any strange behavior.  At least not any more.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;A few things are missing or not fully developed.  First, there's no colon.  I can manipulate a decimal point into that position if I want a delimiter.  I've considered using a long neon tube painted black except for two dot-sized openings on each end, and possibly using two small yellow LEDs, but I decided it was time to call this project to a halt.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Another sort of clunky part is that my setting routines aren't very well human engineered, but they do work.  I added small surface mount SET and ADVANCE pushbuttons on the rear of the case.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Finally, I wanted battery backup.  The PIC board should pull less than 1 mA so a tiny battery should maintain the time even during long outages. I mounted a little 3-cell nicad pack in the box, diode auctioneered with the main 5 VDC supply, but I abandoned it when I had startup problems.  I found that the PIC needs a clean RESET signal, which here means pulling the supply voltage all the way to zero.  So to use the battery, I'd need a third button on the back of the box, labeled RESET.  But I've declared this project finished.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Nixie mania?  Just this month (September, 2009) I found another Nixie based DMM at a hamfest for $5.  It's a Bell &amp;amp; Howell unit made by Heathkit for an electronics class.  But it has only 2 &amp;amp; 1/2 digits so isn't suitable for use as a clock.  I should consider myself lucky.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-6683762288057968227?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/6683762288057968227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=6683762288057968227' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/6683762288057968227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/6683762288057968227'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2009/09/my-nixie-clock.html' title='My Nixie Clock'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_FzEkQwBUXbE/Sr9wt2r7BlI/AAAAAAAADuA/L3r_keCBZCg/s72-c/Nixie+Clock.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-2078629711479602325</id><published>2009-08-14T07:04:00.000-07:00</published><updated>2009-08-14T07:41:08.809-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loop anetnna'/><category scheme='http://www.blogger.com/atom/ns#' term='multi-turn loop'/><category scheme='http://www.blogger.com/atom/ns#' term='antenna'/><title type='text'>Update on the multi-turn loop effort</title><content type='html'>In my first post on the subject, I was flushed with the success of actually making two QSOs with the loop.  But on further examination, I was having trouble keeping a good stable match or even getting back to where I had been.  Now I was seeing minimum SWRs (at resonance) of 3:1 or higher.  &lt;div&gt;I thought the problem might be my use of single conductor wire as opposed to Newkirk's zip cord.  I taped and tied my conductors to increase coupling but without much effect.  So I decided to rebuild the antenna with zip cord, in my case 2c/#18 speaker wire with clear plastic insulation.  I loosely wove the two lengths of cord together as the author had reported that his were "entwined" (sounds romantic - he's a flowery writer). &lt;/div&gt;&lt;div&gt;My initial trails with the new version were disappointing.  I tried a number of different fixed capacitors, including 20 pF dipped silver micas, 33 pF postage stamp micas, and 25 pF "doorknob" HV capacitors.  In each case I could tune to a resonance but could not get to a low SWR.  I even installed a compression mica trimmer in place of the split stator variable with no improvement.  Sometimes I could get a low SWR at some point, but tuning to resonance on my desired 40 meter frequency gave a much higher SWR value.&lt;/div&gt;&lt;div&gt;One tangent I got off on concerned the existence of the fourth wire.  Mr. Newkirk said he used two loops of zip cord but on 40 meters he just used three wires (turns), sparing the fourth for a future conversion to 80 meters.   The article didn't describe whether the spared conductor was broken only at the top or in two places (top and at the matching capacitors at the bottom).  Would it make any difference? I had originally cut the condutor in both places, so I jumpered it together at the bottom and found that it made a big difference in the resonance point.  The resonant frequency dropped about 1 MHz and the SWR at resonance was well under 2:1.  So the spare isn't just hanging around minding its own business.&lt;/div&gt;&lt;div&gt;Too many variables - the quality of the capacitors, the disposition of the spare wire, -- what about &lt;i&gt;balance&lt;/i&gt;, which Mr. Newkirk emphasized? Currently I'm having to tune my variable to minimum capacitance to reach 40 meter resonance.  That might mean my fixed capacitors (lowest tried - 20 pF) are too large.  So I put in two 14.7 pF silver micas.  Much better!  Now my variable is partially meshed for resonance at 7040 kHz and my SWR is well under 2:1.  It seems stable too, and not sensitive to body capacitance.&lt;/div&gt;&lt;div&gt;So that's where I am at this point.  No more QSOs yet -- not much activity on 40 and no contests to exploit.  I think I'd like to put the antenna on the second floor or even outside to give it a better chance.&lt;/div&gt;&lt;div&gt;It's interesting to note the big difference in capacitor values I wound up with as opposed to those in the article:  14.7 pF for me versus 40 pF for Rod Newkirk.&lt;/div&gt;&lt;div&gt;So now I'm happy with it again.  I think it might make a good hotel room antenna.  And it's now much easier to fold up due to the superior flexibility of the zip cord.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-2078629711479602325?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/2078629711479602325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=2078629711479602325' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/2078629711479602325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/2078629711479602325'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2009/08/update-on-multi-turn-loop-effort.html' title='Update on the multi-turn loop effort'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-4230737726374764927</id><published>2009-08-04T16:15:00.001-07:00</published><updated>2009-08-04T18:22:12.041-07:00</updated><title type='text'>Multi-turn small 40 meter loop antenna</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;div style="text-align: right; "&gt;&lt;b&gt;Here's the loop hung from the ceiling with string.&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: right; "&gt;&lt;b&gt;The feed is at top, capacitors bottom center.&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FzEkQwBUXbE/Snjbrrpae2I/AAAAAAAADsw/ig0sqeVIc_o/s1600-h/Capacitors+1.JPG"&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FzEkQwBUXbE/SnjBUUWpAuI/AAAAAAAADso/1ubMV46sz64/s1600-h/Multi-turn+loop+2.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 400px; height: 266px;" src="http://1.bp.blogspot.com/_FzEkQwBUXbE/SnjBUUWpAuI/AAAAAAAADso/1ubMV46sz64/s400/Multi-turn+loop+2.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5366251510817161954" /&gt;&lt;/a&gt;I've had an interest both in compact loops and in in-room hotel antennas for a while, but really hadn't gotten far.  So I finally got around to trying a multi-turn design by Rod Newkirk, W9BRD in the July 1993 QST article called, "Honey, I Shrunk the Antenna".  (Guess what movie was new at the time.)  According to the author, the multi-turn design raises radiation resistance significantly, and a resonating capacitor in each turn, along with the multi-turn design, calms down the extremes of voltage and current seen in single turn loops.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;The antenna is a rectangle 4.5 feet by 3.5 feet, three turns, each turn cut at the bottom (one 4.5 foot side) with a 40 pF capacitor inserted, one of them variable, and fed at the center of the opposite side, which is the top in my case.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I used #14 AWG THWN house wire, stranded (it's a little springy).    I made a little circuit board for inserting the three capacitors and another one for the feed line connection "insulator" at the top.  Instead of etching, I just scored traces with my Dremel tool abrasive wheel.  I mounted the variable capacitor on the opposite side of the (singled sided) board, using nylon screws so's not so short anything out.  The capacitor is a dual section, unequal values (80 pF and 150 pF or so) in series.  This is standard practice so current doesn't have to flow through the shaft to frame bearings.  In the photo below, the variable cap is on the back side and connected to the center traces.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://3.bp.blogspot.com/_FzEkQwBUXbE/Snjbrrpae2I/AAAAAAAADsw/ig0sqeVIc_o/s400/Capacitors+1.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5366280499509230434" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 266px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Circuit board material for series capacitor connections&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The wire generally is bunched up, even tie-wrapped or taped in a few places, in keeping with how the author did it.  In fact, he used a couple turns of 2/c  zip cord and spared one pass of the resulting four.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The article called for 40 pF capacitors with the variable used for fine tuning.  I put two 20.5 pF silver micas in parallel to get 41 pF with lower current in each.  In the photo, I'm experimenting with just one capacitor.  I'm publishing this a little prematurely as I'm still not satisfied with my values and possibly the quality of the capacitors.  I got the SWR down to a fairly stable 2:1 and let the K3's ATU finish the job.  I actually made two QSOs at 5 watts with the top of the antenna barely above head height.  Note that my shack is on the ground floor.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;More to come, maybe, if I make some improvements.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Nick, WA5BDU &lt;/div&gt;&lt;div&gt;August 4, 2009&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-4230737726374764927?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/4230737726374764927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=4230737726374764927' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/4230737726374764927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/4230737726374764927'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2009/08/multi-turn-small-40-meter-loop-antenna.html' title='Multi-turn small 40 meter loop antenna'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_FzEkQwBUXbE/SnjBUUWpAuI/AAAAAAAADso/1ubMV46sz64/s72-c/Multi-turn+loop+2.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-4535695409572105427</id><published>2009-05-23T18:40:00.000-07:00</published><updated>2009-05-23T19:11:46.615-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='synthesizer'/><category scheme='http://www.blogger.com/atom/ns#' term='homebrew'/><category scheme='http://www.blogger.com/atom/ns#' term='ham'/><category scheme='http://www.blogger.com/atom/ns#' term='Si570'/><title type='text'>Si570 Synthesizer</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_FzEkQwBUXbE/ShimPAr5H5I/AAAAAAAADDk/pSJl3QYHxaQ/s1600-h/Si570+on+Arduino.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5339200135060070290" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 213px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_FzEkQwBUXbE/ShimPAr5H5I/AAAAAAAADDk/pSJl3QYHxaQ/s320/Si570+on+Arduino.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;Lately I've been playing with a different kind of frequency synthesizer chip -- instead of DDS, it uses a built in crystal and a voltage controlled oscillator and dividers.  I'm sure that's over-simplifying a great deal.  The chip is the Si570--it's the little silver rectangle in the center of the vertical board in the photo.  The major excitement (to me) is that they make versions that go up to the GHz range.  I'm currently limited to about 60MHz with the Analog Design DDS chips I use.  My Si570 only goes to 160 MHz, but that would allow direct conversion at 2 meters and lots of other interesting stuff.  &lt;/div&gt;&lt;div&gt;The fun in this is learning to program a new chip from a microcontroller.  It's not nearly as straightforward as an AD DDS chip.  You set two front end dividers to set the rough range and then a 38 bit divider for the exact frequency.  It's not deterministic in that there may be more than one combination of the three to get to the same frequency.  Also, you can't just jump anywhere in the range.  Large jumps impose a little delay and some additional programming steps.&lt;/div&gt;&lt;div&gt;But per the data sheet you can move plus or minus 3500ppm by just sending a new 38 bit divider number.  I assumed this meant that on 14 MHz, I could move +/- 49kHz, but experimentally I could go +/- about 330kHz. Hmm ... You can tell you've gone too far because the thing freaks out and resets itself to its startup frequency, 56.32MHz in my case.  Using the more complex frequency change process always works though.  It's just not well suited to continuous tuning.&lt;/div&gt;&lt;div&gt;I got my Si570 on a little board with the same form factor as the NJQRP DDS-30 and DDS-60 after reading about the thing in a recent QEX article.  See the softrock receiver page and/or Yahoo group to track it down.&lt;/div&gt;&lt;div&gt;You control or program it over a two-wire bi-directional bus called I2C, which is a protocol for talking chip-to-chip.  Assembly language programmers always want to do things the hard way, so I was going to bit-bang the thing thru ordinary I/O pins, but it turns out that my Arduino development board (ATmel 168) has I2C built in to its C-based language so I figured I'd do my initial experiments there.  The Si570 is plugged into the Arduino board in the photo, or into a proto board atop the Arduino board.&lt;/div&gt;&lt;div&gt;I'd like to give some tutorial and "lessons learned" stuff, but I've rambled on just in this overview.  Maybe more details later.  I see some fun potential for this thing.  Direct conversion on 144 MHz, or even 220 MHz for the chip just one speed grade up.  An LO for a 2-meter FM rig (not a lot of homebrew there, eh?).  SDR (software defined radio) types like it because they need an LO four times the mixer frequency.  That's why this thing starts up on 56.32MHz -- that's four times 14.080MHz.  I still need to do stuff like measure its output level over the frequency range and so on.  &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-4535695409572105427?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/4535695409572105427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=4535695409572105427' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/4535695409572105427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/4535695409572105427'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2009/05/si570-synthesizer.html' title='Si570 Synthesizer'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_FzEkQwBUXbE/ShimPAr5H5I/AAAAAAAADDk/pSJl3QYHxaQ/s72-c/Si570+on+Arduino.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-5314283711354013068</id><published>2008-10-09T13:26:00.000-07:00</published><updated>2008-10-09T15:49:25.742-07:00</updated><title type='text'>First sound: receiver project</title><content type='html'>&lt;p&gt;&lt;a href="http://1.bp.blogspot.com/_FzEkQwBUXbE/SO5pmT-7ZMI/AAAAAAAACHk/Z6oSl5xtNRA/s1600-h/RX+in+pieces+NF+2.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5255253922108105922" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_FzEkQwBUXbE/SO5pmT-7ZMI/AAAAAAAACHk/Z6oSl5xtNRA/s320/RX+in+pieces+NF+2.JPG" border="0" /&gt;&lt;/a&gt; First sound in a receiver is like first light in a telescope. I finally got enough parts built to hook them together and actually listen to signals on the ham bands. The modules, labeled if you can read them (click to enlarge), are -&lt;br /&gt;&lt;br /&gt;HYCAS IF amplifier with AGC, kind of the heart of the receiver&lt;br /&gt;6 pole crystal filter (Butterworth) 500 Hz bandwidth&lt;br /&gt;BFO board, 8 MHz crystal oscillator with 74HCxx buffer, from EMRFD with some changes&lt;br /&gt;Mixer board, just an ADE-1 SMT mixer and three RCA connectors for IF, LO, RF&lt;br /&gt;Product detector board and audio amplifier stages, on R1 receiver board&lt;br /&gt;DDS VFO (NJQRP AD9851 board) on same prototype board with ...&lt;br /&gt;DDS controller using AVR Butterfly demo / development board&lt;br /&gt;Rotary encoder for DDS controller&lt;br /&gt;&lt;br /&gt;It sounds great, with some allowance for hum due to the haywired configuration. Still needs some front end filtering and several other additions, plus an enclosure.&lt;br /&gt;&lt;br /&gt;I made a table of gains and losses. If you took a 1 uV signal and wanted to raise it to a "line level" of about 2 Vrms audio at the output, the voltage gain would be 126 dB. My table showed my receiver to have 121 dB. (I still plan to add a switchable 20 dB preamp.)&lt;br /&gt;&lt;br /&gt;Testing gain, I used my signal to input a -107 dBm (1 uV) signal and found that the output is weak but readable. At -100 dBm it was "OK" and at -90 dB (about S6) it was strong.&lt;br /&gt;&lt;br /&gt;What next? Build a SSB bandwidth crystal fillter. A preamp. Front end filtering, and decide on how to switch the filters with band selection. An enclosure. Decide whether to continue with the Butterfly DDS controller or do a more custom one with a PIC and a display with 2 lines and more characters.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-5314283711354013068?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/5314283711354013068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=5314283711354013068' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/5314283711354013068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/5314283711354013068'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2008/10/first-sound-receiver-project.html' title='First sound: receiver project'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_FzEkQwBUXbE/SO5pmT-7ZMI/AAAAAAAACHk/Z6oSl5xtNRA/s72-c/RX+in+pieces+NF+2.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-7873271059447365640</id><published>2008-09-10T05:35:00.000-07:00</published><updated>2008-09-10T16:51:54.309-07:00</updated><title type='text'>ATmel versus PIC &amp; Butterfly DDS</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhdNawvi7I/AAAAAAAABQQ/XnXEeEAEF58/s1600-h/Butterfly8x6.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5244544251176389554" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhdNawvi7I/AAAAAAAABQQ/XnXEeEAEF58/s320/Butterfly8x6.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;Better stick in a picture, this is getting pretty boring. The little white board with LCD display is the ATmel Butterfly development / demo board. It's mounted on a perf board used to accommodate other stuff, such as the NJQRP DDS board, which is mounted vertically behind the Butterfly. To the left is my optical encoder, made from a junked digital bathroom scales. You can get little mechanical encoders for $5 to $10, but they're not as glitch free. However, they are about the size of a quarter compared to this one the size of a beer coaster. The scope is showing the 7.040 MHz output of the DDS.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Since my last post, I've been immersed in learning to program the ATMega MCU in the ATmel butterfly board. The project at hand involves some modifications to Steve Weber's source code for his DDS (direct digital synthesizer) controller software.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://kd1jv.qrpradio.com/"&gt;http://kd1jv.qrpradio.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Scroll down to his Butterfly Projects link. Steve recently won an ARRL building contest for designing an SSB / CW transceiver for under $50 parts cost.&lt;br /&gt;&lt;br /&gt;Check out the NJQRP DDS here, click the DDS-60 link -&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.njqrp.org/"&gt;http://www.njqrp.org/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;My main desire is to add use of a rotary encoder for frequency control. This essentially means I can turn a knob to adjust the frequency instead of, or in addition to using the UP/DOWN positions of the tiny joystick on the board.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Another feature I'll add is the ability to select control of the AD9850 based DDS or the newer AD9851 version. These DDS boards are both described on the NJQRP site, as NJQRP developed and sold them. (New Jersey QRP Club) Steve compiled (assembled, actually) separate programs for the two versions. But since I have both boards I'd like to be able to toggle between the two without changing my firmware.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have the encoder code working fine and am mostly finished with the version selector. I'm going to save the last version choice in EEPROM so the butterfly can wake up controlling the last chosen version. BTW, there are only two differences between the two from the perspective of the controlling software: (1) the reference oscillator frequency for the '9850 is 100 MHz and for the '9851 it's 180 MHz, and (2) when you send the phase increment data to the chip there's a control byte after the data. On the '9850 that byte is $00 and on the '9851 it's $01. The $01 tells the '9851 to use an internal x6 multipler (PLL) to take the 30 MHz reference oscillator up to 180 MHz.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;........ &lt;strong&gt;ATMega versus PIC&lt;/strong&gt; ........&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That's what this post was supposed to be about. It's a little early for me to be making pronouncements, but I'm trying out this chip to see if I like it better than the PIC. Both are 8-bit microcontrollers. Both have the usual peripherials built in or at least available in different versions: timers, ADC, PWM, and plain old digital I/O lines. Both can give you fast in-circuit programming and both have versions with on-chip high speed clocks, no crystal needed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Both companies give you a free and very sophisticated IDE (integrated development environment) that includes an editor, assembler, and source code debugger, plus the ability to program the chip right from the IDE environment. The ATMel may have an advantage in that there's a 'C' compiler available as free or shareware. I don't think ATmel developed it though. I'm not much on 'C' as yet, but may give it a shot.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The big deal difference I was seeking was in a more powerful &lt;strong&gt;instruction set&lt;/strong&gt;. Both MCUs claim to be of RISC design, but the PIC is definitely more RISC-ky. The PIC has 32 opcodes (instructions) while the ATmel 8-bitters have 130. Some of this may be just PR -- some PIC operations can be used or combined (with macros or pseudo-ops) to do more functions, while some of the ATMel instructions seem redundant to each other.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Also, the PIC instructions tend to be universally applicable (I think this is called orthogonality) while the ATmel processer has some instructions specific to a small set of registers, some specific to I/O locations, some specific to static ram addresses and so on.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;With all that said though, the PIC doesn't have a true compare instruction and doesn't have a subtract with carry. I recently spent a couple days (off and on) and wrote a page and a half of source code to just subtract one 16 bit unsigned integer from another. Assembly language programmers are masochists, so that kind of thing can be fun ... developing sophisticated programs using primitive stone-axe instructions. But sometimes I long for the power of the 8088 or even the good old 6502.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Not giving up on PICs though. I just have a new toy to play with now.&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-7873271059447365640?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/7873271059447365640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=7873271059447365640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/7873271059447365640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/7873271059447365640'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2008/09/91008-atmel-versus-pic.html' title='ATmel versus PIC &amp; Butterfly DDS'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhdNawvi7I/AAAAAAAABQQ/XnXEeEAEF58/s72-c/Butterfly8x6.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-4335553520153490576</id><published>2008-09-02T09:50:00.000-07:00</published><updated>2010-03-15T16:27:11.279-07:00</updated><title type='text'>FM Tracking (1 transistor) transmitter schematic</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_FzEkQwBUXbE/SL1vOizYasI/AAAAAAAABNY/OWELRAZvVJk/s1600-h/FM+pulsed+TX.gif"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5241467836980292290" src="http://2.bp.blogspot.com/_FzEkQwBUXbE/SL1vOizYasI/AAAAAAAABNY/OWELRAZvVJk/s400/FM+pulsed+TX.gif" style="cursor: hand; display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;OK, here's the schematic of the FM tracking transmitter I discussed earlier.  It's called "tracking" because its original purpose is to be put into a model rocket, then use an FM receiver to track down the rocket after it lands.  The basic oscillator / transmitter is unchanged from the web site I listed earlier.  I added the FM modulator section and changed up the oscillator and  pulse timer part to suit that change.&lt;br /&gt;&lt;br /&gt;Revision 3/15/2010 - The diode used in the modulator should be a 1N4148, not 1N4848. &amp;nbsp;In other words, a common small signal silicon diode. &amp;nbsp;Sorry about that write-o.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-4335553520153490576?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/4335553520153490576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=4335553520153490576' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/4335553520153490576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/4335553520153490576'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2008/09/fm-tracking-1-transistor-transmitter.html' title='FM Tracking (1 transistor) transmitter schematic'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_FzEkQwBUXbE/SL1vOizYasI/AAAAAAAABNY/OWELRAZvVJk/s72-c/FM+pulsed+TX.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1672783022634900449.post-3085242115204140247</id><published>2008-09-01T18:19:00.000-07:00</published><updated>2008-09-10T12:51:42.342-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Introduction 9/1/2008'/><title type='text'>Ham Electronic Homebrewer</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_FzEkQwBUXbE/SL05892oYbI/AAAAAAAABM0/wYLdPJ7kosg/s1600-h/FM+pulsed+TX.gif"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://2.bp.blogspot.com/_FzEkQwBUXbE/SL04cUWVgRI/AAAAAAAABMs/YDPi4XG5Z-Q/s1600-h/FM+pulsed+TX.gif"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;This blog is about building electronic stuff, mostly ham radio related. I've been keeping a homebrewer's diary to help me remember what I've done. This puts it on line.&lt;br /&gt;&lt;br /&gt;I build RF circuits (usually 1 to 30 MHz) and ham accessories and test equipment. I also mix in microprocessor (or MCU) programming in assembly language.&lt;br /&gt;&lt;br /&gt;My diary not only describes what I built but also what I learned, so I don't keep reinventing the wheel. It supplements an Excel file called where I'll keep measurements in tabular or sometimes graphical form.&lt;br /&gt;&lt;br /&gt;I'm constantly getting excited about new projects and getting them 90% done (or even less), then getting distracted by something else. My diary -- blog, helps me pick up where I left off when I get back on track.&lt;br /&gt;&lt;br /&gt;I'm currently building a receiver which started with the &lt;strong&gt;HYCAS&lt;/strong&gt; (from QST) IF amplifier with AGC and will include things like some of the audio sections of the R1 receiver and a LO (VFO) that will first be the NJQRP AD9851 DDS but may be a PLL/VCO driven by a DDS eventually.&lt;br /&gt;&lt;br /&gt;But now I'm sidetracked learing to program &lt;strong&gt;ATmel ATMega 8-bit&lt;/strong&gt; microcontrollers as an alternative to the PICs I've been doing for some time.&lt;br /&gt;&lt;br /&gt;OK, here's some of what I've been up to lately.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;8/2/2008&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;MFJ-4225 P/S&lt;strong&gt; thermostatic fan control&lt;/strong&gt;&lt;br /&gt;Not much homebrewing lately as I’ve been playing with my new K3. But one thing I’ve been wanting to do is to quiet down the fan on the MFJ-4225 power supply in keeping with the quiet fans of the K3 and the new Dell laptop. &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;For more organized info, schematic and photos, see my web page:&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://pages.suddenlink.net/wa5bdu/fan_control_page.html"&gt;http://pages.suddenlink.net/wa5bdu/fan_control_page.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First I made some temperature measurements. The P/S has two heat sinks, one with two devices mounted to it and one with just one. Using a LM34Z sensor glued to the heat sink, I measured the temperature at 20 A load for 10 minutes. It went from 74.5 F to 115 F at 5 minutes and 132 F at 10 minutes. But then I realized the sink toward the middle of the unit was getting hotter. So I moved the sensor there and did the test again. Ambient was 79F. In 5 minutes T was 134 F, in 10 it was 138 F.&lt;br /&gt;&lt;br /&gt;I also experimented with running the fan at lower voltage. It got very quiet at less than 11 volts, but with the cover back on, it was not so quiet. Pulling air through the perforated cover made the difference. The fan current was 127 mA at 14.9 V and reduced to 80.6 mA at 10 volts. So a 2N7000 with a rating of 200 mA could handle it.&lt;br /&gt;&lt;br /&gt;Goals:&lt;br /&gt;I don’t like noisy fans. I also don’t like noisy fans that start, run for a few seconds, stop again, and repeat. If the unit is hot enough to require a fan, I want it to run long enough to cool the sink down a little.&lt;br /&gt;&lt;br /&gt;I don’t think the fan is too critical in this P/S, so I decided to go with a temperature reached after 5 minutes at 20 amps load. In this way, it might never come on during light duty operation and listening. If it does come on, I want a deadband of about 10 degrees at the heat sink before it goes off. If the 20 A load continues, the fan might never go off, which would be OK.&lt;br /&gt;&lt;br /&gt;I was going to use a comparator (LM319A), but couldn’t find my chips. My next choice was an op-amp that could be driven rail to rail and work on a single 5 V supply. For a chip with high saturation voltage of 5V and low saturation voltage of 0V, they hysteresis is 5 / (N + 1) where N is the ratio of the feedback resistor to the input resistor. I used 390 k and 10 k for a hysteresis of about 5/40 or 0.125 volts or 12.5 degrees F.&lt;br /&gt;&lt;br /&gt;The LM34Z is kind of over-kill for this application, but it made calculating settings easy. It’s output is directly proportional to temperature, so volts * 100 = temperature in degrees F. I considered using a Vbe multiplier as a sensor. To maintain a constant deadband, the op-amp’s supply voltage needs to be constant, so I used a 78L05 regulator. The LM34Z will work off 5 volts, so I connect it to that bus.&lt;br /&gt;&lt;br /&gt;Since the fan’s current draw is low, the 2N7000 works as a switch. One could handle the current OK, but I put two in parallel for conservatism. The fan goes in the return (to ground) lead. I cut the black wire to the fan and connected the end from the fan to the drains of the MOSFETs. The other end of the black wire is ground and goes to the board for its ground. I shaved the insulation from the intact red wire and tapped off another wire to go to the board’s 78L05 regulator’s Vp/s input.&lt;br /&gt;&lt;br /&gt;Load test –&lt;br /&gt;&lt;br /&gt;From loading to 20A to fan ON: 2 min, 5 sec, remained loaded one more minute, then unloaded&lt;br /&gt;Time for fan to go off after unloading: 1 min, 12 sec&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;August 10, 2008&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Working with the &lt;strong&gt;Arduino Decimila&lt;/strong&gt; board Mike gave me for my 60th. Today I used a Vbe multiplier for a temperature sensor and have the thing reporting temperature via the serial link. Here’s some info from my Measurements.xls sheet and from my source code:&lt;br /&gt;&lt;br /&gt;Using analog input to read temperature&lt;br /&gt;&lt;br /&gt;My sensor is the Vbe junction voltage of a 2N3904 NPN transistor&lt;br /&gt;&lt;br /&gt;I have it in a Vbe circuit, so it amplifies its own signal&lt;br /&gt;&lt;br /&gt;The circuit is&lt;br /&gt;&lt;br /&gt;1k6 ohms from 5V to collector&lt;br /&gt;3k3 ohms from collector to base&lt;br /&gt;1.6k ohms from base to emitter&lt;br /&gt;emitter to ground&lt;br /&gt;The output voltage is the voltage from collector to emitter&lt;br /&gt;about 2 volts is room temperature&lt;br /&gt;&lt;br /&gt;I put the transistor (wired to the multiplier circuit and DMM) in&lt;br /&gt;an ice bath and in boiling water&lt;br /&gt;&lt;br /&gt;Ice bath: (32F) 2.157 volts (cheating, I only had resolution to 0.01 V)&lt;br /&gt;Boiling point: (212F) 1.578 volts&lt;br /&gt;&lt;br /&gt;Note that the slope is linear, so my change is -3.22 mV / DEFG&lt;br /&gt;&lt;br /&gt;In the Arduino, ice bath gives 443 - 444 counts or 2.163 -- 2.167 volts&lt;br /&gt;&lt;br /&gt;Also was reading in EDN about how long a good capacitor can hold a charge. It can be a long time, maybe days. But if you measure it with a 10 MEG meter, you’ll discharge it. So I’ve got it hooked to the gate of a MOSFET. From 12V battery, 47k to the drain, source to ground, 0.22 uF polystyrene (the big green ones) to gate from ground. Charged the capacitor to 5 volts and let it go.&lt;br /&gt;&lt;br /&gt;I had checked the drain at various voltages. The MOSFET will stay ON (conducting, so the drain is near 0 volts) from 5 volts all the way down till about 1.8 volts, where the drain will be at 9.85 volts. When gate voltage drops to about 1.99 volts, the drain voltage is about 50 mV. As of now, it’s been holding 0 volts for about 6 hours.&lt;br /&gt;&lt;br /&gt;This 0.22uF poly held its charge for about 4 days before being accidentally discharged. Next I tried an ordinary 0.1uF ceramic disk. It held up for about two to three days.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;August 16, 2008&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I’m working on the audio amplifier for my receiver. I’m going to use the famous R1 direct converstion receiver board (QST 8/92 or your EMRFD disk) with modifications and gain reductions. And I won't need so much audio filtering with all those expensive miniature inductors.&lt;br /&gt;&lt;br /&gt;Diplexer. I’m not buying all the expensive parts of the original R1 for filtering and diplexing. So I eliminated all the components between the mixer and the 6.8uf coupling capacitor. I went to VE3BPO’s page to read about post-mixer diplexers and selected on that uses two equal valued inductors and two equal valued capacitors. VE3BPO makes his crossover at 1kHz, but I want mine to work on phone and CW so I divided his component values by 3 to triple the bandwidth.&lt;br /&gt;&lt;br /&gt;Things looked good on LTSpice, even after I had to substitute the available 3.5mH chokes for 3.3mH calculated.&lt;br /&gt;&lt;br /&gt;I got these things built plus put the mixer on the board. It’s a SMT ADE-1, so I used one of Rex’s little adapters to adapt it to the board. (W1REX of &lt;a href="http://www.qrpme.com/"&gt;http://www.qrpme.com/&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;August 17, 2008&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I got the DDS-60 card connected to the ATmel Butterfly demo board and Steve Weber’s software. It was necessary to read three PDFs, one for each of those items, to get them working together.&lt;br /&gt;The DDS-60 runs on 12VDC but no more than that. I routed the input power (presumed 13VDC) through two diodes before the DDS-60 power input pin (#8). The DDS-60 puts out a 5VDC power level for other circuits and I routed that to the Butterfly. As suggested by Steve, I put a 10uH choke in series with that lead.&lt;br /&gt;&lt;br /&gt;The DDS-60 can put out over +10 dBm and with the on-board pot I was able to adjust it down to +7 dBm.&lt;br /&gt;&lt;br /&gt;So now I have a local oscillator I can use for starters. I still need to program in the offset and a pot or divider to handle bandswitching.&lt;br /&gt;&lt;br /&gt;Next I need to build either the BFO or the rest of the audio amplifier.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;August 24, 2008&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Built the dual JFET BFO from QST 9/04 technical correspondence and feedback in Oct. and Dec. 2004 QSTs. Also used in a QEX January 2008 article.&lt;br /&gt;&lt;br /&gt;It oscillates around 8003 kHz without much tuning range. The article called for a parallel mode crystal. I may need more C or some series L if I need to go lower.&lt;br /&gt;&lt;br /&gt;With the scope, I measure 0.68 Vp-p output across the 1k resistor with no load. The amplitude hardly changes at all when I drop the supply voltage from 13V all the way to 8V. The frequency is 8003.5 kHz with one of my ECS crystals.&lt;br /&gt;&lt;br /&gt;Tuesday – Tried adding 82p in parallel with the 18p on the gate side of the crystal, but it stopped oscillation. Put in a BG Micro crystal (CTS) and now I can get to 8001.07 kHz. Note that adjusting the trimmer does affect amplitude, though. Note that the center of the filter (500 Hz) I designed is about 8000.500 kHz. So for 400 Hz note, I need either 8000.100 or 8000.900 BFO frequency. With the CTS #2 crystal, I got to 8000.950 kHz.&lt;br /&gt;&lt;br /&gt;I’ll need an amplifier with about 8 dB gain to follow it, having a 50 ohm output Z.&lt;br /&gt;&lt;br /&gt;I’ve considered using a logic gate like 74HCT, 74HC, 74AC, 74ACT to drive the product detector. I built a circuit consisting of a 74AC04 with gates in parallel. The oscillator described enough didn’t have enough swing to drive it. I built the logic circuit with one inverter having 100 k-ohm feedback to increase sensitivity, and it drives the other four gates in parallel.&lt;br /&gt;&lt;br /&gt;I drove the circuit from the DDS-60 and it did work, producing 4.5 Vp-p into 50 ohms at the scope. It has some high frequency ringing on the leading edge though, operating at 7 MHz. Maybe loading the input would help. (Nope, it didn’t.) As far as symmetry, the relative high and low times were 3.62 and 3.4 (times 20 ns for absolute). One guy uses a pot to DC bias the input at near Vcc/2 and adjusts for equal high and low times. &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;After going through all this, I'm asking myself -- Is there really much value in a super low phase noise oscillator for a BFO? For the LO, sure. I may go to a more conventional circuit such as a Colpitts.&lt;br /&gt;&lt;br /&gt;I also have been working on the DDS-60. Actually, I’ve been improving my PIC DDS source code by looking at Steve Weber’s code for calculating the PI (phase increment). I’m now using a "real" 64 bit by 32 bit division to get rid of all the tricks. It can calculate a PI in 750 us on a 20 MHz (crystal) PIC 16F88. (The "stopwatch" feature of MPLAB's debugger is great for figuring out stuff like this.)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;A 1% Voltage Standard-&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;I got tired of my meters telling me different things, so I put a MC1403 2.5VDC reference chip on a RS perf board. Input voltage can be 5 to 40 VDC. Output is 2.5 VDC +/- 25 mV, or within 1%. I also put in a divider of two 1.78 k resistors to give 1.25 VDC output. I might add an op-amp to go up to 10 VDC too.&lt;br /&gt;&lt;br /&gt;Sears DMM --- RS DMM --- Harbor Freight $3 DMM&lt;br /&gt;2.5 ........................ 2.50 ........... 2.49 (on 2.5V tap)&lt;br /&gt;1.248 .................... 1.252 ......... 1.256 (on 1.25V tap)&lt;br /&gt;&lt;br /&gt;I did this because I've been having a problem with the Radio Shack DMM being about 0.5 volt low (at 13V) compared with the Sears unit. It turned out the problem was with a cheap / bad test lead which I threw away. (Molded banana on one end and alligator clip on the other.)  I wouldn't have thought that a crummy test lead could cause a voltage reading error into a 10 M-ohm meter, but it did.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;August 25, 2008&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;I built this Tracking Beeping FM Transmitter&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.jbgizmo.com/page22.html#schamatic"&gt;http://www.jbgizmo.com/page22.html#schamatic&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;from the web. It’s a single 2N2222 with a tank circuit in the collector lead, operated common base. Base drive is from a 4011 (4093) NAND gate package with an oscillator to produce tones and another to gate the first one ON and OFF. The transmitter is keyed on and off by this arrangement. It’s called a 108 MHz transmitter, but even after I reduced the fixed collector cap to 18 pF, I still had to trim it up to reach 87 to 88 MHz. It’s making a strong signal in my receiver but not much tone. I’m thinking about applying the audio to a varicap in the tank.&lt;br /&gt;Will it oscillate with continuous DC base drive, not pulse stream? Yes.&lt;br /&gt;&lt;br /&gt;The six turns of #26 AWG on a 1/8 inch drill bit gives 0.108 uH inductance. &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;See below for more comments on this thing and my 9/2/08 entry has my revised schematic. Super simple one or two transistor transmitters or receivers fascinate me. I had a hard time believing a single 2N2222 would work as an oscillator / transmitter at ~100 MHz, but it does.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;8/26/08&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Worked on the model rocket transmitter some more. On the original, I couldn’t hear much of any modulation, probably because it’s AM. So I FM’d it by adding varactor FM modulation. I used a 1N4848. I calculated that for 25 kHz deviation I’d need about 0.014 pF capacitance change. So my driving voltage needed to be pretty small too. I swapped out the 74C11 for a 74C14 hex Schmidt trigger. I don’t need the AND gate because one timer pulses the TX on and off and the other now goes to the modulator. The standard RC logic gate oscillator uses three gates and an inverter gives six per package while an AND gate only gives four. So the gating oscillator is running at 1 Hz and the audio oscillator at 800 Hz.&lt;br /&gt;&lt;br /&gt;It works and sounds good. Still sensitive to antenna configuration and placement and body position too. Works best with the oscilloscope connected. Some sort of antenna isolation would help. I tried playing some music through it with no luck – I guess oscillation stopped. &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;8/27/2008&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I had an email exchange with Baltasar (Canary Islands) on QRP-L about &lt;strong&gt;losses in a ferrite transformer&lt;/strong&gt;. He followed up with these measurements:&lt;br /&gt;&lt;br /&gt;"I made your test. I wound 2 11-turns winding on the toroid.&lt;br /&gt;First, I put the two windings apart (i.e. w/o touching each other)&lt;br /&gt;and I measure the following losses:&lt;br /&gt;f=3.5MHz -&gt; L=1.96dB&lt;br /&gt;f=7MHz -&gt; L=4.55dB&lt;br /&gt;f=14MHz -&gt; L=8.67dB&lt;br /&gt;f=21MHz -&gt; L=11.52dB&lt;br /&gt;f=30MHz -&gt; L=14.26dB&lt;br /&gt;Conditions:&lt;br /&gt;Power input -&gt; -20dBm&lt;br /&gt;0.6mm diameter wire.&lt;br /&gt;Then I coiled the second winding over the first winding. I got no losses, only 0.2dB losses at 30MHz. It seems that the windings have to be very near to get full power transfer. "&lt;br /&gt;&lt;br /&gt;That surprised me so I did my own test with 11 turns separated on opposite sides of the core. Here’s what I got&lt;br /&gt;&lt;br /&gt;Sorry about HTML not allowing tabs or white space ...&lt;br /&gt;&lt;br /&gt;...MHz ...... Loss (dB)&lt;br /&gt;...1.8 ........... 0.5&lt;br /&gt;...3.5 ........... 1&lt;br /&gt;...7 .............. 3&lt;br /&gt;...14 ............ 6.3&lt;br /&gt;...21 ............ 8.5&lt;br /&gt;...28 ............ 9.2&lt;br /&gt;&lt;br /&gt;So sure enough, he's right. I always thought that with high-mu toroids, coupling would be high even if the windings were physically separated. Guess not.&lt;br /&gt;&lt;br /&gt;Now I’ll need to repeat with the windings overlaid.&lt;br /&gt;&lt;br /&gt;I also worked on the &lt;strong&gt;FM Tracking Transmitter&lt;/strong&gt; some more. Tried taking the output off the emitter and it did make for less frequency shift with body capacitance, I think. I also decreased the tank fixed cap to about 15 pF and the trimmer to a 2 to 8 pF unit. Now I can get up above 92 MHz. I also tried modulating with music again. This time I had some success, but it was lo-fi for sure.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;September 1, 2008&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;I wrote my first routines for the &lt;strong&gt;Atmel ATMega169 butterfly&lt;/strong&gt; – a routine to put my name to the LCD. I’m pretty pleased that it worked the first time because programming this LCD is complex -- not like the Hitachi standard at all, and I’m also dealing with a whole new set of opcodes.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1672783022634900449-3085242115204140247?l=wa5bdu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wa5bdu.blogspot.com/feeds/3085242115204140247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1672783022634900449&amp;postID=3085242115204140247' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/3085242115204140247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1672783022634900449/posts/default/3085242115204140247'/><link rel='alternate' type='text/html' href='http://wa5bdu.blogspot.com/2008/09/ham-electronic-homebrewer.html' title='Ham Electronic Homebrewer'/><author><name>wa5bdu</name><uri>http://www.blogger.com/profile/00100718408110518225</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_FzEkQwBUXbE/SMhi_4f9UYI/AAAAAAAABQc/g-CHLEuJFh0/S220/Nick+at+bench+1.jpg'/></author><thr:total>0</thr:total></entry></feed>
