tag:blogger.com,1999:blog-36631971477140370012024-03-08T03:33:41.624-08:00The Sync Channel BlogDan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.comBlogger49125tag:blogger.com,1999:blog-3663197147714037001.post-31505215330170297362016-07-13T19:08:00.003-07:002016-07-24T16:10:14.309-07:00Atmel Retrokit SAM D EditionIn this post I will document an update that I designed of a classic AVR board: The Retrokit!<br />
<br />
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2enA-EZlUoItgux3-nnXUItmTqn_CSQsi_mkHitW4MdQlNhIrUoQjHjrnOrWW_-YavbUWdGnd-6bCfTVMfPreOnXc05qLndL6DZIDSbRXxLi7dLhArVVUG4rPFm-YzOGYzEHxgoyZvLc/s1600/retrokit1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="311" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2enA-EZlUoItgux3-nnXUItmTqn_CSQsi_mkHitW4MdQlNhIrUoQjHjrnOrWW_-YavbUWdGnd-6bCfTVMfPreOnXc05qLndL6DZIDSbRXxLi7dLhArVVUG4rPFm-YzOGYzEHxgoyZvLc/s400/retrokit1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Atmel Retrokit SAM D Edition</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3 class="separator" style="clear: both; text-align: left;">
<u>Introduction</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div style="text-align: left;">
I don't have a lot of information on the original Retrokit board. Based on a post by <a href="https://twitter.com/AtmelMCUJo/status/385662630134034432" target="_blank">Jo Uthus on Twitter</a>, it was designed in 1997 by <a href="https://twitter.com/VegardWollan" target="_blank">Vegard Wollan</a>. The intent was clearly to demonstrate the speed of AVR microcontrollers compared to other 8-bit devices of the era: PIC microcontrollers, the HC08, and the 8051. The four LEDs on the board blinked at different rates, with the faster AVR completing its blinks first. Of course, the entire board was controlled by a single AVR device which simulated the comparative speeds of the other devices through the blinking LEDs.</div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnPJhf8Uzk9DAhuqPEB7MKYZwfZjcwLBPbUI2YtDiDJIb-DRFJ6bfLfNuyTqAT3Eswb-K7TZHP7pOIvdNB2Qlq-GmEvzj8ZaxQGsIui9ns6a7oMRTypgSonpQ0u1snEEoj78iYy3dDd4c/s1600/retrokit_original.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnPJhf8Uzk9DAhuqPEB7MKYZwfZjcwLBPbUI2YtDiDJIb-DRFJ6bfLfNuyTqAT3Eswb-K7TZHP7pOIvdNB2Qlq-GmEvzj8ZaxQGsIui9ns6a7oMRTypgSonpQ0u1snEEoj78iYy3dDd4c/s400/retrokit_original.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
The Original Retrokit</div>
<div class="separator" style="clear: both; text-align: center;">
Source: <a href="https://twitter.com/Atmel/status/747916882783657984" target="_blank">Atmel on Twitter</a> </div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
There was a 2008 re-design of the Retrokit that Jo posted about. The re-make is a really nice SMT design, and there is even a YouTube video showing it in action! It was posted by <a href="https://www.youtube.com/channel/UC77hdPeev2kHhw7JkxGBFew" target="_blank">Joseph Rautenbach</a> and he is possibly the designer. If you see this Joseph, let me know and I'll link in more information about you.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqPYwCwcnCZsPhzCy8HNGTWDFfrgZl4mx0nc3JJt4s9y6KErqJXOF7ZUGuHujE_4nT8ZIXq9EhcBsCMQchf_Ar7BT43IYxoH9s0qzCEA89dX6a2O9b7Eq7eS3fQF_D4Mi1BsB_zb-G8Fs/s1600/retrokit_1st_redesign.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqPYwCwcnCZsPhzCy8HNGTWDFfrgZl4mx0nc3JJt4s9y6KErqJXOF7ZUGuHujE_4nT8ZIXq9EhcBsCMQchf_Ar7BT43IYxoH9s0qzCEA89dX6a2O9b7Eq7eS3fQF_D4Mi1BsB_zb-G8Fs/s400/retrokit_1st_redesign.jpg" width="300" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
2008 Re-design of the Retrokit </div>
<div class="separator" style="clear: both; text-align: center;">
Source: <a href="https://twitter.com/AtmelMCUJo" target="_blank">Jo Uthus on Twitter</a></div>
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/t9bwMVpYcJo/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/t9bwMVpYcJo?feature=player_embedded" width="320"></iframe></div>
<div style="text-align: center;">
YouTube video on the 2008 re-design of the Retrokit.</div>
<div style="text-align: center;">
<br /></div>
<h3 style="text-align: left;">
<u>Updating the Retrokit to 32-Bit</u></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
A lot has changed in the past 19 years since the original Retrokit was designed. We now have a plethora of 16- and 32-bit microcontrollers available to us with speeds and feature sets that far surpass their 8-bit brethren. The devices you can purchase these days for very little cost offer amazing capabilities. Microchip Technology and Atmel, once competitors, <a href="http://ir.atmel.com/releasedetail.cfm?ReleaseID=950828" target="_blank">have joined forces</a>. The maker movement has exploded. Arduino happened... It's a great time to be a maker and embedded developer. I thought it was time to bring the Retrokit along for the ride.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I created a 2016 re-design of the Retrokit that uses the <a href="http://www.atmel.com/Images/Atmel-42414-SAM-D09_Datasheet.pdf" target="_blank">Atmel SAM D09 microcontroller</a>. This is an excellent 32-bit device that comes in a SOIC package, making it easy to solder. I mimicked the board size and layout of the first Retrokit as closely as possible. The four LEDs are meant to show a comparison in speed between the 32-bit SAM D device, the 16-bit ATxmega, the 8-bit AVR, and the 8-bit PIC microcontroller. There are a lot of devices to select from in each of those families, and if we wanted to be really picky, I could have even chosen a <a href="http://www.microchip.com/design-centers/32-bit/architecture/pic32mz-family" target="_blank">PIC that blew away the little SAM D09</a>. However, I chose representative devices in each category that also demonstrate the development of microcontroller technology over time, from the older PIC 16F series to the modern 32-bit SAM Ds.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The blink rates of the LEDs and completion times are based on MIPS/DMIPS scores for each device. Check out my code on Github linked below to learn more. Here is a video of the Retrokit SAM D Edition in action:</div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/Xa8J1POdyXg/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/Xa8J1POdyXg?feature=player_embedded" width="320"></iframe></div>
<div style="text-align: center;">
YouTube video showing my Retrokit SAM D Edition board in action.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The blinking LED demo takes 10 seconds to complete, after which the LEDs all stay lit for an additional 5 seconds. After that, the SAM D09 goes into deep sleep mode to save power. Current draw in deep sleep mode is around 2uA, meaning that the CR2032 battery will last a long, long time in that state. To reactive the light show, simply press the Reset button.</div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
<u>Shared as Open Source Hardware (OSHW)</u></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Here is all of the information you need to order PCBs and assemble your own Retrokit SAM D Edition boards or modify the design.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Eagle Files and Firmware: <a href="https://github.com/SyncChannel/Retrokit_SAM_D_Edition" target="_blank">Shared on Github</a></div>
<div style="text-align: left;">
Atmel Retrokit SAM D Edition: <a href="https://oshpark.com/shared_projects/nDdudPr4" target="_blank">Order PCBs on OSH Park!</a></div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzhS2lYGvnmwbWa850Jus-ksoHyREb90V65b5ZmZZerxklI3SUcQqKxL-73sMhbddUAiJ8oTabU7UV4Z7XSL_swhcj-A0IWdB55w8awkffVjnJWURC6nKj7Ska-pulSBpsmFk68WcW5Eg/s1600/retrokit_sch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="291" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzhS2lYGvnmwbWa850Jus-ksoHyREb90V65b5ZmZZerxklI3SUcQqKxL-73sMhbddUAiJ8oTabU7UV4Z7XSL_swhcj-A0IWdB55w8awkffVjnJWURC6nKj7Ska-pulSBpsmFk68WcW5Eg/s400/retrokit_sch.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Retrokit SAM D Edition Schematic </div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<b><u>Parts List</u></b></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<b>Microcontroller:</b> <a href="http://www.digikey.com/product-detail/en/atmel/ATSAMD09C13A-SSUT/ATSAMD09C13A-SSUTCT-ND/5404072" target="_blank">Atmel SAMD09C13A</a></div>
<div style="text-align: left;">
<b>Push Button: </b><a href="http://www.digikey.com/product-search/en?keywords=450-1650-nd" target="_blank">SPST Though-hole</a></div>
<div style="text-align: left;">
<b>Bussed Resistor:</b> <a href="http://www.digikey.com/product-search/en?keywords=4605x-101-471lf-nd" target="_blank">470 ohm 5SIP</a></div>
<div style="text-align: left;">
<b>LEDs:</b> 4x <a href="http://www.digikey.com/product-search/en?keywords=732-5005-nd" target="_blank">3mm Red LEDs</a></div>
<div style="text-align: left;">
<b>Battery Holder:</b> <a href="http://www.digikey.com/product-detail/en/keystone-electronics/3003/36-3003-ND/227448" target="_blank">CR2032 Though-hole</a></div>
<div style="text-align: left;">
<b>R1: </b>10k ohm 0805 SMD</div>
<div style="text-align: left;">
<b>R2:</b> 100 ohm 0805 SMD</div>
<div style="text-align: left;">
<b>C1: </b>100nF Ceramic Through-hole, 0.1" lead spacing</div>
<div style="text-align: left;">
<b>C2: </b>100nF 0805 SMD</div>
<div style="text-align: left;">
<b>Programming Header:</b> <a href="https://www.digikey.com/product-detail/en/amphenol-fci/20021111-00010T4LF/609-3712-ND/2209072" target="_blank">10-pin 0.050"</a> (don't solder this, see note below)</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<b>Assembly Note: </b>Tin the square ground pad in the middle of the battery holder footprint before soldering on the holder. The pad should have a little mound of solder on it to make good contact with the battery.<br />
<b><br /></b>
<b>Programming Note: </b>The 10-pin Cortex Debug port is positioned directly underneath the microcontroller so that it is not visible from the front of the board. The connector is not meant to be soldered. After assembling everything else on the board, throw in a CR2032 battery to power it and insert the male 10-pin connector into the female end of the cable from your programmer (such as an Atmel ICE). Then, wedge the connector into the port to program it. Finger pressure will keep it in place for the few seconds needed to flash the firmware, and then you should never need it again.</div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
<u>Conclusion</u></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I hope you enjoy this little re-make of the classic Retrokit. If you assemble your own, please Tweet me a picture <b><span style="color: blue;">@sync_channel</span></b>. Questions and comments are welcome below.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Thanks for reading!</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
- Dan W.</div>
</div>
Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com1tag:blogger.com,1999:blog-3663197147714037001.post-90290601896641240932016-06-26T18:02:00.002-07:002016-07-06T19:26:35.659-07:00LoRaWAN FeatherWing for Adafruit FeatherIn this post I will document a new custom FeatherWing I have designed to add the <a href="http://www.microchip.com/rn2903" target="_blank">MicroChip RN2483/RN2903</a> LoRaWAN module to <a href="https://www.adafruit.com/category/777" target="_blank">Adafruit Feather</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3tWzjt-NQnV07wQ27HtkuLQGaPjDCQQmQBsHw7HmDHVrajBODOmBIxsaKt1jCqQZ0UO-5y3GoBsJPm4rWbwLTZnD-mcVJBMXTAWHzwtJvDQluGv58cjbLlBI8ZWhVSakU8H8XZHHjP3I/s1600/lorawanfw1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3tWzjt-NQnV07wQ27HtkuLQGaPjDCQQmQBsHw7HmDHVrajBODOmBIxsaKt1jCqQZ0UO-5y3GoBsJPm4rWbwLTZnD-mcVJBMXTAWHzwtJvDQluGv58cjbLlBI8ZWhVSakU8H8XZHHjP3I/s400/lorawanfw1.jpg" width="400" /></a></div>
<div style="text-align: center;">
Help your Feather fly into the IoT clouds with this awesome<br />
LoRaWAN module from MicroChip.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<h3>
<u>Introduction</u></h3>
</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I have designed some FeatherWings in the past to add a LoRa transceiver module to Feather. I did the <a href="http://syncchannel.blogspot.com/2016/02/lora-featherwing-development-breakout.html" target="_blank">LoRa FeatherWing Development Breakout</a> and the <a href="http://syncchannel.blogspot.com/2016/03/lora-featherwing-iox-for-adafruit.html" target="_blank">LoRa FeatherWing IOX</a> that used the HopeRF RFM95/96(W) modules. The RFM modules are small and cheap, which is great for IoT projects. However, they have a limitation if you want to use them with LoRaWAN: the stack is not implemented in the module, leaving that burden to the microcontroller. The LoRaWAN stack takes a fair amount of code space, and it's difficult to implement in some 8-bit microcontrollers.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
This new FeatherWing uses the <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/50002346A.pdf" target="_blank">RN2483 (868 MHz)</a> or <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/50002390B.pdf" target="_blank">RN2903 (915 MHz)</a> from MicroChip. It's an excellent module that fully implements the LoRaWAN stack itself. The microcontroller talks to it over USART with a simple command structure to configure it and send/receive messages. The module also has several GPIO pins available. This is the preferred module on <a href="https://www.thethingsnetwork.org/" target="_blank">The Things Network</a>, and there are a lot of great example projects and code on the Internet to help you get started.<br />
<br />
My FeatherWing is very simple. It connects the module serial pins and the module Reset pin to the Feather. It has an SMA connector for attaching an antenna, and a small white silk-screen box for writing in a node ID or other information. GPIO10 from the RN module is attached to an LED for status indication. Finally, I added an ICSP connector for the module that is compatible with the PicKit3. You'll probably never need this, but it can be used to <a href="http://forum.thethingsnetwork.org/t/ttn-uno-beta-release-documentation/290/47?u=nestorayuso" target="_blank">update the firmware on the module</a> if that is ever necessary.<br />
<br />
<h3>
<u>Challenges</u></h3>
<br />
Despite the simplicity of the FeatherWing, there was a unique challenge along the way. The RN module is a bit wide, and in fact nearly as wide as the header spacing on the Feather boards. My first revision of this board used a very narrow footprint for the module and normal through-hole headers. It was extremely difficult to solder. Though I made two functional boards with that PCB, I didn't think it was suitable to release as a shared project.<br />
<br />
My solution was to make the FeatherWing a bit wider (1" wide instead of the normal 0.9") and use surface mount headers on the bottom. This is the first "wide-body" FeatherWing that I have seen.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEMaDd-DZAnBS3HUlI_fXjIcvmrmbVn1PU66zaqmBo7RHPF_oSClAaFvFKIV_fHDjz-d0VZPMOYUFsbt-l-FbIdpaomN4gJrPdtL85zxrvFfart1Ww_UHwYzZGeJk9alxG32ge0bMraTY/s1600/lorawanfw2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="286" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEMaDd-DZAnBS3HUlI_fXjIcvmrmbVn1PU66zaqmBo7RHPF_oSClAaFvFKIV_fHDjz-d0VZPMOYUFsbt-l-FbIdpaomN4gJrPdtL85zxrvFfart1Ww_UHwYzZGeJk9alxG32ge0bMraTY/s400/lorawanfw2.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Surface mount headers on the bottom of the LoRaWAN FeatherWing.</div>
<div class="separator" style="clear: both; text-align: center;">
Notice that the board is a bit wider than normal FeatherWings.</div>
<div style="text-align: center;">
<br /></div>
<h3 style="text-align: left;">
<u>Compatability</u></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
This board is compatible with <a href="https://www.adafruit.com/product/2772" target="_blank">Feather M0</a>, <a href="https://www.adafruit.com/product/2771" target="_blank">Feather 32U4</a>, and <a href="https://www.adafruit.com/product/3056" target="_blank">Feather WICED</a>.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
It is NOT compatible (as-is) with Feather HUZZAH (ESP8266). The single hardware USART on the HUZZAH is tied to the USB-Serial chip, and other things shouldn't be connected to those pins. If you really want to use the HUZZAH, you can:</div>
<ul>
<li>Pick a software serial library for ESP8266 </li>
<li>Download the Eagle design files</li>
<li>Modify the board so that the serial pins from the RN module go to the pins you want to use for software serial</li>
<li>Order your custom PCB on OSH Park or whatever service you like</li>
</ul>
<br />
Because this FeatherWing is wider than normal FeatherWings, it probably won't work on a <a href="https://www.adafruit.com/product/2890" target="_blank">Doubler</a>. The board will overlap with the Feather and prevent it from being fully seated.<br />
<br />
<h3>
<u>Shared as Open Source Hardware (OSHW)</u></h3>
<br />
Eagle Files: <a href="https://github.com/SyncChannel/LoRaWAN_FeatherWing" target="_blank">Shared on Github</a><br />
Grab my Eagle parts library if you want to edit the footprints: <a href="https://github.com/SyncChannel/DesignFiles" target="_blank">Shared on Github</a><br />
<br />
LoRaWAN FeatherWing: <a href="https://oshpark.com/shared_projects/H45capYJ" target="_blank">Order PCBs on OSH Park!</a> <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHWEavOzafOFELNIz933_ACRxVnbEadlVr2anCtoqPabscmy9Oc9TAtuwZQ3DR4ol2fSluG4GQxbghPCvrpNvSZZ2TVl7xS8GAeTsG-zASrSaMbEjkSnA-h03nLj04yFm5sRQ2waPZ9lg/s1600/lorawanfw_sch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHWEavOzafOFELNIz933_ACRxVnbEadlVr2anCtoqPabscmy9Oc9TAtuwZQ3DR4ol2fSluG4GQxbghPCvrpNvSZZ2TVl7xS8GAeTsG-zASrSaMbEjkSnA-h03nLj04yFm5sRQ2waPZ9lg/s400/lorawanfw_sch.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
LoRaWAN FeatherWing Schematic</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3kjqKR6r2scZWKovNU50A6cVzOJbKBFK8nOj-LRlHOm1TGDOYCBv88U2mi-Hwot_Hj0F7FfvADe8lmnf7xiKFwUfyjKDcLPuBAnvEQBAIFg0D0fE8W3EpD_nY4K1fExMQGypTzdSVT9w/s1600/lorawanfw_brd.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="186" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3kjqKR6r2scZWKovNU50A6cVzOJbKBFK8nOj-LRlHOm1TGDOYCBv88U2mi-Hwot_Hj0F7FfvADe8lmnf7xiKFwUfyjKDcLPuBAnvEQBAIFg0D0fE8W3EpD_nY4K1fExMQGypTzdSVT9w/s400/lorawanfw_brd.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
LoRaWAN FeatherWing Board Layout</div>
<u><b><br /></b></u>
<u><b>Parts List:</b></u><br />
<b><br /></b>
<b>LoRaWAN Module:</b> MicroChip <a href="http://www.digikey.com/product-search/en/rf-if-and-rfid/rf-transceiver-modules/3539948?k=rn2483" target="_blank">RN2483 (868 MHz)</a> or <a href="http://www.digikey.com/product-search/en/rf-if-and-rfid/rf-transceiver-modules/3539948?k=rn2903" target="_blank">RN2903 (915 MHz)</a><br />
<b>RF Connector:</b> SMA or RP-SMA Edge-Launch for 1.6mm/0.062" board thickness<br />
<b>12-pin Header: </b>0.1" SMD, Female (<a href="http://www.digikey.com/product-search/en?keywords=s5643-nd" target="_blank">Digikey</a>) or make your own Male connector (see below)<br />
<b>16-pin Header: </b>0.1" SMD, Female (<a href="http://www.digikey.com/product-search/en?keywords=s5647-nd" target="_blank">Digikey</a>) or make your own Male connector (see below)<br />
<b>R1, R2: </b>680 ohm 0603 SMD (or adjust value to change brighness of LED)<br />
<b>PWR, G10 LEDs: </b>0805 SMD (color of your choice)<br />
<b>C1: </b>1uF 0603 SMD<br />
<b>C2: </b>470nF 0603 SMD<br />
<br />
<b>Notes: </b>C1 and C2 are located on the bottom of the board. The ICSP header is rarely used and you don't need to solder headers to that. Be sure to pick the correct LoRaWAN module (frequency) for your country/region.<br />
<br />
<h3>
<u>Make Your Own Male Surface Mount Headers</u></h3>
<br />
I typically avoid surface mount headers because they are more expensive and not something I have sitting around in the parts bin. Thankfully you can make your own surface mount male headers from right-angle breakway header strips.<br />
<br />
Using a pair of pliers, pull <i>every other </i>pin on the header out of the plastic spacer, rotate it 180 degrees, then re-insert it. Next cut the pins a bit shorter so that they fit within the footprint on the PCB. Super easy and cheap. The below picture should make that more clear:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5WIgAk6d167DyxKX8sSOuuTnYtnCjMSRoRroFjYhYsRp20KxSeW5aJ01F7VGsSLFgi8yZo3BFuH5z3Q1-foDY5zZCGASGSQVtgG4wk75euUqDZgRevaQees2C7SA4281vDJ9Xw1E1Wyc/s1600/lorawanfw4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="278" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5WIgAk6d167DyxKX8sSOuuTnYtnCjMSRoRroFjYhYsRp20KxSeW5aJ01F7VGsSLFgi8yZo3BFuH5z3Q1-foDY5zZCGASGSQVtgG4wk75euUqDZgRevaQees2C7SA4281vDJ9Xw1E1Wyc/s400/lorawanfw4.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
Make your own SMD male headers from right-angle breakway strips. </div>
<br />
<br />
<h3>
<u>Software and Usage</u></h3>
<br />
These are the pin connections from the RN module to the Feather. On all three of these Feather variants, call "<b>Serial1</b>" to talk to the module instead of "<b>Serial</b>" in the Arduino IDE. The default baud rate is 57600. Drive Reset HIGH to enable the module.<br />
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh35LNVLFfNR95JSOuQrSZxoDjRWC1irypUGa_ekVO36YiWd6hr8Cdm6UNbegKmFfEa2apIUvJ1mlbwWDRy3cIotYfzJYBfkz9kcaG9adEZpgQQkB-yZajdbxqBCmABUUn9HqDno9NKiT0/s1600/lorawanfw_pinout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh35LNVLFfNR95JSOuQrSZxoDjRWC1irypUGa_ekVO36YiWd6hr8Cdm6UNbegKmFfEa2apIUvJ1mlbwWDRy3cIotYfzJYBfkz9kcaG9adEZpgQQkB-yZajdbxqBCmABUUn9HqDno9NKiT0/s400/lorawanfw_pinout.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Pin connections for Feather M0, 32U4 and WICED.</div>
<br />
Here are some good software examples available on the Internet for using this module:<br />
<ul>
<li><a href="https://www.disk91.com/2015/technology/networks/first-step-in-lora-land-microchip-rn2483-test/" target="_blank">Great blog post</a> on using the RN2483/2903 in Peer-to-Peer mode. This is useful for testing your boards and learning about the command interface to the modules.</li>
<li><a href="http://forum.thethingsnetwork.org/t/how-to-build-your-first-ttn-node-arduino-rn2483/1574" target="_blank">Write-up</a> on taking the next step into LoRaWAN and making a TTN node. The software is <a href="https://github.com/jpmeijers/ttnmapperarduino" target="_blank">shared on Github</a>.</li>
<li>This is the <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/40001784B.pdf" target="_blank">Command Reference</a> for the RN modules. Definitely download a copy of this. </li>
</ul>
Finally, the status LED on the LoRaWAN FeatherWing is connected to a GPIO pin on the RN module, not the Feather. If you can make it blink with your program, that is great confirmation that the module is operational and talking to the Feather. The command is "<b>sys set pindig GPIO10 1</b>" to turn it on and "<b>sys set pindig GPIO10 0</b>" to turn it off.<br />
<br />
<h3>
<u>Conclusion</u></h3>
<br />
This was a long post for a simple board! I hope you find this little FeatherWing useful. If you have any questions or feedback please post in the comments below. Finally, if you make your own LoRaWAN FeatherWing definitely tweet me a picture <b><span style="color: blue;">@sync_channel</span></b>.<br />
<br />
Thanks for reading!<br />
<br />
- Dan W.</div>
Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com12tag:blogger.com,1999:blog-3663197147714037001.post-70341252377692325612016-06-21T17:48:00.001-07:002016-06-21T17:51:33.237-07:00Eagle Custom Parts LibraryI've created a new Eagle custom parts library for the projects I post on this blog. Though I upload the design files for individual Open-Source projects, you might like to re-use some of the parts in your own projects with a standalone, documented library. I have several parts to bring over, clean up, and comment, so it will be growing quite a bit over the next few weeks.<br />
<br />
You can check it out on Github here:<br />
<span style="font-size: large;"><a href="https://github.com/SyncChannel/DesignFiles" target="_blank"><br /></a></span>
<span style="font-size: large;"><a href="https://github.com/SyncChannel/DesignFiles" target="_blank">Sync Channel Blog Design Files on Github</a></span><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNNJGIf2vDOkH1weO-wHEbLVEqm3gZeUyAu9qZGO14Yxx2o5vcDCmm3kSsFWl6u-UKlDs3gdvXz2XeV7LqNht3lbmILHYAbl027Z2WmrGNRJi6EuNVD5UWOVgznfJd7jBBjIaQ-vebUN8/s1600/newlibrary.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="326" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNNJGIf2vDOkH1weO-wHEbLVEqm3gZeUyAu9qZGO14Yxx2o5vcDCmm3kSsFWl6u-UKlDs3gdvXz2XeV7LqNht3lbmILHYAbl027Z2WmrGNRJi6EuNVD5UWOVgznfJd7jBBjIaQ-vebUN8/s400/newlibrary.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Ready-to-use Eagle footprints. </div>
<br />
I will include Digikey part numbers where possible. I will only add parts to this library that I have personally tested using the <a href="https://oshpark.com/" target="_blank">OSH Park</a> PCB service. I may also add other random things to this repo in the future. Note that I have released everything in it under the Creative Commons Zero license. Therefore, you do not have to attribute to use these in your own projects. OSHW licensing can be confusing at times, so at least you don't have to worry about this library.<br />
<br />
Thanks for reading!<br />
<br />
- Dan W.Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com1tag:blogger.com,1999:blog-3663197147714037001.post-15371192710808771632016-06-19T17:38:00.002-07:002016-06-19T18:10:13.426-07:00Designing a Mains Frequency Monitor, Part 2This is the second in a series of posts about designing a mains frequency monitor using the <a href="http://www.microchip.com/wwwproducts/en/PIC16F1619" target="_blank">Microchip PIC 16F1619</a> microcontroller. In this post we will take a look at the first revision of the board that I designed for the project and some of the features that it adds.<br />
<br />
Be sure to read <a href="http://syncchannel.blogspot.com/2016/05/designing-mains-frequency-monitor-part-1.html" target="_blank">Part 1</a> of the project write-up if you haven't done so already.<br />
<br />
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9cUR6KimCl-8q38JLcvezaxqYZ7xCIDTVUQR3KYs5oDxbtiSoARoJhEKkq-e5uQREQcAD1xQvp4D6A58__uMeLLB5D0s752Ag6KIQMDQ7Cd5SyNmQH42Tl3aZ7DB_V1wC-EL1PjmswWI/s1600/mainsfreqmon_brd1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9cUR6KimCl-8q38JLcvezaxqYZ7xCIDTVUQR3KYs5oDxbtiSoARoJhEKkq-e5uQREQcAD1xQvp4D6A58__uMeLLB5D0s752Ag6KIQMDQ7Cd5SyNmQH42Tl3aZ7DB_V1wC-EL1PjmswWI/s400/mainsfreqmon_brd1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
First revision of the Mains Frequency Monitor board.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3 class="separator" style="clear: both; text-align: left;">
<u>PCB Progress</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I designed a PCB for this project a couple of weeks ago, and recently received the boards back from OSHPark. I think it turned out great! The board houses the microcontroller and 20MHz TCXO that we discussed in Part 1. For the power supply I opted for a Recom DC-DC converter to generate 5V from the rectified input from a 12V AC wall adapter. There is a programming port (PicKit3 compatible) for programming the microcontroller as well as a header to hook up the LCD.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I also added an opto-isolated terminal port that is compatible with common Serial-to-USB adapters such as the <a href="https://www.adafruit.com/product/284" target="_blank">FTDI Friend</a>, <a href="https://www.sparkfun.com/products/9716" target="_blank">FTDI Basic Breakout</a>, and all of the various clones available online. This is nice for capturing data in a log file and then analyzing it in a program such as <a href="http://www.ke5fx.com/timelab/readme.htm" target="_blank">TimeLab</a>.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The PIC 16F1619 only has one USART, but I wanted to use the same serial LCD display I have been working with throughout the prototyping phase. I also needed the USART for the terminal interface. To get around this I added a SPDT analog switch (<a href="http://www.ti.com/product/SN74LVC1G3157" target="_blank">74LVC1G3157</a>) to allow sharing of the USART with both ports. The serial LCD only needs the Tx line, so the Rx line from the USART connects directly to the terminal port.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVaq4e5dtmA6Zdh9RwX50PqkZrp-9gaOw3rQxPrp2JlI-IStihEdM6Vn1sAUBkYaIEEqI_d20xapKVb3KnEIDFTQciALGrTGP-9uRf7moDZDssfRfXhyphenhyphenV1tzwVrqKRnZ_SFAn5Md_3_c8/s1600/mainsfreqmon_brd2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVaq4e5dtmA6Zdh9RwX50PqkZrp-9gaOw3rQxPrp2JlI-IStihEdM6Vn1sAUBkYaIEEqI_d20xapKVb3KnEIDFTQciALGrTGP-9uRf7moDZDssfRfXhyphenhyphenV1tzwVrqKRnZ_SFAn5Md_3_c8/s400/mainsfreqmon_brd2.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
The Mains Frequency Monitor has three ports: programming, Serial LCD,</div>
<div class="separator" style="clear: both; text-align: center;">
and an opto-isolated terminal port for data logging.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Here's a short video showing two of the boards in operation:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/sQPAgXIqZtE/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/sQPAgXIqZtE?feature=player_embedded" width="320"></iframe></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3 class="separator" style="clear: both; text-align: left;">
<u>Performance</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
With assembled PCBs to test, I have been able to collect some data. Here is a frequency difference plot in TimeLab for a 12 hour run:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yNTtfMLPxvSoIcnM13A-l3Qjd9JUI1FU_ej4wEtU58aWvb1JAFiP1Or4Lz2bwdU5G678u0towPdx1cW9pCBY7pJKvKIsFHSGLZF3Vg9bo0NcfRIq8x9ftkNd6l3DCrcOyc01ar8qtZE/s1600/mainsfreqmon_freqplot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6yNTtfMLPxvSoIcnM13A-l3Qjd9JUI1FU_ej4wEtU58aWvb1JAFiP1Or4Lz2bwdU5G678u0towPdx1cW9pCBY7pJKvKIsFHSGLZF3Vg9bo0NcfRIq8x9ftkNd6l3DCrcOyc01ar8qtZE/s400/mainsfreqmon_freqplot.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Mains Frequency, 12 Hour Run, Frequency Difference</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
And here is the ADEV plot for the same run:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh192_lyTY_HN_GHTrg0TmnMIUxPgoJIERYYUHiBe9VtMqC5zMVjeqWhUpM3pSDgXEEsybyGdlPr4780QLC8rRPd51mUcm9tyi9vuxoXrDhOw25F6Y8H3oPodv-AASwhEHLnS137L4qhI0/s1600/mainsfreqmon_adevplot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh192_lyTY_HN_GHTrg0TmnMIUxPgoJIERYYUHiBe9VtMqC5zMVjeqWhUpM3pSDgXEEsybyGdlPr4780QLC8rRPd51mUcm9tyi9vuxoXrDhOw25F6Y8H3oPodv-AASwhEHLnS137L4qhI0/s400/mainsfreqmon_adevplot.png" width="400" /></a></div>
<div style="text-align: center;">
Mains Frequency, 12 Hour Run, ADEV</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Much longer runs will be required in the future. Also, I plan to rig up a test with the board and a proper frequency counter measuring the same signal to allow for a good assessment of the board's performance. I've done some informal comparisons with a calibrated counter and I'm very confident in the accuracy of the readings from the board.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3 class="separator" style="clear: both; text-align: left;">
<u>Design Files</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I plan to wait until the project is finished before creating a project link on OSHPark, publishing the BOM, etc. Rev A of the board is working out well, but it might still be necessary to make some changes. Don't worry, everything will be shared and documented fully in Part 3 when we wrap up. For now, the design files are available in the <a href="https://github.com/SyncChannel/MainsFrequencyMonitor" target="_blank">GitHub repo</a> if you would like to check them out. I have also updated the firmware version in the repo.</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
Here's the schematic of Revision A:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPWQNCZYAJPTm1Dh1U0QWfuvdlm_V2kSJWdMWl_WQGhSIcgc_EEiF2xZnVds5Hz-QWfShj2jM8jniyKIfVu8e9rh6meXaWcwb91AiHCkW3tAPp2e-Paoaki2LQE_FtAzZX2Vp8Vlq2lW4/s1600/mainsfreqmon_RevA_sch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPWQNCZYAJPTm1Dh1U0QWfuvdlm_V2kSJWdMWl_WQGhSIcgc_EEiF2xZnVds5Hz-QWfShj2jM8jniyKIfVu8e9rh6meXaWcwb91AiHCkW3tAPp2e-Paoaki2LQE_FtAzZX2Vp8Vlq2lW4/s400/mainsfreqmon_RevA_sch.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Mains Frequency Monitor Revision A Schematic</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2iV5T5LM1qT6zT9ANhYuWoW5i3cDj5289PrxQN5xZ88fU3j6eU-n3qSxC7XAtnrjXmK1mMa0jOwrNmcFnaN7RG5JiAV0UK5SRTFPD4wRU00EZoGoVh9tvcSZZFju0CM4sxfEG5wsfEzk/s1600/mainsfreqmon_RevA_layout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2iV5T5LM1qT6zT9ANhYuWoW5i3cDj5289PrxQN5xZ88fU3j6eU-n3qSxC7XAtnrjXmK1mMa0jOwrNmcFnaN7RG5JiAV0UK5SRTFPD4wRU00EZoGoVh9tvcSZZFju0CM4sxfEG5wsfEzk/s400/mainsfreqmon_RevA_layout.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Mains Frequency Monitor Revision A Layout </div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvqpl9rS4aKlry1fm2IpLBtsiv0vMymIQl6yiXScrAS90YD5vM3sBWd9vDWu92mYzK-CX5ILQp0yPnVfFLXUEyIBcF0g2v-ZiRJuYX2C8uD1iZQzravWRUl_aQT3wutF-5l2qjgLUl38w/s1600/mainsfreqmon_brd3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="325" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvqpl9rS4aKlry1fm2IpLBtsiv0vMymIQl6yiXScrAS90YD5vM3sBWd9vDWu92mYzK-CX5ILQp0yPnVfFLXUEyIBcF0g2v-ZiRJuYX2C8uD1iZQzravWRUl_aQT3wutF-5l2qjgLUl38w/s400/mainsfreqmon_brd3.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Measuring frequencies is fun for the whole family!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3 class="separator" style="clear: both; text-align: left;">
<u>Conclusion</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
That's it for Part 2! I had hoped to make more progress on the firmware in this post, but the hardware took most of my time. I'm very happy with how the board turned out however. In Part 3, we will work on the code, sort out the clock functionality, and get the project finished up.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Please post any comments, suggestions, and feedback below.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Thanks for reading!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
- Dan W.</div>
Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com4tag:blogger.com,1999:blog-3663197147714037001.post-80869704151385461832016-06-04T18:06:00.000-07:002016-06-06T19:59:08.201-07:00Cherry MX KeypadIn this post I will document an open-source, Arduino-compatible Cherry MX keypad that I designed using the <a href="http://www.atmel.com/devices/atmega32u4.aspx" target="_blank">ATmega32U4</a> microcontroller.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-kfqCmmpjwO0g6hcz__eJA0UBAmRx_eGon_Zy2JhVTN2bap6w0EA6xZkFCMYmc1hCZwLZifpSYp2F3Au4IE-MAfxabmb6hF42OwybbH3GsRXbQj2ioa1KzTricTFp_xNm18s9VrwgYLo/s1600/CherryMXkeypad1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="271" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-kfqCmmpjwO0g6hcz__eJA0UBAmRx_eGon_Zy2JhVTN2bap6w0EA6xZkFCMYmc1hCZwLZifpSYp2F3Au4IE-MAfxabmb6hF42OwybbH3GsRXbQj2ioa1KzTricTFp_xNm18s9VrwgYLo/s400/CherryMXkeypad1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
A highly customizable Cherry MX keypad.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3 class="separator" style="clear: both; text-align: left;">
<u>Introduction</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
You have probably heard of <a href="http://cherryamericas.com/product/mx-series/" target="_blank">Cherry MX keys</a> in relation to gaming keyboards. They are very nice keys with excellent tactile feel. They are also extremely durable and rated for 50 million keystrokes. Products that use them are often top-tier and pricey, but come with cool features like multi-colored backlighting and re-programmable keys. Many people customize their keyboards by changing the key caps to have custom labels and colors. But why stop there? Let's design our own Cherry MX keypad from scratch!</div>
<br />
<h3>
<u>Board Overview</u></h3>
<br />
The board that I designed includes four Cherry MX keys. I used MX Blues, but it is also compatible with other types such as Brown and Red. It's simply a matter of soldering on the ones you want. The keys are backlit by 3mm LEDs that sit in recesses in the sides of the keys. They are controlled via PWM to allow changing the brightness. The microcontroller running the show is an Atmel ATmega32U4. This is the same microcontroller used on the Arduino Leonardo. In fact, this board looks like a Leonardo to the <a href="https://www.arduino.cc/en/Main/Software" target="_blank">Arduino IDE</a> for programming. There is an ISP port for burning the bootloader with a programmer (Atmel ICE, USBtinyISP, etc), but you only need to do that once. Afterwards simply connect the board to your computer using the Micro USB connector for programming and normal usage.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx8grA8ebI657bsC4IHXsD2nxgh8HuBpLD59zMUeYWUtQDrANwW1tf8dDPnquN9TvTdrW3fUairls3x1H4UKy7o99txHDrePGetuLw5UOfY7jJSnAatIBLd6_pOg0QjuI_ejRZSawR7EU/s1600/CherryMXkeypad2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx8grA8ebI657bsC4IHXsD2nxgh8HuBpLD59zMUeYWUtQDrANwW1tf8dDPnquN9TvTdrW3fUairls3x1H4UKy7o99txHDrePGetuLw5UOfY7jJSnAatIBLd6_pOg0QjuI_ejRZSawR7EU/s400/CherryMXkeypad2.jpg" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
The lovely ATmega32U4. Adding USB to the project with this chip couldn't be simpler.</div>
<div style="text-align: center;">
<br /></div>
<br />
The left side of the board with the microcontroller is a good example of a minimal setup for the 32U4. Despite the small number of components, we still have a good 16MHz crystal, reverse polarity protection on the 5V USB line, and the necessary bypass capacitors. If you modify this board to add more keys, you can bring over most of this layout as-is.<br />
<br />
<h3>
<u>Usage</u></h3>
<br />
Using this board is super easy. After flashing the Leonardo bootloader, you can upload the example program on Github over USB from the Arduino IDE. You'll see from the example sketch that the code is simple and easy to modify. After uploading a program, the board immediately re-mounts as a USB input device. Pressing the keys sends the characters you have programmed to the computer just as if it were a keyboard or mouse. You could also program in character strings and complex combinations of key presses, mouse clicks, and delays. See <a href="https://www.arduino.cc/en/Reference/MouseKeyboard" target="_blank">this reference on the Arduino page</a> to learn about all of the keyboard and mouse commands that you can use to program your own key functions.<br />
<br />
Check out my YouTube video on the Cherry MX keypad to see it in action:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/R4jIW6F3w1U/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/R4jIW6F3w1U?feature=player_embedded" width="320"></iframe></div>
<div style="text-align: center;">
<br /></div>
<h3>
<u>Customization</u></h3>
<br />
Not only is the programming of the keypad entirely customizable, the hardware is as well. This is shared as an open-source project. You can use the Eagle files as a template to make your own numeric keypad or even a full keyboard! Adding Cherry MX keys to your project really steps it up a level, especially if you create or 3D print a nice enclosure to mount them in. Remember that these keys are not just about tactile feel. They are extremely durable, and you can purchase or make your own custom keycaps to add the finishing touches to your project's interface.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNK6RBzUbzRCT0QbgdderNy7i24uwu-8jEIrpuC4dyxhyPnInsVil7d_LB5Z5JOypnNlv7ryPAj97JOyCH1urT_vNwyjeH0ZdPGa8i1S9as3XZA_ZpV0ZAP8j-yBCB8srTL44gztnIrdQ/s1600/CherryMXkeypad3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNK6RBzUbzRCT0QbgdderNy7i24uwu-8jEIrpuC4dyxhyPnInsVil7d_LB5Z5JOypnNlv7ryPAj97JOyCH1urT_vNwyjeH0ZdPGa8i1S9as3XZA_ZpV0ZAP8j-yBCB8srTL44gztnIrdQ/s400/CherryMXkeypad3.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Using Cherry MX keys in this project gives us access to all of the awesome</div>
<div class="separator" style="clear: both; text-align: center;">
custom keycaps available. These metal arrow keys look and feel great.</div>
<div style="text-align: center;">
<br /></div>
<br />
I used the internal pull-ups on the 32U4 for the key switch circuits, and debouncing is done in software. There is plenty of space around the keys on the board for adding hardware debouncing if you like.<br />
<br />
With only four keys on the board, I was able to connect each one to an individual pin of the microcontroller. However, if you make a large board with several keys, this will not be possible. You will need to switch over to <a href="https://www.arduino.cc/en/Tutorial/RowColumnScanning" target="_blank">row-and-column scanning</a> to be able to handle something like a full keyboard. There are also some interesting things you could do with the backlighting. You could put the LEDs on a parallel charlieplexed grid, allowing you to turn on individual ones. This would be useful for key press indication, making games like Simon Says, and adding cool lighting effects.<br />
<br />
<h3>
<u>Shared as Open Source Hardware (OSHW)</u></h3>
<br />
Here's the information you need to assemble your own Cherry MX keypads using the PCB I designed or design your own.<br />
<br />
Eagle Files and Example Program: <a href="https://github.com/SyncChannel/CherryMX_Keypad" target="_blank">Shared on Github</a><br />
Cherry MX Keypad: <a href="https://oshpark.com/shared_projects/qWrTz3ym" target="_blank">Order PCBs on OSHPark!</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRDTziX67vUU9KbhpuDB_-FJJlntC6U33OC_ggx5MrPRTCswMHqkz6f4W433wPQiMC7QoDk8OtzfAp-cTbBY2M09z1nyQobWRiKE0FJCRb1Pu8JXAT1rEnH0cMAoSyCw4NOi5fb8jgg-A/s1600/CherryMX1_sch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRDTziX67vUU9KbhpuDB_-FJJlntC6U33OC_ggx5MrPRTCswMHqkz6f4W433wPQiMC7QoDk8OtzfAp-cTbBY2M09z1nyQobWRiKE0FJCRb1Pu8JXAT1rEnH0cMAoSyCw4NOi5fb8jgg-A/s400/CherryMX1_sch.png" width="388" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Cherry MX Keypad Schematic</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTJPakK-en1mi-d53L4mHEZ3TNJjqArtex3cGBudrPRN0I88VnL6KBAEnuncypzwcVgQ2mcfNaWlZxfUNtSnRGbrR06Y782zdlGUAacxiv5mcN7IInC6eJhb5bz349k93QOrwuFImZXpk/s1600/CherryMX1_brd.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="96" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTJPakK-en1mi-d53L4mHEZ3TNJjqArtex3cGBudrPRN0I88VnL6KBAEnuncypzwcVgQ2mcfNaWlZxfUNtSnRGbrR06Y782zdlGUAacxiv5mcN7IInC6eJhb5bz349k93QOrwuFImZXpk/s400/CherryMX1_brd.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Cherry MX Keypad Layout</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h4 class="separator" style="clear: both; text-align: left;">
<u>Parts List:</u></h4>
<h4 class="separator" style="clear: both; text-align: left;">
</h4>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Microcontroller:</b> <a href="http://www.digikey.com/product-detail/en/atmel/ATMEGA32U4-AUR/ATMEGA32U4-AURCT-ND/3440960" target="_blank">Atmel Atmega32U4 TQFP</a></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Keys:</b> 4x (<a href="http://www.digikey.com/product-detail/en/cherry-americas-llc/MX1A-E1NW/CH197-ND/20180" target="_blank">MX Blue Digikey</a>) (<a href="https://www.sparkfun.com/products/13834" target="_blank">MX Blue Sparkfun</a>) (<a href="http://www.digikey.com/product-detail/en/cherry-americas-llc/MX1A-11NW/CH160-ND/91134" target="_blank">MX Black Digikey</a>)</div>
<div class="separator" style="clear: both; text-align: left;">
<b>LEDs: </b>4x <a href="http://www.digikey.com/product-search/en/optoelectronics/led-indication-discrete/524729?k=67-1060-nd" target="_blank">3mm Green</a> (or substitute with LEDs that have the same compact dimensions)</div>
<div class="separator" style="clear: both; text-align: left;">
<b>USB Connector: </b><a href="http://www.digikey.com/short/3zt578" target="_blank">FCI 10103594-0001LF</a><b><br /></b></div>
<div class="separator" style="clear: both; text-align: left;">
<b>D1: </b><a href="http://www.digikey.com/product-detail/en/stmicroelectronics/BAT20JFILM/497-3381-1-ND/669138" target="_blank">BAT20J</a> or similar schottky diode, SOD-323 package</div>
<div class="separator" style="clear: both; text-align: left;">
<b>Q1: </b><a href="http://www.digikey.com/product-detail/en/on-semiconductor/MMBT2222ALT1G/MMBT2222ALT1GOSCT-ND/1139806" target="_blank">MMBT2222A NPN transistor, SOT-23</a> or similar NPN with same footprint</div>
<div class="separator" style="clear: both; text-align: left;">
<b>Y1: </b>16MHz, 5x3.2mm 4-lead SMD crystal<b> </b></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Programming Header:</b> Standard AVR ISP 2x3 0.1" header (no need to actually solder it)</div>
<div class="separator" style="clear: both; text-align: left;">
<b>C1:</b> 4.7uF 0603 SMD</div>
<div class="separator" style="clear: both; text-align: left;">
<b>C2: </b>100nF 0603 SMD</div>
<div class="separator" style="clear: both; text-align: left;">
<b>C3: </b>1uF 0603 SMD</div>
<div class="separator" style="clear: both; text-align: left;">
<b>C4, C5: </b>22pF 0603 SMD (or adjust value based on crystal load capacitance)</div>
<div class="separator" style="clear: both; text-align: left;">
<b>R1:</b> 10k 0603 SMD</div>
<div class="separator" style="clear: both; text-align: left;">
<b>R2, R3: </b>20 ohm or 22 ohm 0603 SMD</div>
<div class="separator" style="clear: both; text-align: left;">
<b>R4, R5, R6, R7:</b> 330 ohm 0603</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Notes:</b> Be sure to get the "PCB Mount" version of the Cherry MX keys, such as the part numbers shown in the links above. They have the necessary "fixation pins" for stability on the board. The 3mm LED needs to have a very small rim and short height to seat fully into the side of the MX key body. Any substitute needs to have similar dimensions to the part number linked above or it may protrude above the key body and interfere with the keycap.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Soldering Note:</b> Be sure to examine the pictures, footprints, and part dimensions to ensure you can successfully assemble this board. I did use hot air for the crystal and USB connector. They can be done with an iron, but hot air and solder paste is more reliable.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<h3>
<u>Wrap Up</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I hope you find this project interesting. As I said, it is really just a template for designing your own Cherry MX keypad. You can modify it to make it easier to solder, expand the board to include many more keys, or customize it to your intended enclosure. Tweet me a picture <span style="color: blue;"><b>@sync_channel</b></span> if you make some of these boards or design your own custom Cherry MX keypad. I'd love to see it!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Also let me know what you thought of the YouTube video. I have wanted to add video content to my articles for some time, and this is a first attempt at it. I have nothing close to a proper setup for making videos, so I apologize for the poor quality. Perhaps in the future I will invest in some better lighting and equipment to improve my videos. This written blog will always be my primary means of sharing my projects however.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Thanks for reading!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
- Dan W.</div>
Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com6tag:blogger.com,1999:blog-3663197147714037001.post-10026767061922328572016-05-16T21:08:00.000-07:002016-06-19T20:50:17.333-07:00Designing a Mains Frequency Monitor, Part 1This is the first in a series of posts about designing a mains frequency monitor using the <a href="http://www.microchip.com/wwwproducts/en/PIC16F1619" target="_blank">Microchip PIC 16F1619</a> microcontroller. Today we will talk about the features of this device that make it a good choice for such a project. We will also start to piece together our circuit, program, and test a prototype on the breadboard.<br />
<br />
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf43aBWcCeEab2naB09Cve3wekS6D7S3ugZmE_q4Zh1MRFe9foEU9AZbtekLe300Y1x8xOk8EAE8JSKX3bDYglyAkOdKkUWOIork_qdig5LJNa-2lYHfp-UosUIf1bbOfEji4PG_bxnqc/s1600/mainsfreqmon1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf43aBWcCeEab2naB09Cve3wekS6D7S3ugZmE_q4Zh1MRFe9foEU9AZbtekLe300Y1x8xOk8EAE8JSKX3bDYglyAkOdKkUWOIork_qdig5LJNa-2lYHfp-UosUIf1bbOfEji4PG_bxnqc/s400/mainsfreqmon1.jpg" width="400" /></a></div>
</div>
<div style="text-align: center;">
Prototype of a mains frequency monitor using the PIC 16F1619.</div>
<br />
<h3>
<u>Introduction</u></h3>
<br />
Many people assume that the mains frequency is exactly 50/60Hz, but in fact that is rarely true. Accuracy and stability of the mains frequency is an interesting topic to research. No two points on the grid will have exactly the same characteristics, so collecting data at your location can reveal some interesting findings. This is especially true if you have (or are interested in building) a mains-referenced clock. There are many industrial applications as well for such a project.<br />
<br />
Numerous circuits and methods have been published for monitoring the mains frequency. Recently, I came across the PIC 16F1619 microcontroller and thought it would be a great device to design my own solution around. It is a very inexpensive chip that comes in a DIP package, making it breadboard-friendly for prototyping. This PIC has an interesting set of features including a Zero Crossing Detector (ZCD), a Signal Measurement Timer (SMT), and an Angular Timer. It also includes several 16-bit timers, configurable logic cells, a PID math accelerator, a hardware USART, and lots more. Check out the <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/40001770C.pdf" target="_blank">datasheet</a> for this device to learn more.<br />
<br />
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguASSOZhndetLbDhRlYZfrpRhtkYsvd3c78XhFxx4WDb99iSiPXt-5f_ZrpbCbhdYeeS3wUIW3cOwZkEmVHrYVrhYNzU7VetesZnc2814xU2Kqri4ZcS7UQzzVc0Wmxn4vYCiAt_KcoCg/s1600/16F1619pinout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguASSOZhndetLbDhRlYZfrpRhtkYsvd3c78XhFxx4WDb99iSiPXt-5f_ZrpbCbhdYeeS3wUIW3cOwZkEmVHrYVrhYNzU7VetesZnc2814xU2Kqri4ZcS7UQzzVc0Wmxn4vYCiAt_KcoCg/s320/16F1619pinout.png" width="320" /></a></div>
</div>
<div style="text-align: center;">
Pinout of the 16F1619 in a 20-pin PDIP/SOIC/SSOP package.</div>
<div style="text-align: center;">
Source: <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/40001770C.pdf" target="_blank">PIC16(L)F1615/19 datasheet</a>.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<h3>
<u>Zero Crossing Detector</u></h3>
</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The first peripheral we will examine in more detail is the ZCD. It allows the detection of both the positive- and negative-going zero crossings of the input signal. Additionally, the output of the ZCD can be used as an input to another peripheral such as the SMT for gating and windowing. Externally, it requires only a single series resistor to limit the current into the module. Additional pull-up and pull-down resistors can be added to correct the offset on the comparator reference voltage or intentionally set an offset from true 0V. Check out this <a href="http://ww1.microchip.com/downloads/en/AppNotes/90003138A.pdf" target="_blank">Technical Brief</a> to learn more about the capabilities and setup of the module.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQy2pPYX91q9_e9fEkNt13iUUCyzKDunNXRzE1qwBm4tWMd3F1_y4qDY9RlQsAo0zxbaylKeuwplmxytueS-tJDZ44FUtzP-RZFS1UhAlG8IKNLAVu9TLY5LzLwbZV4UlLoRoma6ogRNE/s1600/zcdtechbrief1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQy2pPYX91q9_e9fEkNt13iUUCyzKDunNXRzE1qwBm4tWMd3F1_y4qDY9RlQsAo0zxbaylKeuwplmxytueS-tJDZ44FUtzP-RZFS1UhAlG8IKNLAVu9TLY5LzLwbZV4UlLoRoma6ogRNE/s400/zcdtechbrief1.png" width="400" /></a></div>
</div>
<div style="text-align: center;">
Block diagram of the ZCD module.</div>
<div style="text-align: center;">
Source: <a href="http://ww1.microchip.com/downloads/en/AppNotes/90003138A.pdf" target="_blank">ZCD Technical Brief</a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkVqB0Nsb7kOf7f_lriXo4P-mwfREevpOYRsiu4_xuw03VVKhQOoPTIWiqZQUHBIERNmxMckZBlxmU7fcls8htQSVVZiCQql-TX4mT-vVhvA8CyngLt2YRtpBFB7YLWAyYXnAv1QxYRHQ/s1600/zcdwaveforms.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkVqB0Nsb7kOf7f_lriXo4P-mwfREevpOYRsiu4_xuw03VVKhQOoPTIWiqZQUHBIERNmxMckZBlxmU7fcls8htQSVVZiCQql-TX4mT-vVhvA8CyngLt2YRtpBFB7YLWAyYXnAv1QxYRHQ/s400/zcdwaveforms.png" width="400" /></a></div>
</div>
<div style="text-align: center;">
Scope capture of an AC input signal (blue) and ZCD output signal (yellow).</div>
<div style="text-align: center;">
The output is also accessible in an internal register for triggering other peripherals.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<h3>
<u>Signal Measurement Timer</u></h3>
</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The SMT is a flexible 24-bit timer with many options for clocking, windowing, and gating. Check out the <a href="http://ww1.microchip.com/downloads/en/AppNotes/90003129A.pdf" target="_blank">Technical Brief</a> to learn more about it. We can use it to measure the relatively long cycles of the mains signal at full system clock speed and still not overrun the timer. Combined with the ZCD it gives us a means for measuring the mains frequency to a suitable level of precision. With the core functionality needed for our project handled by integrated peripherals, we save our code space for processing the data and feeding it out to another device for monitoring and logging. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWbhNLoj_D8lsaOn1Ki9jrJd9G31PjcdUxCGZ9DzUqYG6QpxPdMuTZJrVeEML8_nAbgUFP4tXCVd1eJOxl9-HQ3uwFKDrWj_xMTcZjOqroJjksUjM_gWp5FRZxYHVz4yqyjhXs05CBafY/s1600/smtbrief1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="257" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWbhNLoj_D8lsaOn1Ki9jrJd9G31PjcdUxCGZ9DzUqYG6QpxPdMuTZJrVeEML8_nAbgUFP4tXCVd1eJOxl9-HQ3uwFKDrWj_xMTcZjOqroJjksUjM_gWp5FRZxYHVz4yqyjhXs05CBafY/s400/smtbrief1.png" width="400" /></a></div>
</div>
<div style="text-align: center;">
Block diagram of the SMT module.</div>
<div style="text-align: center;">
Source: <a href="http://ww1.microchip.com/downloads/en/AppNotes/90003129A.pdf" target="_blank">SMT Technical Brief</a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<h3>
<u>Angular Timer</u></h3>
</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Another really cool peripheral in the 16F1619 is the Angular Timer. It locks onto the input signal and allows the instantaneous phase angle to be determined at any point during the cycle. It can also be used for missed pulse detection. This peripheral relies on several registers and configuration bits, but once set up it is easy to use. You simply read out the value of the phase clock during a cycle to calculate the angle. This peripheral has many potential uses for mains applications and motor control. Microchip has a <a href="http://www.microchip.com/design-centers/8-bit/peripherals/core-independent/angular-timer-angtmr" target="_blank">webpage</a> on it with more information, documentation, and a video.<br />
<br />
<h3>
<u>Designing the Circuit and Firmware</u></h3>
<br />
With the above three peripherals in mind, I started working on my circuit design for the project and building a prototype on the breadboard. I added a <a href="http://syncchannel.blogspot.com/2016/05/quick-pcb-tcxo-breakout.html" target="_blank">20MHz TCXO</a> to generate a stable, accurate clock for the microcontroller and timers. For the mains input, I used a 12V AC wall adapter. This goes into a half-wave rectifier and then a voltage regulator to generate VDD. The mains signal to be measured is tapped off before the rectifier, bringing it into the ZCD with a common ground reference. I might explore upgrading to a center-tapped full-wave rectifier in the future.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Below is a partial schematic for the circuit thus far.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFymTp7RZ5C2kX_3a_who9S54dDNcoH7hoMDb54rWGWzolzCMilokU-HnpXTSDXrcfRgsGXialj5knv1IRo4sm4eLXINKe5vS3u7dd19GAKCcWUkoDZnZgPPKzosvjVIuWq6kPBxfblNI/s1600/mainfreqmonitorsch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFymTp7RZ5C2kX_3a_who9S54dDNcoH7hoMDb54rWGWzolzCMilokU-HnpXTSDXrcfRgsGXialj5knv1IRo4sm4eLXINKe5vS3u7dd19GAKCcWUkoDZnZgPPKzosvjVIuWq6kPBxfblNI/s400/mainfreqmonitorsch.png" width="342" /></a></div>
<div style="text-align: center;">
The beginnings of a mains frequency monitor circuit.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
The firmware came together quickly in MPLAB X IDE. I set up the various peripherals and put the SMT into Windowed Measure mode. The window is triggered by the internal ZCD output bit. When a positive-going zero crossing is detected, the SMT beginning counting at the full 20MHz system clock speed. At the end of the cycle the count is latched into a register and then stored. Once measurements for 60 cycles are accumulated, the average frequency during the second is calculated and printed via USART to an LCD display.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I didn't actually need the Angular Timer in my project, but it's such a cool peripheral I wanted to find some way to include it. I decided to use it to verify that the negative-going zero crossing occurs at the correct phase angle. That angle is of course 180 degrees (assuming a symmetric waveform). The ZCD generates an interrupt at the zero crossing and the program checks the count in the phase timer. If the phase angle is not correct, an error flag is set. Currently I just use this to set a status LED, but there is a lot more that could be done with it. In the future I might use it to detect erroneous measurements and automatically remove them before they get ingested into my data.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
This hardware and firmware setup also gives us the basis for a mains-referenced clock, where the time is incremented every 60 cycles. That doesn't actually provide very good timekeeping (over short intervals) due to the instability/innacuracy of the mains frequency. For now it's an interesting addition to the project though. We will revisit this later and implement a much better solution for our clock.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The prototype on the breadboard works well, and you can see a picture of it at the top of this article. My initial testing against proper frequency counters shows that the design so far meets my expectations.</div>
</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<h3 style="text-align: left;">
<u>Lots More To Do</u></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The project is coming along well, but we have a lot more to do before it is done. In Part 2, we will finish the firmware, finalize the schematic, and design a PCB for it. We will also need to do a lot of testing to verify the performance of the counter.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I have uploaded the program in its current state to a <a href="https://github.com/SyncChannel/MainsFrequencyMonitor" target="_blank">new Github repo</a>. Please check it out if you are interested in seeing what the code looks like. This repo will also house the PCB design files and other documentation in the future.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
If you have feedback and suggestions on this project, please post them in the comments below. A post on Part 2 of the project will be coming in a couple of weeks.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Thanks for reading!</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
- Dan W.</div>
</div>
Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com2tag:blogger.com,1999:blog-3663197147714037001.post-56182735350399954562016-05-14T19:41:00.000-07:002016-05-15T05:59:41.825-07:00Quick PCB: TCXO BreakoutI'm back with another Quick PCB. This one is a little breadboard-compatible breakout board for inexpensive temperature-compensated crystal oscillator (TCXO) modules commonly found on eBay.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH9nXCvxbUaP9pyeWykXaMcleX1mcwON1UMrTwSV-bs6hF_TlKXnsqUFPej87mKUyVzquWo1upVo0CUCjbiyc_giZxrqNNtzXosUwCBLKud0I2GNsEHdW5wGMgiFHKeLW1xtVuK5hrPao/s1600/tcxobrk1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH9nXCvxbUaP9pyeWykXaMcleX1mcwON1UMrTwSV-bs6hF_TlKXnsqUFPej87mKUyVzquWo1upVo0CUCjbiyc_giZxrqNNtzXosUwCBLKud0I2GNsEHdW5wGMgiFHKeLW1xtVuK5hrPao/s400/tcxobrk1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Need a TCXO frequency reference for your breadboard project?</div>
<div style="text-align: center;">
This might be a good option for you.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3 class="separator" style="clear: both; text-align: left;">
<u>Introduction</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
There are some good, inexpensive TCXO modules on eBay that come in the slightly unusual package shown above. This breakout board allows you to mount one of the modules onto the small PCB and adapt it to standard 0.1" breadboard-compatible headers. I have also included a few optional SMD components. There are spots for a power LED, a bypass capacitor on the supply rail, and a capacitor on the control voltage input.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Some of these modules don't actually have a control voltage input on pin #1. Typically they have a small trimmer on top for adjusting the frequency, which is probably more useful for how these are commonly used. If you have access to a disciplined frequency reference such as a GPSDO, you should allow the module to warm up for 24 hours and then trim the frequency.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I have tested this board with two such TCXO modules from eBay. One is a <a href="http://www.ebay.com/itm/RALTRON-RTX0230LC-20-000MHz-TCXO-Oscillator-NEW-10-PKG-/191557977524" target="_blank">20MHz Raltron unit</a> that is quite useful for microcontroller projects. You could also use a D flip-flop to divide it to 10MHz. The other is a <a href="http://www.ebay.com/itm/RAKON-14-4MHz-VCTCXO-VTX0525-14-4MHz-5V-New-Qty-2-/160443714587" target="_blank">14.4MHz Rakon unit</a>. Other modules in the same package will work. I honestly don't know what the package is called, so if YOU do please let me know in the comments below.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3 class="separator" style="clear: both; text-align: left;">
<u>Assemble Your Own</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Eagle Files: <a href="https://github.com/SyncChannel/QuickPCBs" target="_blank">Shared on Github</a></div>
<div class="separator" style="clear: both; text-align: left;">
TCXO Breakout Board: <a href="https://oshpark.com/shared_projects/SxmEadRk" target="_blank">Order PCBs on OSHPark!</a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw9mKM53YHh7pHyDFhghHYNinaYtHJB2fnM49aQi4Xkvv2gBH7CdgYSV1xJlTB_YIGHQeQSlPZOTeVecM1xyFnigySmFNK5JsBYkIGkMoXzGsUnTMLiHq4WUFcH1SVdSJDy9i4Cs1Ylcw/s1600/tcxobrk1_sch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="183" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw9mKM53YHh7pHyDFhghHYNinaYtHJB2fnM49aQi4Xkvv2gBH7CdgYSV1xJlTB_YIGHQeQSlPZOTeVecM1xyFnigySmFNK5JsBYkIGkMoXzGsUnTMLiHq4WUFcH1SVdSJDy9i4Cs1Ylcw/s400/tcxobrk1_sch.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
TCXO Breakout Board Schematic</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0RxTZf-Evirn0-B3pa1YbTQfKGrvb-9Q38ThVwVVDvmQIPEnC6vz1uEk7mqYbrYv1srnf3Ep4D4UmQLRFziQ8W7M1Jk0589En72ecvRlK2g6D7rpqbNEW0p4rGOLx1sML8RzdSQNjt1k/s1600/tcxobrk1_pcb.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0RxTZf-Evirn0-B3pa1YbTQfKGrvb-9Q38ThVwVVDvmQIPEnC6vz1uEk7mqYbrYv1srnf3Ep4D4UmQLRFziQ8W7M1Jk0589En72ecvRlK2g6D7rpqbNEW0p4rGOLx1sML8RzdSQNjt1k/s400/tcxobrk1_pcb.png" width="301" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
TCXO Breakout Board Layout</div>
<div class="separator" style="clear: both; text-align: center;">
Sharp-eyed readers will note this has been updated from the boards shown above.</div>
<div class="separator" style="clear: both; text-align: center;">
The circuit is the same but the layout is much cleaner.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h4 class="separator" style="clear: both; text-align: left;">
<u>Parts List:</u></h4>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>TCXO Module:</b> Raltron RTX0230LC, Rakon VTX0525-14.4MHz, or similar</div>
<div class="separator" style="clear: both; text-align: left;">
<b>C1:</b> 100nF 0603 SMD</div>
<div class="separator" style="clear: both; text-align: left;">
<b>C2:</b> 10nF 0603 SMD (Only necessary if your module has VFC on pin #1)</div>
<div class="separator" style="clear: both; text-align: left;">
<b>R1: </b>1k 0603 SMD (or adjust value to change brightness of LED)</div>
<div class="separator" style="clear: both; text-align: left;">
<b>PWR LED:</b> 0805 SMD (color of your choice)</div>
<div class="separator" style="clear: both; text-align: left;">
<b>Headers:</b> Four 2x1 0.1" standard male headers (snap off from breakaway strips)</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Note:</b> The outer-most pins on each header are not connected to anything. They are just there for stability on the breadboard.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3 class="separator" style="clear: both; text-align: left;">
</h3>
<h3 class="separator" style="clear: both; text-align: left;">
<u>Sine to Square Wave?</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Many of these modules output a relatively weak sine wave. However, you probably need a logic-level square wave for your project. You can use the circuit shown below to convert the sine wave output to a square wave. Note that you may need to adjust the resistor divider values based on the output signal of your module and the inverter you use. The peak-to-peak output from the TCXO needs to extend past the High and Low logic thresholds of the inverter to successfully trigger it. The divider also adjusts the duty cycle of the output.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Use a schmitt inverter chip with TTL-compatible inputs. I use 74LVC chips exclusively for my projects. 74ACT is another good series. If you want to be <i>really </i>old school, find those 74Fs in the junk box.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh6mcpw_klBNUtEXds21ts4Eyx9-6ZQh9MoDd7XTVOFI4PiePKf_WElEDsmuUTOjstkvw5mgIYeMTDTsodHpbnagC0l8HyjRCYth6BY_L-tpYdRem6-nx-8iIJ0qeLanNp2FznvyM-PEk/s1600/tcxobrk1_sinetosquare.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="247" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh6mcpw_klBNUtEXds21ts4Eyx9-6ZQh9MoDd7XTVOFI4PiePKf_WElEDsmuUTOjstkvw5mgIYeMTDTsodHpbnagC0l8HyjRCYth6BY_L-tpYdRem6-nx-8iIJ0qeLanNp2FznvyM-PEk/s400/tcxobrk1_sinetosquare.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
A typical circuit for converting a sine wave signal to a logic-level square wave. </div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3 class="separator" style="clear: both; text-align: center;">
</h3>
<h3 class="separator" style="clear: both; text-align: left;">
<u>Wrap Up</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I hope this little breakout board is useful to you! Tweet me a pic <span style="color: blue;"><b>@sync_channel</b></span> if you build one into a project.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Thanks for reading!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
- Dan W. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com2tag:blogger.com,1999:blog-3663197147714037001.post-49484367349498447132016-05-02T06:43:00.000-07:002016-05-02T06:43:40.980-07:00Learning Embedded Electronics with the ATtiny104 XNANOIn this post I will document a small add-on board that I designed for the Atmel ATtiny104 Xplained NANO. I have also created a series of lessons that use the ATtiny104 XNANO with the add-on board to provide a basic introduction to embedded electronics and programming.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0Jywv1kcvFCA2r9awglLoay4JvkjfurIj_lU6i-UIKCInOfMhsN42RqQPCGC21lk36lJYzdXOE1xHntlbm2ZbCa1e6bF5WmahKQKmW8ulHFKgtL5EH_-J_rhQjFDVzy-90J-44q8uSTo/s1600/DSC_0319.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="273" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0Jywv1kcvFCA2r9awglLoay4JvkjfurIj_lU6i-UIKCInOfMhsN42RqQPCGC21lk36lJYzdXOE1xHntlbm2ZbCa1e6bF5WmahKQKmW8ulHFKgtL5EH_-J_rhQjFDVzy-90J-44q8uSTo/s400/DSC_0319.JPG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
The ATTiny104 XNANO next to the small add-on board I designed to</div>
<div class="separator" style="clear: both; text-align: center;">
enable a series of lessons on embedded development.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3>
<u>Introduction</u></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
In a <a href="http://syncchannel.blogspot.com/2016/03/checking-out-new-atmel-attiny102104.html" target="_blank">previous post</a> I examined the new ATtiny104 microcontroller from Atmel and checked out their evaluation board for it, the ATtiny104 Xplained NANO. I was very impressed by this little board. It has a programmer/debugger built in, allowing it to integrate seamlessly with Atmel Studio 7. You simply connect it to your computer with a USB cable to power the board, develop programs and connect to the USART. It is a great bargain at less than $5 USD.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
It is not only suitable for evaluating the ATtiny104 but also for learning and teaching embedded electronics and programming. Certainly there are numerous Arduino and Arduino-like boards available for that task as well. This is just one more option that might be interesting if you need a very low-cost board that integrates with Atmel Studio for programming in standard C.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I designed a small add-on board for the ATtiny104 XNANO that includes a 5mm LED, a trimpot, and a photoresistor. The LED goes to one of the PWM-capable pins on the microcontroller, and the outputs of the trimpot and photoresistor circuit can be read using the ADC. These components combined with the on-board push button and LED allow for many lessons and projects to be completed. It's a very small and low-cost combo for learning or teaching embedded development.</div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjregj9Zc6bofvK-O7XhH0DyncTFNgw4uNh6RSkhexJFSOannz3U-v4bjErO7BqZpMaQN6R1x3AZzo0uRuqwChWT4H2VHKjQWA3Q_aWgwwyrTWWJLmEdvQqnXtJ22MN3WOZWmYfFqo4MD8/s1600/DSC_0324.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjregj9Zc6bofvK-O7XhH0DyncTFNgw4uNh6RSkhexJFSOannz3U-v4bjErO7BqZpMaQN6R1x3AZzo0uRuqwChWT4H2VHKjQWA3Q_aWgwwyrTWWJLmEdvQqnXtJ22MN3WOZWmYfFqo4MD8/s400/DSC_0324.JPG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
The add-on board connected to the ATtiny104 Xplained Nano.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3>
<u>Lessons</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
To support the use of the add-on board, I have created a 28-page guide with eight lessons on basic embedded programming. The lessons walk you through using various features of the microcontroller and add-on board, including: digital inputs and outputs, the ADC, PWM output, USART, and interrupts. They are designed for someone that knows a little about electronics and programming, probably with an Arduino, and wants to get a feel for programming in Atmel Studio in standard C.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB4jpFzUQ1vODLsC7wzKXeva6EAc9p-o_9hIuNc8t4RhaeYodXTJEpo04lzuC3CIW0NwpXDvcroudmijlcIn8-AEB3K_OgMsOrdGCqSfxmYEHMBYXSdvZgUWgKYiG3uyfY8FUs8amTXso/s1600/guide.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB4jpFzUQ1vODLsC7wzKXeva6EAc9p-o_9hIuNc8t4RhaeYodXTJEpo04lzuC3CIW0NwpXDvcroudmijlcIn8-AEB3K_OgMsOrdGCqSfxmYEHMBYXSdvZgUWgKYiG3uyfY8FUs8amTXso/s400/guide.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://github.com/SyncChannel/ATtiny104XNANO_AddOn" target="_blank">The guide to support the add-on board</a> includes eight lessons on basic embedded development.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3>
<u>Add-On Board Kits</u></h3>
<div>
<br /></div>
<div>
The add-on board makes for a very nice first soldering kit. The PCB is cheap ($6 USD for three copies from OSHPark) and the parts are very common, through-hole components. You probably already have all of this stuff on hand. The part outlines and resistor values are shown in the silk screen of the board so you don't even need to consult a schematic while assembling it.</div>
<div>
<br /></div>
<div>
ATtiny104 Xplained NANO boards can be acquired from distributors such as <a href="http://www.digikey.com/product-detail/en/atmel/ATTINY104-XNANO/ATTINY104-XNANO-ND/5940517" target="_blank">Digikey</a> and <a href="http://www.mouser.com/search/ProductDetail.aspx?R=0virtualkey0virtualkeyATTINY104-XNANO" target="_blank">Mouser</a>. The PCBs can be ordered from <a href="https://oshpark.com/shared_projects/AR0rxCyz" target="_blank">OSHPark</a>. Finally, the parts can be ordered from an online vendor such as <a href="https://www.sparkfun.com/" target="_blank">Sparkfun</a>. </div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIvGdN0jtmvW_b0zhNhVad3pd4rA5Sdqs5JXs02NISGGzKPmODF6g0hIQ-BNfJsEwjXxzAnerJTJeoESIoyMmcVIz686EhVoHdfChoD5C3WTghOD1NxFicc2ytPnRKXmPEiYiwqVSMmd4/s1600/DSC_0327.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIvGdN0jtmvW_b0zhNhVad3pd4rA5Sdqs5JXs02NISGGzKPmODF6g0hIQ-BNfJsEwjXxzAnerJTJeoESIoyMmcVIz686EhVoHdfChoD5C3WTghOD1NxFicc2ytPnRKXmPEiYiwqVSMmd4/s400/DSC_0327.JPG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Lesson #1 in the guide is soldering together your add-on board kit!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3>
<u>Motivation</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Let me say now that this is not a Kickstarter or anything like that. I'm not planning to sell these kits or make any money off of the guide. The add-on board is Open Source Hardware, and the guide is released under the <i>Creative Commons Attribution-Share Alike 3.0 license</i>. I hope that the board and guide are useful for learning a little bit about programming microcontrollers and embedded design, whether that is for an individual reading this blog or someone that might use the board for a workshop or class. Feel free to modify and redistribute the guide to suit your needs, as long as you attribute and share it back to the community under the same license. I have also shared the Eagle files for the add-on board if you'd like to customize it.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://github.com/SyncChannel/ATtiny104XNANO_AddOn" target="_blank">Check out the guide</a> to learn more about the lessons and what you can do with this add-on board.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3>
<u>Shared as Open Source Hardware (OSHW)</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
ATtiny104 Xplained NANO Add-On Board: <a href="https://oshpark.com/shared_projects/AR0rxCyz" target="_blank">Order PCBs on OSHpark</a>!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Eagle Files and Lesson Guide: <a href="https://github.com/SyncChannel/ATtiny104XNANO_AddOn" target="_blank">Shared on Github</a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj3_neI_2BHAdmz5IOSxxGZULXX5eQU-p1tQYJSop3O2bS0HHVN22xXSahAFPpU4VR4CTRu54ayuYklymYVVJSev4551vd0-lET-G5y2qUgoRhKcN9lZaeCpJUKcmu8r7DseaThw_uK3s/s1600/ATtiny104XNANO_addon_sch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj3_neI_2BHAdmz5IOSxxGZULXX5eQU-p1tQYJSop3O2bS0HHVN22xXSahAFPpU4VR4CTRu54ayuYklymYVVJSev4551vd0-lET-G5y2qUgoRhKcN9lZaeCpJUKcmu8r7DseaThw_uK3s/s400/ATtiny104XNANO_addon_sch.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Schematic for the ATtiny104 XNANO Add-On Board</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<u>Parts list:</u></div>
<div class="separator" style="clear: both;">
</div>
<ul>
<li><a href="https://www.sparkfun.com/products/9806" target="_blank">10kΩ trimpot with knob</a></li>
<li><a href="https://www.sparkfun.com/products/9088" target="_blank">Small photoresistor (5mm width)</a></li>
<li>5mm LED (color of your choice)</li>
<li>470Ω resistor, 1/4 watt, 5%</li>
<li>10kΩ resistor, 1/4 watt, 5%</li>
<li>(2) 12-pin 0.1” female headers (snap off from a strip of breakaway headers)</li>
<li>(2) 12-pin 0.1" male headers for the XNANO board</li>
</ul>
<div>
<b><br /></b></div>
<div>
<b>Note</b>: There are no component IDs in the silkscreen, but the outlines and resistor values are shown to clearly indicate where the parts go.<br />
<br />
<b>Headers on XNANO</b>: I have noticed that one of the capacitors on the ATtiny104 XNANO board is a little too close to the header pins. Male headers might not seat all the way flush against the board. Luckily there is an easy fix. Use a file to slightly round the bottom corner of the header where it hits the capacitor. Just a few swipes with the file will allow it to seat fully. Also, I used male headers on the XNANO board and female headers for the add-on board, but you can reverse that if you like.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3SWmPQqOMyxpbc490sXTmUA1OS14fv_If_PEozo0Mq8RMnXJYHNSAmdLKTdv6v1YlFLPPvwu_ZJpDa8x4dpBTbG-6oFxplY5iZk4KikCN4sIFUXVbK0avAWdhGzlx-Tb4uldgbnULRds/s1600/DSC_0329.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="273" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3SWmPQqOMyxpbc490sXTmUA1OS14fv_If_PEozo0Mq8RMnXJYHNSAmdLKTdv6v1YlFLPPvwu_ZJpDa8x4dpBTbG-6oFxplY5iZk4KikCN4sIFUXVbK0avAWdhGzlx-Tb4uldgbnULRds/s400/DSC_0329.JPG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
After you finish the lessons and remove the add-on board, many additional</div>
<div class="separator" style="clear: both; text-align: center;">
projects can be completed with the ATtiny104 XNANO.</div>
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3>
<u>Wrap Up</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I hope that you find this small add-on board for the ATtiny104 XNANO and the lesson guide useful. If you assemble one and work through the lessons, or use them in a class or workshop, please let me know. Also, please post any questions and comments down below.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Thanks for reading!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
- Dan W.</div>
<div style="text-align: left;">
<br /></div>
<br />Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com8tag:blogger.com,1999:blog-3663197147714037001.post-32379933401337545182016-04-30T08:44:00.000-07:002016-04-30T08:49:50.052-07:0010MHz OCXO Teardown (NDK ENE3311A)Here we go with another OCXO teardown. This time we are taking apart an NDK ENE3311A 10MHz OCXO. This is a little 1" square unit with a square wave output. You can find them on eBay for about $15 USD.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4TFdSMgxFW9uuw_iDIg2O0j8H_5E0R5otPmDSO1zjQtdKTEhmPtxD6dxTm5CH_pAvGLuG6W5qAzcNrMBSvEpwLBNFPDegce5rpRvZ5b9IBv0mLBoT-QFBddSu9N-xmdOKt8bxcSTJSxA/s1600/NDKENE3311A_teardown1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="278" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4TFdSMgxFW9uuw_iDIg2O0j8H_5E0R5otPmDSO1zjQtdKTEhmPtxD6dxTm5CH_pAvGLuG6W5qAzcNrMBSvEpwLBNFPDegce5rpRvZ5b9IBv0mLBoT-QFBddSu9N-xmdOKt8bxcSTJSxA/s400/NDKENE3311A_teardown1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
I have a bunch of these on hand, so I don't mind sacrificing one</div>
<div class="separator" style="clear: both; text-align: center;">
to learn more about the internal construction.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhw1185ePliA12znAL5S8ZCtgXRIqv5H9q0_yG79GWGTsDhjsdEBsZNGnhFxn6Zqv9b_R9ohuBxq31Sp3GsQYz7oho0nUayQ1CtcXVTYcyJcEvbEK176OkbMMx2DckZWmoIcH6_7Jixsk/s1600/NDKENE3311A_teardown2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="292" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhw1185ePliA12znAL5S8ZCtgXRIqv5H9q0_yG79GWGTsDhjsdEBsZNGnhFxn6Zqv9b_R9ohuBxq31Sp3GsQYz7oho0nUayQ1CtcXVTYcyJcEvbEK176OkbMMx2DckZWmoIcH6_7Jixsk/s400/NDKENE3311A_teardown2.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
I cut around the bottom of the can with a dremel.</div>
<div class="separator" style="clear: both; text-align: center;">
It eventually came off with little drama.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ91dnPGf9oc3C7ATehSMTKVH8ajjv7UucDneJ5zsvzaWXK_HQ6bbowLqpKwHm6TN8V-7qnFqXPkHj_FOIlgfqP5k5xSF99KvvG_z8vVb2WbhzNJXzh3QtBhepthm8EH7qldtqOZOOU8U/s1600/NDKENE3311A_teardown3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="275" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ91dnPGf9oc3C7ATehSMTKVH8ajjv7UucDneJ5zsvzaWXK_HQ6bbowLqpKwHm6TN8V-7qnFqXPkHj_FOIlgfqP5k5xSF99KvvG_z8vVb2WbhzNJXzh3QtBhepthm8EH7qldtqOZOOU8U/s400/NDKENE3311A_teardown3.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Not a lot going on inside this unit, eh? Just like in the <a href="http://syncchannel.blogspot.com/2016/02/10mhz-ocxo-teardown-cts-1960017.html" target="_blank">CTS OCXO</a>,</div>
<div class="separator" style="clear: both; text-align: center;">
the oscillator circuit is on the top of the PCB, and the crystal is</div>
<div class="separator" style="clear: both; text-align: center;">
bonded to the bottom side.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_biqpFkuBINxIVe-1a2jlUI6ifZjB-0bUex3qJbueLHFEXF9Y3QuOUSF0-zPyLaKXCrMnfE3oibVkQeN7lqVNvJI0v9bRslxHBrXWl3Sz3X3ZyLwZ1vXyTKmA344bB2IrmA4DG_VJ-wg/s1600/NDKENE3311A_teardown4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_biqpFkuBINxIVe-1a2jlUI6ifZjB-0bUex3qJbueLHFEXF9Y3QuOUSF0-zPyLaKXCrMnfE3oibVkQeN7lqVNvJI0v9bRslxHBrXWl3Sz3X3ZyLwZ1vXyTKmA344bB2IrmA4DG_VJ-wg/s400/NDKENE3311A_teardown4.jpg" width="383" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Close-up view of the top of the PCB, along with annotations of the pinout.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgduEPlchwX_Fj_C5KjUqH2YK39TK1xKLH0nQ7DRj-JAXyhejJxRjt781Y0XxlD_JMyeYK7c0OVkrwIIX7NNtFZ2YGn_jy-WjFYztIFQp1Eif_tUDGENJAhpMWamibyz48rIcsx67mrHGQ/s1600/NDKENE3311A_teardown5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgduEPlchwX_Fj_C5KjUqH2YK39TK1xKLH0nQ7DRj-JAXyhejJxRjt781Y0XxlD_JMyeYK7c0OVkrwIIX7NNtFZ2YGn_jy-WjFYztIFQp1Eif_tUDGENJAhpMWamibyz48rIcsx67mrHGQ/s400/NDKENE3311A_teardown5.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
I cut the pins and flipped the board over. Ok! This side is much more interesting.</div>
<div class="separator" style="clear: both; text-align: center;">
The little IC in the upper right is the output buffer. One of the SOT-23s on the</div>
<div class="separator" style="clear: both; text-align: center;">
left is a voltage regulator. The remaining IC is probably an opamp.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijQh26-0EEFc-c74K5JFf40harmaoTLeBzSfPjVfIz9-Iw109NrLkmpMwJT0k2n-cZC43K-J-Qn5RjNpKBRjcC0e7xIumW6bYiTebGV1Kr2Q3pO1haT1JAvncqXk1h4mThEzRx1cIzZlk/s1600/NDKENE3311A_teardown6.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="287" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijQh26-0EEFc-c74K5JFf40harmaoTLeBzSfPjVfIz9-Iw109NrLkmpMwJT0k2n-cZC43K-J-Qn5RjNpKBRjcC0e7xIumW6bYiTebGV1Kr2Q3pO1haT1JAvncqXk1h4mThEzRx1cIzZlk/s400/NDKENE3311A_teardown6.JPG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
There's a thermal pad and some white goop bonding the crystal to the heater elements.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ4F3v8MwEzFhzXf0XUAkGlrB62N-ntoRvJaY9BXVEMZbpXPpom8aqsyZ9rKUlD7NNmXhTXoNY3btWiRYsRxtlJouwcEH6gzjm_FX7qH9y5t4iBcIlPvk8YMlCGHjeiWpn-9-Ijb5y1Js/s1600/NDKENE3311A_teardown7.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="353" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ4F3v8MwEzFhzXf0XUAkGlrB62N-ntoRvJaY9BXVEMZbpXPpom8aqsyZ9rKUlD7NNmXhTXoNY3btWiRYsRxtlJouwcEH6gzjm_FX7qH9y5t4iBcIlPvk8YMlCGHjeiWpn-9-Ijb5y1Js/s400/NDKENE3311A_teardown7.JPG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
I scraped away most of the thermal compound and lifted up the crystal.</div>
<div class="separator" style="clear: both; text-align: center;">
We have two power devices and two resistors acting as heaters, just as expected.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
That's all for this teardown! I might reverse-engineer the schematic for this one as I did with the <a href="http://syncchannel.blogspot.com/2016/03/schematic-of-cts-1960017-10mhz-ocxo.html" target="_blank">CTS 1960017 OCXO</a>. However, it's pretty easy to see what is going on inside this unit. Besides getting exact part values and device IDs, there is probably not a lot to be gained. What are your thoughts on the internal construction of the NDK ENE3311A OCXO?</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Thanks for reading!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
- Dan W.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com0tag:blogger.com,1999:blog-3663197147714037001.post-91143629964587385682016-04-16T11:39:00.000-07:002016-04-16T11:39:27.402-07:00Frequency Counter OCXO Upgrade on The Signal PathShahriar of <a href="http://thesignalpath.com/blogs/" target="_blank">The Signal Path Blog</a> posted a YouTube video a few months ago about a <a href="https://www.youtube.com/watch?v=JiO3OoMfwXQ" target="_blank">Fluke PM6680B frequency counter</a> that he has in his lab. He performed a successful repair on the counter in that episode and got it fully operational. The unit was equipped with the stock XO timebase, however, that did not provide the necessary stability for a counter of that resolution.<br />
<br />
I sent him one of my <a href="http://syncchannel.blogspot.com/2016/04/flukephilips-pm66xx-frequency-counter.html" target="_blank">PM66xx OCXO upgrade boards</a> for his unit. Check out his video where he installs and tests the board in his counter.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/-cNOL7OwjAU/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/-cNOL7OwjAU?feature=player_embedded" width="320"></iframe></div>
<br />
This upgrade board is shared as open source hardware. If you have a compatible counter and would like to make your own, check out my write-up <a href="http://syncchannel.blogspot.com/2016/04/flukephilips-pm66xx-frequency-counter.html" target="_blank">here</a>.<br />
<br />
- Dan W.Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com1tag:blogger.com,1999:blog-3663197147714037001.post-27197267445603569682016-04-13T11:35:00.001-07:002016-04-16T17:20:32.167-07:00Fluke/Philips PM66xx Frequency Counter OCXO UpgradeIn this post I will document an OCXO upgrade board I designed for the Fluke/Philips PM66xx line of frequency counters.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBgz83TmtZ3H1onOMRXLvZ6SUVsMHv5rM46EwrdFcoganSJi9_smgH8FAgPpZ5MOZHYynWAFEXBpRHofvY0Y90jE5lvwzbzAt8fUno0ePOXWEUzjQlpXB6ol2GL4tARdbTkWeTrpqlYOo/s1600/pm6674_upg_installed.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="263" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBgz83TmtZ3H1onOMRXLvZ6SUVsMHv5rM46EwrdFcoganSJi9_smgH8FAgPpZ5MOZHYynWAFEXBpRHofvY0Y90jE5lvwzbzAt8fUno0ePOXWEUzjQlpXB6ol2GL4tARdbTkWeTrpqlYOo/s400/pm6674_upg_installed.jpg" width="400" /></a></div>
<div style="text-align: center;">
Custom OCXO upgrade installed in my Philips PM6674.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<h3>
<u>Introduction</u></h3>
</div>
<div style="text-align: left;">
<br />
A few months ago I purchased a Philips PM6674 frequency counter on eBay. It's an older 9 digit counter with two channels that has a maximum input frequency of 550MHz. The design feels dated compared to more modern counters, such as my Agilent 53131A. However, it is still a fully functional piece of lab equipment with a simple user interface and compact design. I often prefer older counters for day-to-day use because I don't have to fuss with complicated menu-based interfaces and features that I don't need. (Set the gate time on a 53131A and count how many button presses it takes).</div>
<div style="text-align: left;">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCEuF4WKUT7rR5EJcoP87V3etKceEEaYNtvFML9LHgrYvCDwxf4ABz8CJ-pozxW1VWYnYMiMovPVbDZFmF7QV7b3HRDPqVbXiqBxw4ppAC3bo7w-NP0PjFArmGLdSegjs-phH-I5Z3y-s/s1600/pm6674_upgraded.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="183" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCEuF4WKUT7rR5EJcoP87V3etKceEEaYNtvFML9LHgrYvCDwxf4ABz8CJ-pozxW1VWYnYMiMovPVbDZFmF7QV7b3HRDPqVbXiqBxw4ppAC3bo7w-NP0PjFArmGLdSegjs-phH-I5Z3y-s/s400/pm6674_upgraded.jpg" width="400" /></a></div>
</div>
<div style="text-align: center;">
A nice old frequency counter: The Philips PM6674.<br />
<br />
<div style="text-align: left;">
My counter came with the standard XO timebase option, which has fairly poor specs for stability and drift. It is difficult to trim precisely with the single-turn trimmer capacitor on the board. For most testing in my lab I use an external reference from a GPSDO, but it is still nice to have an accurate timebase available in the counter if I need to take it somewhere and do testing away from the bench.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Previously I posted about an <a href="http://syncchannel.blogspot.com/2016/02/ocxo-upgrade-for-racal-dana-199x.html" target="_blank">OCXO upgrade I made for my Racal-Dana 1992</a>. The fun of designing a similar upgrade for the Philips counter was one of my motivations for purchasing it. My upgrade board is roughly equivalent to the original PM9691 OCXO module, and it should be compatible with any Fluke/Philips counter that is capable of using that option.</div>
</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<h3>
<u><br /></u></h3>
<h3>
<u>Designing an OCXO Upgrade</u></h3>
</div>
<div style="text-align: left;">
<br />
Creating a timebase upgrade board for the PM6674 was a bit more involved than the process for designing the Racal-Dana upgrade. That counter had a clean 5V supply available on the header where the timebase board connected, which was exactly what I needed for the OCXO. The header for the OCXO module in the Philips counter also has a 5V rail. However, that rail does not stay active when the counter is in standby. The original Philips OCXO modules operated from the 24V rail, and I had to use that for my own upgrade. In my counter, the "24V" rail actually runs at about 27V, and drifts up to 30V when the counter is in standby. There is also a substantial amount of ripple.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I opted for a <a href="http://www.recom-power.com/pdf/Innoline/R-78Cxx-1.0.pdf" target="_blank">Recom 78C5.0</a> DC-DC converter to get the 5V I needed to power my board. This is a nice little module with a pinout that mimics the 7805 linear regulator. It has good specs for efficiency (as high as 96%) and was very easy to implement on my board. I used a combination of electrolytic and ceramic capacitors on the input and output for filtering.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
With power taken care of, the remainder of the board is very simple. I used the CTS 10MHz OCXO that I did a <a href="http://syncchannel.blogspot.com/2016/02/10mhz-ocxo-teardown-cts-1960017.html" target="_blank">teardown</a> on and <a href="http://syncchannel.blogspot.com/2016/03/schematic-of-cts-1960017-10mhz-ocxo.html" target="_blank">reverse-engineered the schematic for.</a> This OCXO has a 4V reference available on one of the pins, so I did not need to add a separate reference IC to the design. Additionally, the CTS OCXO has a ~1.4Vpp sine wave output, which is quite compatible with the Philips counters. The input spec for the internal reference signal is 1Vpp into 1kohm.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr5v5DjuNJoU0Eyr_zVxG7fcMzEY7mi-HxKIEr9JEnuAmEgQE3Sm1KQX4wKi7MyXEDH5juQknrmrK8_D0Syg5sS3dyTwkYkQn2s9pHzkYbKhyphenhyphen9W5ZwsvGHA6t2zHAC_VuejW1wcOZCfUY/s1600/pm6674_ocxoupg_revb.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr5v5DjuNJoU0Eyr_zVxG7fcMzEY7mi-HxKIEr9JEnuAmEgQE3Sm1KQX4wKi7MyXEDH5juQknrmrK8_D0Syg5sS3dyTwkYkQn2s9pHzkYbKhyphenhyphen9W5ZwsvGHA6t2zHAC_VuejW1wcOZCfUY/s400/pm6674_ocxoupg_revb.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
My take on a modern replacement for the PM969x series of OCXO modules.</div>
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The form-factor of my upgrade board mimics the original OCXO module as closely as possible. I found the exact header I needed on Digikey for the mounting arrangement used in the Philips counter, and there is a single hole for a securing screw. The module mounts nicely in my counter and looks pretty snazzy. The performance of the CTS OCXO is sufficient for the 9-digit resolution of the counter. It warms up quickly and hugely improves the accuracy and usefulness of the counter when it is away from a proper 10MHz external reference.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkhHMpAWFPEzNJy1CTdrT4vMVr3p9A2nDYRIHB45dmgV0A7f2uS6R1xoWRmLpq4Mn1n7uWuwozIlyjtl5pg1xjv7BMyx92dHas9wfVqpcM0IHnLyyUU2gmsd2gUaZKGeKtxd_SzkW2M9U/s1600/CTS1960017_warmup.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkhHMpAWFPEzNJy1CTdrT4vMVr3p9A2nDYRIHB45dmgV0A7f2uS6R1xoWRmLpq4Mn1n7uWuwozIlyjtl5pg1xjv7BMyx92dHas9wfVqpcM0IHnLyyUU2gmsd2gUaZKGeKtxd_SzkW2M9U/s400/CTS1960017_warmup.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
The CTS OCXO warms up very quickly.</div>
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<h3>
<u>Shared as Open Source Hardware (OSHW)</u></h3>
</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Fluke/Philips PM66xx OCXO Upgrade: <a href="https://oshpark.com/shared_projects/CjBK4aat" target="_blank">Order PCBs on OSHPark</a>!</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Eagle Files: <a href="https://github.com/SyncChannel/Fluke-Philips-PM66xx-OCXO-Upgrade" target="_blank">Shared on Github</a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5iBBpBj9uBFXR4fisLgTnSz9QnPx6MVhioOSqT5jOeH7RBibJYdMh3ZE1YExXni3QeYsRUP3b7JXDLamVI3vbElX6lYiWSDUtUqqB57fopiEzIw7AdIzI3w1VON-g7QfKsDcnbwyngrQ/s1600/pm66xx_OCXOupg_sch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="284" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5iBBpBj9uBFXR4fisLgTnSz9QnPx6MVhioOSqT5jOeH7RBibJYdMh3ZE1YExXni3QeYsRUP3b7JXDLamVI3vbElX6lYiWSDUtUqqB57fopiEzIw7AdIzI3w1VON-g7QfKsDcnbwyngrQ/s320/pm66xx_OCXOupg_sch.png" width="320" /></a></div>
</div>
<div style="text-align: center;">
Schematic of the PM66xx OCXO upgrade board.<br />
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<u><b>Parts List</b></u><br />
<u><b><br /></b></u></div>
<div style="text-align: left;">
<b>OCXO:</b> CTS model 1960017 (available on eBay) or compatible substitute<br />
<b>DC-DC Converter: </b><a href="https://www.digikey.com/product-detail/en/recom-power/R-78C5.0-1.0/945-1395-5-ND/2652148" target="_blank">Recom 78C5.0-1.0</a><br />
<b>C1:</b> 100uF / 50V, 105*C rated electrolytic (8mm diameter)<br />
<b>C2: </b>2.2uF X7R 0805 50V rated ceramic<br />
<b>C3: </b>220uF / 35V, 105*C rated electrolytic (8mm diameter)<br />
<b>C4:</b> 10uF X5R 0805 25V rated ceramic<br />
<b>C5, C6: </b>100nF 0603 ceramic</div>
<div style="text-align: left;">
<b>R1: </b>51 ohm 1206<br />
<b>VR1:</b> <a href="https://www.digikey.com/product-detail/en/vishay-spectrol/M64Y103KB40/SP064Y-10K-ND/1287464" target="_blank">Vishay M64Y103KB40 10k 21 turn pot</a><br />
<b>Header: </b><a href="https://www.digikey.com/product-detail/en/molex-connector-corporation/22-14-2104/WM3108-ND/26535" target="_blank">Molex 22-14-2104</a><br />
<br />
<div style="text-align: center;">
<div class="separator" style="clear: both;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrWWP1gcAh6R2DAGhhx5iektuiQFJp9JPf6qbb7T5hJFkvoHqF8tCCAvFDksHyV08gVp1TrCP5nC5BFlbODFPVhY_cGVzxbTLKXgskCSt9KX91yUNGpm7RkmUZZR9BS4lBODkVUo0Brtg/s1600/pm6674_ocxoupg_revbback.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="278" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrWWP1gcAh6R2DAGhhx5iektuiQFJp9JPf6qbb7T5hJFkvoHqF8tCCAvFDksHyV08gVp1TrCP5nC5BFlbODFPVhY_cGVzxbTLKXgskCSt9KX91yUNGpm7RkmUZZR9BS4lBODkVUo0Brtg/s400/pm6674_ocxoupg_revbback.jpg" width="400" /></a></div>
</div>
<div style="text-align: center;">
The ceramic capacitors install on the bottom side of the board.<br />
<br />
<br />
<div style="text-align: left;">
<b><span style="color: #990000;">Installation Note:</span></b> On some counter models, such as the PM6674, you need to remove the stock 10MHz crystal when you install this board. I simply cut the two legs of the crystal from the top of the board and left it glued in place, as you can see in the first picture in this article. Other counter models such as the PM6680B have jumpers near the crystal to easily disconnect it and select the OCXO reference.<br />
<br />
<span style="color: #990000;"><b>12V/24V Rail:</b></span> Some frequency counters in the series, such as the Fluke PM6680B, have a 12V rail available for the OCXO instead of 24V. This upgrade board is still compatible with those models, as 12V is sufficient to operate the DC-DC converter.</div>
</div>
</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<h3>
<u>Rev A?</u></h3>
</div>
<div style="text-align: left;">
<br />
Sharp-eyed readers will note that this shared version of the board is Revision B. Well, that begs the question: what happened to Revision A? The original version of the board used a different OCXO, the 1" square NDK unit that I incorporated into my Racal-Dana upgrade. Due to the lack of a voltage reference on that OCXO, I had to incorporate an LM4140 into the design. The square wave output of that unit was also not ideal for the Philips counter. The whole design seemed needlessly complicated to me, especially when I knew I could make a more elegant solution based around the CTS OCXO.</div>
<div style="text-align: left;">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijljPEzYqyHbowBYxq04hDWqEqKiqkcQqd5TLc1PqxqrM61cogdi8WqnJJaweVOSizjUxDlLJ_sidVOeHakc_pXTtSI_qC6ayBrGLg5XenSflocIwC_H7E5QfEvpUd5l3vt8_EP3n8hos/s1600/pm6674_ocxoupg_reva.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijljPEzYqyHbowBYxq04hDWqEqKiqkcQqd5TLc1PqxqrM61cogdi8WqnJJaweVOSizjUxDlLJ_sidVOeHakc_pXTtSI_qC6ayBrGLg5XenSflocIwC_H7E5QfEvpUd5l3vt8_EP3n8hos/s400/pm6674_ocxoupg_reva.jpg" width="400" /></a></div>
</div>
<div style="text-align: center;">
Revision A of the PM66xx OCXO upgrade board. This one didn't make the cut.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<h3>
<u>Wrap Up</u></h3>
</div>
<div style="text-align: left;">
<br />
Please let me know if you assemble one of these boards for your counter! I have also provided the Eagle files, so you can modify the board if you like to use a different OCXO footprint. I have an entire case of the CTS OCXOs to use up, so expect some more shared projects that use them in the future.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Thanks for reading!</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
- Dan W.</div>
Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com5tag:blogger.com,1999:blog-3663197147714037001.post-72413029408282951352016-04-04T20:39:00.004-07:002016-04-04T20:39:46.655-07:00New "Lab" Equipment: Nikon D3300 DSLRI have needed a good camera for some time now. I've always been interested in photography and owned a couple of film SLRs back in the day, but never made the jump to a DSLR. The cameras in modern smartphones are so good, it's really easy to get by without a proper camera. As of today, however, I have some new equipment in hand to re-kindle an old hobby.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp1QrGXTXI81JKEnB5hwiNrlXB_6y0SdIb-W-mVz_W8vhZ7uTsM5PCXeDAHxAqGH8xgH8-yeYlXF1we460Dm5NI6lVX-7Ou5TUbCN2rScls1Lp25htNj3Xl4ONmIpJ_6v8q7X4LIduGUI/s1600/d3300dslr.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp1QrGXTXI81JKEnB5hwiNrlXB_6y0SdIb-W-mVz_W8vhZ7uTsM5PCXeDAHxAqGH8xgH8-yeYlXF1we460Dm5NI6lVX-7Ou5TUbCN2rScls1Lp25htNj3Xl4ONmIpJ_6v8q7X4LIduGUI/s400/d3300dslr.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
My new Nikon D3300 DSLR.</div>
<div class="separator" style="clear: both; text-align: center;">
Photo taken by an iPhone 6S (and heavily post-processed).</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Nearly all of the photos on this blog were taken by my iPhone. It has a decent camera, but taking pictures of small objects in indoor lighting can be challenging even with a good set of equipment. Two issues I constantly struggle with are underexposure and white balance. I have to heavily post-process the photos to make them presentable, and even then I can get some very strange color and noise artifacts. Lately I've just been blowing out the white background by cranking up the exposure, and then tweaking the temperature until it it looks "ok".</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
That all changes today! I am now the proud owner of a Nikon D3300. It is certainly an entry-level DSLR, but it has the features I need at a good price. I'm really looking forward to using it over the next few weeks and re-learning all the things I have forgotten about proper photography. The camera is also capable of recording video at 1080p/60fps. One of my plans for the blog is to launch a YouTube channel and start producing video content. This will be a starting point equipment-wise for getting that up and running.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I can't offer a lot of insight on the camera right now, but I did set up the tripod and take a couple of sample photos.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBMMOhgEuhXwUmIe2qThGie8CfZUwQVT-l50ssC9KpDJY4uxr9Gi-3-rYdA8cfmNYNwYJoqZLZynFLtVveFtl_PYfmGvlhsQVpk9hIrnJSaHYcAAkDicmf2zyJAHb3I6NAHNVpl_wYsEE/s1600/ce1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBMMOhgEuhXwUmIe2qThGie8CfZUwQVT-l50ssC9KpDJY4uxr9Gi-3-rYdA8cfmNYNwYJoqZLZynFLtVveFtl_PYfmGvlhsQVpk9hIrnJSaHYcAAkDicmf2zyJAHb3I6NAHNVpl_wYsEE/s400/ce1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
My Citizen Eco-Drive. Watches are very photogenic, aren't they?</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDltqlFEgV44p8oPK7iM4j-Oe3CR62S9qjfkgD8rT4WxxzLyPuvQvb_Gg-ZidDuDUwcvW3esHrQDF7TpQxiUIdN4bE0vg3fpWqi3hbgpAFWJUyIwPZhBkwRrHL2xYTJCbHe9iiZ0fc_fU/s1600/fcb1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDltqlFEgV44p8oPK7iM4j-Oe3CR62S9qjfkgD8rT4WxxzLyPuvQvb_Gg-ZidDuDUwcvW3esHrQDF7TpQxiUIdN4bE0vg3fpWqi3hbgpAFWJUyIwPZhBkwRrHL2xYTJCbHe9iiZ0fc_fU/s400/fcb1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
A lovely <a href="http://andybrown.me.uk/2016/02/21/nanocounter/" target="_blank">open-source frequency counter board</a> by Andy Brown.</div>
<div class="separator" style="clear: both; text-align: center;">
I need to do a post about this one in the future.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
What do you think of the above photos? Both would have been quite difficult to do with the iPhone. I certainly notice huge differences in the raw images but they may not come through in the uploads. I did have to do some post-processing, primarily because of the poor lighting I have available to me. I am planning to purchase a soft box to help with the lighting situation for taking pictures of my projects.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
That's all for now. Expect higher quality photos (and videos!) on the blog in the future.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Thanks for reading!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
- Dan W.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com2tag:blogger.com,1999:blog-3663197147714037001.post-70058626319805174572016-03-31T18:07:00.000-07:002016-03-31T18:08:16.692-07:00LoRa Products Coming from Adafruit!Over the past couple of months I've been working on bringing LoRa support to the Adafruit Feather line of microcontroller boards. I designed a small <a href="http://syncchannel.blogspot.com/2016/02/lora-featherwing-development-breakout.html" target="_blank">Development Breakout FeatherWing</a> for the HopeRF RFM95/96(W) module, as well as the <a href="http://syncchannel.blogspot.com/2016/03/lora-featherwing-iox-for-adafruit.html" target="_blank">LoRa FeatherWing IOX</a> that uses an I/O expander to drive the numerous pins of the RFM module over I2C.<br />
<br />
My boards are of course non-official FeatherWings that can be added as daughterboards to Feathers (similar to shields for Arduinos). Well, it looks like Adafruit has also been working on LoRa products! On a recent episode of their weekly <a href="https://www.youtube.com/watch?v=1RPvneVwqeQ&feature=youtu.be&t=2796" target="_blank">Ask An Engineer</a> web show, Ladyada gave a sneak peak of some boards she has in the works. One looks to be a Feather board with an RFM95W module directly on it. Another board is a breakout for the RFM module.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM8sdFeKMieoJADFL8O7f2bXJFM6OJD5GhZd_ztWt4opmEVj8PQ5zMYfc8YkaS33S-TrYq34GfdDtEDDBREJZaMsVPdFVFRXWGNUQQTlLozXISZeCzM7nfGaraPy0kDeWuiXCPfJGchE4/s1600/loraFeather.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="221" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM8sdFeKMieoJADFL8O7f2bXJFM6OJD5GhZd_ztWt4opmEVj8PQ5zMYfc8YkaS33S-TrYq34GfdDtEDDBREJZaMsVPdFVFRXWGNUQQTlLozXISZeCzM7nfGaraPy0kDeWuiXCPfJGchE4/s400/loraFeather.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Prototype of a new "Top Secret" LoRa Feather.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1kWkmm6dh-Src4zlEhyphenhyphenjJ8F_UXvhJS9KY81C3r4dD47fceazMEcKXw04qtwUZrARBqhrt3o-ggTtm6Pq35vooPt0IF_15WDahNoeZVSei76JRsVY_9LbWDVWbP9OtO8kIPs3s_wkilcQ/s1600/loraBreakout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="221" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1kWkmm6dh-Src4zlEhyphenhyphenjJ8F_UXvhJS9KY81C3r4dD47fceazMEcKXw04qtwUZrARBqhrt3o-ggTtm6Pq35vooPt0IF_15WDahNoeZVSei76JRsVY_9LbWDVWbP9OtO8kIPs3s_wkilcQ/s400/loraBreakout.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Breakout board for the RFM modules (yellow PCB) along with a tester and a live demo.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This is great news for the LoRa community. As official products, they will be sold in the store and no doubt come with excellent code support and tutorials. Additionally, it will help to integrate LoRa Feathers with other FeatherWings and eliminate the need for a daughterboard just for the module itself.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
There was no ETA given on the LoRa products, but with functional prototypes and testers already completed, we shouldn't have to wait long.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Thanks for reading!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
- Dan W.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com1tag:blogger.com,1999:blog-3663197147714037001.post-83278432054661266302016-03-20T17:52:00.005-07:002016-03-25T18:52:35.681-07:00Atmel SAM D09 Development BoardIn this post I will document a development board that I designed for the <a href="http://www.atmel.com/products/microcontrollers/arm/sam-d.aspx" target="_blank">Atmel SAM D09</a> microcontroller.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQt5x3bIAUAvi0CxdiISQx-I3eI1gcVdRXVlk8hnfZ8GTzlrooe55jb2uMHn4S1F2u5jcNdwChLRUNmlxn2A5rG320BdKopd18yRLiV5uglu43yayegc2hLaL8HVFhevHClVSeO-RqN_8/s1600/samd09brk1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="321" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQt5x3bIAUAvi0CxdiISQx-I3eI1gcVdRXVlk8hnfZ8GTzlrooe55jb2uMHn4S1F2u5jcNdwChLRUNmlxn2A5rG320BdKopd18yRLiV5uglu43yayegc2hLaL8HVFhevHClVSeO-RqN_8/s400/samd09brk1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
A fun little development board for the Atmel SAM D09.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3>
<u>Introduction</u></h3>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
The Atmel SAM D series of 32-bit microcontrollers includes several devices, each with a long list of features at great prices. Perhaps the best known of the series in the maker community is the SAM D21 due to its use on the <a href="https://www.arduino.cc/en/Main/ArduinoBoardZero" target="_blank">Arduino Zero</a>. However, there are several other devices in the product line that are worth taking a look at. The smallest of the bunch is the SAM D09 that comes in a 14-pin SOIC package. The 14SOIC package is one of my favorites. It is easy to solder, easy to break out on a PCB, and takes up little board space. I decided to order some SAM D09C chips and design a small development board in order to learn more about the capabilities of the device.</div>
<div class="separator" style="clear: both;">
<br /></div>
<h3>
<u>Atmel SAM D09C</u></h3>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
The SAM D09C in the 14-pin SOIC package is capable of running at 48 MHz, includes 8K of FLASH and 4K of SRAM, and has 12 GPIO pins with numerous peripherals. Despite the significant upgrades compared to similarly-sized 8-bit AVR microcontrollers, it is actually cheaper! For example, when purchased in single quantities the SAM D09C costs $1.15 USD, versus an ATtiny841 which is $1.67 USD. (Prices from Digikey, 3/20/2016). The ATtiny841 is one of my favorite AVR devices, and quickly replaced the use of the venerable ATtiny84A in my projects when it came out. However, this SAM D09C has me considering yet another update for my projects that need a 14-pin microcontroller. Once you are familiar with programming ARM Cortex-M devices, upgrading to feature-packed 32-bit microcontrollers makes sense for numerous reasons.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Let's take a look at the pinout and a table of features for the SAM D09.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqzqzSZaLUWJmziGJdgPOnIWYoo_JIXqrevY4B14u5m3qGGJxLjizeRDEtqLAelNVgGM5uMiVdJtZ54KLA2bMHnAd9h44oW6FQ4JnqUtZn-U6zF5GpguVTyaLZNsGD0b1yjP7h9EroS3A/s1600/samd09_pinout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqzqzSZaLUWJmziGJdgPOnIWYoo_JIXqrevY4B14u5m3qGGJxLjizeRDEtqLAelNVgGM5uMiVdJtZ54KLA2bMHnAd9h44oW6FQ4JnqUtZn-U6zF5GpguVTyaLZNsGD0b1yjP7h9EroS3A/s400/samd09_pinout.png" width="392" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Pinout for the Atmel SAM D09C (14SOIC).</div>
<div class="separator" style="clear: both; text-align: center;">
Source: <a href="http://www.atmel.com/Images/Atmel-42414-SAM-D09_Datasheet.pdf" target="_blank">SAM D09 Datasheet</a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjgCMu9CN3GJOn87TgUni_qRQTmOFETVsSS5a8fH35xx8wfep8dQdouySqD4CMJtXqxOQWNmI5Jegwed7VW1WwEFcWP2M9kevdBjriaAqb09gpOkQPVQ1DTtWo1qkWtNDjXTBfhen9ZgQ/s1600/samd09_features.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="386" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjgCMu9CN3GJOn87TgUni_qRQTmOFETVsSS5a8fH35xx8wfep8dQdouySqD4CMJtXqxOQWNmI5Jegwed7VW1WwEFcWP2M9kevdBjriaAqb09gpOkQPVQ1DTtWo1qkWtNDjXTBfhen9ZgQ/s400/samd09_features.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Features of the SAM D09 devices in SOIC and QFN packages.</div>
<div class="separator" style="clear: both; text-align: center;">
Source: <a href="http://www.atmel.com/Images/Atmel-42414-SAM-D09_Datasheet.pdf" target="_blank">SAM D09 Datasheet</a></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<h3>
<u>Development Board</u></h3>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
The development board that I designed for the SAM D09C makes it very easy to work with the device. The pins of the microcontroller are broken out to standard 0.1" headers. I included a high-quality 32.768 kHz external crystal, which can be used with the on-board DFLL or DPLL to generate system clock frequencies up to 48 MHz. You can also use it with the Real-Time Counter (RTC) in the SAM D09 for accurate timekeeping. Additionally, I included a reset button, power LED, and a user LED connected to pin A25. The chip is programmed via a 10-pin Cortex Debug header.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzj9rBJPvsaoVhdxK2AJNhqGpR7azL47rpVuZFfmSVfVyJQrHan3cdcLJzdNm4J9dlhZj6Z0kawPhaFUMP4b7hWxzZWez37-f-2EIX2dIM4B31j3AiYTwudZPZ4QLXy2r32K0fbVnwNCM/s1600/samd09brk2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="243" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzj9rBJPvsaoVhdxK2AJNhqGpR7azL47rpVuZFfmSVfVyJQrHan3cdcLJzdNm4J9dlhZj6Z0kawPhaFUMP4b7hWxzZWez37-f-2EIX2dIM4B31j3AiYTwudZPZ4QLXy2r32K0fbVnwNCM/s320/samd09brk2.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Connect an <a href="http://www.atmel.com/tools/atatmel-ice.aspx" target="_blank">Atmel ICE</a> to the Cortex Debug header for programming and debugging.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both;">
For powering the board, I added a spot for a CR2032 coin cell battery holder on the bottom. This is a nice solution for testing low-power configurations and/or using the board without power supply wires attached. The supply voltage range of the SAM D09 is 2.4V to 3.6V, and this matches nicely with the output voltage of a CR2032 over its discharge cycle. You can also power the development board with an external power supply by connecting to the VDD and Ground pins on the headers. Make sure to remove the CR2032 battery before connecting an external power supply!</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBYBp4qpx9WBdpJMuwWDQj7VUKAGueh8suWFsfj9LlCenHpip3Exb03HVm4y_T7oUlodReK1mkegY5JsNKekyxxeR6gw9SX2-gLIoZp9g2kig4bLr1v4Zez_JNdNFHdeE9h1lTWJNrHyg/s1600/samd09brk3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="346" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBYBp4qpx9WBdpJMuwWDQj7VUKAGueh8suWFsfj9LlCenHpip3Exb03HVm4y_T7oUlodReK1mkegY5JsNKekyxxeR6gw9SX2-gLIoZp9g2kig4bLr1v4Zez_JNdNFHdeE9h1lTWJNrHyg/s400/samd09brk3.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
CR2032 battery holder on the bottom of the development board.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both;">
Programing the device is quite easy in <a href="http://www.atmel.com/tools/atmelstudio.aspx" target="_blank">Atmel Studio</a>. The Atmel ICE integrates nicely with the IDE, and the <a href="http://www.atmel.com/tools/avrsoftwareframework.aspx" target="_blank">Atmel Software Framework (ASF)</a> helps you to develop programs rapidly. Programming 32-bit microcontrollers is much more complex than programming 8-bit devices, and a good set of libraries is important when you are getting started. The development board does need to be powered externally for programming. I found that throwing in a coin cell battery to power the SAM D09 and upload my program was quite handy.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYDiHzaWCToO_pYW2pQpFQaO8p407krHeWAJJMf1oZ4GmM1IctJKYuzAVOjC3JFh03ZUSaRtOM5Ys1R8ZZQdOMwMw4KjhC49YnMmjyzMAk8JNMfV-qjJihZ8jh3KhFUHjUe3nYvQrvdIA/s1600/samd09brk5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYDiHzaWCToO_pYW2pQpFQaO8p407krHeWAJJMf1oZ4GmM1IctJKYuzAVOjC3JFh03ZUSaRtOM5Ys1R8ZZQdOMwMw4KjhC49YnMmjyzMAk8JNMfV-qjJihZ8jh3KhFUHjUe3nYvQrvdIA/s400/samd09brk5.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Atmel ICE programmer/debugger connected to the development board.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3 class="separator" style="clear: both;">
<b><u>Assemble Your Own</u></b></h3>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Here is the information you need if you'd like to make your own development boards for the Atmel SAM D09C.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Atmel SAM D09C Development Board: <a href="https://oshpark.com/shared_projects/s2oVXlOx" target="_blank">Order PCBs on OSHPark</a>!</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<u>Parts List:</u></div>
<ul>
<li><b>Microcontroller: </b><a href="http://www.digikey.com/product-detail/en/atmel/ATSAMD09C13A-SSUT/ATSAMD09C13A-SSUTCT-ND/5404072" target="_blank">Atmel SAM D09C 14SOIC</a></li>
<li><b>Crystal</b>: <a href="http://www.digikey.com/product-detail/en/citizen-finedevice-co-ltd/CM200C32768HZFT/300-8742-1-ND/2108134" target="_blank">Citizen CM200C32768</a></li>
<li><b>Reset Button</b>: <a href="http://www.digikey.com/product-search/en?keywords=CKN9104CT-ND" target="_blank">C&K PTS525SM15SMTR2 LFS</a></li>
<li><b>C1</b>: 10uF 1206 Tantalum SMD capacitor, 10V rated minimum</li>
<li><b>C2, C3:</b> 100nF 0603 Ceramic SMD capacitor</li>
<li><b>C4, C5:</b> 22pF 0603 Ceramic SMD capacitors</li>
<li><b>LEDs: </b>0805, colors of your choice</li>
<li><b>R1:</b> 10k ohm 0603</li>
<li><b>R2, R3, R4:</b> 560 ohm 0603 (adjust values of R3 and R4 to change brightness of LEDs)</li>
<li><b>Battery Holder:</b> <a href="https://www.digikey.com/product-detail/en/mpd-memory-protection-devices/BK-912/BK-912-ND/2647825" target="_blank">MPD BK-912 CR2032 Holder</a></li>
<li><b>Debug Header:</b> <a href="https://www.digikey.com/product-detail/en/amphenol-fci/20021111-00010T4LF/609-3712-ND/2209072" target="_blank">Amphenol FCI 20021111-00010T4LF</a></li>
<li><b>Headers:</b> 2x 7 pin standard 0.1" headers (your choice of male or female)</li>
<li><b>Screws and Standoffs:</b> Sized for M3 screws, standoff length is your choice.</li>
</ul>
<b><br /></b><b>Notes: </b>If you want to do away with the power LED for low-power testing, you can also omit <b>R3</b>. The value of <b>R2</b> is not critical, use whatever value you pick for the LEDs. There are various stability and load capacitance options for the CM200C 32kHz crystal. I picked the +/- 5ppm version with 12.5pF load capacitance.<br />
<br />
<b>Assembly Note:</b> Before soldering on the CR2032 holder, tin the square ground pad in the middle of the footprint. It should have a little mound of solder on it to ensure good contact with the battery.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvQvgFyUucq_U_RvtoyYkpZhPX1_t2N_mdfomZM6aRAtPNz_c0Nh-5UqagbNuUFevHkQXQtq4xVRIK4-yNkeBrBwbx8dHzZsxTHHeFzENxGiggm4ZjNasbbddupn11OCQjzylG26tNQxQ/s1600/SAMD09_Brkout_sch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="348" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvQvgFyUucq_U_RvtoyYkpZhPX1_t2N_mdfomZM6aRAtPNz_c0Nh-5UqagbNuUFevHkQXQtq4xVRIK4-yNkeBrBwbx8dHzZsxTHHeFzENxGiggm4ZjNasbbddupn11OCQjzylG26tNQxQ/s400/SAMD09_Brkout_sch.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Atmel SAM D09C development board schematic.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYxhzlWZCIFTUzxyp_bvjlQcw9bDv745qwSqKmTMzhE-xDRqWYh3YoCVf09vimJVs5oIZm3l4GJcP7ZS7vLW91DbUvNd3cY11a1QG6XbBeSdx-hrtI1BImMMn9cR7zJduP4kkwfnxAmmU/s1600/SAMD09_Brkout_brd.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYxhzlWZCIFTUzxyp_bvjlQcw9bDv745qwSqKmTMzhE-xDRqWYh3YoCVf09vimJVs5oIZm3l4GJcP7ZS7vLW91DbUvNd3cY11a1QG6XbBeSdx-hrtI1BImMMn9cR7zJduP4kkwfnxAmmU/s400/SAMD09_Brkout_brd.png" width="353" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Atmel SAM D09C development board layout.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik-UZboH3V90lwNrpcOpuruww_QqSedmEsZSp9k3hokowneK-t56RNQcQdGfHInlqeZJX6rXYwu93mPb_mdgFmcHmsG5Tif9NRjRrijK8z2mvehKHU9R9AEp-D2ROjzSE23M9YsOcI_3A/s1600/samd09brk4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="317" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik-UZboH3V90lwNrpcOpuruww_QqSedmEsZSp9k3hokowneK-t56RNQcQdGfHInlqeZJX6rXYwu93mPb_mdgFmcHmsG5Tif9NRjRrijK8z2mvehKHU9R9AEp-D2ROjzSE23M9YsOcI_3A/s400/samd09brk4.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Here's a straight-on shot of the board to help with assembly.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3>
<u>Wrap Up</u></h3>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Let me know if you order PCBs and make your own development boards! This is a fun little board, and I'm looking forward to doing some projects based around this very capable microcontroller.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Please post any questions and comments below.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Thanks for reading!</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
- Dan W.</div>
Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com13tag:blogger.com,1999:blog-3663197147714037001.post-90676412978204806152016-03-19T17:24:00.000-07:002016-03-19T19:37:06.663-07:00DIY LED Light Bulb KitsRecently I saw a <a href="https://www.youtube.com/watch?v=Xhztnb21Yq4" target="_blank">video</a> by <a href="https://www.youtube.com/channel/UCtM5z2gkrGRuWd0JQMx76qA" target="_blank">bigclivedotcom</a> on YouTube about LED light bulb (lamp) kits from eBay. I decided to pick up a few of these kits and check them out. I was not disappointed!<br />
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV2c0cJ4oFrNw3roPTxY2AoGygXaTwrc7lnd8tBkgnAeMYedTXD5NuWdCzuCH1cXgjkNmitLxfTqFqRIcGLhX9DWjF6UQ__wGRy0vRC6UE47lkJ74Uwu1jnH-uRqyeKXEYa5nmo3BpEA8/s1600/diyledbulb1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="292" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV2c0cJ4oFrNw3roPTxY2AoGygXaTwrc7lnd8tBkgnAeMYedTXD5NuWdCzuCH1cXgjkNmitLxfTqFqRIcGLhX9DWjF6UQ__wGRy0vRC6UE47lkJ74Uwu1jnH-uRqyeKXEYa5nmo3BpEA8/s400/diyledbulb1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
LED light bulbs I assembled myself. Lots of fun!</div>
<div class="separator" style="clear: both; text-align: center;">
The LED colors shown are cool white diffused, multicolor and warm white clear.</div>
<div>
<br /></div>
<div>
<br /></div>
<h3>
<u>Cheap LED Lamp Kits from eBay</u></h3>
<div>
<br /></div>
<div>
These kits can be found for less than $2 USD on eBay. One example listing to start your search if you want to purchase your own is #<a href="http://www.ebay.com/itm/171505070176" target="_blank">171505070176</a>. That price does not include LEDs, but the real beauty of these is that you can assemble them with any LEDs you want. You can purchase white LEDs in many different color temperatures, such as cool or warm white. Colored or multi-color LEDs are also an option, as Big Clive did in his video. He also did a video assembling one of these kits with <a href="https://www.youtube.com/watch?v=lUdRm0im5ZQ" target="_blank">neon lamps</a>!</div>
<div>
<br /></div>
<div>
The kit comes with the plastic housing, a clear plastic dome, two small circuit boards, and the parts you need to assemble the power supply circuit. The ones that I ordered house 38 LEDs, but there seem to be a variety of kits on eBay in different configurations. Grab some of these and a huge bag of cheap LEDs and you are ready to make some light bulbs!</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpIuX3s5J94fbFGkv4nSjvgpXKfFwHdcJJW07kr4cGq4TjIMEzJ_HMeG66AAnbd6ZfNNsWye4xdBatr0UhAh11NmKj_8ionyQT2a-bRYC2y82_DwhibOlfVIS5jPZ3Tt4LukXfnhaAwQg/s1600/diyledbulb2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpIuX3s5J94fbFGkv4nSjvgpXKfFwHdcJJW07kr4cGq4TjIMEzJ_HMeG66AAnbd6ZfNNsWye4xdBatr0UhAh11NmKj_8ionyQT2a-bRYC2y82_DwhibOlfVIS5jPZ3Tt4LukXfnhaAwQg/s400/diyledbulb2.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Contents of the DIY LED lamp kits.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3>
<u>Assembly</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The kits do not include any instructions, but assembling them is pretty easy. All of the component values on the small green power supply PCB are labeled in the silk screen. Just place the parts as shown and solder it up. Do be careful with the polarities of the electrolytic capacitor and diodes, though. The circular LED board clearly shows the correct polarities for the LEDs, so that is also easy to stuff.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJUkzqVW4Yizt-5Kuol2ZbJanEUSSjRbQg6_PNkxoXVu6Q1sf_NOXiF6ekKKe7dpeBTD_1moAA6iHNEo_JWrKsLY3n0kiqsCRrgyHv3-5HMGhT8lnAVzdyY9HIQ8fv6SsqmDt6OvLfPCU/s1600/diyledbulb6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJUkzqVW4Yizt-5Kuol2ZbJanEUSSjRbQg6_PNkxoXVu6Q1sf_NOXiF6ekKKe7dpeBTD_1moAA6iHNEo_JWrKsLY3n0kiqsCRrgyHv3-5HMGhT8lnAVzdyY9HIQ8fv6SsqmDt6OvLfPCU/s400/diyledbulb6.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
The LED and power supply boards assembled and ready for installation.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Strangely, the attachment points for the power supply on the LED board are just pads without drills. Hmm.... The board in one of the kits I got had misaligned solder mask that exposed a trace between two LEDs next to the DC input pads. Yikes! These issues may or may not be present on the boards you get.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqzK7bukYpcdQ4V5ZlFBnu6y4CDwecEJSLCbmeZGOFqp_BmHcG0UneEVvZim_-a5LY9tGXHtH5scYAduzxbZJ0LpiqRuPaha2stSRxg6IXPBk1Fj-zND-JkgfyjzgTSC5Estv_eagr9c0/s1600/diyledbulb3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="295" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqzK7bukYpcdQ4V5ZlFBnu6y4CDwecEJSLCbmeZGOFqp_BmHcG0UneEVvZim_-a5LY9tGXHtH5scYAduzxbZJ0LpiqRuPaha2stSRxg6IXPBk1Fj-zND-JkgfyjzgTSC5Estv_eagr9c0/s400/diyledbulb3.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Attachment points on the power supply and LED boards.</div>
<div class="separator" style="clear: both; text-align: center;">
Can you spot a safety hazard here when they are crammed into the housing?</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
As I started to install the boards into the housing, I saw that it would be very easy for shorts to happen between the exposed electrical connections on the undersides of the boards. I decided to put electrical tape across the bottom of the power supply board to insulate it from the LEDs.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlPwyDoOpwCcjY2nc35PPQliRtdhMd-lB1mz-lIXB0E9lSQrv-HGBh0i8BBs7R2YHrAaWMIn0vOz7rxP0MRDacIQ4ewq0pUwSfP8R_iE3h7w5Jo7D1zgD8gSVMjCCzSYh8zWYodb-HoIE/s1600/diyledbulb4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlPwyDoOpwCcjY2nc35PPQliRtdhMd-lB1mz-lIXB0E9lSQrv-HGBh0i8BBs7R2YHrAaWMIn0vOz7rxP0MRDacIQ4ewq0pUwSfP8R_iE3h7w5Jo7D1zgD8gSVMjCCzSYh8zWYodb-HoIE/s400/diyledbulb4.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Almost done!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Before snapping on the clear plastic dome, test the bulb to make sure it works. Murphy will ensure that at least one LED doesn't work if you don't test it first. It goes without saying, but please be careful when doing this. The power supply board has completely exposed mains AC voltage on it.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0H2RoWnVAcjV7Pzg5ohZ5cyrs8AyhcTaz5jmOafhvb8Qjs9MckNoHXkDub0bCvt77yU95QQgP1dmYEzPhaGd4RMoBd_ACH09FqaruwwTHLRBdXPbc3_-t9-U-FJl67fBY-kNUMsNg-ls/s1600/diyledbulb5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0H2RoWnVAcjV7Pzg5ohZ5cyrs8AyhcTaz5jmOafhvb8Qjs9MckNoHXkDub0bCvt77yU95QQgP1dmYEzPhaGd4RMoBd_ACH09FqaruwwTHLRBdXPbc3_-t9-U-FJl67fBY-kNUMsNg-ls/s400/diyledbulb5.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Super cool custom LED light bulbs.</div>
<div class="separator" style="clear: both; text-align: center;">
The bulb with blue, yellow, and orange LEDs makes a nice violet color.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3>
<u>Wrap Up</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
These are fun little kits. I wouldn't recommend them for making light bulbs to install throughout your home. The obvious safety hazards of these kits and inconsistent hand assembly make them a bit dangerous. However, I think they are useful for fun projects and making novelty LED light bulbs that will be used in a controlled setting.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Thanks for reading!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
- Dan W.</div>
Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com1tag:blogger.com,1999:blog-3663197147714037001.post-35033536104737585272016-03-18T20:19:00.000-07:002016-04-05T17:12:11.383-07:00Checking Out the New Atmel ATtiny102/104In this post I will discuss my experiences with the Atmel ATtiny104 Xplained Nano kit, and compare this new microcontroller from Atmel with other ATtiny devices.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9qQ8r22SvGzcUWYNv0mA1OhbaXZr6On6-sW5edi3uue-9BdsSSSON_SX3dPLIFO2Wgwz1yWl3L7zNTpy_vRD9CXLYgZEtt7zrJ20NIYw29uVvU-xSYOwdrCqCIinJYUBrbP-GjulWWcU/s1600/104xplained1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="271" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9qQ8r22SvGzcUWYNv0mA1OhbaXZr6On6-sW5edi3uue-9BdsSSSON_SX3dPLIFO2Wgwz1yWl3L7zNTpy_vRD9CXLYgZEtt7zrJ20NIYw29uVvU-xSYOwdrCqCIinJYUBrbP-GjulWWcU/s400/104xplained1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
The Atmel ATtiny104 Xplained Nano evaluation board.</div>
<br />
<h3>
<u>Introduction</u></h3>
<h3>
</h3>
<h3>
</h3>
<br />
I love microcontrollers, and I do my best to keep up with new devices being released from the major manufacturers. Recently, I saw that Atmel had released new ATtiny devices, the <a href="http://www.atmel.com/devices/ATTINY102.aspx" target="_blank">ATtiny102</a> and <a href="http://www.atmel.com/devices/ATTINY104.aspx" target="_blank">ATtiny104</a>. I decided to order one of their <a href="http://www.atmel.com/tools/ATTINY104-XNANO.aspx" target="_blank">Xplained Nano kits for the ATtiny104</a> and check it out. The board costs $4.50 USD and is <a href="http://www.digikey.com/product-detail/en/atmel/ATTINY104-XNANO/ATTINY104-XNANO-ND/5940517" target="_blank">available from Digikey</a> right now. Other distributors have it on order.<br />
<br />
<b>Update (4/5/16):</b> Mouser now has the kit <a href="http://www.mouser.com/ProductDetail/Atmel/ATTINY104-XNANO" target="_blank">in stock</a> as well.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDQhYDnmXx6vlNXMEHOQY4FyxXK32ckLQHgrj3xck8KuizWWFZ5C19IVq6rETxKAtKWCRzOslcFigM98lp0ZuAI-4D0uXAzBk1ehGTgGEtUlZDc3vDK8m6XCCW6s1ycy54e2YD6dEmlOs/s1600/104xplained2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="313" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDQhYDnmXx6vlNXMEHOQY4FyxXK32ckLQHgrj3xck8KuizWWFZ5C19IVq6rETxKAtKWCRzOslcFigM98lp0ZuAI-4D0uXAzBk1ehGTgGEtUlZDc3vDK8m6XCCW6s1ycy54e2YD6dEmlOs/s400/104xplained2.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Let's be honest, the cool box is worth the price of admission. </div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3 class="separator" style="clear: both; text-align: left;">
<u>ATtiny102/104</u></h3>
<h3 class="separator" style="clear: both; text-align: left;">
</h3>
<h3 class="separator" style="clear: both; text-align: left;">
</h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
First step in researching any microcontroller: <a href="http://www.atmel.com/Images/Atmel-42505-8-bit-AVR-Microcontroller-ATtiny102-ATtiny104_Datasheet.pdf" target="_blank">look at the datasheet</a>. Let's get a few of the basics out of the way first. The ATtiny102 is an 8-pin device that comes in SOIC and UDFN packages, and the ATtiny104 is a 14-pin version of the device that comes in SOIC only. The larger device has extra GPIO, and extra channels on some of the peripherals such as the Analog-to-Digital Converter (ADC), but otherwise they are identical.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiixXZZsjj3U7H36VAirTydB0-gQcgEpRbEEAcskjoNJNLeNcc1ZXGxn9AVYSKuR9YH0EPEWfnEBVNPzKtBM5hdTZ5y6KtHJ_xMt90Ajna04mw6UsJQWZfjtD33wQtbQ7djLLzS1IY3f6s/s1600/attiny102_104_pinouts.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="285" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiixXZZsjj3U7H36VAirTydB0-gQcgEpRbEEAcskjoNJNLeNcc1ZXGxn9AVYSKuR9YH0EPEWfnEBVNPzKtBM5hdTZ5y6KtHJ_xMt90Ajna04mw6UsJQWZfjtD33wQtbQ7djLLzS1IY3f6s/s400/attiny102_104_pinouts.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Pinouts of the ATtiny102 and ATtiny104 in SOIC packages.</div>
<div class="separator" style="clear: both; text-align: center;">
Source: <a href="http://www.atmel.com/Images/Atmel-42505-8-bit-AVR-Microcontroller-ATtiny102-ATtiny104_Datasheet.pdf" target="_blank">Atmel ATtiny102/104 Preliminary Datasheet</a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
As I read through the key features of the new microcontroller, I immediately saw some parallels to the <a href="http://www.atmel.com/images/atmel-8127-avr-8-bit-microcontroller-attiny4-attiny5-attiny9-attiny10_datasheet.pdf" target="_blank">ATtiny4/5/9/10</a>. I played around with the ATtiny10 quite a bit when it first came out, and recently developed a <a href="http://syncchannel.blogspot.com/2016/02/attiny10-mini-breakout-board.html" target="_blank">super tiny breakout board</a> for it. However, I saw some very interesting additions to this new device, such as a hardware USART. I decided to make a table comparing the key features of the ATtiny102 and ATtiny10 (8- and 6-pin devices respectively). I also included the classic ATtiny85 in the comparison that has served me well in numerous projects. The ATtiny85 is well-known and loved by many embedded developers and electronics enthusiasts alike, and it even has coveted <a href="http://playground.arduino.cc/Main/ArduinoOnOtherAtmelChips" target="_blank">Arduino support</a> to help make the device accessible to all.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzBBXjaoxTR61ZBgrQOpH-0xbhaKkHf5naCqwDInGHp7AS-I5jL3HD1tRMs9RWN0Wqnyck_YOQQ633n3G8tN9yT8kchNkmD7qqCsCeVcwKEKbIBR_lvFuu01taBJBcdTC9hQQ33XyKaWI/s1600/attiny_comparison.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzBBXjaoxTR61ZBgrQOpH-0xbhaKkHf5naCqwDInGHp7AS-I5jL3HD1tRMs9RWN0Wqnyck_YOQQ633n3G8tN9yT8kchNkmD7qqCsCeVcwKEKbIBR_lvFuu01taBJBcdTC9hQQ33XyKaWI/s320/attiny_comparison.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
Comparing the key features of the ATtiny102, ATtiny10, and ATtiny85.</div>
<div class="separator" style="clear: both; text-align: center;">
(Unit costs shown are from <a href="http://www.digikey.com/" target="_blank">Digikey</a>, 3/18/2016)</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
We see many similarities between the ATtiny102 and the ATtiny10, especially in the amount of FLASH, SRAM, instructions, and general purpose working registers. However, the new device has some key upgrades. The most important of these is probably the hardware USART, which can also work in an SPI Master mode. While the ATtiny10 is very capable at collecting data from sensors and the like, it has almost no way to pass that data on to another device for processing. It is meant to handle simple, embedded tasks on its own. Given the tiny board space occupied by the SOT-23-6 chip and the low cost, it does very well in that regard.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The hardware USART on the ATtiny102 opens the device up to many more projects and potential uses. You can pass data on to another microcontroller, or even transmit it using a wireless module that accepts data over serial and handles the wireless transceiver functions on its own. Additionally, the ATtiny102 has some upgrades on the ADC front. Importantly, it has 10-bit resolution, where as the ATtiny10 has an 8-bit ADC. Besides an extra ADC channel, you also have three internal voltage references in the new device which can improve the accuracy of your measurements, especially when powered from varying supply voltages.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3 class="separator" style="clear: both; text-align: left;">
<u>Comparison with the ATtiny85</u></h3>
<h3 class="separator" style="clear: both; text-align: left;">
</h3>
<h3 class="separator" style="clear: both; text-align: left;">
</h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
In many regards, the ATtiny85 is a more robust device. The extra FLASH, SRAM, working registers, and instructions are crucial when developing more complicated solutions. Tasks we take for granted on many AVR devices such as floating point arithmetic and string manipulation are very difficult to implement on the ATtiny10 and ATtiny102/104. The ATtiny85 also comes in a DIP package, which is important to many electronics hobbyists.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
However, the lack of a hardware USART on the ATtiny85 has always been a limitation. You can do software serial, but a hardware peripheral is very welcomed when available. Also, the ATtiny85 only has 8-bit counters, where as the smaller ATtiny devices have single 16-bit counters.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Finally, the ATtiny85 costs more, even when purchased in volume. The price difference doesn't seem large on the table above, but component cost adds up when using many of the devices in a solution, or designing something that will be produced in quantity.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3 class="separator" style="clear: both; text-align: left;">
<u>ATtiny104 Xplained Nano</u></h3>
<br />
Atmel did a great job on their evaluation board for the ATtiny104. The board has a programmer and debugger built in! Simply plug it into your computer with a USB cable and it connects directly to Atmel Studio 7 for programming. I encountered no issues working with the board in Atmel Studio, though I did have to update the program before using the board.<br />
<br />
My favorite feature of the Xplained Nano board is that you can connect to the USART on the ATtiny104 over USB and talk to it with a serial terminal. This is HUGE for prototyping and development when you need to read out your data for debugging and verification. The serial link is available as a simple COM port, and I found that I could keep it connected to my terminal program even when re-programming the chip.<br />
<br />
The ATtiny104 Xplained Nano has a user button and LED on board, and breaks out all pins of the microcontroller. Additionally, you have some options for taking current measurements and running the ATtiny104 at supply voltages other than 5V USB.<br />
<br />
Check out the official documentation on the evaluation board for more info:<br />
<br />
<a href="http://www.atmel.com/Images/Atmel-42671-ATtiny104-Xplained-Nano_User-Guide.pdf" target="_blank">ATtiny104 Xplained Nano User Guide</a><br />
<a href="http://www.atmel.com/Images/Atmel-42678-Getting-Started-with-Atmel-ATtiny102-104_ApplicationNote_AT12489.pdf" target="_blank">ATtiny102/104 Getting Started Guide</a><br />
<br />
<h3>
<u>Wrap Up</u></h3>
<h3>
</h3>
<h3>
</h3>
<br />
I enjoyed working with the ATtiny104 evaluation kit, and I plan to order some bare chips when they are available from distributors. This new microcontroller from Atmel does have limitations as I discussed above, and other AVRs may be better options for your project. But if you have worked with the ATtiny10 before and just wished it had a USART, or if you need a low-cost chip for simple embedded tasks in a project, I think this is a good device to consider.<br />
<br />
Thanks for reading!<br />
<br />
- Dan W.Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com1tag:blogger.com,1999:blog-3663197147714037001.post-13913217017538569522016-03-16T19:58:00.000-07:002016-04-25T13:12:51.911-07:00LoRa FeatherWing IOX for Adafruit FeatherIn this post I will document another custom FeatherWing that I have designed for the <a href="https://www.adafruit.com/category/777" target="_blank">Adafruit Feather</a> line of microcontroller boards, the LoRa FeatherWing IOX.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZWJc4UePjCJi3b5YskF7ZdPdpUoy4Ra8EZBdVpBxfS9SWN-BnY098I1x1qyja5wrTKkyHQZL9nKUOoP0rYOwliUI3-UQPDV_vQu_JiGVLJ7KCh1kuitKvTrn6Y1rw44kHJ-qsosZKdv4/s1600/ioxpic4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="273" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZWJc4UePjCJi3b5YskF7ZdPdpUoy4Ra8EZBdVpBxfS9SWN-BnY098I1x1qyja5wrTKkyHQZL9nKUOoP0rYOwliUI3-UQPDV_vQu_JiGVLJ7KCh1kuitKvTrn6Y1rw44kHJ-qsosZKdv4/s400/ioxpic4.jpg" width="400" /></a></div>
LoRa FeatherWing IOX on a Feather HUZZAH ESP8266.</div>
<br />
<h3 style="text-align: left;">
<u><b>Introduction</b></u></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Last month I posted about a LoRa FeatherWing Development Breakout that I made for Feather. Please <a href="http://syncchannel.blogspot.com/2016/02/lora-featherwing-development-breakout.html" target="_blank">check out that post</a> to learn more about LoRa, the HopeRF RFM95/96(W) modules and potential uses of the breakout.<br />
<br />
The LoRa FeatherWing IOX (<b>I/O</b> e<b>X</b>pander) is a follow-up to that design. The RFM95/96(W) side of the board is exactly the same as on the earlier FeatherWing. The big difference on the IOX is that I have replaced the breakout header for the Digital IO, chip select, and reset lines from the RFM module with an <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/21919e.pdf" target="_blank">MCP23008</a> 8-bit I/O expander. This chip allows the Adafruit Feather to control all of those pins on the RFM module over I2C. It is a huge step forward in this project, because it eliminates the manual wiring required for the breakout. This FeatherWing does not tie up any of your digital I/O pins on the Feather, and it makes the board compatible with any Feather variant. This is particularly important for the Feather HUZZAH ESP8266 which has a limited number of GPIO available.<br />
<br />
Current LoRa and LoRaWAN libraries can be modified to incorporate the simple MCP23008 I2C library to drive the RFM module. I have also developed example programs to turn a Feather HUZZAH ESP8266 into a LoRa gateway to <a href="http://io.adafruit.com/" target="_blank">Adafruit IO</a> using Wi-Fi.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn4yB667x-igzdzy5TWXLDjdCnphLSbyaZajOwRogjzFROP8i2bbum4AgfWHr5woPhTkyyWzhmS6wU-J8ke1D0Ix5Fl0CZ79YpmwOPKIc1ygFp0i2hsH_DkpGMV2YkZwmu1T5-7UQiC-w/s1600/ioxpic2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn4yB667x-igzdzy5TWXLDjdCnphLSbyaZajOwRogjzFROP8i2bbum4AgfWHr5woPhTkyyWzhmS6wU-J8ke1D0Ix5Fl0CZ79YpmwOPKIc1ygFp0i2hsH_DkpGMV2YkZwmu1T5-7UQiC-w/s400/ioxpic2.jpg" width="315" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
A node with LoRa FeatherWing IOX, Feather M0, MCP9701 temperature sensor and a Li-Po.</div>
<div class="separator" style="clear: both; text-align: center;">
The node transmits data bursts to a Feather HUZZAH acting as a gateway,</div>
<div class="separator" style="clear: both; text-align: center;">
which then pushes the data to Adafruit IO over Wi-Fi.</div>
<div style="text-align: center;">
<br /></div>
</div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
<b><u>Incorporating the I/O Expander</u></b></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
To incorporate the MCP23008 into my earlier example programs, I used the <a href="https://github.com/adafruit/Adafruit-MCP23008-library" target="_blank">Adafruit library</a> for the chip. I felt this was a good approach, because if you are using Feathers you are likely already familiar with downloading Adafruit libraries. The library is quite simple. You use the same digitalRead and digitalWrite commands you are familiar with in the Arduino IDE, but you call them as member functions to the MCP23008 object. For example, to drive DIO0 low on the RFM module you would type "<b><span style="color: blue;">iox.digitalWrite(DIO0, LOW)</span></b>" instead of the normal "<b><span style="color: #38761d;">digitalWrite(DIO0, LOW)</span></b>".<br />
<br />
If you want to write your own code for driving the chip, that is certainly possible as well. I broke out the interrupt pin from the MCP23008 to solder jumpers to select one of five digital I/O pins on the Feather to send it to. This could be used to increase efficiency of your code and minimize delays in seeing pin state changes.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibMLvYPtrFBkD529zB6oivleSpDZwuRhGceUr73Gz91vYr_06ZbmTbHeUnkz4bjnhsHEQziGtBMDxyNMOxB6wHsdGy7YCxumWeNREhtt_xeNnaWoBBCSat_c-KlmM4iyXK24cAweSlMYY/s1600/LoRaFWIOX_bottomrender.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="178" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibMLvYPtrFBkD529zB6oivleSpDZwuRhGceUr73Gz91vYr_06ZbmTbHeUnkz4bjnhsHEQziGtBMDxyNMOxB6wHsdGy7YCxumWeNREhtt_xeNnaWoBBCSat_c-KlmM4iyXK24cAweSlMYY/s400/LoRaFWIOX_bottomrender.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
The Interrupt pin from the MCP23008 can be sent to a digital pin on the Feather if desired.</div>
<div class="separator" style="clear: both; text-align: center;">
The I2C address of the chip is fixed as 0x20.</div>
<div style="text-align: center;">
<br /></div>
</div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
<span style="font-family: inherit;"><u><b>Example Programs</b></u></span></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I have three example programs for this board. Two are very similar to my earlier example programs for the Development Breakout. One configures the Feather as a beacon node that sends periodic data bursts, while the other is a general-purpose Transceiver program that is set up to receive the data from the beacons and print it out to USB serial.<br />
<br />
In these examples, I am sending temperature data from an <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/21942e.pdf" target="_blank">MCP9701</a> temperature sensor. You can of course modify the programs to send any sensor data you like. I also send the battery voltage reading using the battery monitoring circuit built in to Feather M0 and 32U4.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfveYRLpyunpBBl1MmDW0Uh4rE9CyqmyWYx94z0W8yXVa0BPb5R327GQWkjtsmDEi2lSqyOkmxcXPSepAk8U1ofjJs2AUnbCtK03ltsEWlMzKbl-Iidqo9J0ukx7vHZAaPTtyyH6VAnCg/s1600/serialgrab.tiff" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="306" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfveYRLpyunpBBl1MmDW0Uh4rE9CyqmyWYx94z0W8yXVa0BPb5R327GQWkjtsmDEi2lSqyOkmxcXPSepAk8U1ofjJs2AUnbCtK03ltsEWlMzKbl-Iidqo9J0ukx7vHZAaPTtyyH6VAnCg/s400/serialgrab.tiff" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Receiving data from two different Beacons and viewing it in a serial terminal.</div>
<br />
<br />
The third program I have provided is a bit more interesting. It is intended for use with the Feather HUZZAH, and not only echoes the received data to USB serial, but also pushes it to Adafruit IO using the MQTT library. Being able to get data into the "cloud" from nodes several kilometers away using LoRa modules instead of cellular could be a great addition to your sensor monitoring project.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYMN8VW_cxkHh_0FLkEDkvFWFCudo-Wy94BF-WFk1USFebwyYKiJ_FdBdnsLksu2XvBucG6wn_bzE0vpdB9kFfMKAV4Fj_PK60dmOFYtHlWkoeUr31bgdi-x55je9JJOFncuibhIti1uM/s1600/ioxpic1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYMN8VW_cxkHh_0FLkEDkvFWFCudo-Wy94BF-WFk1USFebwyYKiJ_FdBdnsLksu2XvBucG6wn_bzE0vpdB9kFfMKAV4Fj_PK60dmOFYtHlWkoeUr31bgdi-x55je9JJOFncuibhIti1uM/s400/ioxpic1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Feather HUZZAH with a LoRa FeatherWing IOX.</div>
<div class="separator" style="clear: both; text-align: center;">
Push the data to Adafruit IO over Wi-Fi for monitoring, graphing, and logging.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6qa2cM-1JPdkY7K-CeaXP4E9K-YgWvBSM3Y3y4leI0NRLr1NdCf4iCdHWmPpU4x0hQ9eQ8qrMFhgC0c8bGRIN7tyPzuBkqeuSkFa7FLCg657oX07VpCb6g5e0Zg1BwXY96YyMrzbxjkI/s1600/aiograb.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="203" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6qa2cM-1JPdkY7K-CeaXP4E9K-YgWvBSM3Y3y4leI0NRLr1NdCf4iCdHWmPpU4x0hQ9eQ8qrMFhgC0c8bGRIN7tyPzuBkqeuSkFa7FLCg657oX07VpCb6g5e0Zg1BwXY96YyMrzbxjkI/s400/aiograb.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Monitoring the data from the Beacon nodes on Adafruit IO.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Please note that these are very simple programs intended as templates to build in the full functionality your project requires. One issue you might need to solve is how to handle multiple beacons trying to transmit at the same time. The overlapping transmissions will cause un-reliable reception at the gateway. A fix for this is to poll the beacons for updates from the gateway node, and only allow them to transmit when they are polled. Another possible fix is to send a response from the gateway when it successfully receives a data transmission. If a beacon doesn't get an acknowledgment, it should wait a random amount of time and try again. This provides some amount of de-confliction on the wireless link.</div>
</div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
<b><u>Shared as Open Source Hardware (OSHW)</u></b></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
LoRa FeatherWing IOX: <a href="https://oshpark.com/shared_projects/K4lLe1uG" target="_blank">Order PCBs on OSHPark</a>!<br />
<br />
Eagle Files: <a href="https://github.com/SyncChannel/LoRa_FeatherWings" target="_blank">Shared on Github</a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Example Program: <a href="https://gist.github.com/SyncChannel/b5c099a8eb8e7235aa8c" target="_blank">LoRa FeatherWing IOX Beacon Mode</a></div>
<div style="text-align: left;">
Example Program: <a href="https://gist.github.com/SyncChannel/2747e1f0950495a396ee" target="_blank">LoRa FeatherWing IOX Transceiver Mode</a><br />
Example Program: <a href="https://gist.github.com/SyncChannel/8e10c30f136dd7c765f8" target="_blank">LoRa FeatherWing IOX Adafruit IO Gateway (for Feather HUZZAH)</a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDEKe4KPHBh_EYSwKnRO3dvK5avqZZhgctHkH1mPVMVk03Ft4ce6JW5LvJnn4rOqTPWLsQPLJmfWIG7HCvn1foVSDSVeHmxqHmecn7dFiIUSVhnCIshc177CifDRsIQUuhSMLokLrI_nw/s1600/loraiox_sch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDEKe4KPHBh_EYSwKnRO3dvK5avqZZhgctHkH1mPVMVk03Ft4ce6JW5LvJnn4rOqTPWLsQPLJmfWIG7HCvn1foVSDSVeHmxqHmecn7dFiIUSVhnCIshc177CifDRsIQUuhSMLokLrI_nw/s400/loraiox_sch.png" width="400" /></a></div>
<div style="text-align: center;">
LoRa FeatherWing IOX Schematic</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEierhOJclMYAU-zuUyavt6QQ9EaeMHw-hbVB_W5EIVGyzPgOAeMOyIM9PfwHHGMaPO4tlr737UnhkMb04rHEt_bol-3ob0FDNxv320fZzElPK2R6gsB6wibmBVJ0J0BRVkWa4KZZvQKp6g/s1600/loraiox_brd.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="172" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEierhOJclMYAU-zuUyavt6QQ9EaeMHw-hbVB_W5EIVGyzPgOAeMOyIM9PfwHHGMaPO4tlr737UnhkMb04rHEt_bol-3ob0FDNxv320fZzElPK2R6gsB6wibmBVJ0J0BRVkWa4KZZvQKp6g/s400/loraiox_brd.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
LoRa FeatherWing IOX Board Layout</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3 class="separator" style="clear: both;">
<b><u>Assemble Your Own</u></b></h3>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Here is the information you need if you'd like to order PCBs and make your own LoRa FeatherWing IOX boards.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<u>Parts List:</u></div>
<ul>
<li><b>LoRa Module: </b>HopeRF RFM95W or RFM96W (pick the correct frequency for the ISM bands used in your country)</li>
<li><b>I/O Expander</b>: <a href="http://www.digikey.com/product-detail/en/microchip-technology/MCP23008-E%2FSO/MCP23008-E%2FSO-ND/735952" target="_blank">MicroChip MCP23008 18-SOIC</a></li>
<li><b>RF Connector</b>: SMA or RP-SMA Edge-Launch for 1.6mm/0.062" board thickness<b> </b></li>
<li><b>C1</b>: 47uF 1410 Tantalum SMD capacitor, 10V rated minimum</li>
<li><b>C2:</b> 1uF 0603 Ceramic SMD capacitor</li>
<li><b>C3, C4:</b> 100nF 0603 Ceramic SMD capacitors</li>
<li><b>LED: </b>0805, color of your choice</li>
<li><b>R1:</b> 680 ohm 0603, or adjust value to change brightness of LED</li>
<li><b>R2, R3</b>: 4.7k ohm 0603 resistors (I2C pullups)</li>
<li>Headers to connect the FeatherWing to the Feather board</li>
<li>Antenna suitable for the frequency range supported by your RFM module</li>
</ul>
<b>Notes: </b>You can do away with the <b>LED</b> and <b>R1</b> if you don't want an additional power indicator. Also, if you are using another FeatherWing that has I2C pull-ups on it, omit <b>R2</b> and <b>R3</b>. Only one set of I2C pull-up resistors should be used on Feather.<br />
<br />
<br />
<h3>
<u>Going Forward</u></h3>
<div>
<u><br /></u></div>
I am quite happy with this development in my project to bring LoRa functionality to Adafruit Feather. Please let me know if you assemble one of these boards, I am always looking for feedback. Also, I'm curious to see if someone will modify an existing LoRaWAN library to use this board on a Feather HUZZAH. I believe overcoming the I/O restrictions of the ESP8266 module will help further development in that regard. I know there is much more to be done, but I hope my small contribution to the hardware side of these endeavors is of use.<br />
<br />
As to future LoRa boards, I would like to make one additional board with multiple sensors on it to be used as a ready-to-go Beacon node. I am also exploring ways to fit a U-Blox GPS module onto this FeatherWing.<br />
<br />
Once I am done developing boards for the RFM95/96(W) modules, I may turn to a more sophisticated LoRaWAN module, such as the <a href="http://www.microchip.com/wwwproducts/en/RN2903" target="_blank">MicroChip RN2903</a>. Wouldn't an actual Feather board with that module built in be cool? How about a <a href="https://www.adafruit.com/products/2890" target="_blank">FeatherWing Doubler</a> with the microcontroller circuitry and a wireless module built directly onto it instead of prototyping area? That would give you two spots for FeatherWings and a huge amount of functionality.<br />
<br />
As always, please post comments, corrections, and suggestions below.<br />
<br />
Thanks for reading!<br />
<br />
- Dan W.Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com10tag:blogger.com,1999:blog-3663197147714037001.post-62731504332093083832016-03-03T16:30:00.000-08:002016-03-04T18:40:45.466-08:00Schematic of the CTS 1960017 10MHz OCXORecently, I posted a <a href="http://syncchannel.blogspot.com/2016/02/10mhz-ocxo-teardown-cts-1960017.html" target="_blank">teardown</a> of a CTS 10MHz Oven Controlled Crystal Oscillator (OCXO). Using the unit that I opened up, I was able to work out the schematic for the boards inside.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-nNe15cGk0y8fdrSB4RNil3vHnUG3vSojX6YS22zncD53sf9DnnuB9pjjRhIVTQKl-9NMgfOAxECMYAR6e_evo6nmhLsgemUg7HKvhOWBUfNn0o_c58EjwX1W5T2x6q6yB0C7wsMGYmc/s1600/cts1960017_sch_td.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-nNe15cGk0y8fdrSB4RNil3vHnUG3vSojX6YS22zncD53sf9DnnuB9pjjRhIVTQKl-9NMgfOAxECMYAR6e_evo6nmhLsgemUg7HKvhOWBUfNn0o_c58EjwX1W5T2x6q6yB0C7wsMGYmc/s400/cts1960017_sch_td.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
This is what's left of the CTS OCXO I did the teardown on. Poor thing...</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3>
<u>Construction</u></h3>
<br />
Internally, the OCXO consists of two boards. One is the larger, main board with most of the components. It contains the oscillator circuit, voltage control and voltage reference circuitry, heater control, and output buffering/filtering. The ceramic board adhered to the bottom of it is the heater. It contains two power devices and two temperature monitoring devices. The 10MHz crystal is bonded to that ceramic board, but connects directly to the main board. The two boards connect via five pins that are directly soldered.<br />
<br />
The board assembly is mounted on pins inside the can, which also extend to the outside of the unit. The only insulation material in the unit is the small, brown strip seen in the above photo. It wraps around one side of the crystal when everything is assembled.<br />
<br />
Externally, the OCXO has five pins: <b>5V</b>, <b>GND</b>, 10MHz <b>OUTPUT</b>, <b>VREF</b>, and <b>EFC</b>. Those pin names are used as labels for various nodes in the schematic below where they connect.<br />
<br />
<h3>
<u>Schematic</u></h3>
<br />
I was able follow the components and traces on the boards to work out the schematic. After getting a rough outline, I removed all of the capacitors and inductors and measured their values out of circuit as accurately as I could.<br />
<br />
There are only two ICs on the main board. One is an <a href="http://www.ti.com/lit/ds/symlink/lm124-n.pdf" target="_blank">LM2902</a> quad opamp. Three of the opamps are used and one is terminated. The other IC is a <a href="http://toshiba.semicon-storage.com/info/lookup.jsp?pid=TC7S00F&lang=en" target="_blank">TC7S00FU</a> single NAND gate that is used as an output buffer.<br />
<br />
The two power devices on the heater board are <a href="http://www.nxp.com/documents/data_sheet/BST50_51_52.pdf" target="_blank">BST50</a> NPN darlington transistors. The temperature sensors are TI <a href="http://www.ti.com.cn/cn/lit/ds/symlink/lm45.pdf" target="_blank">LM45</a>s.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6YXoJN0d6ke8R6wb-01e1SBZ8t29L803MvDw46lNwb1nHIOTv02tYCCfHxjOcDVaFlHka4rrwQapFwn8r1A5Hcycrhq8I8-ZuJaKybwtVT9wq724oyLcR7Ja4XOBbyQeji2QmIR37a_U/s1600/CTS1960017_sch_final.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6YXoJN0d6ke8R6wb-01e1SBZ8t29L803MvDw46lNwb1nHIOTv02tYCCfHxjOcDVaFlHka4rrwQapFwn8r1A5Hcycrhq8I8-ZuJaKybwtVT9wq724oyLcR7Ja4XOBbyQeji2QmIR37a_U/s400/CTS1960017_sch_final.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
Schematic of the CTS 1960017 10MHz OCXO.</div>
<div class="separator" style="clear: both; text-align: center;">
Click to make it larger, then right click to download it.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3>
<u>Wrap Up</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
So what do you think? Is the circuit simpler than you expected, or more complex? It's very interesting to see this take on a modern 5V, 10MHz OCXO. I suspect internal construction and complexity varies greatly between device families. Please post any questions, comments, or corrections below.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Thanks for reading!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
- Dan W.</div>
<br />Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com4tag:blogger.com,1999:blog-3663197147714037001.post-88796753742397454082016-02-28T19:19:00.002-08:002016-03-01T20:02:32.226-08:00ATtiny10 Mini Breakout BoardHere is a very tiny breakout board for the <a href="http://www.atmel.com/devices/ATTINY10.aspx" target="_blank">Atmel ATtiny10</a>. It's so small, you'll lose it. Literally. I lost one in the carpet and I'm hoping to find it before the vacuum does.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3UL_PWCMAjsZCDE3wz8JNeThWDqypphp_cAQhkyY0quV6TBF3ipQklNYDJeAKOZEoJ4wcyN9bSdzCuCbvP6wn5dGfDRxi5TwS3t1ivcDXqktAyvuqmNH8SRxbkFOjJEJ4zKm3Qet1nbk/s1600/attiny10brkout_fig1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3UL_PWCMAjsZCDE3wz8JNeThWDqypphp_cAQhkyY0quV6TBF3ipQklNYDJeAKOZEoJ4wcyN9bSdzCuCbvP6wn5dGfDRxi5TwS3t1ivcDXqktAyvuqmNH8SRxbkFOjJEJ4zKm3Qet1nbk/s400/attiny10brkout_fig1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
ATtiny10 Mini Breakout Board next to a 5mm LED.</div>
<br />
<h3>
<b><u>A Tiny Breakout for a Tiny Microcontroller</u></b></h3>
<br />
This breakout board is for the <a href="http://www.atmel.com/images/atmel-8127-avr-8-bit-microcontroller-attiny4-attiny5-attiny9-attiny10_datasheet.pdf" target="_blank">ATtiny10 microcontroller</a>. The PCB is 0.25x0.325" and uses 0.050" header pins. The board could actually be made smaller, but I ran into the <a href="http://docs.oshpark.com/submitting-orders/board-outline/" target="_blank">minimum PCB size limit</a> on OSHPark. Despite the tiny size, I was able to include a 100nF bypass capacitor, power LED, and a user LED on pin PB1. That pin is also the clock pin for the programming interface, so it flashes when the board is being programmed.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9DQFkKFzyHO5ginZPNiBIT-sYjS7lkledQKV79Fd0sbqIieXG3oPwvNckEhZIUdkk2AiC_t6a5nsBffarjk2qzta3nMeZb0CcrALcNbsJzdaQKSksSuZ1MviDqyJzms_uR1yncfOVbhQ/s1600/attiny10brkout_fig2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="251" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9DQFkKFzyHO5ginZPNiBIT-sYjS7lkledQKV79Fd0sbqIieXG3oPwvNckEhZIUdkk2AiC_t6a5nsBffarjk2qzta3nMeZb0CcrALcNbsJzdaQKSksSuZ1MviDqyJzms_uR1yncfOVbhQ/s400/attiny10brkout_fig2.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
This breakout board might be confused for a bug.</div>
<br />
<br />
<h3>
<u><b>How to Program It</b></u></h3>
<br />
The board is so tiny, it's difficult to use and program. It is certainly not breadboard compatible due to the small-pitch headers. To alleviate these problems, I created a small landing pad board for it. This adapts the 0.050" headers to 0.1" headers. Additionally, the landing pad has a 6-pin <a href="http://www.atmel.com/images/doc8373.pdf" target="_blank">TPI</a> programming connector. This allows the ATtiny10 to be programmed with an <a href="http://www.atmel.com/tools/atatmel-ice.aspx" target="_blank">Atmel ICE</a>. You can also program ATtiny10s with an <a href="http://junkplusarduino.blogspot.com/p/attiny10-resources.html" target="_blank">Arduino</a> and a little extra circuitry.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9_qtrC7pLJOx91FmtX-4agn8eKdOqdZ9AITKRSRTuLItqbMw5yysEVCwt2w_kT6HXT6_vhLvxGnmPuDS6KUfiiCbdJi-8M88c9LA2yJ0JWV04feg0EOBjYki7T3kGXa1XgyJxn6uW1s8/s1600/attiny10lp_fig1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="306" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9_qtrC7pLJOx91FmtX-4agn8eKdOqdZ9AITKRSRTuLItqbMw5yysEVCwt2w_kT6HXT6_vhLvxGnmPuDS6KUfiiCbdJi-8M88c9LA2yJ0JWV04feg0EOBjYki7T3kGXa1XgyJxn6uW1s8/s400/attiny10lp_fig1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
ATtiny10 Mini Breakout Landing Pad</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIIgvBqbDCSVkAET2G8Av8QNMqWpRPA0a5rOu-bdVJP2fn0L-bdzwyPQRNOGNpjjZS3DRF4mbA49EXuuAGCFLgsU0V8MdEU1ZmQyHBUYUVOa8OyT2plNtKNV90wYgyPyrltfhJqmLPZUc/s1600/attiny10lp_fig2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="286" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIIgvBqbDCSVkAET2G8Av8QNMqWpRPA0a5rOu-bdVJP2fn0L-bdzwyPQRNOGNpjjZS3DRF4mbA49EXuuAGCFLgsU0V8MdEU1ZmQyHBUYUVOa8OyT2plNtKNV90wYgyPyrltfhJqmLPZUc/s400/attiny10lp_fig2.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
The landing pad is breadboard compatible, and allows you to power,</div>
<div class="separator" style="clear: both; text-align: center;">
program, and use the ATtiny10 mini breakout.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3>
<u><b>What Can I Do With It?</b></u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
There are many things you could do with a breakout board this small:</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ul>
<li>Use it to design the world's smallest quadcopter and become a billionaire</li>
<li>Build an army of cybernetic bats with ATtiny brains</li>
<li>Show it off to your friends and demonstrate your fine soldering skills!</li>
<li>Leave off the headers and make electronic fireflies</li>
<li>Incorporate it into a project's PCB by adding 0.050" male headers on your board. The ATtiny10 may be tiny, but it has 1k of flash, 4 GPIO, a 16-bit counter, PWM, an ADC, and capacitive touch sensing.</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVcoWuHSKO8yegeDHV6VeiSR_k8YD5L96-KHBiMtt8boW0a0rtbkdG4X13HDbwz5Bv-1vZYGkD20xvxcA7VtMrlVA6dWvBdXuxLZR63Z9MwYyS5MpPBM9q5ngOpdAgUqlNqMNd-CTxp54/s1600/attiny10_solar.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVcoWuHSKO8yegeDHV6VeiSR_k8YD5L96-KHBiMtt8boW0a0rtbkdG4X13HDbwz5Bv-1vZYGkD20xvxcA7VtMrlVA6dWvBdXuxLZR63Z9MwYyS5MpPBM9q5ngOpdAgUqlNqMNd-CTxp54/s400/attiny10_solar.jpg" width="355" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Powering it from miniature <a href="http://www.vishay.com/docs/81521/bpw34.pdf" target="_blank">BPW34</a> solar cells. This isn't great for LEDs,</div>
<div class="separator" style="clear: both; text-align: center;">
but the microcontroller itself is fully functional.</div>
<div>
<br /></div>
<div>
<br /></div>
<h3>
<u>Assemble Your Own</u></h3>
<div>
<br /></div>
<div>
Here's the information you need if you'd like to assemble your own pint-sized ATtiny10 breakouts.</div>
<div>
<br /></div>
<div>
ATtiny10 Mini Breakout Board: <a href="https://oshpark.com/shared_projects/HjnJTo5S" target="_blank">Order PCBs on OSHPark</a>! (<b><span style="color: #990000;">select the 0.8mm thickness option</span></b>)</div>
<div>
ATtiny10 Mini Breakout Landing Pad: <a href="https://oshpark.com/shared_projects/tbB2lM2K" target="_blank">Order PCBs on OSHPark</a>!</div>
<div>
<br /></div>
<div>
<u>Parts List for Breakout</u></div>
<div>
<ul>
<li><b>Microcontroller</b>: <a href="http://www.digikey.com/product-detail/en/atmel/ATTINY10-TSHR/ATTINY10-TSHRCT-ND/2136158" target="_blank">ATtiny10 SOT-23-6</a></li>
<li><b>C1</b>: 100nF 0402 SMD ceramic capacitor</li>
<li><b>R1, R2</b>: 680 ohm 0402 SMD resistors, or adjust value to change brightness of LEDs</li>
<li><b>LEDs</b>: 2x 0603 SMD, colors of your choice</li>
<li><a href="https://www.digikey.com/product-detail/en/sullins-connector-solutions/GRPB041VWVN-RC/S9014E-04-ND/1786440" target="_blank">A pair of 4 pin 0.050" male headers</a></li>
</ul>
<div>
<u>Parts List for Landing Pad</u></div>
</div>
<div>
<ul>
<li><a href="https://www.digikey.com/product-detail/en/sullins-connector-solutions/LPPB041NFFN-RC/S9008E-04-ND/1786362" target="_blank">A pair of 4 pin 0.050" female headers</a></li>
<li>A pair of 3 pin 0.1" standard male headers</li>
<li><a href="https://www.digikey.com/product-detail/en/3m/30306-6002HB/3M15451-ND/1237391" target="_blank">6 pin (2x3) Shrouded Programming Header</a></li>
</ul>
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcRoO2foeEoBTl3aRGIpfJijeLijl4VVYXvXh2GYfC3VhQFmRlSlH9dnVpy2aqqNvjO9iY13cVNKVRHtzC64b7If7cBNFrzWkUF-71QOBAJ2pKvRkJmJCX6OrPzQS700g1fOlCENJ6CmQ/s1600/attiny10brkout_sch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="203" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcRoO2foeEoBTl3aRGIpfJijeLijl4VVYXvXh2GYfC3VhQFmRlSlH9dnVpy2aqqNvjO9iY13cVNKVRHtzC64b7If7cBNFrzWkUF-71QOBAJ2pKvRkJmJCX6OrPzQS700g1fOlCENJ6CmQ/s400/attiny10brkout_sch.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
ATtiny10 Mini Breakout Schematic</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4aJh0YqlAikuLy87dv7jTKZqXhPnmWYQmPlilCA4MrWND9-y8bKe22uYEjr_SKtq8vmlDR0kBs-p33hS13DG_61w045Rjf9lJIbI0T0WxWZAIV8HklTLHZTBLyd3yQqZG7Ay0qU0XmJ8/s1600/attiny10brkout_brd.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4aJh0YqlAikuLy87dv7jTKZqXhPnmWYQmPlilCA4MrWND9-y8bKe22uYEjr_SKtq8vmlDR0kBs-p33hS13DG_61w045Rjf9lJIbI0T0WxWZAIV8HklTLHZTBLyd3yQqZG7Ay0qU0XmJ8/s400/attiny10brkout_brd.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
ATtiny10 Mini Breakout Board Layout</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxSNzA-29sau23Cg7a2133c2veSvcAV-7GwMpPdlJIwfYwUXeamux2uR8cSwXVYI4bOqWa2fDQsiKj7-wF6OC4aCEHcNCjnRcA9qtdgI4ryoWbaO0uCzO6q7xpCTya0cTWTl_LrT6Vg84/s1600/attiny10lp_sch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxSNzA-29sau23Cg7a2133c2veSvcAV-7GwMpPdlJIwfYwUXeamux2uR8cSwXVYI4bOqWa2fDQsiKj7-wF6OC4aCEHcNCjnRcA9qtdgI4ryoWbaO0uCzO6q7xpCTya0cTWTl_LrT6Vg84/s400/attiny10lp_sch.png" width="357" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
ATtiny10 Mini Breakout Landing Pad Schematic</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjroZ9t3G9WIV5FiB8tbYRHN5E8MNVfq6MYacnk2DZrq9ERKPVOf9mcdty5DyfIls3LdPvI5-VnlDNaySW2z7T2ASlB7TuAGUqlpEA5PJnLP1_yy6osY5crLt4N9fFb8w-ZLAsm8Y4Mvlk/s1600/attiny10lp_brd.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjroZ9t3G9WIV5FiB8tbYRHN5E8MNVfq6MYacnk2DZrq9ERKPVOf9mcdty5DyfIls3LdPvI5-VnlDNaySW2z7T2ASlB7TuAGUqlpEA5PJnLP1_yy6osY5crLt4N9fFb8w-ZLAsm8Y4Mvlk/s400/attiny10lp_brd.png" width="398" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
ATtiny10 Mini Breakout Landing Pad Board Layout</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQQB9GQ_RRRW8p-G-q4SK_1qu-iBfzTMU8PhFeoXz0GuwRVthUuO_kgjyTmrvuamo_C6e-2zjH9C2duIoOvT2ZCmJ1HF3oxf2SohiOIbp-tSTOYGfrOyihXpIk6dY5GVVAwM4JgbxcJjg/s1600/attiny10brkout_assembly.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQQB9GQ_RRRW8p-G-q4SK_1qu-iBfzTMU8PhFeoXz0GuwRVthUuO_kgjyTmrvuamo_C6e-2zjH9C2duIoOvT2ZCmJ1HF3oxf2SohiOIbp-tSTOYGfrOyihXpIk6dY5GVVAwM4JgbxcJjg/s400/attiny10brkout_assembly.png" width="263" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
There wasn't enough space for (readable) component identification in the</div>
<div class="separator" style="clear: both; text-align: center;">
silk screen, so here's a picture showing where the parts go.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3>
<u>Conclusion</u></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
If you assemble your own ATtiny10 Mini Breakouts, let me know! This board is kind of a novelty, but it's fun to play with a fully functional AVR breakout that is so small.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Thanks for reading!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
- Dan W.</div>
Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com12tag:blogger.com,1999:blog-3663197147714037001.post-22104069729890084962016-02-27T08:27:00.000-08:002016-02-28T21:24:20.233-08:0010MHz OCXO Teardown (CTS 1960017)I recently purchased a case of CTS 1960017 10MHz OCXOs on eBay. They are little 5V units with a sine wave output, and purchased in this quantity, cost $5 a piece. I decided to sacrifice one and open it up to see what's inside. Here are some pictures of the teardown.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB2TwOnIPoImNReB1KFbecP2R1ovvTeGn5gIVQDx2KxfzNnRWFLA28F3-A9s1GOaRzlDpWxuaHpRTaaUVK3flTe8OQf6MZTs4IwZIYib_DpBc3-khNS_-Qgf_V8YSKrqnW90-yEcArBBM/s1600/ctsOCXO_td_1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB2TwOnIPoImNReB1KFbecP2R1ovvTeGn5gIVQDx2KxfzNnRWFLA28F3-A9s1GOaRzlDpWxuaHpRTaaUVK3flTe8OQf6MZTs4IwZIYib_DpBc3-khNS_-Qgf_V8YSKrqnW90-yEcArBBM/s400/ctsOCXO_td_1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Yes, I really meant a "case" of OCXOs. 40 to be exact.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqC3OZi9PDUKDc_r9Ck8ax01l8or1mYNO-_-o9fIvMGcXjWXBEyV0TBr9wV0_XAHzGjB9WamzsZbTfyMoHT3ZTG0vLE1RfDAJnQ4g1RHx2nDwW_-NToceRSK1n-OR62MfSrBTlUok3ico/s1600/ctsOCXO_td_2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqC3OZi9PDUKDc_r9Ck8ax01l8or1mYNO-_-o9fIvMGcXjWXBEyV0TBr9wV0_XAHzGjB9WamzsZbTfyMoHT3ZTG0vLE1RfDAJnQ4g1RHx2nDwW_-NToceRSK1n-OR62MfSrBTlUok3ico/s400/ctsOCXO_td_2.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
39 of them will be handled with care.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTGfxnkhes1wRdUB88gCXVtlyiGAXYHB7vtOBOhB7sH6HL7K9sF_altUz5NNFXymjWocaA0Lp_MGzsGx3bvdw1_Yj-i3fHywT31QmlnSqjDeMT0MrfBPCusYNQzQbrBP1VDotAFbLHSRg/s1600/ctsOCXO_td_3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTGfxnkhes1wRdUB88gCXVtlyiGAXYHB7vtOBOhB7sH6HL7K9sF_altUz5NNFXymjWocaA0Lp_MGzsGx3bvdw1_Yj-i3fHywT31QmlnSqjDeMT0MrfBPCusYNQzQbrBP1VDotAFbLHSRg/s400/ctsOCXO_td_3.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
I cut around the bottom of the can, being careful not to go too deep in any spots.</div>
<div class="separator" style="clear: both; text-align: center;">
Eventually the can just cracked off in my hand cleanly.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiybZatb-xCSlaEwgTX1e72ADgEhRKEEFqxSoJyRELQfl5jUH0WGj-2WqoKGyaz2MlKS6gJo45p1KlsANKdShHYTmeJCznFlyEKtaV0PtQ8dnYqnMViLQltTwT3NerZq8ZdCCIB8wWS9PQ/s1600/ctsOCXO_td_4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiybZatb-xCSlaEwgTX1e72ADgEhRKEEFqxSoJyRELQfl5jUH0WGj-2WqoKGyaz2MlKS6gJo45p1KlsANKdShHYTmeJCznFlyEKtaV0PtQ8dnYqnMViLQltTwT3NerZq8ZdCCIB8wWS9PQ/s400/ctsOCXO_td_4.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Success.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9rb4EBtWmF303ht1hXzEgS7WGv47BAVws_ZXTBv-9IAc27juso1I6jGuOroEIZI3H2yqstoaB1WxbHPKcDaF8r8jtsHtPGAU5uCCgGX7U9y6nhDKxNcQFRpBVi_TnpIJPfHf79a3jgIM/s1600/ctsOCXO_td_5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="278" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9rb4EBtWmF303ht1hXzEgS7WGv47BAVws_ZXTBv-9IAc27juso1I6jGuOroEIZI3H2yqstoaB1WxbHPKcDaF8r8jtsHtPGAU5uCCgGX7U9y6nhDKxNcQFRpBVi_TnpIJPfHf79a3jgIM/s400/ctsOCXO_td_5.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Lots of passive components and a couple of ICs visible from the top of the board.</div>
<div class="separator" style="clear: both; text-align: center;">
I always expect to find more inside these oscillator units than I actually do.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQzVZp384hB9r6aJhvH2hOgO-DeVPr_zewiaXeOysRjZTWvVdRC3kFwPDv1FR0Wu1HK51UV3_8XoXCBeinoth-v2S-_jatIWvGgJPvShD9KHYRgJDEnjSlLFv3vg6yjEGSwF5goqCibpc/s1600/ctsOCXO_td_10.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQzVZp384hB9r6aJhvH2hOgO-DeVPr_zewiaXeOysRjZTWvVdRC3kFwPDv1FR0Wu1HK51UV3_8XoXCBeinoth-v2S-_jatIWvGgJPvShD9KHYRgJDEnjSlLFv3vg6yjEGSwF5goqCibpc/s400/ctsOCXO_td_10.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
The 14SOIC part is an <a href="http://www.onsemi.com/pub_link/Collateral/LM324-D.PDF" target="_blank">LM2902</a> quad opamp.</div>
<div class="separator" style="clear: both; text-align: center;">
There is also an SC70-5 part that looks like an output buffer.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigZZOBk-AUFPU9iVST7yV6VsU39AOcZw9pmxPFkhDeAqoeE6MTKYl-bELIXkbn0yAaFX4AN44CQLQYR7w2ihtKrzXThZX6YvdlYTzSOMt-NBGBfeUEsa-e8pBN03uALwqNlbJRbhZoafI/s1600/ctsOCXO_td_6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigZZOBk-AUFPU9iVST7yV6VsU39AOcZw9pmxPFkhDeAqoeE6MTKYl-bELIXkbn0yAaFX4AN44CQLQYR7w2ihtKrzXThZX6YvdlYTzSOMt-NBGBfeUEsa-e8pBN03uALwqNlbJRbhZoafI/s400/ctsOCXO_td_6.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
This small piece of insulation was wrapped around one side of the crystal.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrREd6UmpHbaBatkK2Duop_9jUldlRBBcfg46K7v_cQvDr_Vl8IOdtuNbts0KTnn5-KSyuBXBBAkLP9_tzVN6Hoim_WatKLPNNT_SQMXPCgbQy1a5TIkiop7fzNqSKWR2g6Y-fbMZvUz0/s1600/ctsOCXO_td_7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="275" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrREd6UmpHbaBatkK2Duop_9jUldlRBBcfg46K7v_cQvDr_Vl8IOdtuNbts0KTnn5-KSyuBXBBAkLP9_tzVN6Hoim_WatKLPNNT_SQMXPCgbQy1a5TIkiop7fzNqSKWR2g6Y-fbMZvUz0/s400/ctsOCXO_td_7.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
I cut the pins and flipped the board over.</div>
<div class="separator" style="clear: both; text-align: center;">
This side is much more interesting!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv7dszR8BBwwonIuDCGK8WSYMaQbCYqm5rnAZHOL4sI_h5sxEI5QBdVJxqZDz3tB6VskgJoHBCaqP-wOpWgZe-RUZA9WMTqKVjunsomVNKzCEWD2Dogodd1RgO_fwp6ChYC5gTDYCITGw/s1600/ctsOCXO_td_11.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="281" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv7dszR8BBwwonIuDCGK8WSYMaQbCYqm5rnAZHOL4sI_h5sxEI5QBdVJxqZDz3tB6VskgJoHBCaqP-wOpWgZe-RUZA9WMTqKVjunsomVNKzCEWD2Dogodd1RgO_fwp6ChYC5gTDYCITGw/s400/ctsOCXO_td_11.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
The crystal is bonded to the ceramic heater board, and that seems to</div>
<div class="separator" style="clear: both; text-align: center;">
be glued to the main board.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMk3oU7SC5lC4wz7_iINpBT4gT_IxKiwzbnCinJYiqx1XgsMQyKTnPUmKE_qPckMskToH-RkLZYEvBrsSHZGvqJVT6U1NySE9cSV5IKo-DqjE0ffMUl6hZrA7ClyuZKe3CzCdtiUUWs1M/s1600/ctsOCXO_td_9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="253" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMk3oU7SC5lC4wz7_iINpBT4gT_IxKiwzbnCinJYiqx1XgsMQyKTnPUmKE_qPckMskToH-RkLZYEvBrsSHZGvqJVT6U1NySE9cSV5IKo-DqjE0ffMUl6hZrA7ClyuZKe3CzCdtiUUWs1M/s400/ctsOCXO_td_9.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Now to put it back together. Hmm...</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Thanks for reading!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
- Dan W.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com3tag:blogger.com,1999:blog-3663197147714037001.post-85445935305747402102016-02-25T05:05:00.000-08:002016-04-25T13:14:10.610-07:00LoRa FeatherWing Development BreakoutIn this post I will document a LoRa FeatherWing Development Breakout board that I designed for the <a href="https://www.adafruit.com/category/777" target="_blank">Adafruit Feather</a> line of microcontroller boards.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVlIf-KRm6xdL6EIbyvPU3w6VzGEt24r3F8O3mIPcNxWR5vTmU8vVjPqKnXX0GuSu35ykIUItvVtM584RyO0EaMIajOismSABatEvfKwxpiVll1Gdlz9CV80JnWMvdDTXk7p5W_YjMcow/s1600/lorafw.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="252" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVlIf-KRm6xdL6EIbyvPU3w6VzGEt24r3F8O3mIPcNxWR5vTmU8vVjPqKnXX0GuSu35ykIUItvVtM584RyO0EaMIajOismSABatEvfKwxpiVll1Gdlz9CV80JnWMvdDTXk7p5W_YjMcow/s400/lorafw.jpg" width="400" /></a></div>
<div style="text-align: center;">
LoRa FeatherWing Development Breakout for Adafruit Feather</div>
<br />
<h3 style="text-align: left;">
<u><b>What is LoRa?</b></u></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
LoRa is an ultra-long range wireless technology that uses sub-GHz <a href="https://en.wikipedia.org/wiki/ISM_band" target="_blank">ISM</a> bands. It allows the interconnection of small, low-power sensor nodes and Internet of Things (IoT) devices. There are many LoRa transceiver modules on the market from manufacturers such as <a href="http://www.hoperf.com/rf_transceiver/lora/" target="_blank">HopeRF</a> and <a href="http://www.microchip.com/design-centers/wireless-connectivity/motor-control/lora-technology" target="_blank">MicroChip</a>. These modules can be used to connect small, isolated networks of nodes in custom applications. They can also be used to connect nodes to <a href="https://en.wikipedia.org/wiki/LPWAN" target="_blank">Low-Power Wide Area Networks</a> (LPWANs), such as <a href="https://www.lora-alliance.org/What-Is-LoRa/Technology" target="_blank">LoRaWAN</a>.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The choice of module is quite important when designing your project. If you are interested in participating in LoRaWAN, you need to choose a module that is compatible with it. Importantly, significant coding is also necessary to enable the necessary features and functions required by the network. Unless you want to start coding from scratch, you should pick a module with existing library support for whatever development environment you are using.<br />
<br />
Check out this <a href="http://thethingsnetwork.org/wiki/Hardware/OverviewNodes/raw" target="_blank">great article</a> on <a href="http://thethingsnetwork.org/" target="_blank">The Things Network</a> website that covered various modules and their compatibility. They have documentation on building a LoRa node with an RFM95W module and a Teensy.</div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
<b><u>HopeRF RFM95/96(W)</u></b></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The RFM95/96(W) series of modules by HopeRF is a good entry point into LoRa development. There is a substantial amount of documentation, source code, and example projects on the internet to help you get started. Numerous Arduino-compatible libraries have also been developed.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
RFM95/96(W) modules can be purchased for as little as $10 from some suppliers. Please read the manufacturer's documentation to become more familiar with them.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<a href="http://www.hoperf.com/rf_transceiver/lora/RFM95W.html" target="_blank">RFM95W Low Power Long Range Transceiver Module</a></div>
<div style="text-align: left;">
<a href="http://www.hoperf.com/upload/rf/RFM95_96_97_98W.pdf" target="_blank">RFM95/96/97/98(W) Manufacturer's Datasheet</a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
As always, low cost comes at a <i>price</i>. The RFM95/96(W) modules interface with a microcontroller over SPI bus plus a few digital I/O lines. If you are interested in LoRaWAN, much of the processing necessary for that is offloaded to the microcontroller and must be implemented in software. By comparison, more complex and expensive modules from other manufacturers do all of the LoRaWAN processing for you, and you merely pass data in and out of the modem.</div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
<span style="font-family: inherit;"><u><b>LoRa Development for Adafruit Feather</b></u></span></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I became interested in LoRa technology some weeks ago, and decided to design a small LoRa FeatherWing. I am calling this a "Development Breakout" because it is not entirely ready to use after you solder on the RFM95/96(W) module. My board connects power and the MOSI, MISO, and SCK SPI lines from the Feather to the module. However, there are additional lines that need to be connected based on which library you are using. For maximum flexibility, I decided to break out the DIO, Reset, and SPI chip select pins from the module to a 2x5 0.1" header. This allows you to connect the pins any way you like to the Feather.<br />
<br />
The antenna connects via an edge-launch SMA connector. You can select SMA or RP-SMA based on your antennas and requirements.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The example programs I will provide here are compatible with Feather M0, 32U4, and HUZZAH. If you plan to use this board for LoRaWAN, the Feather M0 is required. The LoRaWAN libraries I have seen are quite large, and the 8-bit AVRs do not have enough flash and RAM to support them.<br />
<br />
This is only the first board I plan to design. If you want a more polished, ready-to-use board, please stay tuned as the project develops.<br />
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
<span style="font-family: inherit;"><u><b>Feather HUZZAH ESP8266</b></u></span></h3>
<div style="text-align: left;">
<br /></div>
I know there will be interest in using this board on the Feather HUZZAH, especially for creating small gateways. <strike>I have successfully gotten a Feather HUZZAH to operate in receive mode only, picking up the broadcast strings from a beacon. However, when I attempted to transmit with the Beacon Mode example program, I experienced reset issues on the ESP8266. I'm not sure yet if this is a power issue or an SPI issue, but it will require more experimenting.</strike><br />
<br />
<b>Update: </b>Both of the example programs are now compatible with the Feather HUZZAH. A small delay had to be added to the five second wait loop in the Beacon mode program to prevent the ESP8266's watchdog from timing out. Just change your digital pin definitions for the HUZZAH. I found that pins #4, #5, and #2 worked for controlling DIO0, DIO5, and NSS respectively.<br />
<br />
Despite compatibility with these simple example programs, the Feather HUZZAH is limited in "clean" I/O pins that can operate as inputs for the DIO lines needed by many LoRaWAN libraries. I am exploring using an 8-bit I/O expander that communicates with the ESP8266 over I2C to enable further LoRa development on HUZZAH.<br />
<br /></div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
<b><u>Shared as Open Source Hardware (OSHW)</u></b></h3>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
LoRa FeatherWing Development Breakout: <a href="https://oshpark.com/shared_projects/X6nJejfZ" target="_blank">Order PCBs on OSHPark</a>!<br />
<br />
Eagle Files: <a href="https://github.com/SyncChannel/LoRa_FeatherWings" target="_blank">Shared on Github</a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Example Program: <a href="https://gist.github.com/SyncChannel/30fcedae57075484f9c0" target="_blank">LoRa FeatherWing Beacon Mode</a></div>
<div style="text-align: left;">
Example Program: <a href="https://gist.github.com/SyncChannel/06f1918742e4943e5692" target="_blank">LoRa FeatherWing Transceiver Mode</a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd_fakEPOpllCKzrvGwBlz0QpKIYRP9gyVEy5BhQtHBs70AWylyf8whLamExdAFlzGZslVBUVlK5bT9GeAzaHkMy8HD6Ci8S6wvRddvAMI37hZTNM6M0eJAh6VAAEAcFbF4Oe2Jj47aJ0/s1600/LoRaFWsch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd_fakEPOpllCKzrvGwBlz0QpKIYRP9gyVEy5BhQtHBs70AWylyf8whLamExdAFlzGZslVBUVlK5bT9GeAzaHkMy8HD6Ci8S6wvRddvAMI37hZTNM6M0eJAh6VAAEAcFbF4Oe2Jj47aJ0/s400/LoRaFWsch.png" width="400" /></a></div>
<div style="text-align: center;">
LoRa FeatherWing Development Breakout Schematic</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQzzXdqdsZfTB0vz0PA5pVn_cyG32zpsbEyXxTGYLI8jQzrmiNrYaVlxX4qa7imq5A2VAMfdsotpCCcB9OHHcC-BvX7f9mfO7zE9YuGKt-_sC33gHFNjYNDg9k-yZZs2glyNok5LVlLUw/s1600/LoRaFWboard.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQzzXdqdsZfTB0vz0PA5pVn_cyG32zpsbEyXxTGYLI8jQzrmiNrYaVlxX4qa7imq5A2VAMfdsotpCCcB9OHHcC-BvX7f9mfO7zE9YuGKt-_sC33gHFNjYNDg9k-yZZs2glyNok5LVlLUw/s400/LoRaFWboard.png" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
LoRa FeatherWing Development Breakout Board Layout</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h3 class="separator" style="clear: both; text-align: left;">
<b><u>Assemble Your Own</u></b></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Here is the information you need if you'd like to order PCBs and make your own LoRa FeatherWings.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<u>Parts List:</u></div>
<ul>
<li><b>LoRa Module: </b>HopeRF RFM95W or RFM96W (pick the correct frequency for the ISM bands used in your country)</li>
<li><b>RF Connector</b>: SMA or RP-SMA Edge-Launch for 1.6mm/0.062" board thickness<b> </b></li>
<li><b>C1</b>: 47uF 1410 Tantalum SMD capacitor, 10V rated minimum</li>
<li><b>C2:</b> 1uF 0603 Ceramic SMD capacitor</li>
<li><b>C3:</b> 100nF 0603 Ceramic SMD capacitor </li>
<li><b>LED: </b>0805, color of your choice</li>
<li><b>R1:</b> 680 ohm 0603, or adjust value to change brightness of LED</li>
<li>Headers to connect the FeatherWing to the Feather board </li>
<li>Antenna suitable for the frequency range supported by your RFM module</li>
</ul>
<b>Note: </b>You can do away with the LED and R1 if you don't want an additional power indicator. Also, you <i>might </i>be tempted to do away with the capacitors C1 and C2 to simplify the bill of materials. The RFM module draws over 100mA during transmissions at the maximum power setting, and ramp-up can be quite quick depending on your configuration. I would recommend the extra bulk capacitance on the board, especially if you are loading the voltage regulator on the Feather with other devices.<br />
<br />
<h3>
<u><b>Wiring</b></u></h3>
<br />
As noted, this is a development breakout, so you have some additional wiring to do to get the module fully connected to the Feather. I used the following pinout, which is compatible with the example programs I have provided. You can modify it as you like to fit your project or chosen library. The DIO and CS lines from the RFM module only need to go to standard digital I/O pins on the Feather, so you have many options with the 32U4 and M0. <br />
<br />
When you try other libraries, you'll probably have to connect more of the DIO pins. Actually, if you look closely in the pictures below, you'll see that I have a different pinout wired up for experimentation. This board is very flexible.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAdJsD0ZVqIV9XMH37rcbpDONiDSFuPaE8vhheZnlwHZTeMXKVLyNymdCsaEwnqlqsJN-aVbml3n3x0KjDTfqan4jSwtyUPPvNuObXkvo-sowRrfTv03OaBn4Fj3JtizhYPMeJqdk6yys/s1600/example_pinout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAdJsD0ZVqIV9XMH37rcbpDONiDSFuPaE8vhheZnlwHZTeMXKVLyNymdCsaEwnqlqsJN-aVbml3n3x0KjDTfqan4jSwtyUPPvNuObXkvo-sowRrfTv03OaBn4Fj3JtizhYPMeJqdk6yys/s320/example_pinout.png" width="320" /></a></div>
<div style="text-align: center;">
Pinout used in the example programs.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1Ww7dl5tid721lzOCoUQ-UwWjCFlFQr42DqATcm7vut-f9EZ2W3_woibl9CEGT54PVWy56iQuezgf5cNcuwMBFP5jYIaH4rtcaztXkR2Qxe0f8GavCzYVK8-Qn723n4cmoy8WWPTB8X8/s1600/lorafw_st.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1Ww7dl5tid721lzOCoUQ-UwWjCFlFQr42DqATcm7vut-f9EZ2W3_woibl9CEGT54PVWy56iQuezgf5cNcuwMBFP5jYIaH4rtcaztXkR2Qxe0f8GavCzYVK8-Qn723n4cmoy8WWPTB8X8/s400/lorafw_st.jpg" width="300" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
Wiring completed with breadboard jumper wires and a 2x5 0.1" male header.</div>
<div class="separator" style="clear: both; text-align: center;">
This allows maximum flexibility to change things, but it's messy. </div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiRUTEsv2S5R0wkp7IEx6E7hsgxm9e_oq5S4ZGokkJ_Ho7qksMvBfMHhRnnwt0cTes6MCC9evKara2s9ukWXHr5b7PlcNxAiFkDWi7qSkcBqPzQRqcjmRtUsCLFgKKw6-BJEAGzrY12KA/s1600/lorafw_w2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="281" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiRUTEsv2S5R0wkp7IEx6E7hsgxm9e_oq5S4ZGokkJ_Ho7qksMvBfMHhRnnwt0cTes6MCC9evKara2s9ukWXHr5b7PlcNxAiFkDWi7qSkcBqPzQRqcjmRtUsCLFgKKw6-BJEAGzrY12KA/s400/lorafw_w2.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Wiring completed with small gauge, solid core wire.</div>
<div class="separator" style="clear: both; text-align: center;">
Nice and neat. This is a ready-to-use LoRa beacon!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3>
<u>Example Programs</u></h3>
<br />
I debated on which RFM95W Arduino library to use for my example programs. I am aware that many people reading this know a lot about LoRa, have a library in mind, and just need the hardware for the Feather boards. If that's you, awesome. Please enjoy using this board and tell me what you would like to see on future versions. Other people might just need long range wireless connectivity in their project, and don't necessarily want to participate in a LPWAN yet.<br />
<br />
I decided to use the <a href="https://github.com/Ideetron/RFM95W_Nexus" target="_blank">RFM95W_Nexus library by Ideetron</a>. This set of code seems to be set up for a specific LoRa development board, but it also has example programs for simple beacon and transceiver nodes operating independently. The portions of code I used don't actually rely on an included library at all, besides SPI. I think this is a great first example program, because it shows you what is actually necessary to drive the RFM module from your microcontroller, without obscuring things into routines. When you get interested in LoRaWAN, the library includes code for that. Additionally, with all of the DIO pins broken out from the RFM module, you can advance to any of the other libraries under development, such as the <a href="https://github.com/tftelkamp/arduino-lmic-v1.5" target="_blank">LMIC</a> library.<br />
<br />
The <i>LoRa FeatherWing Beacon Mode</i> program configures the Feather as a beacon that broadcasts a test count every five seconds. This is useful for testing the range of your nodes. The code is very simple, and you will see that modifying the program to send sensor data or anything else you like in the payload is straightforward. Simply load the program, connect a LiPo battery or some other means of power to the Feather, and it will broadcast autonomously.<br />
<br />
The <i>LoRa FeatherWing Transceiver Mode</i> example configures the Feather to receive the messages from the Beacon node. There are also functions in there to transmit, so you could modify this into a bridge for long range wireless serial communications. In this example, received messages are echoed across USB Serial, allowing you to verify the receipt of broadcasts from your beacon nodes and test your boards.<br />
<br />
<h3>
<u>Range</u></h3>
<br />
The range you can expect from your wireless link is very dependent upon your antennas and environment. Good line-of-sight between the modules is important. Additionally, the frequencies supported by your modules has an impact. Finally, the configuration options you choose for the wireless link will set your maximum data rate, but also affect your range. In the example programs, I set the modules up for 250kHz bandwidth, Spreading Factor 11, and a 4/8 coding rate. These settings favor longer range, with a nominal bit rate of 293bps. Much higher nominal bitrates are possible at the expense of range.<br />
<br />
Bandwidth, Spreading Factor, and Coding rate are much too complicated to get into in this article. If you are interested in seeing a separate post explaining those concepts and how they can be use to customize your LoRa FeatherWing project, please let me know in the comments below.<br />
<br />
I personally have tested these boards, with the above-mentioned link settings, out to 2.7 kilometers. With a Spreading Factor of 6 (high data rates), I was able to achieve reliable communications out to 500 meters with less than perfect line-of-sight.<br />
<br />
<br />
<h3>
<u>Wrap Up</u></h3>
<br />
I do hope that you find this FeatherWing design useful. Please let me know if you build one and make a cool project with it, or get it linked into LoRaWAN. Also, please post below any corrections or necessary additions to the information I have presented here. LoRa is very popular in the IoT community, and I look forward to learning from your knowledge and experience in using it.<br />
<br />
Thanks for reading!<br />
<br />
- Dan W.Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com8tag:blogger.com,1999:blog-3663197147714037001.post-87164288613984068322016-02-15T07:48:00.000-08:002016-02-15T08:52:48.584-08:00HP 5221B Electronic CounterIt is a snow day here, so let's take a break from projects and look at an old Hewlett-Packard frequency counter. I purchased this 5221B electronic counter last year in San Diego from a military surplus store. It is accurate within its limited resolution, the nixie tubes all work, and overall it is in fine shape.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpFwXlV4Z51JbukVPuMrFX1nOM3FPRbQslabh9Txm0d2flmwvN8zB0Wp3vSDyJ0oqAw2R36gZ2bLpzpAPPmkpCBBj1qsUHRa__rPAEjWlt9xYvtC6_zLbEQwP-9pLUiYIR4jK7J-AyeTg/s1600/HP5221B_1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="203" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpFwXlV4Z51JbukVPuMrFX1nOM3FPRbQslabh9Txm0d2flmwvN8zB0Wp3vSDyJ0oqAw2R36gZ2bLpzpAPPmkpCBBj1qsUHRa__rPAEjWlt9xYvtC6_zLbEQwP-9pLUiYIR4jK7J-AyeTg/s400/HP5221B_1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
The display on the counter reading out 3.885 MHz.</div>
<div class="separator" style="clear: both; text-align: center;">
Who doesn't love nixie tubes and the smell of vintage HP test gear?</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu4ed0gYdB850krFKjrNqBU68PqE0si8kJiaYo8vW1R-d5WSE1aZvsED5-YCjRl8vL9XX8GaJd0Ydqj85vGHEe_SNHAWI1ADO0k123kzBIJWo_qUM6LCZRo6lAarzHZCl8fpIzBRgpvAA/s1600/HP5221B_2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu4ed0gYdB850krFKjrNqBU68PqE0si8kJiaYo8vW1R-d5WSE1aZvsED5-YCjRl8vL9XX8GaJd0Ydqj85vGHEe_SNHAWI1ADO0k123kzBIJWo_qUM6LCZRo6lAarzHZCl8fpIzBRgpvAA/s400/HP5221B_2.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
The 5221B sitting on top of a Racal-Dana 1992.</div>
<div class="separator" style="clear: both; text-align: center;">
I wonder who put the 5 Megacycles sticker on there. It fit the look of the counter so I left it.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-DYM2uf0YKf-0W6Xjbl3jzVUJO3jhbqKiXC8YHOoJUQnUDggV0j2pXpSwUIFYzgtx04H6bD-g3hm_Mh9YnVcimmqKFu1VqVwDTE0UorkAt7xDhhyXq9OurXtCz9kqSQiTD3_SVf3XhHw/s1600/HP5221B_3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-DYM2uf0YKf-0W6Xjbl3jzVUJO3jhbqKiXC8YHOoJUQnUDggV0j2pXpSwUIFYzgtx04H6bD-g3hm_Mh9YnVcimmqKFu1VqVwDTE0UorkAt7xDhhyXq9OurXtCz9kqSQiTD3_SVf3XhHw/s400/HP5221B_3.jpg" width="298" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
The internal 1 MHz timebase of the counter is well within spec:</div>
<div class="separator" style="clear: both; text-align: center;">
less than 1ppm out and I have never trimmed it.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1aASLKD9RYWjSQg7OfWPYglD_CVcXUkf5RC1L2BQQ9ZZGRaaER8aQUXeY6Dvi6DdOwohY82l4hUzKJi43Lw-4ckUxl2kBMFR9OqxGc4PNHYsvPfUWkFhL592S3w8s-K27HwrbwKYHbO4/s1600/HP5221B_4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1aASLKD9RYWjSQg7OfWPYglD_CVcXUkf5RC1L2BQQ9ZZGRaaER8aQUXeY6Dvi6DdOwohY82l4hUzKJi43Lw-4ckUxl2kBMFR9OqxGc4PNHYsvPfUWkFhL592S3w8s-K27HwrbwKYHbO4/s400/HP5221B_4.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
It is hard to do nixie tubes justice in a picture. You just have to see them in</div>
<div class="separator" style="clear: both; text-align: center;">
person to appreciate the depth and complexity of each digit in the display.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV2J5Rdl5AFZ2prs6Neh9_Sk06bBK-bu3t7RJ40m_ZDsn8wnCFTZsyq8khzA0W8dC0C585sqIPeUP_1b2W3zw8sDEjQSsV2uT_C3CUInDouBLZfcHXAfOk_zdp_xMOaP6ueTE56L31jG4/s1600/HP5221B_5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV2J5Rdl5AFZ2prs6Neh9_Sk06bBK-bu3t7RJ40m_ZDsn8wnCFTZsyq8khzA0W8dC0C585sqIPeUP_1b2W3zw8sDEjQSsV2uT_C3CUInDouBLZfcHXAfOk_zdp_xMOaP6ueTE56L31jG4/s400/HP5221B_5.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
The form factor of the counter is compact and well executed.</div>
<div class="separator" style="clear: both; text-align: center;">
(It is also very hard to photograph.)</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTYzxdOmoep6kxBUxJLdHByyaJKY_uelEof67l6pdivD6qKCNlXCdn3utyqCHu4QvEMuFrqYajEDx75Fjs01RkTN9rI0HbEoYO8WMUhUioCvjeIASLbIcXhjngzreZslmGnnC1Z1k6Zzs/s1600/HP5221B_6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTYzxdOmoep6kxBUxJLdHByyaJKY_uelEof67l6pdivD6qKCNlXCdn3utyqCHu4QvEMuFrqYajEDx75Fjs01RkTN9rI0HbEoYO8WMUhUioCvjeIASLbIcXhjngzreZslmGnnC1Z1k6Zzs/s400/HP5221B_6.jpg" width="298" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
I would love to see the "Digital Recorder" that attached to this!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0r7-XS-C5rhho1k8JPSDPrl5KICq223FNIYMwkZRfqUSL4XHRm35d0uVNjRhIzz4wQMJjXvfmXSVS61isnUZIk0k6w6Ub5XVPBqxW-G9NWSF3K9Qg9ytQlwApH2EHF2twt7yRD-Ay6Bs/s1600/HP5221B_8.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0r7-XS-C5rhho1k8JPSDPrl5KICq223FNIYMwkZRfqUSL4XHRm35d0uVNjRhIzz4wQMJjXvfmXSVS61isnUZIk0k6w6Ub5XVPBqxW-G9NWSF3K9Qg9ytQlwApH2EHF2twt7yRD-Ay6Bs/s400/HP5221B_8.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Gold-plated pins on the ICs and point-to-point wiring.</div>
<div class="separator" style="clear: both; text-align: center;">
Definitely an instrument from another era.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0YHJjHSZbWQyT4Psfl_vUoBXu6J1DMaVNb0vuKy889L5L5jhIGdy7TEdx_csfoJ2ECvqfvqBx66ky92ODkP8Y9qTwVAGVH-Vt_IiAeb3pBonwUuoyNbatrJgij4c7CGffOv3eYrI7mj4/s1600/HP5221B_7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0YHJjHSZbWQyT4Psfl_vUoBXu6J1DMaVNb0vuKy889L5L5jhIGdy7TEdx_csfoJ2ECvqfvqBx66ky92ODkP8Y9qTwVAGVH-Vt_IiAeb3pBonwUuoyNbatrJgij4c7CGffOv3eYrI7mj4/s400/HP5221B_7.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
I'll have to get in there one day and check the Sprague capacitors.</div>
<div class="separator" style="clear: both; text-align: center;">
I have had bad luck with those in the past.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
One thing that cannot be experienced from these pictures is the unit's smell. As it warms up it fills the room with the scent of test gear from days gone by.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Thanks for reading!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
- Dan W.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com5tag:blogger.com,1999:blog-3663197147714037001.post-66097827687181813852016-02-07T20:04:00.000-08:002016-02-07T20:05:16.761-08:00Quick PCB: Crystal Ladder FilterHere's a little board for making a four pole crystal ladder filter.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgF6BL6sH3k0zY-a2uosbN8olnMaaFMmFhBG3hWYrTH4reectEPVM7GxkBEXOEKCsaP5mY82keNoF6H8AckxtdT4rp3ZZnrLP-uZo3V_m_IWcmYuYlmW3Z7-JnwaNmlm1VAwsygIoKMEM/s1600/crystal_ladder_filter.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgF6BL6sH3k0zY-a2uosbN8olnMaaFMmFhBG3hWYrTH4reectEPVM7GxkBEXOEKCsaP5mY82keNoF6H8AckxtdT4rp3ZZnrLP-uZo3V_m_IWcmYuYlmW3Z7-JnwaNmlm1VAwsygIoKMEM/s400/crystal_ladder_filter.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Four Pole Crystal Ladder Filter with SMA connectors</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This type of filter has a very high Q and narrow bandwidth, allowing you to select a specific frequency from your signal. Because of the narrow bandwidth, selection of the capacitors and tuning of the filter is important to achieve the desired response. You will want to test your filter after designing and assembling it to verify performance.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://oshpark.com/shared_projects/bY1EnFdp">Order PCBs on OSHPark</a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b><u>Theory</u></b></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Here are some links to cover the design theory. Many more can be found using an internet search.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://www.arrl.org/files/file/QEX_Next_Issue/Nov-Dec_2009/QEX_Nov-Dec_09_Feature.pdf">https://www.arrl.org/files/file/QEX_Next_Issue/Nov-Dec_2009/QEX_Nov-Dec_09_Feature.pdf</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://www.giangrandi.ch/electronics/crystalfilters/xtalladder.html">http://www.giangrandi.ch/electronics/crystalfilters/xtalladder.html</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://www.w0qe.com/Projects/crystal_bandpass_filters.html">http://www.w0qe.com/Projects/crystal_bandpass_filters.html</a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXsjDqSTerxnR-Qcgn8SFYFjAqo-u1yI5o2Z4FCWxXjeuBdg4NLRJCPyuVH9ZlwXaXl_HTCKQBnJATr8f8Vm-T1uJpJwChoEYSyK16GlYAgzJJ0C2fg4c-9GRs2rFeI2yxKKBVpx7a_tI/s1600/crystalfilterschematic.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="131" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXsjDqSTerxnR-Qcgn8SFYFjAqo-u1yI5o2Z4FCWxXjeuBdg4NLRJCPyuVH9ZlwXaXl_HTCKQBnJATr8f8Vm-T1uJpJwChoEYSyK16GlYAgzJJ0C2fg4c-9GRs2rFeI2yxKKBVpx7a_tI/s400/crystalfilterschematic.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
Schematic of the board</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<u><b>Parts List</b></u></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Crystals</b>: Standard HC-49 through-hole crystals</div>
<div class="separator" style="clear: both; text-align: left;">
<b>C1 through C5</b>: 0603 SMT capacitors</div>
<div class="separator" style="clear: both; text-align: left;">
<b>SMA Connectors</b>: Edge-Launch SMA for 1.6mm/0.062" board thickness</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
If you make some interesting crystal filters with this board let me know!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
- Dan W.</div>
Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com0tag:blogger.com,1999:blog-3663197147714037001.post-15714896108327928972016-02-07T20:01:00.001-08:002016-02-09T13:10:41.027-08:00Quick PCB: Pi AttenuatorThis tiny PCB can be used to make a useful Pi attenuator for your bench.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi92uf8h9QqvbGiwPEOQ0W2yVTYKVWN99xJ2q7K_WD4kkRSP31ZMVBDsT7RluqcVcQZMth-Upk6auyyeAcLl9wzsoSAes-8SWxfxmtS5k0Q4x8Ov8ZNIj4KytA77fzb-8vqxs-kswlQ3Fg/s1600/piattenuator.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="271" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi92uf8h9QqvbGiwPEOQ0W2yVTYKVWN99xJ2q7K_WD4kkRSP31ZMVBDsT7RluqcVcQZMth-Upk6auyyeAcLl9wzsoSAes-8SWxfxmtS5k0Q4x8Ov8ZNIj4KytA77fzb-8vqxs-kswlQ3Fg/s400/piattenuator.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Tiny RF Pi attenuators using surface mount resistors.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Attenuators are useful when you need to reduce a signal's strength by a specific amount. Flatness of the attenuator's response is very important to ensure predictable signal levels across the entire bandwidth of operation. Maintaining the impedance match is also important. You can buy high quality attenuators from manufacturers like <a href="http://www.minicircuits.com/products/Attenuators.shtml">Mini-Circuits</a>, but sometimes it's more fun or more expedient to make your own. Luckily you can make very low-cost, low-power attenuators that will have sufficient performance for general use in your workshop.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://www.qsl.net/w2aew/">Alan, W2AEW</a>, has an excellent YouTube video on the theory of Pi attenuators and how to design them. Check out his video. I'll also post a link to an online calculator to aid the design process.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://www.youtube.com/watch?v=A5gGeV7CiQ0">W2AEW on YouTube: Basic RF Attenuators</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://chemandy.com/calculators/matching-pi-attenuator-calculator.htm">Online Calculator</a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioGI_G8Xprfoy_-g1zSP-XyK92uwkTj8ADCRUM39bLM1Hghl3U3NAuT18i2IkC29pvLQjwpKez1Cu4YN3CIJ85uCTNqkgNaXm50Jm0V0RkapNT72PO-88tNV-ww0Z1Ejul9VHx1nJprjk/s1600/piattensch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioGI_G8Xprfoy_-g1zSP-XyK92uwkTj8ADCRUM39bLM1Hghl3U3NAuT18i2IkC29pvLQjwpKez1Cu4YN3CIJ85uCTNqkgNaXm50Jm0V0RkapNT72PO-88tNV-ww0Z1Ejul9VHx1nJprjk/s400/piattensch.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Pi Attenuator Schematic</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
R1 is in parallel with R2, and R4 is in parallel with R5. This allows you to get odd resistor values needed for some attenuator designs by placing common value resistors in parallel. The back of the board has a white silkscreen box for writing in the amount of attenuation as a reminder.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<u><b>Order PCBs on OSHPark:</b></u></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://oshpark.com/shared_projects/PTbZWoDD">Pi Attenuator (For 0603 Resistors)</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://oshpark.com/shared_projects/hgp3PubD">Pi Attenuator (For 0805 Resistors) </a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<u><b>Parts List:</b></u></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>R1 through R5</b>: 0603 or 0805 thin-film SMT resistors</div>
<div class="separator" style="clear: both; text-align: left;">
<b>SMA Connectors</b>: Edge-Launch SMA for 1.6mm/0.062" board thickness</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Using SMT components for these attenuators allows you to achieve best performance at higher frequencies. These boards have a generally flat response up to about 2GHz. <b>Be cautious of the signal levels you put through these and the power ratings of the small SMT resistors.</b></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
With some of these boards, SMA connectors, and a <a href="https://www.adafruit.com/products/442">book of SMT passives</a>, you should be able to handle any low-power attenuation needs that arise on the bench.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Thanks for reading.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
- Dan W.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com7tag:blogger.com,1999:blog-3663197147714037001.post-9161681231848669542016-02-07T20:01:00.000-08:002016-02-07T20:01:19.273-08:00Blog Hits 10k Views + "Quick PCBs"Last week this blog hit 10,000 page views! That's very surprising to me, as I haven't posted a huge amount of content to date. When I started this, I only got hits when I posted an article on a mailing list or forum. Now, I get a steady stream of views from followers and internet searches. Thank you to everyone who reads my blog. I do hope that the information I present here is high quality and useful.<br />
<br />
Most of my posts are lengthy and intended to document a full project. However, occasionally I make small boards that I need for ham radio activities or general lab use. I think some of these would be useful to share in quick posts, even if they aren't as well documented. To that end, I am going to start posting "Quick PCB" articles that share boards you might find useful on your own bench. They will be small, inexpensive PCBs that you can order on <a href="https://oshpark.com/">OSHPark</a>. I like being able to share boards for my projects, because I think it helps others re-create the work if they find it interesting.<br />
<br />
Here's to 100k views!<br />
<br />
- Dan W.Dan Watsonhttp://www.blogger.com/profile/17460460939501143627noreply@blogger.com1