<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1634572204034071649</id><updated>2026-10-10T05:51:09.319-04:00</updated><category term="AVR ATTiny RGB mood lamp PWM"/><category term="Electronics"/><category term="christmas story mannequin leg lamp"/><category term="sew bow tie sewing machine"/><title type='text'>Pete&#39;s Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>39</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-391989968063196782</id><published>2017-03-31T23:15:00.000-04:00</published><updated>2017-04-01T21:35:29.394-04:00</updated><title type='text'>Programming a Cookbook</title><content type='html'>As my girlfriend Rima and I were cooking dinner we read over the recipe we&#39;d made before. Soon we would struggle to recall if it was the lemon juice or the salt that we wanted to reduce or omit this second time around. &amp;nbsp;Or was that an increase we had wanted? This was turning out to be the usual guessing game.&lt;br /&gt;
&lt;br /&gt;
I also lamented the fact that my favorite meal recipes live exclusively in said girlfriends head. With this in mind, we came to the natural conclusion that we should write a cookbook; something for our own use. i.e. an aggregation of recipes we like from books, family, the internet, and even the ones that we&#39;ve made up ourselves.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
As I began mulling over cookbook writing options, it occurred to me to use LaTeX. LaTeX is a document typesetting system that is used primarily in the scientific field of document and book publishing. It is a very powerful tool to programmatically generate very clean documents. I have used it on many occasions when writing notes for various math classes, &lt;a href=&quot;http://petemills.blogspot.com/2013/09/latex-airplane-checklist.html&quot;&gt;airplane checklists&lt;/a&gt;, reports, and more.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The decision to use LaTeX really came together when I discovered that someone has already written a LaTeX package for typesetting recipes. The package is called &lt;a href=&quot;https://www.ctan.org/tex-archive/macros/latex/contrib/cuisine?lang=en&quot;&gt;Cuisine&lt;/a&gt; and you can read more about that in the link. &amp;nbsp;Below is a screen cap of some LaTeX to generate a recipe using the Cuisine package followed by the typeset output in the finished PDF book.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB-DR7Xgie2VXDg4r-USbNWU_tdofjqa6rUQwLks0gQQ2Dq1hjm74jPTOnJiRuf-rKe80ExK9P9wPup0ubvNB-nh6fiJN-rpNt64B984lM2QnRcj_KcAe9rYRqum6eplI7B5uGzHP97Dcn/s1600/Screen+Shot+2017-03-30+at+10.55.11+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;136&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB-DR7Xgie2VXDg4r-USbNWU_tdofjqa6rUQwLks0gQQ2Dq1hjm74jPTOnJiRuf-rKe80ExK9P9wPup0ubvNB-nh6fiJN-rpNt64B984lM2QnRcj_KcAe9rYRqum6eplI7B5uGzHP97Dcn/s320/Screen+Shot+2017-03-30+at+10.55.11+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ2_GZ5r2XctfClCMUpIT9RSjxwabAqyjgCBHkhCUNS7YZAFnE5Eky4vLjj_fE3fKIObMpH4s7_IBJ7atEygZBdGftWXJ5G7_ZK1RZwiEovTV5yCobgH_SWcMKM5oRFQBiMQnb_HloBO6p/s1600/Screen+Shot+2017-03-30+at+10.57.20+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;98&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ2_GZ5r2XctfClCMUpIT9RSjxwabAqyjgCBHkhCUNS7YZAFnE5Eky4vLjj_fE3fKIObMpH4s7_IBJ7atEygZBdGftWXJ5G7_ZK1RZwiEovTV5yCobgH_SWcMKM5oRFQBiMQnb_HloBO6p/s320/Screen+Shot+2017-03-30+at+10.57.20+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
You can see from the image above that the recipes follow a format where a group of ingredients and an action to perform on the ingredients are linked. This is continued in chronological order with 1 or more ingredients listed and an associated action to perform with those ingredients.&lt;br /&gt;
&lt;br /&gt;
I really like this order of listing ingredients. It succinctly communicates and compartmentalizes each step of the recipe thereby reducing confusion, errors, and even fatigue. It is tiresome to read a recipe that says &quot;Add the cumin&quot; and then you have to hunt thru the ingredient list to find how much cumin you need.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
The first task was to design the LaTeX document. This entails setting margins, paper size, fonts, preparing a table of contents, a title page, etc. With the rough template sorted out, I turned my attention to entering recipes.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I got about 2 recipes deep before I realized a better way to enter recipes was needed. As you can see in the syntax above, there are a lot of brackets and braces and duplicate typing. It was clear that typing up a multitude of recipes in LaTeX was going to be a tedious adventure. This is where Perl comes in.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The idea was to casually type up a recipe as a text file that could be parsed and let Perl do all of the tedious and repetitive typing. This way, we can just type up a new recipe text file at any time, take a picture, and rerun the scripts to output a new copy of our nicely formatted cookbook. After all, who knows how many recipes we may come up with!&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Below you can see an example of one of these user typed recipe.txt files. This file was used to generate the LaTeX that output the hummus recipe above. As you can see, the format is quite simplified when compared to the LaTeX. Write a line that starts with &#39;t&#39; for title, &#39;p&#39; for picture filename, &#39;s&#39; for setup, &#39;i&#39; for ingredient, &#39;a&#39; for action - a cooking step, and &#39;n&#39; for any note. These line type identifiers are separated by the &#39;&amp;gt;&#39; symbol for parsing.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpBHw4HEYu56FxbNgymBCfvI49WGSGpD_gl3tvKLyQ2oWxbLYToTtA8_AHKi5jukjdoJRuEGIMgR16rSOIPhUE1ijmn3_hy_pfPOixkVBUDR1sqIoth3YAT3UVs43RUNCiEA-tgSVNu4DQ/s1600/Screen+Shot+2017-03-30+at+11.09.19+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;100&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpBHw4HEYu56FxbNgymBCfvI49WGSGpD_gl3tvKLyQ2oWxbLYToTtA8_AHKi5jukjdoJRuEGIMgR16rSOIPhUE1ijmn3_hy_pfPOixkVBUDR1sqIoth3YAT3UVs43RUNCiEA-tgSVNu4DQ/s320/Screen+Shot+2017-03-30+at+11.09.19+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
The first three lines must be in all recipe text files. i.e. Title, Picture, and Setup. If no picture is wanted for a particular recipe, simply set the filename as &quot;none&quot;. e.g. &quot;p &amp;gt; none&quot;. This will omit the picture and placeholder image for a given recipe. If a picture is desired, then the filename should be entered on this line and the image file stored in the ./Latex/Images directory.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
The subsequent Ingredient and Action lines must be in the order you wish them to appear in the recipe. When creating the recipe text file, write 1 or more Ingredient lines followed by an Action line that describes an action to perform with the previously listed ingredients. Continue the recipe by listing the next set of ingredients and an action to perform with them.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
The Note designator must only come at the very end of the file, although if no note is required, simply omit the line and line type designator entirely. i.e. have no line that reads &quot;n &amp;gt; &quot;.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
So, the Perl script can now parse these files and generate the LaTeX, but this alone does not a cookbook make. We need chapters, but which ones? What if a friend or family member wants to make a book, but doesn&#39;t want a desert chapter? Will we have enough soup recipes to warrant their own chapter or should we fold those in with the main courses? &amp;nbsp;The penultimate scenario is strange to be sure, but clearly chapters must not be hard coded in LaTeX or Perl; we want all that code to remain unchanged even as the contents of the cookbook change.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
To handle the changing needs of chapter definitions I went with a directory structure scheme. The directory &quot;Chapters&quot; is scanned for directories who&#39;s name should follow the convention &quot;x-ChapterName&quot; where x is any letter used to force an alphabetic order to the directories. The order that the chapters appear in the book is set alphabetically by the left &quot;x-&quot; portion of the directory name which is then discarded. The chapter names are generated by the Perl script using the right portion after the hyphen only.&amp;nbsp;In the screencap below then it is clear to see that there will be 4 chapters in book order &quot;Snacks&quot;, &quot;Side Dishes&quot;, &quot;Soups&quot;, and &quot;Main Course&quot;. In this method chapters can be added, deleted, and renamed without the need to change any code.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNz6xwL9mkxf-xzW6V-4CAAhZye1-N_rU6Q-kUlOFbGcAhRH5kwHUGdYH-0gxMXnRR7ZuaOT_07MPYyMqhnUv66GU3xJXPEf-FG3-9f5uC6Ddupfo3nI3jtjiKaaDafvG0VVtAe9Tya1p8/s1600/Screen+Shot+2017-03-30+at+11.22.33+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;45&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNz6xwL9mkxf-xzW6V-4CAAhZye1-N_rU6Q-kUlOFbGcAhRH5kwHUGdYH-0gxMXnRR7ZuaOT_07MPYyMqhnUv66GU3xJXPEf-FG3-9f5uC6Ddupfo3nI3jtjiKaaDafvG0VVtAe9Tya1p8/s320/Screen+Shot+2017-03-30+at+11.22.33+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
From the above image you have probably already guessed that there are two recipes that will be included in the &quot;Snacks&quot; chapter. However, the only thing you can discern from this is the alphabetical order in which the recipes appear within the chapter. i.e. the filename is not used to title the recipe, however naming the files something descriptive is recommended. It might be hard to go back to edit your recipe for fig jam if the filename is 123.txt. The title of the recipe used in the cookbook is contained within the recipe text file itself on the line &quot;t &amp;gt; &#39;Recipe Title&#39;&quot;.&lt;br /&gt;
&lt;br /&gt;
Toward the beginning of the book goes the front matter. This contains the author name, book title, and a preface. This front matter gets placed before the table of contents, and is generated from a user editable text file at ./latex/frontMatter.txt. It is parsed similarly to the files described above where the lines &quot;a &amp;gt;&quot; is for the author, &quot;t &amp;gt;&quot; is for the cookbook title, and &quot;p &amp;gt;&quot; is for the preface.&lt;br /&gt;
&lt;br /&gt;
To make your own cookbook in this manner you will need Perl and LaTeX. Additionally, a sample cookbook structure is included in &lt;a href=&quot;https://drive.google.com/drive/folders/0B1CPUkh94AtmWjdxSk54bV80dUU?usp=sharing&quot;&gt;this Google Drive shared folder&lt;/a&gt;. It should just be a matter of downloading a copy the directory, editing your own frontMatter.txt, and recipe cards. Oh, and be sure to add some pictures of your tasty foods. With all of the edits in place, run the perl script then typeset the LaTeX and out comes your cookbook.pdf. If you are interested in taking a peek at our latest cookbook you can &lt;a href=&quot;https://drive.google.com/file/d/0B1CPUkh94AtmeWZGV1dWdkpvcFE/view?usp=sharing&quot;&gt;download &amp;nbsp;it separately&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Well, I think that is about it. With only a couple evenings work we have a sustainable method of maintaining our own cookbook. Now, I am off to the kitchen to make a pizza. If it turns out well, it might make it into our recipes.&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/391989968063196782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/391989968063196782' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/391989968063196782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/391989968063196782'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2017/03/programming-cookbook.html' title='Programming a Cookbook'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB-DR7Xgie2VXDg4r-USbNWU_tdofjqa6rUQwLks0gQQ2Dq1hjm74jPTOnJiRuf-rKe80ExK9P9wPup0ubvNB-nh6fiJN-rpNt64B984lM2QnRcj_KcAe9rYRqum6eplI7B5uGzHP97Dcn/s72-c/Screen+Shot+2017-03-30+at+10.55.11+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-2514294260121161292</id><published>2016-05-31T13:33:00.002-04:00</published><updated>2016-05-31T13:40:35.882-04:00</updated><title type='text'>Watchmaking - My Beginnings</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_MsfPOtOTxebBQgnW6LpSerHvmXEt3NZMuDI6R2G4TaEy4TIA4RtvvIYZwKw2bLQ1T5EBvEsR99q42LxX4dOgXH9J3FEpmNfISzhLk9M7Wr8g3DQy7YMV9oN0ZvMy3A5TITnyoA3pBbZU/s1600/20150530_205655.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_MsfPOtOTxebBQgnW6LpSerHvmXEt3NZMuDI6R2G4TaEy4TIA4RtvvIYZwKw2bLQ1T5EBvEsR99q42LxX4dOgXH9J3FEpmNfISzhLk9M7Wr8g3DQy7YMV9oN0ZvMy3A5TITnyoA3pBbZU/s320/20150530_205655.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I want to make a watch. More specifically, I want to make a watch movement. And I&#39;m reasonably sure that I have yet to realize the magnitude of this aspiration, although with every project I undertake it becomes more clear.&lt;br /&gt;
&lt;br /&gt;
I have been at this watchmaking thing for just about a year and a half now. In that time I have managed a few clock repairs, and even a few watch repairs. I&#39;ve also failed several repairs by shooting tiny springs across the room, permanently deforming miniscule watch parts, and have rocketed a balance jewel to bounce off a wall before disappearing forever into the carpet, but as time goes by my skillset is improving.&lt;br /&gt;
&lt;br /&gt;
Learning the oh-so-delicate touch required for successful micro-manipulation of watch components is something that I read about, and I am glad I did. But to get in there with a loupe and a pair of tweezers has taught me so much.&lt;br /&gt;
&lt;br /&gt;
As you can see, I am barely a novice at this. Perhaps needless to say, if you are looking for proper watchmaking advice, look to one of the texts in the &quot;Literature&quot; section below. Still, I wanted to capture some of my watchmaking experiences so far. The general theme of which is a sort of dive right in and learn by doing.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Literature&lt;/h3&gt;
Here is a partial list of reading materials that have helped me along the way. The list is in no particular order. If you google the title of the text you may find that there is a pdf online. I have many of these watchmaking pdf&#39;s, but since they are not mine to distribute I won&#39;t be linking them directly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;A Practical Course in Horology 1944&lt;/li&gt;
&lt;li&gt;The Practical Lubrication of Clocks and Watches&lt;/li&gt;
&lt;li&gt;The Complete Clock and Watchmaker Manual by Mary Booth&lt;/li&gt;
&lt;li&gt;Riveting and Staking March 2012&lt;/li&gt;
&lt;li&gt;A Treatise on Staff Making and Pivoting&lt;/li&gt;
&lt;li&gt;TM 9-1575&lt;/li&gt;
&lt;li&gt;Vigneaux Practical Watchmaking&lt;/li&gt;
&lt;li&gt;Chicago School of Watchmaking&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally I have purchased these books:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfOUIUEwhOQrU8TSArjVxzTQzaY9SV4F7GIRZKscObCLDthKkAOrMA0l67NE_TGYsHxGOTnLOnIGaixJMeNkytf1rpn80DgmPhX2hHQmRIAbRGnPyGqSadpSsXiD14QaOBtn2hl-ESRawy/s1600/IMG_0507.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfOUIUEwhOQrU8TSArjVxzTQzaY9SV4F7GIRZKscObCLDthKkAOrMA0l67NE_TGYsHxGOTnLOnIGaixJMeNkytf1rpn80DgmPhX2hHQmRIAbRGnPyGqSadpSsXiD14QaOBtn2hl-ESRawy/s320/IMG_0507.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
Websites&lt;/h3&gt;
&lt;h4&gt;
Forums:&lt;/h4&gt;
&lt;a href=&quot;http://forums.watchuseek.com/f6/&quot;&gt;http://forums.watchuseek.com/f6/&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.watchrepairtalk.com/&quot;&gt;http://www.watchrepairtalk.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Youtube:&lt;/h4&gt;
&lt;a href=&quot;https://www.youtube.com/user/bunnspecial&quot;&gt;https://www.youtube.com/user/bunnspecial&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://www.youtube.com/user/perplxr&quot;&gt;https://www.youtube.com/user/perplxr&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://www.youtube.com/user/spahlow&quot;&gt;https://www.youtube.com/user/spahlow&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://www.youtube.com/user/jewldood&quot;&gt;https://www.youtube.com/user/jewldood&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://www.youtube.com/watch?v=vTQT6PwgJTA&quot;&gt;https://www.youtube.com/watch?v=vTQT6PwgJTA&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://www.youtube.com/watch?v=ys4ChOWYNy8&quot;&gt;https://www.youtube.com/watch?v=ys4ChOWYNy8&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Parts/Tools:&lt;/h4&gt;
&lt;a href=&quot;http://www.ofrei.com/page235.html&quot;&gt;http://www.ofrei.com/page235.html&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.casker.com/&quot;&gt;http://www.casker.com/&lt;/a&gt;&lt;br /&gt;
eBay is where I buy most of my vintage watchmaking tools.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Tutorials:&lt;/h4&gt;
&lt;a href=&quot;http://www.clockmaker.com.au/diy_seiko_7s26/&quot;&gt;http://www.clockmaker.com.au/diy_seiko_7s26/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Terminology&lt;/h3&gt;
As with any new hobby you have to learn the lingo. Here are some of the terms that I didn&#39;t understand at first.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Wheels are gears&lt;/li&gt;
&lt;li&gt;Pivots are bearing journals ( burnished to size with a jacot tool, fyi. )&lt;/li&gt;
&lt;li&gt;Staffs are axels&lt;/li&gt;
&lt;li&gt;Jewels can be either female plain bearings, or in other locations pallet jewels or impulse pins.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Tools&lt;/h3&gt;
When I started started this journey I had no suitable tools. Even my smallest &quot;Jeweler&quot; screwdrivers loomed ominous above the diminutive watch movements. I started with a &quot;cheap&quot; set of watchmakers screwdrivers, probably from eBay. I eventually purchased several more sets until finding a set of Starrett screwdrivers. These work for all but the very tiniest of screws, say on a hairspring stud or such. I also like them as I know Starrett is a quality brand.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeHhjxmfRmA3w0xOWUQ7egTQjMs-Xg7y8arYPoyLRzBCwXWJU7UXR1BtMnCKx5iWsM-JkXa-ZuFGSxMiGB7nQN1vTEr09OW78vuxEVcjjk8mLX2kJzGdGmwYHqNey37xefOQUfVhxbeUpd/s1600/IMG_0486.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeHhjxmfRmA3w0xOWUQ7egTQjMs-Xg7y8arYPoyLRzBCwXWJU7UXR1BtMnCKx5iWsM-JkXa-ZuFGSxMiGB7nQN1vTEr09OW78vuxEVcjjk8mLX2kJzGdGmwYHqNey37xefOQUfVhxbeUpd/s320/IMG_0486.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
For general work I use a binocular visor magnifier. It has a wide field of view and a long focal length. For oiling and other high magnification jobs I prefer a binocular microscope. Mine is an AMScope brand and works very well. You can see pictures of it in the Watchmaker bench section below.&lt;br /&gt;
&lt;br /&gt;
Loups are also important. I have a Bausch &amp;amp; Lomb on a wire to strap it to my head. This loupe has a very short focal length, and a very narrow field of view. It is sometimes hard to get the part you want into focus. In fact, the stack of loups I bought from harbor freight might even suit me better than the Bausch &amp;amp; Lomb. I mean, they must be of a lower quality, but they have a wider field of view and sufficient clarity and magnification. Yes, I think I like them better.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGPSxxnTWEzQcSELmiYMgRiaXNVQcYCnqRMaG7VF_KQ8Q9eTgoNmYShUm8CzEW-ulcTP0Bd7b51ShGTxr117Wjjj3n4BZ6cuFfDkZUDpjvhxu4kHsloTJERCoKjXEs8J_S8VyX_Aqi0-oN/s1600/IMG_0500.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGPSxxnTWEzQcSELmiYMgRiaXNVQcYCnqRMaG7VF_KQ8Q9eTgoNmYShUm8CzEW-ulcTP0Bd7b51ShGTxr117Wjjj3n4BZ6cuFfDkZUDpjvhxu4kHsloTJERCoKjXEs8J_S8VyX_Aqi0-oN/s320/IMG_0500.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Good tweezers are important. Did you know that you will be sharpening tweezers at some point? I didn&#39;t, but it is as simple as clasping a file or stone in the tweezer jaws to dress them up. At any rate, I find I use my brass tweezers the most often these days. The Excelta and WLXY tweezers below require more force than the others, and as a result have less feedback. They are still OK, but I use them much less often.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBgng6xQjaUN0mnkiTcw5rQxS8_Bj3IlY16qGXM-U2iHkeTKLtVnPPSNoIfRkozpsgWz0Pce8v47xFYVszHzkVaoesDGabFkm-iyncR_0yyU9tX6gj8PAUk0vU2TD99CGJepvFiDPFVGFA/s1600/IMG_0483.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBgng6xQjaUN0mnkiTcw5rQxS8_Bj3IlY16qGXM-U2iHkeTKLtVnPPSNoIfRkozpsgWz0Pce8v47xFYVszHzkVaoesDGabFkm-iyncR_0yyU9tX6gj8PAUk0vU2TD99CGJepvFiDPFVGFA/s320/IMG_0483.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I also make frequent use of Rodico putty for cleaning, removing smudges, removing oil from screws, etc. I Prefer the blue case back remover ball better than the 3 jaw adjustable type. You can also see the black puffer bulb to displace rogue fibers and dust specks. You wouldn&#39;t blow warm moist air from your lungs onto a clean watch movement, would you? The puffer bulb is also good for giving a spin to a balance wheel to check its rotation. All of this is sitting on a green watchmakers mat. It is reasonably soft, yet firm, and helps parts from slipping around or disappearing from plain sight.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHovRsml0tuk1qft7HYllDeA-GKjxSXMNoIiDs89WY14pG-eK2botaAVEcFPfBVxzJmBfVzD0uEpb_PgQGX09x48C37mbpD-sz2NIckXKlrh9369ay4H-8LZ99-6IVF4RkvV_vqW5xpOG_/s1600/IMG_0498.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHovRsml0tuk1qft7HYllDeA-GKjxSXMNoIiDs89WY14pG-eK2botaAVEcFPfBVxzJmBfVzD0uEpb_PgQGX09x48C37mbpD-sz2NIckXKlrh9369ay4H-8LZ99-6IVF4RkvV_vqW5xpOG_/s320/IMG_0498.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Below is a collection of some of my other tools. If you would like to ask about any tool in particular, please feel free to leave a comment.&lt;br /&gt;
&lt;br /&gt;
Watchmaking tool gallery: &lt;a href=&quot;https://goo.gl/photos/Bbgp44ysX8Nyt6zbA&quot;&gt;https://goo.gl/photos/Bbgp44ysX8Nyt6zbA&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Bench&lt;/h3&gt;
When I very first started tinkering with watches I was using a standard height desk. I had to hunch over the watches and it cast a shadow over the work. This was less than Ideal. Since I had an old sewing table that I wasn&#39;t using, I decided to re-purpose it as a watchmakers bench. I added some risers to the feet to bring the desk height up quite a bit.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1irskAzuNywaQ1YHJ6AWl3zNqhSsXG8iXIC29liJiyP3YqLgNX4TBMtdFakoB2jcffZ0wPQZjU7iZ8zUhDIWzPChg2gMmSgzi1ArsuMoah_ObcHuRV7ZnGGuVYAtOjRwwjzTHHtB-Vnvm/s1600/IMG_0042.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1irskAzuNywaQ1YHJ6AWl3zNqhSsXG8iXIC29liJiyP3YqLgNX4TBMtdFakoB2jcffZ0wPQZjU7iZ8zUhDIWzPChg2gMmSgzi1ArsuMoah_ObcHuRV7ZnGGuVYAtOjRwwjzTHHtB-Vnvm/s320/IMG_0042.JPG&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I also replaced the sewing machine with a watchmakers lathe.&lt;br /&gt;
&lt;br /&gt;
Adding a positionable lamp with a CFL bulb, and a microscope on an arm really made this bench something useful. It might be a little on the short side still, but overall it is a very serviceable bench.&lt;br /&gt;
&lt;br /&gt;
Here are some more photos of my Sewing table to watchmakers bench transition.&lt;br /&gt;
&lt;a href=&quot;https://goo.gl/photos/5CESun2cBQigS22o7&quot;&gt;https://goo.gl/photos/5CESun2cBQigS22o7&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Cleaning&lt;/h3&gt;
It is important for me to keep track of where everything goes as i&#39;m taking apart a watch. To that end I take photos as I go along. I also make use of these blue plastic watchmaker trays below. I currently have two, but a single movement can fill up both with no problem. It would be nice to take parts from one compartment, clean them, and move them to a new, clean tray. So, I have ordered two more trays from eBay.&lt;br /&gt;
&lt;br /&gt;
The glass dome on the right of the picture below is a vintage movement cover. It is necessary to cover all movement parts any time you are away from the bench even for a short while. These protect against dust settling on the movement and accidental physical damage. I recently ordered 3 more of these vintage movement covers from eBay.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNUpqZLqtGqWXkfgCGDyUudsGvVvgCxDQEFPmZard2KwSa4I5vzTxYoSaHEwNeJno5F2c5xqvcrKHFfmHvZCGd_CkhpRAqG-W7sW3sldkjTnmzDD6yCY3kI1oEZmQIVg2rkF7900p8PvNA/s1600/IMG_0499.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNUpqZLqtGqWXkfgCGDyUudsGvVvgCxDQEFPmZard2KwSa4I5vzTxYoSaHEwNeJno5F2c5xqvcrKHFfmHvZCGd_CkhpRAqG-W7sW3sldkjTnmzDD6yCY3kI1oEZmQIVg2rkF7900p8PvNA/s320/IMG_0499.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I am still working out my cleaning methods, but basically I use a combination of manual cleaning and ultrasonic. &lt;br /&gt;
&lt;br /&gt;
The tools I use for cleaning in no particular order are:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Rodico - a blue/green putty&lt;/li&gt;
&lt;li&gt;Harbor freight ultrasonic cleaner&lt;/li&gt;
&lt;li&gt;Peg wood&lt;/li&gt;
&lt;li&gt;Pith wood&lt;/li&gt;
&lt;li&gt;An acid brush with cut down bristles&lt;/li&gt;
&lt;li&gt;Paper&lt;/li&gt;
&lt;li&gt;Kimwipes&lt;/li&gt;
&lt;li&gt;Carburetor / MAF cleaner&lt;/li&gt;
&lt;li&gt;A hybridizer - essentially a low temperature oven ~50 deg C&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
A watchmaking forum member once wrote to me on the subject of cleaning. Here is an excerpt from his advice.&lt;br /&gt;
&lt;br /&gt;
IV. Cap jewels should be rubbed on lint free paper or tissue.&lt;br /&gt;
V. Holes must be pegged through from both sides.&lt;br /&gt;
VI. Pivots have to be rotated in pith.&lt;br /&gt;
VII. Wheel teeth and pinion leaves shall be carefully brushed.&lt;br /&gt;
VIII. Plates and bridges shall be rubbed, pegged, pithed and brushed.&lt;br /&gt;
VIV. Pallets and balance completes require single dip treatment. (I brush pallets and rub the faces with hard paper. Be sure to inspect the impulse jewel for dirt/damage.)&lt;br /&gt;
&lt;br /&gt;
My cleaning method is as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Exercise caution to avoid losing parts. This is always true, I suppose.&lt;/li&gt;
&lt;li&gt;Process one group of parts at a time to keep them compartmentalized and help me remember where they go.&lt;/li&gt;
&lt;li&gt;Generally I only clean screws with Rodico.&lt;/li&gt;
&lt;li&gt;For really dirty or oily/greasy parts I may soak them in lighter fluid first.&lt;/li&gt;
&lt;li&gt;Mechanically clean the parts with brushes, paper, peg/pith, etc.&lt;/li&gt;
&lt;li&gt;Send the group thru the ultrasonic cleaner with hot water.&lt;/li&gt;
&lt;li&gt;Rinse the parts in hot water.&lt;/li&gt;
&lt;li&gt;Use carburetor cleaner to displace all of the remaining water.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Place parts in the low temperature oven for final drying. Note that the carburetor cleaner can evaporatively cool the parts below the dew point resulting in, well, dew on the part. This is why I favor the use of the oven.&lt;/li&gt;
&lt;li&gt;The ultrasonic cleaner is probably not necessary, however my harbor freight model is inexpensive and can be used for other items around the house.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
I do not use the ultrasonic cleaner or carburetor cleaner on any parts with shellac mounted jewels. This would include the balance staff with impulse jewel, and the pallet fork with its jewels. I have not yet had to replace a shellac mounted jewel, so I am rather cautious not to disturb them. I am looking forward to doing it one day though.&lt;br /&gt;
&lt;br /&gt;
Once a part is clean you don&#39;t touch it with your bare fingers. I use nitrile gloves or latex finger cots.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Oiling&lt;/h3&gt;
I am a little reluctant to write this section as there are many whom are rather &lt;i&gt;passionate &lt;/i&gt;about oiling. Nevertheless, I will relay how I go about it.&lt;br /&gt;
&lt;br /&gt;
I picked up this oil cup / decanter thing on ebay. It is nice. The yellow, and blue generic oilers came from Amazon, and suck. One was rusted and another was broken. I ordered a nicer set of Bergeon brand oilers that haven&#39;t arrived yet. They come in different color coded sizes corresponding the the amount of oil they can hold, that is to say the handle color does not necessarily match the oil color.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_9WbbHGTBSLfcujTmgkAGVxr-frKJNNrUAivehTnQJAvGKPpkiFJDsz-xzARalt0JurRhKPt73HOKiN8R9nx6kdIEPTyrbDWeAVVDlZuUTpSfs0mPXw_uWwc4-1IJeNLqUkvowS4lgzLz/s1600/IMG_0518+%25281%2529.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_9WbbHGTBSLfcujTmgkAGVxr-frKJNNrUAivehTnQJAvGKPpkiFJDsz-xzARalt0JurRhKPt73HOKiN8R9nx6kdIEPTyrbDWeAVVDlZuUTpSfs0mPXw_uWwc4-1IJeNLqUkvowS4lgzLz/s320/IMG_0518+%25281%2529.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;I use Moebius 9401 for mainsprings, and other &quot;high load&quot; areas such as mainspring barrel pivots, winding mechanisms, click springs, etc.&lt;/li&gt;
&lt;li&gt;I use Moebius 8000 for smaller pivots and &quot;low load&quot; areas such as pallet fork jewels, roller jewel, etc.&lt;/li&gt;
&lt;li&gt;The gear wheel train teeth do not get oiled.&lt;/li&gt;
&lt;li&gt;I use a microscope for oiling, so I can really see what is happening. A loupe of sufficient magnification would be OK too.&lt;/li&gt;
&lt;li&gt;The oilers work by dipping the oiler into some oil. They retain the oil due to surface tension and the shape of the oiler tip. Touching the oil laden oiler to a watch part will wick the oil from the oiler onto the pivot.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Here is some more information: &lt;a href=&quot;http://www.ofrei.com/page951.html&quot;&gt;http://www.ofrei.com/page951.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Projects&lt;/h3&gt;
Here I&#39;ll give a little description of some of the projects I&#39;ve worked on, and link to the photos I took while working on them. They are in order starting from my earliest project to most recent.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Seiko 5&lt;/h4&gt;
Here is a Seiko 5 which was my first experience disassembling a watch. I didn&#39;t clean this one as it was brand new. I didn&#39;t even oil it. I just took it apart, blued some screws, and polished some parts before reassembling it.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3Yotg7R3Ruz-3G-fm5UvXnwQw9uZG6rLuq0WeU0D6ohVV5uhiWeNJY4EBicFJT6zQ-8kyyVLE3ofJvVeNTV94tTKqEz1zlohgRYc2_HUlcY8We-uBLagtMO1q2il2zBpn2ntTJtx9qzN6/s1600/20150530_200106.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3Yotg7R3Ruz-3G-fm5UvXnwQw9uZG6rLuq0WeU0D6ohVV5uhiWeNJY4EBicFJT6zQ-8kyyVLE3ofJvVeNTV94tTKqEz1zlohgRYc2_HUlcY8We-uBLagtMO1q2il2zBpn2ntTJtx9qzN6/s320/20150530_200106.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I followed this guide &lt;a href=&quot;http://www.clockmaker.com.au/diy_seiko_7s26/&quot;&gt;http://www.clockmaker.com.au/diy_seiko_7s26/&lt;/a&gt; The tutorial is missing a couple pages at the end for reassembly, but it is easy enough to sort it out from the disassembly pages.&lt;br /&gt;
&lt;br /&gt;
I lost the click spring on this one. It shot out from under a plate that I removed. Two days later I found it and was able to complete this watch. Each time I wear it I remember the trials and tribulations we have been thru together.&lt;br /&gt;
&lt;br /&gt;
Here are some more photos: &lt;a href=&quot;https://goo.gl/photos/E3SJgWmraomovewb6&quot;&gt;https://goo.gl/photos/E3SJgWmraomovewb6&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;br /&gt;Heuer Stopwatch&lt;/h4&gt;
Stopwatches are good practice candidates as they are not as sought after as pocket watches, and as such can be purchased for less money. They are generally larger than wristwatches, too.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb4B7l3QC__Dy2KCdRKSbtDC20DpdWPvxPVeiQDhjeFtHHqC5c0KYYUkoGWnRSZCqpZGpDxpdYM2pgS7u3-EOA2pk075b0wqG5g9RVciiqr5hyphenhyphenlrtD1aOeTw6nFIT7RjmJKjLXcZ3MVEoD/s1600/20150912_222326.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb4B7l3QC__Dy2KCdRKSbtDC20DpdWPvxPVeiQDhjeFtHHqC5c0KYYUkoGWnRSZCqpZGpDxpdYM2pgS7u3-EOA2pk075b0wqG5g9RVciiqr5hyphenhyphenlrtD1aOeTw6nFIT7RjmJKjLXcZ3MVEoD/s320/20150912_222326.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This Heuer stopwatch was absolutely filthy inside. It was also missing several pieces. I elected to only disassemble, clean, and oil this one, and not repair/replace missing broken/components.&lt;br /&gt;
&lt;br /&gt;
During cleaning I lost a balance jewel on this one. Then, I found it in the carpet, only to lose it again. &lt;br /&gt;
In the end, I learned quite a lot from this project.&lt;br /&gt;
&lt;br /&gt;
Here are some more photos: &lt;a href=&quot;https://goo.gl/photos/1TAUbgpPX9aaYhNNA&quot;&gt;https://goo.gl/photos/1TAUbgpPX9aaYhNNA&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Grandpa&#39;s Banjo Clock&lt;/h4&gt;
I acquired this clock a while back. The movement was caked with a green gelatinous grease. Also, one of the pivot holes is severely worn. I gave this clock just a quick clean with partial disassembly to evaluate it. It hangs unwound on the wall awaiting the pivot hole repair. It will also need a winding key made.&lt;br /&gt;
&lt;br /&gt;
Photos: &lt;a href=&quot;https://goo.gl/photos/2z6A21fyzLEwG5v79&quot;&gt;https://goo.gl/photos/2z6A21fyzLEwG5v79&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Dad&#39;s Dila&lt;/h4&gt;
This is a watch that my father&#39;s mother gave him when he was a teenager. The mainspring broke not long after he had it, and it stayed broken for nearly 60 years. &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVjMUpZIYgyhMt_dS3FDQDNjjaybqWsXAZUSroGytOEUv54xdmWa48IDTCkiryWOXZpJUx9DmtNkczwrUzBwLrohpa3pkWmIYHp5GiY9XoZbQDsZZq8tbO1gWK2zrrLBv1vpbYsRRQIh0m/s1600/IMG_0142.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVjMUpZIYgyhMt_dS3FDQDNjjaybqWsXAZUSroGytOEUv54xdmWa48IDTCkiryWOXZpJUx9DmtNkczwrUzBwLrohpa3pkWmIYHp5GiY9XoZbQDsZZq8tbO1gWK2zrrLBv1vpbYsRRQIh0m/s320/IMG_0142.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I replaced the mainspring with a new old-stock steel spring. This new spring broke also, so back inside I went. This time I replaced the mainspring with a modern &quot;white alloy&quot; spring which has been running without issue. Dad wears the watch quite often now. &lt;br /&gt;
&lt;br /&gt;
Here are some more pictures: &lt;a href=&quot;https://goo.gl/photos/Wr178dHLkBhhwzs48&quot;&gt;https://goo.gl/photos/Wr178dHLkBhhwzs48&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Raketa Big Zero&lt;/h4&gt;
This watch is called the Big Zero because of the large 0 at the 12 o&#39;clock position. I read that Mikhail Gorbachev used to wear one. At any rate, I think it looks pretty cool on the bracelet I ordered from Amazon..&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2l_Dvcm2E0SEaiCzbczF4K1yBQcZu9_Kg3h8Zoy45PffnJZNEHyOR1qF5YzIBPNof3XG0Zdjrkp1EEl_h48DfVxhZRi3olLR6HzlghWoMUxJGIuvt0Kkkklo3gJY75ZBVzSawz0l-zK1l/s1600/IMG_0528.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2l_Dvcm2E0SEaiCzbczF4K1yBQcZu9_Kg3h8Zoy45PffnJZNEHyOR1qF5YzIBPNof3XG0Zdjrkp1EEl_h48DfVxhZRi3olLR6HzlghWoMUxJGIuvt0Kkkklo3gJY75ZBVzSawz0l-zK1l/s320/IMG_0528.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
While working on this watch I lost a balance jewel. I pinched it a little too hard, or at just the wrong angle so that it launched itself from my tweezers. I combed the carpet fibers for a while before resigning myself to it being lost. Then I went to eBay and purchased a lot of 3 non-running movements of the same type. These three 2906HA movements only cost $17 including shipping. I harvested a balance jewel from one of the donor watches, and finished the job.&lt;br /&gt;
&lt;br /&gt;
On this watch I got a little carried away with the case polishing. There was a ding I was trying to buff out. As I was doing so I realized that the watch case is chrome plated brass. You can now see a bit of the brass poking out, but it&#39;s OK you and I are the only ones that will know.&lt;br /&gt;
&lt;br /&gt;
More pictures: &lt;a href=&quot;https://goo.gl/photos/u2mbcLh8URiWRq5aA&quot;&gt;https://goo.gl/photos/u2mbcLh8URiWRq5aA&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;
&lt;br /&gt;Waltham Model 1877&lt;/h4&gt;
This Waltham Model 1877 was made in Waltham MA in 1883. A lot has changed in the world since then!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgIcds3pSD6S1Em7LL4qNo89JqYpovUTZBWX36Gq2cM0AkvPFDnW3uosrICoJ2aWqh8tbvwBDq3RnIgsRLymoCDkdFapcSDMBwUA4vC20ESUELQ-_PzI8vQxiWS5f0HQmD1zNvoNjizeFX/s1600/IMG_0287.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgIcds3pSD6S1Em7LL4qNo89JqYpovUTZBWX36Gq2cM0AkvPFDnW3uosrICoJ2aWqh8tbvwBDq3RnIgsRLymoCDkdFapcSDMBwUA4vC20ESUELQ-_PzI8vQxiWS5f0HQmD1zNvoNjizeFX/s320/IMG_0287.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I bought this pocket watch from eBay. It would stop running depending orientation. It would run on its face, but stop when vertical.&lt;br /&gt;
&lt;br /&gt;
After disassembling the watch I discovered it had a smashed out balance jewel. I think you can order drop in replacements, but I decided to go a different route.&lt;br /&gt;
&lt;br /&gt;
I ordered an assortment of loose jewels from eBay. When they came in I searched thru them to find one of the correct inside diameter for the balance staff. Then I turned a brass chaton to hold the jewel.&lt;br /&gt;
&lt;br /&gt;
A chaton will have a bore of specific depth, and a diameter to fit the OD of the jewel. The chaton will have an undercut outside the OD of the jewel to allow this material to be burnished over the jewel, capturing it in the chaton.&lt;br /&gt;
&lt;br /&gt;
Between ordering parts, and several failed attempts at making a chaton, this watch took a while to complete. I think it took so long in fact that I forgot to clean it before reassembling it! This watch will have to come apart again for a cleaning before I can say this project is done.&lt;br /&gt;
&lt;br /&gt;
Pictures: &lt;a href=&quot;https://goo.gl/photos/BXawYhNaLnqD1f7U6&quot;&gt;https://goo.gl/photos/BXawYhNaLnqD1f7U6&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;
&lt;br /&gt;Elgin Aircraft Clock&lt;/h4&gt;
This is an 8-day clock meaning that it will run 8 days on a wind. A coworker generously gave it to me after learning of my forray into horology.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXY6b6QBFkuzLaUYoM5u4v9jz5Pivho1b_Rlj-aXmpH5r6z_Nle9E_SW6SGriJjJaOFqdVSpq5vpsoOyKszMULpUCgMI4pMsw9HXM11sNql2FUEdap4CZWoIKRI1nn1MoB15o3NlQXQzKy/s1600/IMG_0426.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXY6b6QBFkuzLaUYoM5u4v9jz5Pivho1b_Rlj-aXmpH5r6z_Nle9E_SW6SGriJjJaOFqdVSpq5vpsoOyKszMULpUCgMI4pMsw9HXM11sNql2FUEdap4CZWoIKRI1nn1MoB15o3NlQXQzKy/s320/IMG_0426.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
This clock movement is about the size of a pocketwatch movement. I was pleased to discover all the parts were present. After a clean and oil the clock was ticking again. It was a minute off after a couple days, so I made a timing adjustment. It is on my desk at work, so we will see how the adjustment worked this Monday morning. I love the faint ticking sound at my desk.&lt;br /&gt;
&lt;br /&gt;
I noticed this clock has two wheels to drive the second hand. One is attached to the second hand shaft, and the second is free to rotate about the second hand shaft. Both are driven by a pinion gear, there is a very light spring providing torque between the two wheels. This provides anti-backlash for the second hand so it won&#39;t be flopping back and forth between pinion leaves as you are flying around.&lt;br /&gt;
&lt;br /&gt;
I lightly brushed the dial with soap, water and a toothbrush, and left the hands untouched. I wanted to leave a witness to the clock&#39;s vintage.&lt;br /&gt;
&lt;br /&gt;
Additional photos: &lt;a href=&quot;https://goo.gl/photos/ixytccCJ9S74TPZw9&quot;&gt;https://goo.gl/photos/ixytccCJ9S74TPZw9&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Other Projects&lt;/h3&gt;
I have a few other projects on the go too, but nothing to show for it yet. I am looking forward to trying out some more manufacturing techniques in the future to further work toward my goal of making a watch movement.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Words of Wisdom&lt;/h3&gt;
&lt;br /&gt;
The only advice I could offer is encouragement. Read as much as you can, but get in there and start doing it. Maybe start on movements that are not sentimental or otherwise valuable.&lt;br /&gt;
&lt;br /&gt;
If you have any advice for me please leave a comment below. I am always eager to learn better ways to do things. &lt;br /&gt;
&lt;br /&gt;
I am sure I have forgotten some things as I am tired while I write this. Perhaps there will be a follow up on the future.&lt;br /&gt;
&lt;br /&gt;
Good luck on your horological adventures!</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/2514294260121161292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/2514294260121161292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/2514294260121161292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/2514294260121161292'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2016/05/watchmaking-my-beginnings.html' title='Watchmaking - My Beginnings'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_MsfPOtOTxebBQgnW6LpSerHvmXEt3NZMuDI6R2G4TaEy4TIA4RtvvIYZwKw2bLQ1T5EBvEsR99q42LxX4dOgXH9J3FEpmNfISzhLk9M7Wr8g3DQy7YMV9oN0ZvMy3A5TITnyoA3pBbZU/s72-c/20150530_205655.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-6260700046968882853</id><published>2016-03-19T07:06:00.001-04:00</published><updated>2016-03-19T07:19:39.903-04:00</updated><title type='text'>Digitizing Grandpa&#39;s Reel to Reel Tapes</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;
My grandfather had a bunch of these reel to reel tapes from the 60&#39;s. &amp;nbsp;I thought it would be a good idea to digitize them to preserve the audio incase the tape began to deteriorate. &amp;nbsp;Conveniently enough, my aunt gave me this reel to reel player a few months ago. &amp;nbsp;I should have everything I need to manually transfer these audio tapes into digital format now.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
But, there are quite a few of these tape reels, and my mind wanders. &amp;nbsp;I wonder if I could make this a semi automatic process. &amp;nbsp;The primary benefit would be that I don&#39;t have to be present during the entire recording process. &amp;nbsp;Of secondary benefit, I get to play with electronics. &lt;br /&gt;
&lt;br /&gt;
I want to be able to set a tape playing and the recording program will automatically stop the recording when the reel to reel player stops playing. &amp;nbsp;Without automatic stopping of the recording, I am certain I would forget that I am recording and wander off to do something else while Audacity dutifully records silence at the end of each tape.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
So, here is the setup. &amp;nbsp;To get the audio into the computer I made a 1/4&quot; phono plug to 1/8&quot; phono plug cable. &amp;nbsp;This cable runs from the reel to reel headphone jack to the computer&#39;s microphone input. &amp;nbsp;I am running a program called &lt;a href=&quot;http://www.audacityteam.org/&quot;&gt;Audacity&lt;/a&gt; on this computer to handle the recording of the audio signal.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB6iwnws3WZmf8H1GNDPvABGMrzxM4Y_W0Doud1x2gPacsv8dNfNBNWU23v_kfNyc5uY_To2_iG0NZchPH6Jwjw_Ts6lxw17iiomTXniLbZwcMQf1XizH47O8xJK2jwfuNr8aVVDw6FqVh/s1600/IMG_0773.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB6iwnws3WZmf8H1GNDPvABGMrzxM4Y_W0Doud1x2gPacsv8dNfNBNWU23v_kfNyc5uY_To2_iG0NZchPH6Jwjw_Ts6lxw17iiomTXniLbZwcMQf1XizH47O8xJK2jwfuNr8aVVDw6FqVh/s320/IMG_0773.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDMj3tBw_qhXJNZ7w4mvuP2lFNfrbovN2P-5-OJfz8MIs8SUF4gBLpBpLWcIUYB8G-VvUu5mlp60NfYQ_7FmHDPqiZt8pRrExlA0nPLFonGZSHaN9_1liePatAr2dL5EZLV_kvUyB3CzEL/s1600/IMG_0782.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDMj3tBw_qhXJNZ7w4mvuP2lFNfrbovN2P-5-OJfz8MIs8SUF4gBLpBpLWcIUYB8G-VvUu5mlp60NfYQ_7FmHDPqiZt8pRrExlA0nPLFonGZSHaN9_1liePatAr2dL5EZLV_kvUyB3CzEL/s320/IMG_0782.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Like many programs, &lt;a href=&quot;http://www.audacityteam.org/&quot;&gt;Audacity&lt;/a&gt; has keyboard shortcuts. &amp;nbsp;Press SHIFT&amp;nbsp;+ R to start/append a recording. &amp;nbsp;The spacebar will stop a recording. &amp;nbsp;Sending CTRL&amp;nbsp;+ SHIFT&amp;nbsp;+ E will open the audio export window. &amp;nbsp;All of these commands can be sent to Audacity with a keyboard, but we are trying to automate, so our commands will come from an ATMega32U4 microcontroller instead.&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0o3If6N1M3o2AJ1wqBabXY_aIHMx_sQPotvE_KXfoFjAuKVZMGCHEwkgEP8lWPvz5F5nlRFXbNlUGLX7or4oPp72zN6i0yWDn-AB6YlwBFbmJSd9_IBVHNWE5bxBS9HyV65GfKUlRzN1K/s1600/IMG_0775.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0o3If6N1M3o2AJ1wqBabXY_aIHMx_sQPotvE_KXfoFjAuKVZMGCHEwkgEP8lWPvz5F5nlRFXbNlUGLX7or4oPp72zN6i0yWDn-AB6YlwBFbmJSd9_IBVHNWE5bxBS9HyV65GfKUlRzN1K/s320/IMG_0775.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
To know when the reel to reel player is playing, and thus when to have the microcontroller tell Audacity to start recording, I connected a Light Detecting Resistor along with a fixed value resistor to form a voltage divider. &amp;nbsp;The output of the divider is wired to the ADC on the ATMega32U4 &amp;nbsp;uC.&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIB25WG18PsJp_5bc0_3IljF932PSe2KBLY20M-STy-DXW4X2IYZePF3zKkNiSFBxghbu58qtv64EcapGgXeSrXYvpsTII_mJsG33yEpikDDrOD_N9ks5wQnNb8e3O1bkewdHB5B_7pmqK/s1600/IMG_0777.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIB25WG18PsJp_5bc0_3IljF932PSe2KBLY20M-STy-DXW4X2IYZePF3zKkNiSFBxghbu58qtv64EcapGgXeSrXYvpsTII_mJsG33yEpikDDrOD_N9ks5wQnNb8e3O1bkewdHB5B_7pmqK/s320/IMG_0777.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
The LDR ( Light Detecting Resistor ) is taped with blue painter&#39;s tape to the VU meter face. &amp;nbsp;The voltage from this divider circuit is read into the uC and compared to a threshold. &amp;nbsp;When the reel to reel is running, the VU meter turns on a tiny incandescent bulb inside. &amp;nbsp;The LDR voltage divider provides a high voltage when it sees light ( reel to reel is running ) and a low voltage when it sees little or no light ( reel to reel stopped ).&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqFIPCRUXj7Uwerlv-ZAxPP8btA1RHtiIoq_14Et5QBoXlHHyTFAAvELOr_CvdveoWauyGOUtvow87fVYoguPz9X8W_x-intMea3lZ3vfYshPelU84nzhdohcGnH3Pk58_nhw4nRv_mTnt/s1600/IMG_0781.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqFIPCRUXj7Uwerlv-ZAxPP8btA1RHtiIoq_14Et5QBoXlHHyTFAAvELOr_CvdveoWauyGOUtvow87fVYoguPz9X8W_x-intMea3lZ3vfYshPelU84nzhdohcGnH3Pk58_nhw4nRv_mTnt/s320/IMG_0781.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;u&gt;&lt;b&gt;Operation&lt;/b&gt;:&lt;/u&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Initially the reel to reel is stopped and a reel is loaded. &amp;nbsp;A new Audacity window is opened up by the operator. &amp;nbsp;As soon as the reel to reel starts playing, the VU meter lamp in the reel to reel turns ON, and the microcontroller detects the LDR voltage. &amp;nbsp;The uC then sends the keyboard shortcut SHIFT&amp;nbsp;+ R via USB to start Audacity recording. &amp;nbsp;I am now free to do other tasks without worrying about missing the end of the reel to press &quot;stop&quot; recording.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
When the tape reaches the end of its run, the reel to reel will shut off, the VU meter will go dark, and the uC will send out ASCII 0x20 for a spacebar command. &amp;nbsp;This will stop the recording. &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Then the uC sends out CTRL&amp;nbsp;+ SHIFT&amp;nbsp;+ E&amp;nbsp;to open the audio export path dialog box. &amp;nbsp;Here, everything will wait until I am available again. &amp;nbsp;At which point I enter a suitable filename to save the recording, and setup the process for the next side of the tape.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Conclusion:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
I have now digitized both sides of one tape. &amp;nbsp;Everything went smoothly for the first side. &lt;br /&gt;
&lt;br /&gt;
On the second side, however there was a small problem. &amp;nbsp;The screen saver came on. &amp;nbsp;When the recording was finished, the uC sent out the spacebar command to stop the recording. &amp;nbsp;Instead of stopping the recording the screensaver consumed this keypress and woke up, so the recording didnt stop. &amp;nbsp;Fortunately, I caught this problem early and have disabled the screensaver for the duration of this project.&lt;br /&gt;
&lt;br /&gt;
An alternative solution to this problem could be to send a keypress that Audacity does not recognize before sending the STOP recording shortcut. &amp;nbsp;The first keypress would cancel the screensaver, then the spacebar keypress could stop the recording. &amp;nbsp;If the screensaver was not on, the first keypress is benign and only the spacebar command will be acted upon.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Here is a short sample of some of the audio I captured while setting up this system. &amp;nbsp;It ends abruptly because I was just testing the start/stop commands from the uC:&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;a href=&quot;https://drive.google.com/file/d/0B1CPUkh94AtmcHR3OGNmQkMwc0k/view?usp=sharing&quot;&gt;https://drive.google.com/file/d/0B1CPUkh94AtmcHR3OGNmQkMwc0k/view?usp=sharing&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Let me know if you have success digitizing some reel to reel tapes using this method or perhaps you have a different method?&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Microcontroller Code:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;c&quot; name=&quot;code&quot;&gt;// running on an arduino pro micro

#include &lt;keyboard .h=&quot;&quot;&gt;

int ledPin = 17;    // Onboard the arduino pro micro
int ldrPin = A0;    // light Detecting Resistor input

int adcRaw = 0;

#define OFF_THRESHOLD 512
#define HYSTERESIS 25

#define KEY_LEFT_CTRL  0x80
#define KEY_LEFT_SHIFT 0x81
#define KEY_LEFT_ALT   0x82
#define KEY_LEFT_GUI   0x83
#define KEY_RIGHT_CTRL 0x84
#define KEY_RIGHT_SHIFT    0x85
#define KEY_RIGHT_ALT  0x86
#define KEY_RIGHT_GUI  0x87

#define KEY_UP_ARROW   0xDA
#define KEY_DOWN_ARROW 0xD9
#define KEY_LEFT_ARROW 0xD8
#define KEY_RIGHT_ARROW    0xD7
#define KEY_BACKSPACE  0xB2
#define KEY_TAB        0xB3
#define KEY_RETURN 0xB0
#define KEY_ESC        0xB1
#define KEY_INSERT 0xD1
#define KEY_DELETE 0xD4
#define KEY_PAGE_UP    0xD3
#define KEY_PAGE_DOWN  0xD6
#define KEY_HOME   0xD2
#define KEY_END        0xD5
#define KEY_CAPS_LOCK  0xC1
#define KEY_F1     0xC2
#define KEY_F2     0xC3
#define KEY_F3     0xC4
#define KEY_F4     0xC5
#define KEY_F5     0xC6
#define KEY_F6     0xC7
#define KEY_F7     0xC8
#define KEY_F8     0xC9
#define KEY_F9     0xCA
#define KEY_F10        0xCB
#define KEY_F11        0xCC
#define KEY_F12        0xCD

int ledToggleCounter = 1;

void setup()
{

  Serial.begin(9600);
  
  pinMode(ledPin, OUTPUT); // onboard LED

  
}


void loop()
{


adcRaw = analogRead(ldrPin);

// if the player is ON
if( adcRaw &amp;gt; OFF_THRESHOLD + HYSTERESIS ){
  
  ++ledToggleCounter;
}
else if( adcRaw &amp;lt; OFF_THRESHOLD - HYSTERESIS )
{
  // player is off
  //digitalWrite( ledPin, HIGH);

  delay(1000); // Wait a bit to make sure the reel to reel is really off.

  // If the signal is still low.
  if( adcRaw &amp;lt; OFF_THRESHOLD - HYSTERESIS ){
    
    Keyboard.write(0x20); // Send the spacebar to stop the audacity recording
    delay(500);
    Keyboard.press(KEY_LEFT_CTRL);  // Send CTRL + SHIFT + E to export the audio
    delay(100);                     // Audacity will wait for a filename to be manually input.
    Keyboard.press(KEY_LEFT_SHIFT);
    delay(100);
    Keyboard.write(&#39;e&#39;);
    Keyboard.release(KEY_LEFT_CTRL);
    Keyboard.release(KEY_LEFT_SHIFT); // CTRL + SHIFT + E complete. 

    // Stay here  until the reel to reel turns on again
    while(analogRead(ldrPin) &amp;lt; OFF_THRESHOLD ){
      // Blink fast because we are stopped.
      digitalWrite( ledPin, !(digitalRead(ledPin)));
      delay(200);
    }
    
    // The reel to reel has turned ON! Start recording.
    Keyboard.press(KEY_LEFT_SHIFT);   // Send SHIFT + R to Start/Append the audacity recording.
    delay(100);
    Keyboard.write(&#39;r&#39;);
    Keyboard.release(KEY_LEFT_SHIFT);
  }
  

}
else{
  digitalWrite( ledPin, LOW);
  }

  // toggle the LED at 2 Hzbecause we are recording.
  if( ledToggleCounter % 10 == 0 ){
    digitalWrite( ledPin, !(digitalRead(ledPin)));
    ledToggleCounter = 0;
  }

  Serial.println(analogRead(ldrPin));
delay(100);

  
}
&lt;/keyboard&gt;&lt;/pre&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/6260700046968882853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/6260700046968882853' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/6260700046968882853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/6260700046968882853'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2016/03/digitizing-grandpas-reel-to-reel-tapes.html' title='Digitizing Grandpa&#39;s Reel to Reel Tapes'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB6iwnws3WZmf8H1GNDPvABGMrzxM4Y_W0Doud1x2gPacsv8dNfNBNWU23v_kfNyc5uY_To2_iG0NZchPH6Jwjw_Ts6lxw17iiomTXniLbZwcMQf1XizH47O8xJK2jwfuNr8aVVDw6FqVh/s72-c/IMG_0773.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-6891914481219075240</id><published>2016-03-18T22:11:00.003-04:00</published><updated>2016-03-18T22:13:04.791-04:00</updated><title type='text'>tgimboej</title><content type='html'>tgimboej is an acronym for&amp;nbsp;The Great Internet Migratory Box Of Electronics Junk, which is pretty much what it sounds like. &amp;nbsp;You can sign up to receive one of the boxes; participation is free - you just have to pay to ship the box to the next person. &amp;nbsp;When you receive the box, you can take out a few bits, and put some back in before sending it to another recipient. &lt;br /&gt;
&lt;br /&gt;
You can read more here:&amp;nbsp;&lt;a href=&quot;http://tgimboej.org/Main_Page&quot;&gt;http://tgimboej.org/Main_Page&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
They say one man&#39;s trash is another&#39;s treasure, but that doesn&#39;t really apply here. &amp;nbsp;I found the components in the box of very high quality. &amp;nbsp;I was quite pleased with the selection. &amp;nbsp;I even found an immediate use for one of the switches I acquired!&lt;br /&gt;
&lt;br /&gt;
Here is a photo of the bits I took.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy57aylbk_rj2sjrqFG5vfFL2aN4EXZ8nBniXiJaDWABC3c3wTyXfMqXlHshObhqiCmMXsTpvSlqANqjAEFE1mWXj3wjf2U1VD2I7X6H8gSuWUryUHuOhK0BYr1Nxbm-byBhq96HuwTYlF/s1600/IMG_0691.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy57aylbk_rj2sjrqFG5vfFL2aN4EXZ8nBniXiJaDWABC3c3wTyXfMqXlHshObhqiCmMXsTpvSlqANqjAEFE1mWXj3wjf2U1VD2I7X6H8gSuWUryUHuOhK0BYr1Nxbm-byBhq96HuwTYlF/s320/IMG_0691.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
As you can see I got some sweet switches, a stepper motor, some gear motors, an audio jack, binding posts, SMD to PTH adapters, perf board, a piezo buzzer, and a key switch. &amp;nbsp;Thank you to the donors!&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Here are some photos of some of the things I added.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzlgN-2punG8bSaCfpXwy5Kq6h5mSwE2eX6OEMEx15C7-VTK6esoY6IAif-I_SY4cLaQqDHSlINnYaH5KK34dL5-3S6FgBb219LMsFIC61_ZZPQfeilrM5aGKL4SHgKHskHOShKqUKMTMe/s1600/IMG_0685.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzlgN-2punG8bSaCfpXwy5Kq6h5mSwE2eX6OEMEx15C7-VTK6esoY6IAif-I_SY4cLaQqDHSlINnYaH5KK34dL5-3S6FgBb219LMsFIC61_ZZPQfeilrM5aGKL4SHgKHskHOShKqUKMTMe/s320/IMG_0685.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0Ol0aDQKdhInne0LTBDgwwLcpCGl0nf5j-lz6V2Cs1VdoiQgCvTRWCj4AgbScfsYVqzYC4-25AHIXslR2XgUv1sJc2usyzQqNIeOS4K6IXL1BJRPto1wnWeWRIUEMMAHTEK7cdyOnW4gQ/s1600/IMG_0686.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0Ol0aDQKdhInne0LTBDgwwLcpCGl0nf5j-lz6V2Cs1VdoiQgCvTRWCj4AgbScfsYVqzYC4-25AHIXslR2XgUv1sJc2usyzQqNIeOS4K6IXL1BJRPto1wnWeWRIUEMMAHTEK7cdyOnW4gQ/s320/IMG_0686.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiKtxo_NotErWvDhFTZJFJF7y8sv8vSq5DMA-CbrNcpbwbhcMTPLZS1YMIzMPa5Gq_fvJ4XGrAruUPtpmiHmgB8RTTzpDP5wda_mcckT78rMa0ExGtL88lLi3oVuk1V2AdCv_7V9K6CYpY/s1600/IMG_0687.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiKtxo_NotErWvDhFTZJFJF7y8sv8vSq5DMA-CbrNcpbwbhcMTPLZS1YMIzMPa5Gq_fvJ4XGrAruUPtpmiHmgB8RTTzpDP5wda_mcckT78rMa0ExGtL88lLi3oVuk1V2AdCv_7V9K6CYpY/s320/IMG_0687.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNQSYemre34vUqcX1UTSOjorzUdVd1zeMsN1IQdgr3jUweHYK5LD3JX0-_haCxB-A7gG-oEPv65ZEVSgyaFBK9-s1ZhWG2i7ST6nzdnMYjOUgjfOGT4BrD5lV5tvtwi-IAHKgpxhtHObbR/s1600/IMG_0684.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNQSYemre34vUqcX1UTSOjorzUdVd1zeMsN1IQdgr3jUweHYK5LD3JX0-_haCxB-A7gG-oEPv65ZEVSgyaFBK9-s1ZhWG2i7ST6nzdnMYjOUgjfOGT4BrD5lV5tvtwi-IAHKgpxhtHObbR/s320/IMG_0684.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjHokThwo617hUTYmTgEwC1sDMS0HiGob3vhlbuSxnpQpsAeA14lEamHIR54RM4AwB3qdgK-z76463icQ36ZDL_wDOyr2ksspWXOmjeFy2UAXNziyOdcTo8DYkOaLXdE3rolnrr_rPv55e/s1600/IMG_0689.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjHokThwo617hUTYmTgEwC1sDMS0HiGob3vhlbuSxnpQpsAeA14lEamHIR54RM4AwB3qdgK-z76463icQ36ZDL_wDOyr2ksspWXOmjeFy2UAXNziyOdcTo8DYkOaLXdE3rolnrr_rPv55e/s320/IMG_0689.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
I hope you will sign up. &amp;nbsp;It was a rather fun experience.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/6891914481219075240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/6891914481219075240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/6891914481219075240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/6891914481219075240'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2016/03/tgimboej.html' title='tgimboej'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy57aylbk_rj2sjrqFG5vfFL2aN4EXZ8nBniXiJaDWABC3c3wTyXfMqXlHshObhqiCmMXsTpvSlqANqjAEFE1mWXj3wjf2U1VD2I7X6H8gSuWUryUHuOhK0BYr1Nxbm-byBhq96HuwTYlF/s72-c/IMG_0691.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-2137275725187451876</id><published>2015-05-30T08:22:00.000-04:00</published><updated>2015-05-30T08:22:43.353-04:00</updated><title type='text'>A GUI Makeover</title><content type='html'>I&#39;ve been wanting to play around with a different look for this blog for a while now. &amp;nbsp;I thought the previous layout looked a bit passé. &amp;nbsp;I also didn&#39;t like the color scheme for unclicked hyperlinks vs clicked hyperlinks; they were hard to read and not distinct enough to be useful.&lt;br /&gt;
&lt;br /&gt;
And, so I made a few changes. &amp;nbsp;It was a painful process; I don&#39;t consider myself to have an eye for the artistic. &amp;nbsp;Basically, I just poked around at color schemes and backgrounds for an hour until I got bored. &lt;br /&gt;
&lt;br /&gt;
This new layout is definitively different and subjectively more satisfying to the eye. &amp;nbsp;Below is a pic of the old layout so that you can be the judge.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpFf-7Y3tp6ylKSI1x6r3N_YFHVtkYWaQ4g0uYuwqD1tBRY8pgdW7GlbsWKlyc-tWIL-QTTCDHUwRYbvNeBjFpdVqiVEytNYn34jIMko6AcodAx1YpYVL2l4UZaLLxT1aufujFmBSo4C02/s1600/Screen+Shot+2015-05-30+at+7.22.04+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;203&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpFf-7Y3tp6ylKSI1x6r3N_YFHVtkYWaQ4g0uYuwqD1tBRY8pgdW7GlbsWKlyc-tWIL-QTTCDHUwRYbvNeBjFpdVqiVEytNYn34jIMko6AcodAx1YpYVL2l4UZaLLxT1aufujFmBSo4C02/s400/Screen+Shot+2015-05-30+at+7.22.04+AM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Ok, so I just checked the preview of this post before...posting, and I have to laugh a bit. &amp;nbsp;I guess the new and the old look are not as contradistinctive as I had led myself to believe. &amp;nbsp;We&#39;ll keep it anyhow.</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/2137275725187451876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/2137275725187451876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/2137275725187451876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/2137275725187451876'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2015/05/a-gui-makeover.html' title='A GUI Makeover'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpFf-7Y3tp6ylKSI1x6r3N_YFHVtkYWaQ4g0uYuwqD1tBRY8pgdW7GlbsWKlyc-tWIL-QTTCDHUwRYbvNeBjFpdVqiVEytNYn34jIMko6AcodAx1YpYVL2l4UZaLLxT1aufujFmBSo4C02/s72-c/Screen+Shot+2015-05-30+at+7.22.04+AM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-8866816171665840576</id><published>2015-05-25T23:24:00.002-04:00</published><updated>2023-01-15T14:36:06.173-05:00</updated><title type='text'>Nixie Tube Clock</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjZXNUPlO4Dzbll-cqCjXbjyzJeJ4nJLQiL3uuuNfkuJMDF9P4riLZSiGPtDtUa6JJ7nnhT13y3OPzprO2m-1r2Ul93X_OET0c42tTrrAbog_jYKDvE5RyqDRViHvMqQTZmm_DV34QsYur/s1600/20150525_195643.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjZXNUPlO4Dzbll-cqCjXbjyzJeJ4nJLQiL3uuuNfkuJMDF9P4riLZSiGPtDtUa6JJ7nnhT13y3OPzprO2m-1r2Ul93X_OET0c42tTrrAbog_jYKDvE5RyqDRViHvMqQTZmm_DV34QsYur/s640/20150525_195643.jpg&quot; width=&quot;360&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
If you&#39;ve poked around the internets where electronics hobbyists collect, it is likely that you are acutely aware of our incontrovertible affinity for building timekeeping clocks. &amp;nbsp;It is similarly &lt;i&gt;unlikely&lt;/i&gt; that you have been able to evade the plenitude of nixie tube based projects. &amp;nbsp;There is a reason for this.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://en.wikipedia.org/wiki/Nixie_tube&quot;&gt;Nixie tubes&lt;/a&gt; are cool. &amp;nbsp;They have great aesthetic appeal with their difficult-to-photograph, warm orange glow, and dem curvy numerals. &amp;nbsp;They add an organic je ne sais quoi to a hobby with ostensibly digital design cues. &amp;nbsp;Further, they pose technical challenges in the way of producing and switching the ~175 V DC needed to light each tube element. &amp;nbsp;&lt;strike&gt;And as far as I am aware, there are no new nixie tubes being produced&lt;/strike&gt;; as such, procurement can be a challenge unto itself. &amp;nbsp;My N.O.S. nixies came from Russia thru Ebay, and only 3 were duds. &amp;nbsp;Incidentally the seller replaced those 3, FOC.&lt;br /&gt;
&lt;br /&gt;
The &lt;strike&gt;strike thru&lt;/strike&gt; text above results from a tip from&amp;nbsp;&lt;a href=&quot;https://plus.google.com/+NicholasStock/posts&quot;&gt;+nicholasStock&lt;/a&gt;&amp;nbsp;&amp;nbsp;who points out new nixie tubes ae in fact being produced:&amp;nbsp;http://www.daliborfarny.com/ &amp;nbsp;The linked tubes are really impressive from a technical standpoint as well as asthetics. &amp;nbsp;They seem to amplify all of the design cues we love about NOS nixies and the results speak for themselves. &amp;nbsp;Might still be an issue with procurement, however...&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHGgm7phe7TGAKsd3G7EOlYYJ8dFLUxlTpoLQqx5PT1K6med442aV3q0Gd_0p2A4e1BkxpYDKYZVMfAJcQT1de84f_ZmijyChC4W127XSlJqUvnE__a3aIPBmOHcknPRlNc15G37wy10gJ/s1600/IMG_20150228_224608.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHGgm7phe7TGAKsd3G7EOlYYJ8dFLUxlTpoLQqx5PT1K6med442aV3q0Gd_0p2A4e1BkxpYDKYZVMfAJcQT1de84f_ZmijyChC4W127XSlJqUvnE__a3aIPBmOHcknPRlNc15G37wy10gJ/s400/IMG_20150228_224608.jpg&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Nixie Tubes and HV Driver&lt;br /&gt;
From Russia with love&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGEtLTC8iTQqolxs1MgasfvQULCVqP6Gy2_fYWWVvFnNMSbFjltAJhbuD42eZ-nOTiBCG9ZikzEbirZkfgwLvkbfjrKQzdaAPcZjfYS8rRdMBb-UjpffuRy0gLbwHWS33t1cChaxa18OwP/s1600/20150503_093017.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGEtLTC8iTQqolxs1MgasfvQULCVqP6Gy2_fYWWVvFnNMSbFjltAJhbuD42eZ-nOTiBCG9ZikzEbirZkfgwLvkbfjrKQzdaAPcZjfYS8rRdMBb-UjpffuRy0gLbwHWS33t1cChaxa18OwP/s400/20150503_093017.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;K155ID1&#39;s are shipped in stacks bound by rubber bands&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div&gt;
Fortunately, not all nixie tube clocks are implemented the same. &amp;nbsp;In fact, look around at all the schematics for nixie clocks, and you will realize there are more permutations in methodology than there are models of nixie tubes. &amp;nbsp;This is how it should be. &amp;nbsp;We ( DIY electronics people ) like to put our own spin on things.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
My version of the Nixie Clock has a few of its own nifty features. &amp;nbsp;The list includes:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Single microcontroller design.&lt;/li&gt;
&lt;li&gt;Software based RTC.&lt;/li&gt;
&lt;li&gt;Software driven boost converter for ~175 V DC supply.&lt;/li&gt;
&lt;li&gt;Time, Date, and behavior configuration via USB&lt;/li&gt;
&lt;li&gt;Windows application for clock configuration.&lt;/li&gt;
&lt;li&gt;Time, Date, Temperature, and AC Power line frequency display.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguDxp0VE_uBzGzC3QgfWAMZ17lURF3IoHczNtM_PkXkOH8dTG0dj5W6eaQUNGfdPstnnVeDgzJ5n1IAzL8-Tm8SKzHR79ZIRq9YUc-DkWunNboYTeG0KaFoZkRCIXPwPicb9xjgLfhJyZh/s1600/20150412_210207.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguDxp0VE_uBzGzC3QgfWAMZ17lURF3IoHczNtM_PkXkOH8dTG0dj5W6eaQUNGfdPstnnVeDgzJ5n1IAzL8-Tm8SKzHR79ZIRq9YUc-DkWunNboYTeG0KaFoZkRCIXPwPicb9xjgLfhJyZh/s400/20150412_210207.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
The Name&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
I was working on the PCB layout and thought it would be cool to write &quot;Nixie Tube Clock&quot; in Cyrillic script, so I did a google translate. &amp;nbsp;You can see the translation on the top right of the PCB. &amp;nbsp;Well, it turns out that &quot;Nixie&quot; translates to something of a shapeshifting water-woman. &amp;nbsp;So, I call this the mermaid clock now. &amp;nbsp;Thanks to the native language speakers that pointed this out to me.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPfV0tgsjkhOig2ei2pyyyLI9_SOcy1mcd4Qq8OBTp0hyphenhyphenB3n3dqrwW-ow0TzXYBQ9FLi2jUFv1eIVHkESqnGKKDpg8W6bMPwnLTTjQPePQ8I1Ay2mbPDk0KYhTRWPRT5D-uNfjX4BeeFYZ/s1600/20150412_210238.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPfV0tgsjkhOig2ei2pyyyLI9_SOcy1mcd4Qq8OBTp0hyphenhyphenB3n3dqrwW-ow0TzXYBQ9FLi2jUFv1eIVHkESqnGKKDpg8W6bMPwnLTTjQPePQ8I1Ay2mbPDk0KYhTRWPRT5D-uNfjX4BeeFYZ/s400/20150412_210238.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Downloads&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
The clock firmware can be found on GitHub here:&amp;nbsp;&lt;a href=&quot;https://github.com/pilotingpete/Nixie-Tube-Clock&quot; target=&quot;_blank&quot;&gt;https://github.com/pilotingpete/Nixie-Tube-Clock&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The Nixie Clock Communicator code can be found on GitHub here:&amp;nbsp;&lt;a href=&quot;https://github.com/pilotingpete/nixieClockCommunicator&quot; target=&quot;_blank&quot;&gt;https://github.com/pilotingpete/nixieClockCommunicator&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
An Electronics Bill of Materials - Please notify me of any errors: &lt;a href=&quot;https://docs.google.com/spreadsheets/d/1ZhO8OGlxGMYI7I5BOQ9BeYuwDf4MAAcQkCAm8IlP1JA/edit?usp=sharing&quot; target=&quot;_blank&quot;&gt;BOM&lt;/a&gt;&lt;/div&gt;&lt;div&gt;
&lt;br /&gt;
The KiCad schematic and board files. &amp;nbsp;Also, a collection of datasheets, and some logfiles from when I calibrated my prototype clock. &amp;nbsp;Perhaps there are some other files in this archive that I thought were useful while I was working on this project too: &lt;a href=&quot;https://drive.google.com/file/d/0B1CPUkh94AtmMmM5Y1NmeGttLWs/view?usp=sharing&amp;amp;resourcekey=0-1wT0E5hV8WxlI2hVp9KdLQ&quot; target=&quot;_blank&quot;&gt;Electronics Package&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://drive.google.com/file/d/0B1CPUkh94AtmQzA4Smx5Nnprc2s/view?usp=sharing&amp;amp;resourcekey=0-4gZAWWIHxheVHSvU1s3_0g&quot; target=&quot;_blank&quot;&gt;Here is the current schematic&lt;/a&gt; in PDF in case you don&#39;t have KiCad installed. &lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Researching Nixie Tubes online I learned about &lt;a href=&quot;https://www.google.com/webhp?sourceid=chrome-instant&amp;amp;rlz=1C5CHFA_enUS558US560&amp;amp;ion=1&amp;amp;espv=2&amp;amp;ie=UTF-8#q=cathode+poisoning&quot;&gt;Cathode Poisoning&lt;/a&gt;. &amp;nbsp;I don&#39;t know a whole lot about it, but suffice to say an unused or seldom used nixie element will deteriorate over time. &amp;nbsp;I read that you can sometimes reverse this deterioration by applying a higher than normal voltage to the element for a period of time. &amp;nbsp;I also read that you can try to make sure all elements get some ON time to prevent or slow the deterioration of elements.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
The last paragraph should be read as &quot;We have an opportunity to do some neat blinky stuff with our tubes!&quot; &amp;nbsp;Hence, the video below. &amp;nbsp;This pattern occurs every 30 minutes - at the top and bottom of each hour.&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/sgmtbTFv1xg/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/sgmtbTFv1xg?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
RTC&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://petemills.blogspot.com/2011/05/real-time-clock-part-1.html&quot;&gt;Four short years ago I posted about a method for building your own microcontroller based realtime clock.&lt;/a&gt;&amp;nbsp; This is essentially a method to calibrate your xtal to more closely match real time, and some code to keep track of the time and date. &amp;nbsp;The benefits of a uC based RTC include a reduction in components and everything that comes with that; increased reliability, cost reduction, real estate savings, &amp;amp;c. &amp;nbsp;We can also achieve accuracy in timekeeping greater than that specified in stand alone IC RTC&#39;s datasheets.&lt;br /&gt;
&lt;br /&gt;
In the aforementioned post, we only discussed the theory and showed a proof of concept example. &amp;nbsp;There were no software provisions for calendar with leap year, 12/24 hr format, etc. &amp;nbsp;That is, the finishing touches to make a useful RTC for a clock were left out. &amp;nbsp;This nixie clock builds upon the methods for coding your own RTC and shows the implementation to make a useful clock. &amp;nbsp;This code could easily be recycled into any number of clock projects with LED, LCD, OLED, displays too.&lt;br /&gt;
&lt;br /&gt;
The core RTC code can keep track of the time and date, account for leap years, and report the day of the week. &amp;nbsp;One could expand this to take care of DST, but I go into detail about why I don&#39;t in the previous post.&lt;br /&gt;
&lt;br /&gt;
While designing the hardware for the clock I added a &quot;zero cross detector&quot; to the incoming AC power line. &amp;nbsp;We can use this in lieu of the calibrated xtal to keep time - users choice.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNKpKJh8uZD1mUhRwwB82t3E9FMETLce7aXSj6HwB2QN3CK31szbLKvcz681ECj9ZFupO8jEDlm5Ysm85DY8KHxojpjpmwXPUkD1azFuBznXcUiGG36eAbMiUypVeFN6mnL7HE4b6MU5F0/s1600/20150525_195758.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNKpKJh8uZD1mUhRwwB82t3E9FMETLce7aXSj6HwB2QN3CK31szbLKvcz681ECj9ZFupO8jEDlm5Ysm85DY8KHxojpjpmwXPUkD1azFuBznXcUiGG36eAbMiUypVeFN6mnL7HE4b6MU5F0/s400/20150525_195758.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;All those nixies controlled with just 3 uC lines. &amp;nbsp;Thanks, shift registers!&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
USB Interface&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
Using the ATMega328&#39;s built in UART we are able to communicate with the firmware via an FTDI USB cable to configure clock settings and behavior parameters. &amp;nbsp;These parameters can also be read back out of the clock and/or stored to the internal eeprom of the ATMega328. &amp;nbsp;Parameters stored to eeprom are read into memory at boot up, so that the clock&#39;s configuration is persistent thru total power loss.&lt;br /&gt;
&lt;br /&gt;
For example, open a terminal to 56700 baud and type &quot;celsius=1&quot; and hit enter. &amp;nbsp;This will set the clock to display the temperature on the Celsius scale. &amp;nbsp;Setting this parameter to 0 would result in the Fahrenheit scale i.e. &quot;celsius=0&quot;.&lt;br /&gt;
&lt;br /&gt;
If you were to type &quot;hours?&quot; the clock would reply with &quot;Hours: nn&quot; where nn is the currently displayed hours. &amp;nbsp;There are also parameters for &quot;showFreq&quot;, &quot;showDate&quot;, showTherm; each of which are set to display its unique parameter value at the top of each minute or not. &amp;nbsp;i.e. if you type &quot;showtherm=1&quot; then at the top of each minute the temperature will be displayed - in Celsius or Fahrenheit as previously discussed.&lt;br /&gt;
&lt;br /&gt;
Below is a screenshot of the available commands. &amp;nbsp;At the terminal type &quot;help&quot; and hit enter. &amp;nbsp;The column labeled &quot;command&quot; shows you the available parameters to configure. &amp;nbsp;&quot;Set/Read&quot; column suggests that you may set a value with &#39;=&#39; and read the value with &#39;?&#39;. &amp;nbsp;The &quot;Low Lim&quot; and &quot;High Lim&quot; columns show the range of acceptable values to input.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicEWwvfN5zDpUrOyTa73PbTwcjg1mNMaCQfo02Uhpv3pXgN-_S9jAHu2QLtgd0SOgOKwseyi4UUhl1LxTNfp9xilpeGLOMd2bCxNSM-Sk6EykvaOZMbk3oKdvfOEZweyYGwe2nhpWokPYX/s1600/Screen+Shot+2015-05-25+at+7.29.02+PM.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;205&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicEWwvfN5zDpUrOyTa73PbTwcjg1mNMaCQfo02Uhpv3pXgN-_S9jAHu2QLtgd0SOgOKwseyi4UUhl1LxTNfp9xilpeGLOMd2bCxNSM-Sk6EykvaOZMbk3oKdvfOEZweyYGwe2nhpWokPYX/s400/Screen+Shot+2015-05-25+at+7.29.02+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;USB Terminal Interface&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&quot;getall&quot; returns a csv line of all current parameter values. &amp;nbsp;The order can be verified in the firmware.&lt;/li&gt;
&lt;li&gt;&quot;ramtoeeprom&quot; will store all current parameters to eeprom so that they are recalled after a total power removal. &amp;nbsp;Time and date are excluded - view the firmware to confirm all parameters that get stored.&lt;/li&gt;
&lt;li&gt;&quot;poke&quot; returns the clock serial number - mine is S/N: 100; what will yours be?&lt;/li&gt;
&lt;li&gt;&quot;pwrok&quot;, &quot;hvfeedback&quot;, &quot;battvoltage&quot;, and &quot;rectifiedac&quot; return system voltages. &amp;nbsp;Refer to the schematic for voltage points.&lt;/li&gt;
&lt;li&gt;&quot;doecho&quot; is a UART echo and is useful for typing at a terminal; it lets you see what you are typing. &amp;nbsp;It is not so useful when using the NCC app and should probably be turned off i.e. &quot;doecho=0&quot;&lt;/li&gt;
&lt;li&gt;&quot;nixiesleepstart&quot; and &quot;nixiesleepend&quot; set the time that the nixies turn off and on at night. &amp;nbsp;We dont need to burn up valueable nixie time while we are sleeping. &amp;nbsp;If nixiesleepstart is 0, then they will never sleep and nixiesleepend is necessarily ignored.&lt;/li&gt;
&lt;li&gt;&quot;toggleled&quot; if set to 1 then the LED on PD7 will toggle at 1 Hz. &amp;nbsp;Set to 0 and no more toggling - the LED will remain in its current state. &amp;nbsp;It is neat, although power wasteful, if toggleled=1 and a power outage occurs. &amp;nbsp;The LED continues to toggle letting you know the clock is still running. &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Wouldn&#39;t it be cool if we had a PC app to handle all the communication? &amp;nbsp;So that we can just click a button and the app would send the current PC time to the clock, for instance? &amp;nbsp;I think so too, and more on that below.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
A video showing the time, date (2015.05.29), temperature (28.93 C), and AC Frequency (59.991 Hz).&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/nMoTmuckH28/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/nMoTmuckH28?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
Boost Converter&lt;/h3&gt;
&lt;div&gt;
The boost converter utilizes one PWM channel and one ADC channel on the ATMega328. &amp;nbsp;A function is called at 1 kHz to check the voltage coming out of the boost converter and thru a voltage divider. &amp;nbsp;If the voltage is higher than a setpoint, then the PWM duty cycle is reduced. &amp;nbsp;If the voltage is too low, the duty cycle is increased. &amp;nbsp;The resultant ~175 V DC is quite stable.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
*I discovered that stopping the timer is not a suitable method of turning the boost converter off. &amp;nbsp;The state of the output pin can sometimes come to rest at ON. &amp;nbsp;The result is a direct short thru the boost converters inductor. &amp;nbsp;Many fuses gave indication to a problem here. &amp;nbsp;The solution is to disconnect the pin from the PWM timer in software and then set the output low. &amp;nbsp;Check the firmware and code comments for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0xYcWAwISQcnuSivOrLZht1rsQTwFblA_TtGA5kkjfqZa4zCXuqydI2Pd2NxBZV0hucB2r1Q5d8PLrJ9o9h18TpisP6cSVDa1LZRo4rG0aPLuOf_Pso37OMS2SnL1nrTejFeKiDc7US6-/s1600/20150525_195605_001.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0xYcWAwISQcnuSivOrLZht1rsQTwFblA_TtGA5kkjfqZa4zCXuqydI2Pd2NxBZV0hucB2r1Q5d8PLrJ9o9h18TpisP6cSVDa1LZRo4rG0aPLuOf_Pso37OMS2SnL1nrTejFeKiDc7US6-/s400/20150525_195605_001.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmX_YgAP-T5r0d0AwIB5tZ28ij17VGXy7xBGzXd1QLXNfckdxfNIpTnSG_ZcC-URwSfUbU-uZIpO0Ei4G1HiEOMklLr-02GQhaVRDRxkgQ9-pL2LAvGVoJ8LPAZoSH0dz_BT8yX-O09B6m/s1600/20150410_231935_001.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmX_YgAP-T5r0d0AwIB5tZ28ij17VGXy7xBGzXd1QLXNfckdxfNIpTnSG_ZcC-URwSfUbU-uZIpO0Ei4G1HiEOMklLr-02GQhaVRDRxkgQ9-pL2LAvGVoJ8LPAZoSH0dz_BT8yX-O09B6m/s400/20150410_231935_001.jpg&quot; width=&quot;225&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Reflow soldering the SMD components&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7fnE4YwHdsxwGhKA1U4ItzyGGqVFkReYdijA8JNeiOWZ2yyU4hXrtGusgPcorsDA66yjcQQO3TIbP7F7llWfeXkLt2S_zFnx1ZoR5WpbB8afpt6UCax7A2iqhjuWve0tr7wSD89avhV-h/s1600/20150410_214728.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7fnE4YwHdsxwGhKA1U4ItzyGGqVFkReYdijA8JNeiOWZ2yyU4hXrtGusgPcorsDA66yjcQQO3TIbP7F7llWfeXkLt2S_zFnx1ZoR5WpbB8afpt6UCax7A2iqhjuWve0tr7wSD89avhV-h/s400/20150410_214728.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Kapton Solder Paste Screen&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Hardware&lt;/h3&gt;
&lt;div&gt;
There were/are a couple of mistakes made when I designed the PCB. &lt;br /&gt;
&lt;br /&gt;
First, the datasheet I have for the nixie tubes was incorrect. &amp;nbsp;I used the datasheet to make PCB footprints in KiCad and never checked the physical tube before sending the PCB to manufacture. &amp;nbsp;They were in the mail at the time. &amp;nbsp;The physical tubes are a full 180 degrees upside down compared to the datasheet. &amp;nbsp;I corrected this in KiCad and sent the new gerbers to be manufactured again.&lt;br /&gt;
&lt;br /&gt;
The new boards came back ready to go. &amp;nbsp;Or as it would turn out, ready for me to find more mistakes. &amp;nbsp;Like R8, which is supposed to be a pullup resistor for the DS18B20 temperature sensor, not a pulldown as I drew originally. &amp;nbsp;I discovered this one when I couldn&#39;t get any temperature readings. &amp;nbsp;Rather than remake the boards I drilled out R8&#39;s via to GND and added a wire jumper to VCC. &amp;nbsp;You can see this fix below.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmlsJDQxCRmgi_34zoUON43HRdbAgEr6kXZG1O43ClmjjryMQrOPRqfDxpBcM6Tuhx0YI3mrUQBsAFGLYukXFhs6rs_ISrcPRw2JTo4RiujWqF2tHNdNUdzgb7oPTiTUv3Zjta4N2FujMD/s1600/20150506_183048.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmlsJDQxCRmgi_34zoUON43HRdbAgEr6kXZG1O43ClmjjryMQrOPRqfDxpBcM6Tuhx0YI3mrUQBsAFGLYukXFhs6rs_ISrcPRw2JTo4RiujWqF2tHNdNUdzgb7oPTiTUv3Zjta4N2FujMD/s400/20150506_183048.jpg&quot; width=&quot;225&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;font-size: 12.8px;&quot;&gt;Drilled out VIA to disconnect R8 from GND&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNHSnEK4A_Iw8-xmKfXEpMWwIkoRv0MT_ovBOqxjmXaBT1WOd6y-CC13k4zlHZp93IlbslIyMEZjPLiDO8lqFjiINbiP6eBveiyRQbsp-TwQWY6nk4FRcxJGKyJ8V5k26wjy41EpXhZRhm/s1600/20150506_183728.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNHSnEK4A_Iw8-xmKfXEpMWwIkoRv0MT_ovBOqxjmXaBT1WOd6y-CC13k4zlHZp93IlbslIyMEZjPLiDO8lqFjiINbiP6eBveiyRQbsp-TwQWY6nk4FRcxJGKyJ8V5k26wjy41EpXhZRhm/s400/20150506_183728.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Red Jumper for R8 to VCC&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
The R8 pullup/pulldown error has been fixed in KiCad and included in V1.1 as REV A.&lt;br /&gt;
&lt;br /&gt;
Prior to discovering the pullup/pulldown mix up on the DS18B20, I had discovered that my linear voltage regulator supplying VCC was overheating. &amp;nbsp;I had underestimated how much current the HV driver IC&#39;s would consume - they doubled the circuit total. &amp;nbsp;I also underestimated the voltage that would be coming out of my 12 V AC adapter. &amp;nbsp;It is approaching 18 V DC after rectification. &lt;br /&gt;
&lt;br /&gt;
To salvage this embarrassingly obvious oversight I ordered 10 premade buck converters from ebay for about $10 total. &amp;nbsp;They are based on the LM2596 IC and are voltage output adjustable. &amp;nbsp;Now, I feed that ~18 V DC into the buck converter and send ~6.5 V DC out to the linear regulator. &amp;nbsp; Hopefully, I will remember this lesson and incorporate buck converters appropriately in the future.&lt;br /&gt;
&lt;br /&gt;
Below are some pictures showing the repair/mistake. &amp;nbsp;Since this photo was taken I have potted the linear regulator and wires to prevent shorts or strain failures.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxJwuRWoE1e-7YWlT6K9p5f2fAGrijqJIW7koaCWv-4QqdiP_cuiN6NfrPz5a4bQEHEwjTL28MDQccvHw7uTqxGfgkzUKPEhBY9puwWuwQWs6mA4K2QC8jSfiVBf_gQwV0UyebKgxz7Gpx/s1600/20150514_200854.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxJwuRWoE1e-7YWlT6K9p5f2fAGrijqJIW7koaCWv-4QqdiP_cuiN6NfrPz5a4bQEHEwjTL28MDQccvHw7uTqxGfgkzUKPEhBY9puwWuwQWs6mA4K2QC8jSfiVBf_gQwV0UyebKgxz7Gpx/s400/20150514_200854.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;LM2596 Buck Converter&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_FhYAYHWX7DGGDTixscbGFl8ONqggVRhbZ0AUQbz9gZmYY1hfoOWgRAzRc77UApD4Rl7DkUMtL7K4O7I5T-hZUcvgHt1K9Yzzx4rj0hiZtUFDOLkUApmvMALm0tSW-vcLVJKHV4ibfz0i/s1600/20150514_200815.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_FhYAYHWX7DGGDTixscbGFl8ONqggVRhbZ0AUQbz9gZmYY1hfoOWgRAzRc77UApD4Rl7DkUMtL7K4O7I5T-hZUcvgHt1K9Yzzx4rj0hiZtUFDOLkUApmvMALm0tSW-vcLVJKHV4ibfz0i/s400/20150514_200815.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Buck Converter Wiring&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
I currently have several of these nixie clock boards as spare. &amp;nbsp;If you would like one, send me an email and I can figure out how much they cost. &amp;nbsp;Although I did drill out R8&#39;s VIA on all boards they are subject to needing the R8 jumper to VCC fix still, and the buck regulator fix described above.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
SW1&lt;/h3&gt;
&lt;div&gt;
There is an unpopulated tactile switch on my PCB. &amp;nbsp;I put it there &quot;just in case&quot; but I don&#39;t have a need for it. &amp;nbsp;Perhaps it could be used to cancel an alarm or put the nixies to sleep/wake them up? &amp;nbsp;Let me know if you end up coding anything for it!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
&amp;nbsp;Battery Backup&lt;/h3&gt;
&lt;div&gt;
In the picture below you can see the battery backup schematic. &amp;nbsp;BATT-4.5V is just a 3x AAA battery holder. &amp;nbsp;I resisted the urge to use a CR2032 battery or similar in lieu of the larger AAA batteries. &amp;nbsp;My reasoning being that I have plenty of real estate inside the clock case, and weight was not a concern. &amp;nbsp;Also, I always have AAA batteries on hand, and they are cheap.&lt;br /&gt;
&lt;br /&gt;
So, this battery pack is connected to VCC via a schottky diode such that the battery is not a source so long as VCC is at a greater potential. &amp;nbsp;When power is lost, and VCC is at a lower potential than BATT_VOLTAGE, the diode allows the battery backup to conduct and keep the circuit alive seamlessly.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here, BATT_VOLTAGE goes to the ADC on the ATMega328 and allows us to measure the voltage of the battery pack. &amp;nbsp;Presumably, we could work out a way to determine when battery replacement is necessary. &amp;nbsp;For now, we just read the voltage. &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIIvotNhQA31huqIgTskwt3eeojlxxTOzKZZZ7UXOSAKEULiJp8Y2Cy9GPAS0gK8Cr8cf66IShMxHB-gCEw8FSUgYPHm9uvVj_kj1C9mlmYu_hVmMFQd-YvHD8S9NMps4kwAvpEnSV-1eQ/s1600/Screen+Shot+2015-05-17+at+9.39.45+PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;288&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIIvotNhQA31huqIgTskwt3eeojlxxTOzKZZZ7UXOSAKEULiJp8Y2Cy9GPAS0gK8Cr8cf66IShMxHB-gCEw8FSUgYPHm9uvVj_kj1C9mlmYu_hVmMFQd-YvHD8S9NMps4kwAvpEnSV-1eQ/s320/Screen+Shot+2015-05-17+at+9.39.45+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
AC Frequency Measurement&lt;/h3&gt;
&lt;div&gt;
Below you can see a schematic showing the method of digitizing the AC input waveform. &amp;nbsp;There is a nominal 12 V AC on L1 and L2. &amp;nbsp;AC_FREQ goes to a pin with internal pullup on the ATMega328. &amp;nbsp;Therefore, this pin is normally high and pulled low once per positive AC cycle. &amp;nbsp;Say, for an AC sine wave input somewhere between 0 and Pi there is a square pulse output.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I included this part of the circuit mainly because I wanted to measure the ac frequency of the power line. &amp;nbsp;I have never done his before, and thought it would be a good opportunity to do so. &amp;nbsp;There is the added benefit that you could use this AC input to drive the clock if you were so inclined. &amp;nbsp;The software would just need to count up 60 cycles ( or 50 in some countries ) and tick over the seconds. &lt;br /&gt;
&lt;br /&gt;
EDIT: As I wrote the previous paragraph I realized that I should just take a break and code the AC frequency as a timekeeping source. &amp;nbsp; To run the clock in this mode, you can now type &quot;acclock=1&quot; at the terminal. &lt;br /&gt;
&lt;br /&gt;
I am partial to the xtal calibration method described in the RTC section above (&quot;acclock=0&quot;) , but I do recognize that method takes some level of commitment to implement. &amp;nbsp;Certainly, both timekeeping methods have their merit based on the expected usage environment of the finished product.&lt;br /&gt;
&lt;br /&gt;
When a power outage occurs and acclock=1 the xtal will step in and keep time. &amp;nbsp;Yet another good reason to run the calibration procedure anyway... &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKRnLkeaFzMeLNMAahKH18NNJzmkYLxao8JjW2-dmnU5S-HzhfpqPtzonKWSsQ9CHHiOfJr26rskvVR3C9jFu7wIQKvTKp_U4CVyopq68Apj0ZpXpXn-9-hxTAStmG_N_kWpck02C7A79C/s1600/Screen+Shot+2015-05-17+at+9.44.59+PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;156&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKRnLkeaFzMeLNMAahKH18NNJzmkYLxao8JjW2-dmnU5S-HzhfpqPtzonKWSsQ9CHHiOfJr26rskvVR3C9jFu7wIQKvTKp_U4CVyopq68Apj0ZpXpXn-9-hxTAStmG_N_kWpck02C7A79C/s400/Screen+Shot+2015-05-17+at+9.44.59+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
I tried to get a scope cap of what this looks like in operation, but it didn&#39;t come out very well because the AC and DC sides of the circuit don&#39;t share a ground. &amp;nbsp;Anyway here it is. &amp;nbsp;You can see blue half of the AC sine wave and the digitized red trace that we can feed to the input of the uC.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Counting up the rising edges of the red trace until we get to our nominal AC frequency ( 60 Hz in the USA ) then ticking over our seconds. &amp;nbsp;So far this has been quite acceptable for accuracy although I have not run this mode for more than a week or so.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm06OGeID9w1844Tu8_ngi_qjxE0qFjEFDoZtBiZf45V7FEfRW69uwQbahjga7INyR1nvEyu4DK9z_YPGf4HEb1g7rH4bSNsyo7WsohwObWI4-ONpmpOvalnXUdONIJNqfWoRBvY5cWA6R/s1600/2015-05-24+22_14_54-WFMReader+V2.01.00.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;277&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm06OGeID9w1844Tu8_ngi_qjxE0qFjEFDoZtBiZf45V7FEfRW69uwQbahjga7INyR1nvEyu4DK9z_YPGf4HEb1g7rH4bSNsyo7WsohwObWI4-ONpmpOvalnXUdONIJNqfWoRBvY5cWA6R/s400/2015-05-24+22_14_54-WFMReader+V2.01.00.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC2hY0gZpDbcpnbKfuVLRybLnfFN68xkSDiVJind9Akm-8FPk4hUQE2_hKqqn8iMhj6GnyBGLDpiNL87KffEjMioFl0_ABJIT3BQZzmTH0tDFH_ji_X6yiMUcL2EqcjMfsLANsodsRHvBf/s1600/20150523_070204.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC2hY0gZpDbcpnbKfuVLRybLnfFN68xkSDiVJind9Akm-8FPk4hUQE2_hKqqn8iMhj6GnyBGLDpiNL87KffEjMioFl0_ABJIT3BQZzmTH0tDFH_ji_X6yiMUcL2EqcjMfsLANsodsRHvBf/s400/20150523_070204.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnocYLQ9xywsWQ3uDO31QM_9SM6OhZ4b2n-EKjHo0a1fzvtuGZyX_bNwtsr0FkEELWIFEq4hhEgh6oKU_nk3exgRMLMkMBYkj23srCX3-wbkT1UaS-w-JiHHwPtzPnfmX-BWTxwtusHwkr/s1600/20150525_232608.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnocYLQ9xywsWQ3uDO31QM_9SM6OhZ4b2n-EKjHo0a1fzvtuGZyX_bNwtsr0FkEELWIFEq4hhEgh6oKU_nk3exgRMLMkMBYkj23srCX3-wbkT1UaS-w-JiHHwPtzPnfmX-BWTxwtusHwkr/s320/20150525_232608.jpg&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;The AC/AC Transformer&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;
Clock Case&lt;/h3&gt;
&lt;div&gt;
Functionally, a clock case is very important. &amp;nbsp;It needs to provide thermal stability for the clock innards, mechanical protection from bumps and dings, light splash protection from water, and protection from dust, or rather a surface to collect dust that is easier to clean than the populated PCB alone.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Putting on my humility hat I attempt to create a clock case from wood. &amp;nbsp;Sycamore; locally harvested to be precise. &amp;nbsp;It is a work in progress, but my vision for the case involves dovetails, radii, and a glass front panel - possibly etched. &amp;nbsp;I hope to continue on the case soon - I imagine the wood quipping that it could have grow itself into a clock case faster.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-EUUK1TLj91T4vlmltrf8w6ooJFi4vnIg35CbiXmF_q65IdNj-Uv2Q76HoPFuaXGLm6rzRyKg1XHNu25iXnWCwW9-HCqVMSbGUkFbS16CrsrIrrGWcJAXS9mlkPkxJHKR109eQVShpRKP/s1600/20150516_133203.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-EUUK1TLj91T4vlmltrf8w6ooJFi4vnIg35CbiXmF_q65IdNj-Uv2Q76HoPFuaXGLm6rzRyKg1XHNu25iXnWCwW9-HCqVMSbGUkFbS16CrsrIrrGWcJAXS9mlkPkxJHKR109eQVShpRKP/s400/20150516_133203.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Local Sycamore&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipSD8lZ88kjP4t8OLxIo6vnsf_XwC-O9l3W4y3ROS1ZuaNN2M6KYPhH7-IjZNmkgl7kPrZziYoYq57YuIHKn0NHQ4n2E4m2Upcp0aLdUm0Ex0vC76usVDzeHqCY6Qr-sR9xLAejE1-mSWI/s1600/20150516_142243.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipSD8lZ88kjP4t8OLxIo6vnsf_XwC-O9l3W4y3ROS1ZuaNN2M6KYPhH7-IjZNmkgl7kPrZziYoYq57YuIHKn0NHQ4n2E4m2Upcp0aLdUm0Ex0vC76usVDzeHqCY6Qr-sR9xLAejE1-mSWI/s400/20150516_142243.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Table sawing the 1-1/8&quot; thick boards to half thickness for case sides.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7FeeE82MBgNacXvO0Mu9AIKB8Qg8HSno9WgGOM6se3Ss72soDmSUvfOreBmAgb8sW20L2_Wf9QXgUZlKROJcdx83wMpoPnLcoTRlMkdX4VltqfycYMAO4lbsjsxk2yKlUKZpFoapXPOQq/s1600/20150516_170405.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7FeeE82MBgNacXvO0Mu9AIKB8Qg8HSno9WgGOM6se3Ss72soDmSUvfOreBmAgb8sW20L2_Wf9QXgUZlKROJcdx83wMpoPnLcoTRlMkdX4VltqfycYMAO4lbsjsxk2yKlUKZpFoapXPOQq/s400/20150516_170405.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Marking and cutting out dovetails&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXGg4vSqcK7IeDQtt0hiqR48IaVTnbHMmp2DfWphlaxYJIODDSUa7CbSLrnfd3VplCp5_F7bso6ol4SZAYc1vsbziY2KrxIlTZaGlGFDBG0Ywj1j1cpoI4NYewcEDlVs7tJ7ujsE_6SwCI/s1600/20150516_142808.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXGg4vSqcK7IeDQtt0hiqR48IaVTnbHMmp2DfWphlaxYJIODDSUa7CbSLrnfd3VplCp5_F7bso6ol4SZAYc1vsbziY2KrxIlTZaGlGFDBG0Ywj1j1cpoI4NYewcEDlVs7tJ7ujsE_6SwCI/s400/20150516_142808.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Admiring the Sycamore grain&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h3&gt;
Windows Application&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
The purpose of the Nixie Clock Communicator app ( NCC ) is to simplify the setting, and calibrating of this nixie clock. &amp;nbsp;It is not required for use, but is handy - particularly during development and debug.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
For instance, to set the time I could open a terminal and connect. &amp;nbsp;Then type &quot;hours=12&quot; [ENTER], &quot;minutes=55&quot; [ENTER], &quot;seconds=13&quot; [ENTER] and the nixie clock would be set to 12:55:13. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
No problem. &amp;nbsp;But with the NCC app, I can click the &quot;Send PC Time&quot; button and the app will look at the current system time, wait for a new second to tick over ( mS = 0 ), and then immediately send the seconds, minutes and then hours.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Additionally, the app can datalog the time and date that the clock thinks it is, concatenate this with the PC time and date, and log this to a text file. &amp;nbsp;Using this information we can derive a calibration value such that the long term accuracy of the XTAL is compensated to drive the clock very near to real time. &amp;nbsp;More on this in the &quot;Calibration&quot; section below.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The app is written in C# using Microsoft Visual Studio 2013. &amp;nbsp;Although the code compiles, runs and does it&#39;s job, it is very much a work in progress - I am currently trying to work out some bugs where there seem to be some phantom characters triggering my serialRead event handler. &amp;nbsp;I am sure there is a logical explanation, but I have not sorted it out just yet. &amp;nbsp;If you do, please let me know!&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Y2F5uvLFd9Uj7RTtkXeec9nK5t06vbyx3cWfmjr1yZQrAOWN5UV3v6iVBL587TI8svMkIN5hPq5GojMuvAYm7cVEZfuCwXb38uPwQqSQlEONukZ0xOts8jxHA2hl7Wh7FNmS7Lbf15kz/s1600/NixieClockCommunicatorGUI.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;285&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Y2F5uvLFd9Uj7RTtkXeec9nK5t06vbyx3cWfmjr1yZQrAOWN5UV3v6iVBL587TI8svMkIN5hPq5GojMuvAYm7cVEZfuCwXb38uPwQqSQlEONukZ0xOts8jxHA2hl7Wh7FNmS7Lbf15kz/s400/NixieClockCommunicatorGUI.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Nixie Clock Communicator ( NCC ) app for Windows.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h3&gt;
&lt;br /&gt;
Calibration&lt;/h3&gt;
&lt;div&gt;
Before you attempt to calibrate the clock it should be placed in a suitable enclosure. &amp;nbsp;One that is vented yet free from drafts. &amp;nbsp;The idea being that you want to keep ambient thermal excursions from affecting the temperature of the xtal case. &amp;nbsp;Direct sunlight might be desirable to avoid.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
It does not greatly matter what the temperature of the xtal is, so long as it is stable over the long term. Having said that, if one were to have a choice of temperatures to put the xtal near, it would be wise to select one nearest to 25 C, however do not neglect the benefit inherent to a stable temperature.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
It might save you some frustration to have tested out the battery backup before now. &amp;nbsp;However, if power outages do occur during calibration, the outcome may be an improper calibration value. &amp;nbsp;It occurs to me now that there should be a firmware counter that keeps track of the number of times the clock enters battery backup mode. &amp;nbsp;If that number is &amp;gt; 0 while calibrating, a new calibration should be performed.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Steps:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;With the clock in its case, and the case with the clock placed in its preferred place of use, set &quot;mscal = 0&quot; and set the time and date precisely and accurately. &amp;nbsp;Use time.gov or something similar.&lt;/li&gt;
&lt;li&gt;Allow the clock to run continuously for at least 1 week. &amp;nbsp;Longer calibration periods get a greater average of environmental changes and potentially a higher degree of calibration precision. &amp;nbsp;Allow the clock to experience all environmental changes expected during normal operation - if you have a programmable thermostat let it run its course etc. &amp;nbsp;&lt;/li&gt;
&lt;li&gt;Optional - use the NCC app to data log the nixie clock time, and host PC time/date to a log file. &amp;nbsp;I set my logfile up in a google drive folder so I can check the progress anywhere.&lt;/li&gt;
&lt;li&gt;When the clock has run for a week or more, compare the current real world time to that of your nixie clock. &amp;nbsp;This is particularly easy if you&#39;ve been using the NCC app.&lt;/li&gt;
&lt;li&gt;If the nixie clock is running faster than the real world time, set &quot;xtalisfast=1&quot;, otherwise &quot;xtalisfast=0&quot;.&lt;/li&gt;
&lt;li&gt;Compute the time error in Parts Per Million by (realWorldTime / nixieTime)^-1&lt;/li&gt;
&lt;li&gt;Compute the mS Calibration value by&amp;nbsp;mscal = F_CPU / (F_CPU * PPM_ERROR)&lt;/li&gt;
&lt;li&gt;Set &quot;mscal=nnnn&quot; where nnnn is the calibration value calculated above&lt;/li&gt;
&lt;li&gt;Read back your values to be sure you set them right: &quot;mscal?&quot; and &quot;xtalisfast?&quot;&lt;/li&gt;
&lt;li&gt;Store the values to EEPROM so they will be remembered even thru a total power loss by typing &quot;ramtoeeprom&quot; and hit [ENTER]&lt;/li&gt;
&lt;li&gt;Optional - remove power, reapply power and check that mscal and xtalisfast have been stored properly.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Below is a screen cap from some notes I took while calibrating my prototype clock. &amp;nbsp;The first 2 lines were generated by the NCC app and serial nixie data. &amp;nbsp;The nixie clock sends out the time/date that it thinks it is on the right at the top of a minute. &amp;nbsp;The NCC app prepends the current system time/date on the left then logs this to a file. &amp;nbsp;The last value on each of the first 2 lines is the current temperature. &amp;nbsp;In the example below, you can see my mscal value is 21180 and xtalisfast should be set to 1.&lt;br /&gt;
&lt;br /&gt;
To be more explicit, the format of the top 2 lines in the screen cap below is as follows. &amp;nbsp;PC Date, PC Time, Nixie Clock Date, Nixie Clock Time, Clock Temperature in Celsius.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqwbShg-wWmLzqO-wSVis9-ODtD9iMBhLcH0NGsGSF0L6oSUGxXTc7pLCvrPgK2HB6LnlTVKZoIZJk7pS4Bev-N-7IRgJMsEUZcuATA0N1q9LvYEwJdCurd03WZm4Zv4nn8ryPVJO-ff4l/s1600/Screen+Shot+2015-05-25+at+8.45.07+PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;256&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqwbShg-wWmLzqO-wSVis9-ODtD9iMBhLcH0NGsGSF0L6oSUGxXTc7pLCvrPgK2HB6LnlTVKZoIZJk7pS4Bev-N-7IRgJMsEUZcuATA0N1q9LvYEwJdCurd03WZm4Zv4nn8ryPVJO-ff4l/s400/Screen+Shot+2015-05-25+at+8.45.07+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Since the proof is in the pudding, as they say I wanted to log some real world data to see how well this calibration scheme would work. &amp;nbsp;So, I stored &quot;mscal=21180&quot; as found from above, and ran the clock with the NCC app logging data again. &amp;nbsp;After 45 days it was revealed that the nixie clock was running 8.698 seconds fast which is about 2.24 ppm. &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXiicbTdccARivuj55xpG1rchCL0uXmLttDeON62vKdZPsBif5F7MaiYyz67QsSK1FBUgAYFQaZGmpbKgZPfEJD6ADX4pgWLPSfC6njjRQxilAk07Jk3QdzMJDLsy7H0KJ0LtR-b_M1Uij/s1600/Screen+Shot+2015-05-28+at+6.17.59+PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;53&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXiicbTdccARivuj55xpG1rchCL0uXmLttDeON62vKdZPsBif5F7MaiYyz67QsSK1FBUgAYFQaZGmpbKgZPfEJD6ADX4pgWLPSfC6njjRQxilAk07Jk3QdzMJDLsy7H0KJ0LtR-b_M1Uij/s400/Screen+Shot+2015-05-28+at+6.17.59+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
That&#39;s pretty darn good I&#39;d say. &amp;nbsp;For reference, 2.24 ppm is about 70 seconds in 1 year, and somewhere around 46 seconds in 8 months. &amp;nbsp;Since I adjust for DST in intervals &amp;lt; 8 months, it is clear that the nixie clock should never be a full minute off from real time. &lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Miscellaneous&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
If you&#39;re thinking about skipping the fuse in the circuit, please don&#39;t. &amp;nbsp;It is remarkably important. &amp;nbsp;I once thought of using a PTC, but even that is a bad idea here. &amp;nbsp;You really want total separation from the power source and a deliberate reapplication. &amp;nbsp;To that end, do not move past a burned fuse until you fully understand why it blew. &amp;nbsp;Read the section on the boost converter and look at the schematic if you need further convincing.&lt;br /&gt;
&lt;br /&gt;
This project has taken somewhere around 6 months to date. &amp;nbsp;I have to admit that I am a little surprised by how challenging this project has been. &amp;nbsp;It has also been a lot of fun. &amp;nbsp;If you have any questions, please feel free to email me or leave a comment. &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/8866816171665840576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/8866816171665840576' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/8866816171665840576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/8866816171665840576'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2015/05/nixie-tube-clock.html' title='Nixie Tube Clock'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjZXNUPlO4Dzbll-cqCjXbjyzJeJ4nJLQiL3uuuNfkuJMDF9P4riLZSiGPtDtUa6JJ7nnhT13y3OPzprO2m-1r2Ul93X_OET0c42tTrrAbog_jYKDvE5RyqDRViHvMqQTZmm_DV34QsYur/s72-c/20150525_195643.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-1371126726471508295</id><published>2014-10-10T01:06:00.001-04:00</published><updated>2023-01-13T21:25:48.665-05:00</updated><title type='text'>Mobile Radio Power Controller ( MRPC )</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWAbQdydlwuTDfEgv5w8VVLddVl1fvnw2QlPFuQDxibHPwRd0CrN4Z3bdxrnakOY7Z7Te2-ck5skAU9yqTjM8GHaWqWFXLesn8jL-8RFJP9Wt6ROW0h1DvpL4e6Igxl0BsxT_YC5TDZXJi/s1600/IMG_3472.JPG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWAbQdydlwuTDfEgv5w8VVLddVl1fvnw2QlPFuQDxibHPwRd0CrN4Z3bdxrnakOY7Z7Te2-ck5skAU9yqTjM8GHaWqWFXLesn8jL-8RFJP9Wt6ROW0h1DvpL4e6Igxl0BsxT_YC5TDZXJi/s1600/IMG_3472.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Before I began the installation of my &lt;a href=&quot;http://www.yaesu.com/indexVS.cfm?cmd=DisplayProducts&amp;amp;ProdCatID=106&amp;amp;encProdID=FD01F8F398F2B94A9C9F4299F3D18732&amp;amp;DivisionID=65&amp;amp;isArchived=0&quot;&gt;Yaesu FT-8800&lt;/a&gt; in my car I knew I wanted automatic power ON / OFF. &amp;nbsp;This is a feature that I have always felt was lacking in my other mobile rigs as I am forever leaving my ham radio on long after I have departed the car.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s start with an action packed video of the finished product, then we can talk about how we got there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/b8SvVXVKk1w?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
First, I set out to determine if my radio has such a feature natively, and I found the following. &amp;nbsp;Per the FT-8800 user manual, there is an Automatic Power Off ( APO ) feature. &amp;nbsp;Below is a screen cap from the manual describing this operation. &lt;br /&gt;
&lt;br /&gt;
As you will read, this feature can be used to turn OFF the radio, but not back ON. &amp;nbsp;And for the APO to turn the radio OFF there are several specific requirements including leaving the radio in a non-scanning mode - not necessarily something I can commit to. &amp;nbsp;In the end, I determined this APO is not helpful to me in its current form.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6m7TvroFbygCl-VlXcuH6o_ZsA-st-roFgczn584Li3iPQyGMOCGGilzI-h2m6ZR4CGNz0-7KGOTz6xBGuq-kRM70eEIDqsbIRzeKkQLnK5MZgVgf-24ACCk8_P-OvfZMoDfPbVsZds2T/s1600/Screen+Shot+2014-10-07+at+11.58.44+PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6m7TvroFbygCl-VlXcuH6o_ZsA-st-roFgczn584Li3iPQyGMOCGGilzI-h2m6ZR4CGNz0-7KGOTz6xBGuq-kRM70eEIDqsbIRzeKkQLnK5MZgVgf-24ACCk8_P-OvfZMoDfPbVsZds2T/s1600/Screen+Shot+2014-10-07+at+11.58.44+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Recalling that my radio will return to its last known power state meant that I only have to apply power to the radio when the car is ON and disconnect the power when the car is OFF to achieve my goal.&lt;br /&gt;
&lt;br /&gt;
Having ruled out the APO feature on the FT-8800 I set out to see what products already exist on the market to automatically toggle my radio power. &amp;nbsp;Surely there should be something for &amp;lt;$50. &lt;br /&gt;
&lt;br /&gt;
Wrong. &amp;nbsp;I did find &lt;a href=&quot;https://www.tessco.com/products/displayProductInfo.do?sku=315672&amp;amp;eventGroup=4&amp;amp;eventPage=1&quot;&gt;this&lt;/a&gt; for ~$100 and &lt;a href=&quot;http://www.aprsworld.com/apo3/&quot;&gt;this&lt;/a&gt; for ~$60, but these prices made me bristle with antagonism. &amp;nbsp;I was quickly learning that this would be a DIY project. &amp;nbsp;( As a point of reference I ended up shelling out $8.23 in parts for my MRPC. )&lt;br /&gt;
&lt;br /&gt;
And so began what I hope to be my very last PCB design using Eagle CAD. &amp;nbsp;I have several specific opinions related to my disappointment with Eagle, but I won&#39;t go into it today. ( ok, I recently learned the hard way that Eagle uses proportional fonts. &amp;nbsp;They look good in Eagle, but send your board to fab and they are converted to fixed-width vector fonts. &amp;nbsp;The result is the word &quot;controller&quot; is partially cut off my silk screen layer. ) &lt;br /&gt;
&lt;br /&gt;
So, as I was saying, I won&#39;t go into my issues with Eagle today, but after designing a board in KiCad and having it manufactured, I can say what a massive improvement. &amp;nbsp;I am probably still a bit slow with KiCad, but I imagine my proficiency will improve as I move to exclusive use of KiCad over Eagle.&lt;br /&gt;
&lt;br /&gt;
Ok, back to business. &amp;nbsp;Below is a screen cap of the schematic drawn in Eagle. &amp;nbsp;VBATT_IN is the 12 V DC car battery power. &amp;nbsp;It is fed into D2 for reverse polarity protection before heading to a 5 V DC regulator. &amp;nbsp;Prior to D1, the VBATT_IN voltage is also feeding a voltage divider of R1 and R2 and 48 Hz LPF with R2 &amp;amp; C2. &amp;nbsp;The resulting voltage is an attenuated analog of VBATT_IN fed to the ATTiny85 microcontroller ADC. &lt;br /&gt;
&lt;br /&gt;
With the ATTiny85 able to measure system voltage, it can now determine when the car is running ~14 V DC with the alternator running, ~12 with the engine off. &amp;nbsp;We will talk about the program some more later on.&lt;br /&gt;
&lt;br /&gt;
R4 feeds the base of Q2 which pulls down the gate of U1, which is otherwise held high by R3. &amp;nbsp;U1 is an IPD90P03P4 mosfet. &amp;nbsp;It has an RdsON of only 4.5 mOhms which; in testing, allowed me to comfortably pass about 200 watts at ~13.5 V with no heat sink. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI5DztuNg0PsKUZ2VJmnVwQzHozUUvoJL6rA8ulQ7pLKq7UTNmuzQbDd0-oT_bZC46KBvAYMTKeRIefI55oLuGZn2lEkM_Peih0b8mzyhSM0sA9YDs5KigCMHAdqqTLTI4XVc6QaneyZhQ/s1600/Screen+Shot+2014-10-09+at+10.58.07+PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;182&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI5DztuNg0PsKUZ2VJmnVwQzHozUUvoJL6rA8ulQ7pLKq7UTNmuzQbDd0-oT_bZC46KBvAYMTKeRIefI55oLuGZn2lEkM_Peih0b8mzyhSM0sA9YDs5KigCMHAdqqTLTI4XVc6QaneyZhQ/s1600/Screen+Shot+2014-10-09+at+10.58.07+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Further down is a link to the Mobile Radio Power Controller ( MRPC ) Bill of Materials ( BOM ). &amp;nbsp; The &amp;nbsp;voltage regulator I used is an obsolete part. &amp;nbsp;You should select a new one if you decide to build a MRPC board. &amp;nbsp;Another reason to select a different regulator would be because the one I use draws a shameful 5 mA quiescent current. &amp;nbsp;I might recommend something like an LD1117.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
I had these boards fabbed thru the &lt;a href=&quot;https://oshpark.com/&quot;&gt;OSH Park service&lt;/a&gt;. &amp;nbsp;It was my first time using OSH Park, and at the time of this writing, 50% of of my OSH Park orders have been for MRPC boards.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
If you would like to order one of the boards, well you can&#39;t, you have to order 3. &amp;nbsp;It&#39;s the OSH Park rules. &amp;nbsp;The good news is that those 3 boards will only cost you $9.05, at the time of this writing, for each multiple of 3. &amp;nbsp;For the record, I am not affiliated with OSH Park and no money goes to me if you do purchase a board thru them. &amp;nbsp;Here is a link to the PCB order page &lt;a href=&quot;https://oshpark.com/shared_projects/jAyTdKon&quot;&gt;https://oshpark.com/shared_projects/jAyTdKon&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The circuit board is housed in a custom enclosure I designed in AutoCad. &amp;nbsp;The *.stl was exported, sliced in Slic3r and printed on my Prusa 3D printer. &amp;nbsp;The material I used is Red PLA. &amp;nbsp;I have uploaded the *.stl files so you can print your own at&amp;nbsp;&lt;a href=&quot;http://www.thingiverse.com/thing:495167&quot;&gt;http://www.thingiverse.com/thing:495167&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaSMTR880FURNXTCjG1Gx-tGaFNo0C8C790Hw4seVjFzQYXpOv3gsz8zPTx6-nyi_YnJoF3qiIQVh-rqfkIhYZUl4oHJ3GNRmAZkTNCwhCa93DkZgo7gfko7Dii3zb8raP4TkM0NvbCCsa/s1600/Screen+Shot+2014-10-07+at+11.38.25+PM.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;242&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaSMTR880FURNXTCjG1Gx-tGaFNo0C8C790Hw4seVjFzQYXpOv3gsz8zPTx6-nyi_YnJoF3qiIQVh-rqfkIhYZUl4oHJ3GNRmAZkTNCwhCa93DkZgo7gfko7Dii3zb8raP4TkM0NvbCCsa/s1600/Screen+Shot+2014-10-07+at+11.38.25+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA_Pmn9ONMTKwEi8KLPvMlEoIGL5omFSYn8_ri4ClG3FyZX5ygA8hyzdA9l4EsNg_19kZgPF5F6fc4syBx942T_tq3Ogbv7bMgaSo8EcnP2hoB2rYcITdZ89dnCQDvlsfEyLCpyRQyTmfL/s1600/IMG_3474.JPG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA_Pmn9ONMTKwEi8KLPvMlEoIGL5omFSYn8_ri4ClG3FyZX5ygA8hyzdA9l4EsNg_19kZgPF5F6fc4syBx942T_tq3Ogbv7bMgaSo8EcnP2hoB2rYcITdZ89dnCQDvlsfEyLCpyRQyTmfL/s1600/IMG_3474.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The software is pretty straight forward. &amp;nbsp;Basically, the code tells the processor to sleep forever. &amp;nbsp;This is to reduce power. &amp;nbsp;The watchdog timer will wake the processor up once per second. &amp;nbsp;At this time an ADC conversion is initiated. &amp;nbsp;If the system ( car ) voltage is above a threshold, the event is logged. &amp;nbsp;If the voltage exceeds the threshold for a period of time, the mosfet is switched ON. &amp;nbsp;If neither threshold is met, the mosfet stays OFF appropriately. &amp;nbsp;Everything should be commented, but if you have any questions, feel free to email me. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Downloads:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
Here you can download the &lt;a href=&quot;https://drive.google.com/drive/folders/0B1CPUkh94AtmczNuRHVVdVRlWVE?resourcekey=0--AP-ocZh0N8xSrZbpbp5jA&amp;amp;usp=sharing&quot; target=&quot;_blank&quot;&gt;project archive&lt;/a&gt;.&lt;br /&gt;
Here you can download the &lt;a href=&quot;https://drive.google.com/folderview?id=0B1CPUkh94AtmcTZINVd5Q3VMV3c&amp;amp;usp=sharing&quot;&gt;Eagle PCB files&lt;/a&gt;&lt;br /&gt;
Here is the link to &lt;a href=&quot;https://oshpark.com/shared_projects/jAyTdKon&quot;&gt;order a PCB&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I think that&#39;s about it. &amp;nbsp;Let me know if you end up building one for yourself!&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/1371126726471508295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/1371126726471508295' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/1371126726471508295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/1371126726471508295'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2014/10/mobile-radio-power-controller-mrpc.html' title='Mobile Radio Power Controller ( MRPC )'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWAbQdydlwuTDfEgv5w8VVLddVl1fvnw2QlPFuQDxibHPwRd0CrN4Z3bdxrnakOY7Z7Te2-ck5skAU9yqTjM8GHaWqWFXLesn8jL-8RFJP9Wt6ROW0h1DvpL4e6Igxl0BsxT_YC5TDZXJi/s72-c/IMG_3472.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-2599524791915006540</id><published>2014-07-06T08:04:00.002-04:00</published><updated>2017-03-31T23:21:06.427-04:00</updated><title type='text'>blueShift - An OpenXC LED Tachometer</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
An Arduino, some addressable LED&#39;s, a bluetooth module, code and a 3D printer come together to make blueShift - An OpenXC LED Tachometer. &amp;nbsp;blueShift is so named for the &lt;i&gt;Blue&lt;/i&gt;tooth protocol used for data communication, and the use of a tachometer to indicate when to &lt;i&gt;shift&lt;/i&gt; your car. &amp;nbsp;It may be amusing to note that the driver and passengers traveling in this car would observe &lt;a href=&quot;http://en.wikipedia.org/wiki/Blueshift&quot;&gt;Blueshift&lt;/a&gt; when peering thru the windscreen, provided their velocity was sufficient.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsPQnnPGZRF6GEjmebdZ0VdQVJsvQMbY5p-2yejB_cQl04AgZdC6BsGZo0KefJKVX79H936s3vUttapTveAzcRA3MatHZueYydiVXVLrIBSI_Wwxj2RoZTTpjfop8xZ__3S5qVW2KPOQFK/s1600/IMG_2876.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsPQnnPGZRF6GEjmebdZ0VdQVJsvQMbY5p-2yejB_cQl04AgZdC6BsGZo0KefJKVX79H936s3vUttapTveAzcRA3MatHZueYydiVXVLrIBSI_Wwxj2RoZTTpjfop8xZ__3S5qVW2KPOQFK/s1600/IMG_2876.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMrE40s4OP1fahS5wBFSZ7tHT-dIMwCqPuPLFfrTCGRP89A8cuLTjE_oF9TOYh0ITocvwr8-M0ondPWOPJLgJbiAhsnI96-YParYXGvB-E4NQj4LG65JNDUQr_R8tSmErfwk8XHtJVdmXR/s1600/IMG_2872.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMrE40s4OP1fahS5wBFSZ7tHT-dIMwCqPuPLFfrTCGRP89A8cuLTjE_oF9TOYh0ITocvwr8-M0ondPWOPJLgJbiAhsnI96-YParYXGvB-E4NQj4LG65JNDUQr_R8tSmErfwk8XHtJVdmXR/s1600/IMG_2872.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/lUmPiPhLRXw?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
About a month ago I picked up a new car. &amp;nbsp;It&#39;s a Ford Fiesta with a 1 liter, turbo, eco-boost engine. &amp;nbsp;It achieves roughly 2.5 times greater fuel efficiency than my Jeep. &amp;nbsp;This fuel efficiency was my primary impetus to purchase, but the new tech in automotive electronics is a pretty cool bonus.&lt;br /&gt;
&lt;br /&gt;
It took a couple days driving around to figure out all the bells, whistles, and electronic gizmos in the Fiesta, and just that quickly, I was looking for something more. &amp;nbsp;What that turned out to be was Ford&#39;s OpenXC API. &amp;nbsp;&lt;a href=&quot;http://openxcplatform.com/&quot;&gt;OpenXC&lt;/a&gt; is part hardware, part software. &amp;nbsp;It is open source, as the name suggests and aims to ease us into integrating vehicle data into our android apps, and in case of blueShift, embedded hardware.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s take a brief, but closer look at OpenXC and the potential it provides. &amp;nbsp;For quite some time now, auto manufacturers have provided an &lt;a href=&quot;http://en.wikipedia.org/wiki/On-board_diagnostics&quot;&gt;OnBoard Diagnostics port&lt;/a&gt;. &amp;nbsp;This OBD2 port, as it is sometimes called, is a digital interface to engine management parameters and chassis/body status. &amp;nbsp;To the typical hobbyist, an OBD2 ports data is relatively inaccessible. &amp;nbsp;You would need to know manufacturer proprietary PID&#39;s for the CAN messages you were viewing to discern &quot;air intake temperature&quot; from &quot;outside air temperature&quot; for instance. &amp;nbsp;Likely, the information you were able to decode is specific to one vehicle make/model or worse, ECM batch. &lt;br /&gt;
&lt;br /&gt;
Under the OpenXC umbrella, Ford has developed a hardware module called a &lt;a href=&quot;http://openxcplatform.com/vehicle-interface/hardware.html&quot;&gt;Vehicle Interface or VI&lt;/a&gt;. &amp;nbsp;This VI plugs into your OBD2 port, and interprets engine parameters and chassis/body info. &amp;nbsp;These data are then packaged into JSON format, and relayed out over Bluetooth SPP. &amp;nbsp;If you were to look at the &lt;a href=&quot;http://openxcplatform.com/about/data-set.html&quot;&gt;OpenXC Data set&lt;/a&gt;&amp;nbsp;you would discover that listening to this Bluetooth connection provides you with a plethora of vehicle specific information in real time. &amp;nbsp;For instance, you can read your accelerator pedal position, fuel level, odometer, brake pedal status, and of course engine speed. &amp;nbsp;The list goes on.&lt;br /&gt;
&lt;br /&gt;
blueShift aims to utilize these engine speed data to drive a set of LED&#39;s in an easy to interpret, graphical manner. &amp;nbsp;The circular nature of an &lt;a href=&quot;http://www.adafruit.com/products/1586&quot;&gt;off-the-shelf LED strip&lt;/a&gt; lends itself to this project nicely. &amp;nbsp;What&#39;s more, these LED&#39;s are individually addressable, RGB LED&#39;s. &amp;nbsp;This means that we can set any LED on the ring to just about any color we like, at any time we like. &amp;nbsp;blueShift takes advantage of these addressable &lt;a href=&quot;https://www.google.com/search?q=WS2812B&amp;amp;oq=WS2812B&amp;amp;aqs=chrome..69i57&amp;amp;sourceid=chrome&amp;amp;es_sm=93&amp;amp;ie=UTF-8&quot;&gt;WS2812B LED&#39;s&lt;/a&gt; to create an interesting and informative display. &lt;br /&gt;
&lt;br /&gt;
At first glance it may seem a &lt;i&gt;second&lt;/i&gt;&amp;nbsp;tachometer in my car is superfluous. &amp;nbsp;I can say after having used blueShift, quite the opposite is true. &amp;nbsp;The LED&#39;s are much easier to read with peripheral vision than the stock tachometer needle. &amp;nbsp;Likewise, blueShift would be very useful for someone who races Ford automobiles. &amp;nbsp;Additionally, blinky LED things are just plain cool, and no further justification for this project is therefore necessary.&lt;br /&gt;
&lt;br /&gt;
The only wired connection to blueShift is for power. &amp;nbsp;All data transfer is accomplished over Bluetooth SPP. &amp;nbsp;Presently, this power is derived from my vehicles on-board USB power. &amp;nbsp;I have plans to derive power from the OpenXC VI power port in the future. &amp;nbsp;This will require a small regulator to convert the vehicle ~14 V DC to a microcontroller compatible, regulated 5 V DC supply. &amp;nbsp;This supply will also need to supply power for the LED ring, so current consumption should be considered.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;3D Printed Enclosure:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes a project will take you to unanticipated places. &amp;nbsp;In the case of blueShift, that ended up being the land of 3D printing. &amp;nbsp;Typically when I make a new project I am left to drilling and milling existing enclosures, and sometimes tupperware. &amp;nbsp;What I am left with is a finished product that looks less than finished. &amp;nbsp;When I was envisioning how I wanted blueShift to look, it deviated rather drastically from the prototype seen below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7qIxRJabZ9XbCjM3AYvF6TM0gdwpuL8OgLTnAf1nG3FW_2cPdqbhYgoeNpYJ8hyI8CLr_U25rr_fmTqKg3Lcp_cz8H2s78em-0DKX8rrLBwtlPNInWkob7apc6PczeLYa4agycIvLEI_e/s1600/IMG_2769.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7qIxRJabZ9XbCjM3AYvF6TM0gdwpuL8OgLTnAf1nG3FW_2cPdqbhYgoeNpYJ8hyI8CLr_U25rr_fmTqKg3Lcp_cz8H2s78em-0DKX8rrLBwtlPNInWkob7apc6PczeLYa4agycIvLEI_e/s1600/IMG_2769.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Once it was decided to build a 3D printer to print blueShift&#39;s housing, I started down the path of designing a 3D printer of my own. &amp;nbsp;I had a basic layout and construction method in mind when I started looking for approximate pricing on parts. &amp;nbsp;I soon discovered that the constituent parts of my 3D printer design were approaching the cost of a 3D printer kit. &amp;nbsp;This led me to purchase a Prusa i3v from &lt;a href=&quot;http://www.makerfarm.com/&quot;&gt;Maker Farm&lt;/a&gt;, and I am glad I did. &amp;nbsp;The kit was assembled in a few evenings. &amp;nbsp;The decision to build a kit saved substantial time over designing a printer. &amp;nbsp;The first prints were the requisite calibration cubes and then some other items. &amp;nbsp;There is probably still some fiddling to do with the printer setup, but I am pretty pleased with the print quality so far.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpBL4_QFjpaRRwTvL8Z0ucjfNnT8YrG5Gue7kPMILfSWq1ta1EYx5TnzyRQ_NiZNVdFIPxcDgNAf5GdPWR1DHgluVqKbZ-UTW58CAQ0Nf4gG6JSsN_2EPsTmdLyecxXPKH7Ucb90Eb5RZV/s1600/IMG_2845.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpBL4_QFjpaRRwTvL8Z0ucjfNnT8YrG5Gue7kPMILfSWq1ta1EYx5TnzyRQ_NiZNVdFIPxcDgNAf5GdPWR1DHgluVqKbZ-UTW58CAQ0Nf4gG6JSsN_2EPsTmdLyecxXPKH7Ucb90Eb5RZV/s1600/IMG_2845.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a photo of the partially finished 3D printer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtphaeVUMmQ7XZL-2Y9L3FOaF6Zjr2SuMpuvf1xY6TCsAeQeo6EDKL7xuftrjBjQWV1kZ2NlJgd6iQkk8sF7LbG1Q_BfrwX7GPP_xo0XXBpra-f05vjIKgoul6Zw_1Tgmzaa-w2NfxYVIF/s1600/IMG_2750.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtphaeVUMmQ7XZL-2Y9L3FOaF6Zjr2SuMpuvf1xY6TCsAeQeo6EDKL7xuftrjBjQWV1kZ2NlJgd6iQkk8sF7LbG1Q_BfrwX7GPP_xo0XXBpra-f05vjIKgoul6Zw_1Tgmzaa-w2NfxYVIF/s1600/IMG_2750.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I designed the 3D models for blueShift in AutoCad 2014. &amp;nbsp;I then exported the models as *.stl files and uploaded them to Thingiverse for sharing. &amp;nbsp;&lt;a href=&quot;http://www.thingiverse.com/thing:385088&quot;&gt;You can download&lt;/a&gt; the *.stl files to print your your own blueShift enclosure, or I think companies like Shapeways may print them out for you if you don&#39;t have a printer ( yet ). &amp;nbsp;I have no experience with that.&lt;br /&gt;
&lt;br /&gt;
Below are some photos of the enclosure in various states of printing, and drawing revisions. &amp;nbsp;The portions of the print that have large gaps and look like a lattice are intentional. &amp;nbsp;This makes up supporting structure for parts with overhangs while printing. &amp;nbsp;It is designed to break off easily, and in practice this is sometimes true.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUn75df2NxwuRAgWNbE5fl_X8Nrxk11d-j9CX4ZpMYgM2utZsYYlYNOzKMxA073tHzD-25KdXq4C3NyuSBL3uH3pKEi4ax4qvQhbOUSiXUNpc6XPB5MIoZ2j1Pd_OPtOV7g9nNlAZahWy-/s1600/IMG_2858.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUn75df2NxwuRAgWNbE5fl_X8Nrxk11d-j9CX4ZpMYgM2utZsYYlYNOzKMxA073tHzD-25KdXq4C3NyuSBL3uH3pKEi4ax4qvQhbOUSiXUNpc6XPB5MIoZ2j1Pd_OPtOV7g9nNlAZahWy-/s1600/IMG_2858.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZKmzWcUBfsLMU0FNGgbmF5RJmy_hd0STkRK6g9FPX0kmJDJGwW4AG8oS6c157Q4ZdK3gnrSiIZUJmPcNrm6mN81FhDInFFj-tVCmSwwbXwLXLfu_N1ROZxbHqnj63DCZKAEJO3ql1YE0r/s1600/IMG_2859.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZKmzWcUBfsLMU0FNGgbmF5RJmy_hd0STkRK6g9FPX0kmJDJGwW4AG8oS6c157Q4ZdK3gnrSiIZUJmPcNrm6mN81FhDInFFj-tVCmSwwbXwLXLfu_N1ROZxbHqnj63DCZKAEJO3ql1YE0r/s1600/IMG_2859.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw87WZ13toqzfYZtDjzaCK8UbQyLOYlaK0gzOjmebOm-oHCRXpiqZKGa23SjfnMdBXJJvok_T5aJEIsKkfx_fYt1CsZRWJ_lXvuBa3_atNKOYyIXVGJCZx0nqI6sl9CIAfcnX2xdeNzQRb/s1600/IMG_2861.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw87WZ13toqzfYZtDjzaCK8UbQyLOYlaK0gzOjmebOm-oHCRXpiqZKGa23SjfnMdBXJJvok_T5aJEIsKkfx_fYt1CsZRWJ_lXvuBa3_atNKOYyIXVGJCZx0nqI6sl9CIAfcnX2xdeNzQRb/s1600/IMG_2861.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBSQ2iSywP2kX1Qfal0JyAgHH5BlVvOAr0ysNe6JAaRr3bInoTq7Ug0VYASSAFvJGFerPGH5qceNrD0Eg3PRn6GWhYiMxTk4i5q6F87olj1bfs5xh0Fwh2unYWhIBPYUgcyBdudNavA8uf/s1600/IMG_2881.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBSQ2iSywP2kX1Qfal0JyAgHH5BlVvOAr0ysNe6JAaRr3bInoTq7Ug0VYASSAFvJGFerPGH5qceNrD0Eg3PRn6GWhYiMxTk4i5q6F87olj1bfs5xh0Fwh2unYWhIBPYUgcyBdudNavA8uf/s1600/IMG_2881.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I am really enjoying 3D printing. &amp;nbsp;Even with it&#39;s obvious limitations, I feel that I will make good use out of this tool. &amp;nbsp;I see many opportunities to print things that may or may not be necessary, but ultimately I am having a great time with it.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Electronics:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Part List:&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://www.sparkfun.com/products/12665&quot;&gt;NeoPixel Ring w/ 24 WS2812 RGB LED&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.sparkfun.com/products/11113&quot;&gt;Arduino Pro Mini&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.sparkfun.com/products/12577&quot;&gt;BlueSMiRF Bluetooth Module&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;NPN transistor&amp;nbsp;+ 1k0 base resistor&lt;/li&gt;
&lt;li&gt;Pushbutton Switch ( optional )&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.sparkfun.com/products/9718&quot;&gt;FTDI cable for programming and power&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://openxcplatform.com/vehicle-interface/hardware.html&quot;&gt;A Ford OpenXC VI&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
I am using an RN-42 Bluetooth module from Sparkfun called a &lt;a href=&quot;https://www.sparkfun.com/products/12577&quot;&gt;BlueSMiRF&amp;nbsp;&lt;/a&gt;. &amp;nbsp;One of the first things to do is connect to the modem and configure it for &lt;i&gt;Auto-Connect Master Mode (SM,3). &amp;nbsp;&lt;/i&gt;The &lt;a href=&quot;http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Wireless/Bluetooth/bluetooth_cr_UG-v1.0r.pdf&quot;&gt;AT Command sheet&lt;/a&gt; will walk you thru this process. &amp;nbsp;For more detailed information on how to connect the Bluetooth module, and enter into command mode, refer to the &lt;a href=&quot;https://learn.sparkfun.com/tutorials/using-the-bluesmirf&quot;&gt;Sparkfun tutorial&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
With the Bluetooth module configured, we can wire up the rest of the circuit and tuck it into the blueShift housing. &amp;nbsp;Here are a few pictures that show this process. &amp;nbsp;Great care should be taken to avoid short circuits. &amp;nbsp;Currently I power the blueShift from an FTDI USB cable. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGztUV88gZN9Z0YWc6p6DDEq_1HWQGVch4lqBgluZJpgi3SbJCz0u1-zs5SGGOdL6CP5EXXBLeEm9akm1cKLm6UoxFwK8o5BPjQoHSkPeoktRQYj_2zac5Bf3H9Qb7EFFJCSeQa-GXWx6f/s1600/Screen+Shot+2014-07-04+at+11.03.17+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGztUV88gZN9Z0YWc6p6DDEq_1HWQGVch4lqBgluZJpgi3SbJCz0u1-zs5SGGOdL6CP5EXXBLeEm9akm1cKLm6UoxFwK8o5BPjQoHSkPeoktRQYj_2zac5Bf3H9Qb7EFFJCSeQa-GXWx6f/s1600/Screen+Shot+2014-07-04+at+11.03.17+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSTQJ3GURCw5bTSMlbCUur8nvzq6ZDBhPUmnTakGQNlqT1dNpID2GVOUMMYMNmnSOM0FiHBHoYaAZUQZePSe64SYId7h6Gu1VPYABJMwduufWFPDxq3B4yFEUeKpB9c1Q_SgmMWNaU1qCF/s1600/IMG_2883.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSTQJ3GURCw5bTSMlbCUur8nvzq6ZDBhPUmnTakGQNlqT1dNpID2GVOUMMYMNmnSOM0FiHBHoYaAZUQZePSe64SYId7h6Gu1VPYABJMwduufWFPDxq3B4yFEUeKpB9c1Q_SgmMWNaU1qCF/s1600/IMG_2883.jpg&quot; width=&quot;296&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF2qlV83nfGsz6gQLHvkGKkyg_0I4ntGBntjZs87XAPR-bnxOKuvXh8ijNzDqXs4fXTEbvXRK5xRpyOERr3-L_IQDjOPKMsUR0ySLTZ4hevOSeycoXZzHcBYnVBekdmZW2-G82dgAYck8D/s1600/IMG_2885.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF2qlV83nfGsz6gQLHvkGKkyg_0I4ntGBntjZs87XAPR-bnxOKuvXh8ijNzDqXs4fXTEbvXRK5xRpyOERr3-L_IQDjOPKMsUR0ySLTZ4hevOSeycoXZzHcBYnVBekdmZW2-G82dgAYck8D/s1600/IMG_2885.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAJ4_TVZ0bdZk2q7pKRB216QX847R6eCdCmA3hAqeVWVAiVm2pmj-x2SFIV2lo2YjePcdxw-MF4pG0ZGo7ZSxwwv_91-Ial9jh0_24JjjALkSSjg2eFXj1_EFh2sDIsx5aPHKEYBc30jAX/s1600/IMG_2887.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAJ4_TVZ0bdZk2q7pKRB216QX847R6eCdCmA3hAqeVWVAiVm2pmj-x2SFIV2lo2YjePcdxw-MF4pG0ZGo7ZSxwwv_91-Ial9jh0_24JjjALkSSjg2eFXj1_EFh2sDIsx5aPHKEYBc30jAX/s1600/IMG_2887.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioLztJn4EjtZBT8bbm8xQwCkXvUCJ0L5PYVBpoVKwS19JxseCCT1sofA5nGuVkKszzR-mG0UQPtvgwNhbxV3VLS4MqOTf-gpkztZW_x0gcPyg5ulrttUk-_0HRy5Fb_13fZBXgi1yrcUlJ/s1600/IMG_2889.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioLztJn4EjtZBT8bbm8xQwCkXvUCJ0L5PYVBpoVKwS19JxseCCT1sofA5nGuVkKszzR-mG0UQPtvgwNhbxV3VLS4MqOTf-gpkztZW_x0gcPyg5ulrttUk-_0HRy5Fb_13fZBXgi1yrcUlJ/s1600/IMG_2889.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4nIZx-FB2PaTOEgdSh7AQiFq50RedxDwh28BFGow-JBmui3lOuVpBMU3PZpdydc3mLn8wSiJzLk8cgABKqDlAUJa4DyHZKum77t0ANBKFO4WRL-yT6MB1J7Phl0ooOdH5VPcXUhvsG4aE/s1600/IMG_2890.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4nIZx-FB2PaTOEgdSh7AQiFq50RedxDwh28BFGow-JBmui3lOuVpBMU3PZpdydc3mLn8wSiJzLk8cgABKqDlAUJa4DyHZKum77t0ANBKFO4WRL-yT6MB1J7Phl0ooOdH5VPcXUhvsG4aE/s1600/IMG_2890.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The little tactile switch will perform a function in future software revisions. &amp;nbsp;For now, it does nothing in software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGHqpp7TbK1eivFISOKiV0U_9IxEpNmGuml-i6uBjzrzWO5Y1fAbcXfVHriIZlNiYyn9XuZwiRiJV5ZfNdIDdQFqfNIGbnMy57j-nOb9nKlCUkAYPMH6OcXeF5MqMija6LYoN7d2keB8wV/s1600/IMG_2904.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGHqpp7TbK1eivFISOKiV0U_9IxEpNmGuml-i6uBjzrzWO5Y1fAbcXfVHriIZlNiYyn9XuZwiRiJV5ZfNdIDdQFqfNIGbnMy57j-nOb9nKlCUkAYPMH6OcXeF5MqMija6LYoN7d2keB8wV/s1600/IMG_2904.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The two red wires with header pins are for the bluetooth modem power. &amp;nbsp;This is represented as a SPST switch on the schematic labeled &quot;HEADER&quot;. &amp;nbsp;It is necessary to unpower the modem when uploading new firmware to the Arduino. &amp;nbsp;This should be shorted out while operating blueShift to power the Bluetooth Module, and disconnected for uploading new firmware to the arduino.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBshbvGkOUYrB9OdTp0P2pjmk93Xj2cUkoX4GjXjBBqOyI3424j09VFDoNcRmR0kQK_8fXital51E0dmaqicCEYbgLg2-N36xGDpr15EwuHBU1ZpYficO_dT_APLURoJld69zF5uNrM1je/s1600/IMG_2903.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBshbvGkOUYrB9OdTp0P2pjmk93Xj2cUkoX4GjXjBBqOyI3424j09VFDoNcRmR0kQK_8fXital51E0dmaqicCEYbgLg2-N36xGDpr15EwuHBU1ZpYficO_dT_APLURoJld69zF5uNrM1je/s1600/IMG_2903.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
This would be a good time to install the software and verify everything works. &amp;nbsp;If you need to re-solder anything, it is better to find out now. &amp;nbsp;The author may have experience that lead to this warning.&lt;br /&gt;
&lt;br /&gt;
In the picture below, this semi-opaque, 5mm thick disk is possibly polypropylene. &amp;nbsp;I purchased the stock from an unknown bin at a shop and belt sanded it into shape. &amp;nbsp;There are 3 equally spaced clearance holes drilled into this lens to accommodate the M3 mounting bolts which we are about to install. &amp;nbsp;Drop the lens into the outer housing and line up the holes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidDq1qoaCXCBLnn-2SdTxehkgoUr-odOPNCULD_8sBqFS_O9h6r29wZXXUBy_MpZmuGypK4RwNvckD6KozwnAz57T2W5FENAmVV9Q6_SGlStoJrjccDMyiKmOzAIKlR3rzF1kbbF43RHgr/s1600/IMG_2905.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidDq1qoaCXCBLnn-2SdTxehkgoUr-odOPNCULD_8sBqFS_O9h6r29wZXXUBy_MpZmuGypK4RwNvckD6KozwnAz57T2W5FENAmVV9Q6_SGlStoJrjccDMyiKmOzAIKlR3rzF1kbbF43RHgr/s1600/IMG_2905.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Insert the assembled and tested inner housing into the outer. &amp;nbsp;Line the three M3 bolts up and screw the entire assembly together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7NH27pyd6_GhKKJB7rCc88Y-puvDrtMbMOA3tNHwUh3W8aHwrXR213zWZozu4pdS42L5lDaDb_8OY46eUaWKzGBOBHRZTqrIRvXKeoOQIQvZESfE7DwmPiRpQyqzIWqT6eChw0R3OIxdc/s1600/IMG_2906.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7NH27pyd6_GhKKJB7rCc88Y-puvDrtMbMOA3tNHwUh3W8aHwrXR213zWZozu4pdS42L5lDaDb_8OY46eUaWKzGBOBHRZTqrIRvXKeoOQIQvZESfE7DwmPiRpQyqzIWqT6eChw0R3OIxdc/s1600/IMG_2906.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Screw the Ram Mount to the back of blueShift. &amp;nbsp;This will now suction cup to your windshield and plug the FTDI USB cable into a USB port in your car. &amp;nbsp;If you don&#39;t have a USB port onboard, &amp;nbsp;there are 12 volt outlet to USB adapters available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia8Mcg7QX5ii1M0I_vqi1scasyh71jDDksfUYVtOq5kUO3Pe0frimcPuF6ZJW8BPvdcQ7EFS760aF94XLDsePSC-72H0iyYgJlaAbjjswd7y0q16STp2ZoH7-sIadO-up5YXPdqvmTfqvZ/s1600/IMG_2910.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia8Mcg7QX5ii1M0I_vqi1scasyh71jDDksfUYVtOq5kUO3Pe0frimcPuF6ZJW8BPvdcQ7EFS760aF94XLDsePSC-72H0iyYgJlaAbjjswd7y0q16STp2ZoH7-sIadO-up5YXPdqvmTfqvZ/s1600/IMG_2910.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw20qwtPsIjwgJVXX9oz4j2W2WpL8WiQPs5jIZeK3GwZDN-i-WncTp4zBPv_VU2DIQWVomlkSmyLgv0twH_mV38IJu9D1ab6O3sr5JiG7QKK5lEOkFW7N_otsVFVpsgqWTFy0nGUft5PBd/s1600/IMG_2909.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw20qwtPsIjwgJVXX9oz4j2W2WpL8WiQPs5jIZeK3GwZDN-i-WncTp4zBPv_VU2DIQWVomlkSmyLgv0twH_mV38IJu9D1ab6O3sr5JiG7QKK5lEOkFW7N_otsVFVpsgqWTFy0nGUft5PBd/s1600/IMG_2909.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPDc-o1DHvkYI-4pXRqkyutpR6vxukuzk07G2vms8nUZbepCkoG3f0CRwTqVmgRu-U1gbF6pSkXtcLZX-4fGKIBjxV2Koy88PpboO_F5gd19Q0apGKDBJVPgwxyrIHAHlJpSfc4i_TGxbV/s1600/IMG_2875.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPDc-o1DHvkYI-4pXRqkyutpR6vxukuzk07G2vms8nUZbepCkoG3f0CRwTqVmgRu-U1gbF6pSkXtcLZX-4fGKIBjxV2Koy88PpboO_F5gd19Q0apGKDBJVPgwxyrIHAHlJpSfc4i_TGxbV/s1600/IMG_2875.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;Software:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You can download the Arduino code &lt;a href=&quot;https://sites.google.com/site/pemills2011/file/blueShiftv0_7.ino?attredirects=0&amp;amp;d=1&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
When blueShift first turns on, there is a brief pause. &amp;nbsp;During this time, we are waiting for the Ford OpenXC VI to boot up, and for blueShift to establish a connection to the VI. &amp;nbsp;For a bit of fun, we display the &quot;Waiting for Bluetooth Throbber&quot; that you can see below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYYFIX38uIYNesF16zpOHwtJw9WlB_dHYwi1s2S5YMVI9JPIrqDQOQdNPMJ-1oJrcIAEQc0wZ6y2qarLzv26j_c7qAxSiOHOFZtMmb1oxJy4LdqLkq0df-3A9hHsRTJG8HpFLn3kACeBHI/s1600/a2m2p.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYYFIX38uIYNesF16zpOHwtJw9WlB_dHYwi1s2S5YMVI9JPIrqDQOQdNPMJ-1oJrcIAEQc0wZ6y2qarLzv26j_c7qAxSiOHOFZtMmb1oxJy4LdqLkq0df-3A9hHsRTJG8HpFLn3kACeBHI/s1600/a2m2p.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Once a connection is established and valid RPM data is coming thru, the display changes to &quot;Run Mode&quot;. &amp;nbsp;In this state, RPM is displayed as a green LED trail. &amp;nbsp;It grows clockwise as RPM increases, with the final LED being displayed in red for a bit of visual interest.&lt;br /&gt;
&lt;br /&gt;
This final LED, the highest LED displayed, is &quot;sticky&quot;. &amp;nbsp;That is to say, as your RPM begins to decay, the peak RPM read will continue to be displayed as a single red LED. &amp;nbsp;This will either persist until 3 seconds have elapsed since the peak measurement or once a positive rate RPM is detected. &lt;br /&gt;
&lt;br /&gt;
Since OpenXC provides with boolean headlamp status on the same bluetooth connection, we can implement auto-dimming of blueShift. &amp;nbsp;As soon as your headlamps come on, blueShift will dim. &amp;nbsp;When your headlamps return to the off state, blueShift will regain full brightness. &amp;nbsp;This is not just a nicety - it is rather important. &amp;nbsp;These LED are quite bright and without dimming at night the result is a well lit car interior.&lt;br /&gt;
&lt;br /&gt;
The sticky LED telltale can be seen in the video below. &amp;nbsp;You can also see the auto-dimming feature towards the end of the video. &amp;nbsp;It&#39;s a little hard to see when the headlights turn on because its still light out, but you can see blueShift get dimmer. &amp;nbsp;You can also hear the headlight knob click on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/qYp3V5nOi-k?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, blueShift is hard coded to a specific RPM span. &amp;nbsp;That is to say, if you wanted the first LED to light at 500 RPM and the final LED to light at 6000 RPM, you would need to reflash the firmware. &amp;nbsp;After I get a few more miles on my car I will want to change that so, I will probably use that tactile switch as a way to program the RPM span without reflashing firmware.&lt;br /&gt;
&lt;br /&gt;
To implement this I think it would be good to have a &quot;programming mode&quot; where say you enter program mode and blueShift will keep track of the highest RPM read. &amp;nbsp;You press the button once to set this as the lower RPM span. &amp;nbsp;Now, rev your engine and blueShift will remember the highest RPM achieved. &amp;nbsp;Press the button to store this as the high RPM span. &amp;nbsp;These new values will be saved to EEPROM and recalled at the next power on cycle.&lt;br /&gt;
&lt;br /&gt;
Additional firmware upgrades include moving to JSON parsing. &amp;nbsp;Right now I just read the full JSON line and manually parse the string for the values I want. &amp;nbsp;If something were to change in the VI firmware, it is possible to break my code.&lt;br /&gt;
&lt;br /&gt;
Are you making a blueShift? &amp;nbsp;Send me a message, I would love to hear how it&#39;s going. &amp;nbsp;Happy making!&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/2599524791915006540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/2599524791915006540' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/2599524791915006540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/2599524791915006540'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2014/07/blueshift-openxc-led-tachometer.html' title='blueShift - An OpenXC LED Tachometer'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsPQnnPGZRF6GEjmebdZ0VdQVJsvQMbY5p-2yejB_cQl04AgZdC6BsGZo0KefJKVX79H936s3vUttapTveAzcRA3MatHZueYydiVXVLrIBSI_Wwxj2RoZTTpjfop8xZ__3S5qVW2KPOQFK/s72-c/IMG_2876.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-7557412275223299448</id><published>2014-04-21T12:53:00.001-04:00</published><updated>2014-05-08T16:22:30.243-04:00</updated><title type='text'>DIY Pick and Place Machine - Part 3</title><content type='html'>*Update*&lt;br /&gt;
Be sure to check out the other posts in this series below.&lt;br /&gt;
&lt;a href=&quot;http://petemills.blogspot.com/2014/03/diy-pick-and-place-machine-part-1.html&quot;&gt;Part 1&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://petemills.blogspot.com/2014/04/diy-pick-and-place-machine-part-2.html&quot;&gt;Part 2&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Now we are starting to make some headway into making this stock ShapeOko kit into something resembling a CNC Pick and Place Machine. &amp;nbsp;I am quite pleased with the progress so far, and I am learning a lot along the way. &amp;nbsp;For instance, I have discovered that blunt tip dispensing needles with luer lock connections are non-concentric, but more on that later. &amp;nbsp;For now, let&#39;s talk about some of the parts that are making this PnP take shape; specifically the head unit and the PnP fixture.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0DAvSwxZEo-_Yb5jiPOhPU_0F-YwKwF_pz7ioGqYd2y_a3_YbiiOF7knQS5_iN9ZdFr-axcMtc1gxzEpzTqRTTzNbJDr2WUuXbhblqhZpUm0XCP2cbh32dLJIvCT5SCQAKY7xW0WeksuY/s1600/IMG_2335.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0DAvSwxZEo-_Yb5jiPOhPU_0F-YwKwF_pz7ioGqYd2y_a3_YbiiOF7knQS5_iN9ZdFr-axcMtc1gxzEpzTqRTTzNbJDr2WUuXbhblqhZpUm0XCP2cbh32dLJIvCT5SCQAKY7xW0WeksuY/s1600/IMG_2335.JPG&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;Head Unit:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
The purpose of the head unit on this PnP machine is to facilitate the following operations:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Advance the component tape to present a new component for placement.&lt;/li&gt;
&lt;li&gt;Vacuum grip to pick up a component for placement.&lt;/li&gt;
&lt;li&gt;Rotate the picked up component to the correct orientation for placement on the PCB.&lt;/li&gt;
&lt;li&gt;Hold a syringe of solder paste for robotic solder paste dispensing.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
When designing the head unit I wanted it to be made from primarily off the shelf parts. &amp;nbsp;This speeds up development and allows a distributed approach for duplication should any reader wish to replicate the same. &amp;nbsp;I was able to achieve this ideal save one part, which I turned on a lathe. &amp;nbsp;The rest of the parts for the head unit came from online retailers that are listed below.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here are a few pictures of the head unit assembled.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6TZSFB-sgkRPHB45lv-fMIkV0r4sYYsOO8uXIz7vrsEyDLDgXc0kXWf5VI75_3cRiJVzJX-YgCCbE_O6WuYTLWa5jHa5B4DtAct3KyMwupaDclaqqIkrEjuNyCgf8h6jr-QlQVZtdKwJc/s1600/IMG_2330.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6TZSFB-sgkRPHB45lv-fMIkV0r4sYYsOO8uXIz7vrsEyDLDgXc0kXWf5VI75_3cRiJVzJX-YgCCbE_O6WuYTLWa5jHa5B4DtAct3KyMwupaDclaqqIkrEjuNyCgf8h6jr-QlQVZtdKwJc/s1600/IMG_2330.JPG&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkLYKsq83nLntY1xbMCqy6twLrYCVSg_JMci1Zsf_0onc6AviitWHuNPUQP-jhF8BoaSeFOW_J1YubT9Wh4-JX-hRzdZ5Q1JhzcSZxx7EIJwaXT7q4nx60uPKczHIeNKu30JQCQzyPBo_7/s1600/IMG_2332.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkLYKsq83nLntY1xbMCqy6twLrYCVSg_JMci1Zsf_0onc6AviitWHuNPUQP-jhF8BoaSeFOW_J1YubT9Wh4-JX-hRzdZ5Q1JhzcSZxx7EIJwaXT7q4nx60uPKczHIeNKu30JQCQzyPBo_7/s1600/IMG_2332.jpg&quot; height=&quot;308&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Below is a photo of the head unit prior to assembly. &amp;nbsp;It is annotated with numbers which will correspond to a descriptive list.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4lbPutyDK7TKdg1l1w5Dc8cDjcCk2sHAldcEIEdezIk4yohIEFM_TQgeSuYt6EKgEbm3wM45sHF3Pe40CFVgE0K1VY0Kbe8pV1y6RtY0HaXCo_iU34AE1o_Fqkur6NjFyl8lG9jRl_7N7/s1600/IMG_2262.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4lbPutyDK7TKdg1l1w5Dc8cDjcCk2sHAldcEIEdezIk4yohIEFM_TQgeSuYt6EKgEbm3wM45sHF3Pe40CFVgE0K1VY0Kbe8pV1y6RtY0HaXCo_iU34AE1o_Fqkur6NjFyl8lG9jRl_7N7/s1600/IMG_2262.jpg&quot; height=&quot;180&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Refer to the image above and the list below for part numbers &amp;amp;c. &amp;nbsp;I see now that I left off an annotation number for the bottle of loctite. &amp;nbsp;It is slightly optional, but probably a good idea for many of the fasteners as stepper motors can be a bit vibratey. &amp;nbsp;All of the parts ( except #9 ) came from the following vendors: &lt;a href=&quot;http://www.mcmaster.com/&quot;&gt;McMaster-Carr&lt;/a&gt;, &lt;a href=&quot;https://www.servocity.com/&quot;&gt;Servo City&lt;/a&gt;, &lt;a href=&quot;http://www.sdp-si.com/index.asp&quot;&gt;SDP/SI&lt;/a&gt;, &lt;a href=&quot;http://www.clippard.com/&quot;&gt;Clippard&lt;/a&gt;, and &lt;a href=&quot;http://www.ebay.com/&quot;&gt;eBay&lt;/a&gt;. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;A 10-32 threaded female luer lock adapter and blunt tip dispensing needle from McMaster Carr. &amp;nbsp;Respective P/N&#39;s: 51465k151 and 75165A682 and 75165A677&lt;/li&gt;
&lt;li&gt;6-32 nuts. &amp;nbsp;I had these. They measure 0.245&quot; across the flats.&lt;/li&gt;
&lt;li&gt;6-32 x 3/8&quot; Long, &amp;nbsp;Button Head Cap Screws. &amp;nbsp;I purchased these from a local hardware store.&lt;/li&gt;
&lt;li&gt;6-32 x 1/4&quot; Long, Button Head Cap Screws. &amp;nbsp;McMaster P/N: 98164a106&lt;/li&gt;
&lt;li&gt;#6 Washers. &amp;nbsp;McMaster P/N: 98032a436&lt;/li&gt;
&lt;li&gt;Wood Screws to hold the maple block ( #7 ) to the head.&lt;/li&gt;
&lt;li&gt;This is a v-cut block of wood for holding the solder paste syringe.&lt;/li&gt;
&lt;li&gt;A flat channel bracket from Servo City P/N: 585468 and a pair of Servo City 90 deg. dual mounts P/N: 585470. &amp;nbsp;All of this is held together with screws ( line item #4 ) and washers ( line item #5 ).&lt;/li&gt;
&lt;li&gt;I turned this shaft out of some 8 mm bar stock ordered from McMaster-Carr P/N: 1272t38 &amp;nbsp;A drawing to make this part is below.&lt;/li&gt;
&lt;li&gt;A Clippard pneumatic cylinder, plus a hardware store washer. &amp;nbsp;This is for drag feeding the SMD tape. &amp;nbsp;Clippard P/N: FSR-05-1 1/2&lt;/li&gt;
&lt;li&gt;Two 1/4&quot; I.D. bearing mounts from Servo City P/N: 535110&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.google.com/search?q=1%22+x+1%22+80%2F20+Extrusion&amp;amp;oq=1%22+x+1%22+80%2F20+Extrusion&amp;amp;aqs=chrome..69i57.912103j0j4&amp;amp;sourceid=chrome&amp;amp;es_sm=93&amp;amp;ie=UTF-8&quot;&gt;1&quot; x 1&quot; 80/20 Extrusion&lt;/a&gt;. &amp;nbsp;I cut mine slightly shorter ( &amp;lt; 3.75&quot; ) than the Servo city bracket this is mounted to.&lt;/li&gt;
&lt;li&gt;3.75&quot; Aluminum channel from Servo City P/N: 585443&lt;/li&gt;
&lt;li&gt;GT2 Timing belt and 2 disparate pulleys from SDP-SI P/N: A6R51M093060, A6Z51M036DF0608, and A6Z51M036DF0605&lt;/li&gt;
&lt;li&gt;A NEMA 17 stepper from eBay, plus a stepper motor mount from Servo City P/N: 555152&lt;/li&gt;
&lt;li&gt;An arbor shim kit for setting the end play of the diameter 8 mm shaft ( line item #9 ). &amp;nbsp;McMaster P/N: 3088a928&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
In the assembled head unit photos you can also see a brass spool valve for diverting the CO2 flow betwixt the solder paste syringe or pneumatic cylinder. &amp;nbsp;I probably should have just ordered another solenoid, but the diverter valve is Clippard P/N: HTV-3F.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Lets begin assembling the head unit by attaching the aluminum channel from Servo City ( line item #13 ) to the 80/20 extrusion ( line item #13 ). &amp;nbsp;You will notice I used non-standard mounting methods here. &amp;nbsp;I drilled and tapped the 80/20 extrusion for 40-40 BHCS ( Button Head Cap Screws ). &amp;nbsp;This was necessary because the standard 1/4-20 BHCS plus t-slot nuts came too close to my pulleys and belt for my liking. &amp;nbsp;One way around this would be to select a smaller tooth number pulleys and belt, while maintaining the same center to center distance. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK_KV9lD-B9WeFNMxkKK-Mv0JvWuWlWmTdjDRXBH3340tYFRCEoBGUgpRWbadKs73Ctl2R4567-WRu-JWAD2GP-N-rzHGpDd2CQVaGWI4c3zv6N8BUnwxF7epqdiK1gUmUYAUe4plqj-qC/s1600/IMG_2264.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK_KV9lD-B9WeFNMxkKK-Mv0JvWuWlWmTdjDRXBH3340tYFRCEoBGUgpRWbadKs73Ctl2R4567-WRu-JWAD2GP-N-rzHGpDd2CQVaGWI4c3zv6N8BUnwxF7epqdiK1gUmUYAUe4plqj-qC/s1600/IMG_2264.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQxXgOSrUrpUtX3kO6zYCwxQPhLFcsPvncxou8ujM5Os9dgSW_jou2fnoT1tMZmqt8p81D8xtxDCzQciRPg55HZNX5B7gvd0lM451YLJcf4MVv4Dg6yXasrUmNMyaYSFb3ej99fuZIpSVX/s1600/IMG_2266.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQxXgOSrUrpUtX3kO6zYCwxQPhLFcsPvncxou8ujM5Os9dgSW_jou2fnoT1tMZmqt8p81D8xtxDCzQciRPg55HZNX5B7gvd0lM451YLJcf4MVv4Dg6yXasrUmNMyaYSFb3ej99fuZIpSVX/s1600/IMG_2266.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Next up, attach the bottom bearing mount using some 6-32 x 3/8&quot; BHCS&#39;s, washers and nuts as shown below.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-JKck_qHlUgkPNq7h-TA-ZEPcMm92lhme5UNKzVcXkzPhwnexnXD4km9GyW8nD330iHK68wpvlRLEPrQnRDmqpEjd9g8GAupEOpIkSCgcHmmK5P9RzAkWekatS81BC3aiBflkCl6PD6Hb/s1600/IMG_2267.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-JKck_qHlUgkPNq7h-TA-ZEPcMm92lhme5UNKzVcXkzPhwnexnXD4km9GyW8nD330iHK68wpvlRLEPrQnRDmqpEjd9g8GAupEOpIkSCgcHmmK5P9RzAkWekatS81BC3aiBflkCl6PD6Hb/s1600/IMG_2267.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Below, you can see the pneumatic cylinder installed. &amp;nbsp;Note the hole position, and don&#39;t forget to install the GT2 belt prior to continuing, otherwise you are likely to gain the authors experience in re-assembly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr_lLFY6l88mnBDkixXbDAbk3LVgpyS-5u0ltffYrSdR_tKrHZFKfS4I3HFqZDYUplzpVmvt_mgU-F70L06OxQ8QRBHcHaCQHtBbT_1X6UiKnxJA1aiGDiN8k4gWHpOAwejlbh3FImbEz4/s1600/IMG_2268.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr_lLFY6l88mnBDkixXbDAbk3LVgpyS-5u0ltffYrSdR_tKrHZFKfS4I3HFqZDYUplzpVmvt_mgU-F70L06OxQ8QRBHcHaCQHtBbT_1X6UiKnxJA1aiGDiN8k4gWHpOAwejlbh3FImbEz4/s1600/IMG_2268.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In the next photo you can see the stepper motor installed with the stepper motor mount from Servo City.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguF12SwVp8HA7xwuD4HkqD-bP1A31f1BGyiQrUuiA3XDvURLqwPbXw3YbzFvFKIDmqwjR5uuE6hI_txibnH95hBIvoIdfXnMbeyp2ZI5RtNMhA0HlenlKc6OO2wIBAvwyVSTdl9uoXbv_x/s1600/IMG_2269.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguF12SwVp8HA7xwuD4HkqD-bP1A31f1BGyiQrUuiA3XDvURLqwPbXw3YbzFvFKIDmqwjR5uuE6hI_txibnH95hBIvoIdfXnMbeyp2ZI5RtNMhA0HlenlKc6OO2wIBAvwyVSTdl9uoXbv_x/s1600/IMG_2269.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Install the diameter 5 mm I.D. GT2 pulley on the stepper motor shaft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlFNxcjMDmYTD4hnMjOFI1dlysJc6qR0URtyO5tu89TD58Hgn4qhhiMPIxbKlAMAjYU3-e8yONCAcwPLNNCujHcVRcxOCiMWd8D_WqZO6FlXzItQUruP2orl5nGzKyIaO01V7VjVgXgu6w/s1600/IMG_2273.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlFNxcjMDmYTD4hnMjOFI1dlysJc6qR0URtyO5tu89TD58Hgn4qhhiMPIxbKlAMAjYU3-e8yONCAcwPLNNCujHcVRcxOCiMWd8D_WqZO6FlXzItQUruP2orl5nGzKyIaO01V7VjVgXgu6w/s1600/IMG_2273.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Prepare the aluminum plate and brackets as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicuLk5i_hk_Sz8QZp5xJ3mZAWLbgI2b1mlWHUUrDEQ1Z_t9Mu3hAGSDinKJnRa1EoRLVBqaz3AMNJGTDfkE5QKBTGTbBzjEGdyvw-QU1W_HH9n50veU6h8ZhHOG5t9OjZ3lIwNyL9CTO-0/s1600/IMG_2277.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicuLk5i_hk_Sz8QZp5xJ3mZAWLbgI2b1mlWHUUrDEQ1Z_t9Mu3hAGSDinKJnRa1EoRLVBqaz3AMNJGTDfkE5QKBTGTbBzjEGdyvw-QU1W_HH9n50veU6h8ZhHOG5t9OjZ3lIwNyL9CTO-0/s1600/IMG_2277.jpg&quot; height=&quot;320&quot; width=&quot;315&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
And install the solder paste syringe holder using wood screws. &amp;nbsp;For this, I countersunk the aluminum plate so that the wood screw heads were below the surface.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6bTHDGeZT6Y81AkE8rM26NiklLU8df2_Gl-m0u86EdLMXcRub7nDdhc__dE0_iN9CBrHoTBo1qv5GhdZ7fCJrOFmot7GmvNWPk8kz22XM-Kl7ykspOUmYqj4lhlg91pCemjxk-GZpWuM6/s1600/IMG_2280.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6bTHDGeZT6Y81AkE8rM26NiklLU8df2_Gl-m0u86EdLMXcRub7nDdhc__dE0_iN9CBrHoTBo1qv5GhdZ7fCJrOFmot7GmvNWPk8kz22XM-Kl7ykspOUmYqj4lhlg91pCemjxk-GZpWuM6/s1600/IMG_2280.jpg&quot; height=&quot;320&quot; width=&quot;310&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Attach the solder paste syringe holder assembly to the front of the aluminum channel using 6-32 x 1/4&quot; BHCS&#39;s as shown. &amp;nbsp;It is important to do this now, as it could affect the vertical clearance on the vacuum shaft. &amp;nbsp;The author was able to install qty 3, 6-32 screws during this operation before discovering the stepper motor was blocking one of the screw holes. &amp;nbsp;It was decided to move on with life instead of trying to increase the number of fasteners further.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPBi7EStplVJc9gAsEn0xVlT4OCc1tjsMun8niFkW9uvIBUssUAwUWIKrGyHoaOHeLXOrIcy-3HiO_OM-Lk3uilXpCfhKdTzkPZg2x5G2fWSoMDU3LSZ7gzrm9mLfw9y0lSOkXiYOJSRZI/s1600/IMG_2281.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPBi7EStplVJc9gAsEn0xVlT4OCc1tjsMun8niFkW9uvIBUssUAwUWIKrGyHoaOHeLXOrIcy-3HiO_OM-Lk3uilXpCfhKdTzkPZg2x5G2fWSoMDU3LSZ7gzrm9mLfw9y0lSOkXiYOJSRZI/s1600/IMG_2281.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT4vYWuJnQLfT3PJ4XVkRiWCR7Mb6QXFo4qLSA6yeMaFuNZ8O6NklmrIE3TcyjfM6_X_YogKukuVokP-jyC-86DMk-PY4eBpGFjVt_36Bs3mtvjgcqi3x2SSslB4z6UdHjUqzVaoAHRg6w/s1600/IMG_2282.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT4vYWuJnQLfT3PJ4XVkRiWCR7Mb6QXFo4qLSA6yeMaFuNZ8O6NklmrIE3TcyjfM6_X_YogKukuVokP-jyC-86DMk-PY4eBpGFjVt_36Bs3mtvjgcqi3x2SSslB4z6UdHjUqzVaoAHRg6w/s1600/IMG_2282.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Ok, the steps shown below are the most complicated, but I think you will manage to follow along just fine. &amp;nbsp;Temporarily install the vacuum shaft and top bearing mount. &amp;nbsp;You may elect to install this with one screw. &amp;nbsp;Slide the shaft axially to detect end float. &amp;nbsp;Measure, if you can, this displacement. &amp;nbsp;Mine was 0.015&quot;. Otherwise, you can attempt an iterative process of fitment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWSfKTqMEw470ERolPINHsqWMZf3eg5sdRUEd4GF0rW8Bh6akJ1cvorDXi4wLWwXz_4eMngWSO_Dm_uiuGfbi7ZhvirX9wbryv3VSMG_Hb-6iO_n4zQ0Z8XSYCyJ1X6MLuLx64h9MY8ktu/s1600/IMG_2283.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWSfKTqMEw470ERolPINHsqWMZf3eg5sdRUEd4GF0rW8Bh6akJ1cvorDXi4wLWwXz_4eMngWSO_Dm_uiuGfbi7ZhvirX9wbryv3VSMG_Hb-6iO_n4zQ0Z8XSYCyJ1X6MLuLx64h9MY8ktu/s1600/IMG_2283.jpg&quot; height=&quot;264&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the top bearing plate, install the dia 8 mm I.D. GT2 pulley, and install one of the shims from the arbor shim kit. &amp;nbsp;Since I knew my end float was 0.015&quot;, I selected a 0.012&quot; shim. &amp;nbsp;This would leave me with 0.003&quot; clearance. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaJjgbQrKhLu_xQurpQMqi11wXiVzuJMUtYOpxzdQYRMT-5XhKVHsJa0D1BeKZBrA_MLJtsZTFDrX30VHScHdI6QHBeLawHpUc2qZWSui0b704vAfj9MQt1XHPjpDL1xgPnBPeBIuZxmR6/s1600/IMG_2286.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaJjgbQrKhLu_xQurpQMqi11wXiVzuJMUtYOpxzdQYRMT-5XhKVHsJa0D1BeKZBrA_MLJtsZTFDrX30VHScHdI6QHBeLawHpUc2qZWSui0b704vAfj9MQt1XHPjpDL1xgPnBPeBIuZxmR6/s1600/IMG_2286.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Bolt the top bearing mount in place, and check that the shaft rotates freely and there is minimal, but perceptible end float. &amp;nbsp;Mine was predictably measured to be 0.003&quot; axial clearance after assembly. &amp;nbsp;If you cannot rotate the shaft, or cannot detect/measure end float, you should select a smaller shim and repeat.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimpuCibGQxm2Tg6pNG3TIwlMc4iKpGyxm24sW5CtpjEjambamj-z3vf1vNHRbM-9_EDX8kxOnGLvMFIWifH9r2YpitXHuwu4uwb-JyTtI2QTpNUAoGu3QhSMWIC4hQqEeiSlbEfx9e6V35/s1600/IMG_2290.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimpuCibGQxm2Tg6pNG3TIwlMc4iKpGyxm24sW5CtpjEjambamj-z3vf1vNHRbM-9_EDX8kxOnGLvMFIWifH9r2YpitXHuwu4uwb-JyTtI2QTpNUAoGu3QhSMWIC4hQqEeiSlbEfx9e6V35/s1600/IMG_2290.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Below you can see the luer lock adapter and blunt dispensing needle installed ( line item #1 ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvkLE5pNLY1CnTj0WlwdycZsYyZpJRWJ7Zh6J1ULxliubw7-JjMyirbNH7GBfTO5yrrUO_bt1V5AdWXO_R4ottoY4ExSD3r-jnR2BtnJITekGvrRLpO75bZp5BPo7P_TnTd2KRdSmNAcsT/s1600/IMG_2292.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvkLE5pNLY1CnTj0WlwdycZsYyZpJRWJ7Zh6J1ULxliubw7-JjMyirbNH7GBfTO5yrrUO_bt1V5AdWXO_R4ottoY4ExSD3r-jnR2BtnJITekGvrRLpO75bZp5BPo7P_TnTd2KRdSmNAcsT/s1600/IMG_2292.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the assembled head unit interfaced to the ShapeOko gantry via an 80/20 extrusion angle bracket.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcjXjPcH7WpxdE-_oX7q4CDygvKVMAFUu7RGmYA_fuVbeXSyNez-1WWi79KpNvU4lQODAbPZWrvC-pT_g-9UDf98PT3SBMngkuf11kLjJi_GEdaFDT91WQJ21u1grPiVhE3bTvh8fcxaUN/s1600/IMG_2296.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcjXjPcH7WpxdE-_oX7q4CDygvKVMAFUu7RGmYA_fuVbeXSyNez-1WWi79KpNvU4lQODAbPZWrvC-pT_g-9UDf98PT3SBMngkuf11kLjJi_GEdaFDT91WQJ21u1grPiVhE3bTvh8fcxaUN/s1600/IMG_2296.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOtka-rsxeXi3HRiXdn_ZKn1F_XgciCLiL7Epzq1Ltk2hvcySJzwWgAsWQ7DQHHnDUKzu2U6CA7sbc8m_hsDAxsHUkTfEAhlJVDj5nE4Lbjx1EnZXn1bVbOhl85USKHXhYqjXMBNkliIVL/s1600/IMG_2299.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOtka-rsxeXi3HRiXdn_ZKn1F_XgciCLiL7Epzq1Ltk2hvcySJzwWgAsWQ7DQHHnDUKzu2U6CA7sbc8m_hsDAxsHUkTfEAhlJVDj5nE4Lbjx1EnZXn1bVbOhl85USKHXhYqjXMBNkliIVL/s1600/IMG_2299.jpg&quot; height=&quot;320&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember that spool valve I mentioned earlier? &amp;nbsp;here it is installed to the head unit with a Servo City P/N:&amp;nbsp;545424&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMjrhkFkLor09Cf4XiDqW19N_yc44Op3m4Uvyy4gzYHh2tJoQU-6Qfdfhf1F5OV9um_z6gzZczDY3fqo2SyQq2-z3dNifR64hu2vEZF_GXkeRuHHuUnjK_Vnqec28slCsXmEicYDURH49A/s1600/IMG_2301.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMjrhkFkLor09Cf4XiDqW19N_yc44Op3m4Uvyy4gzYHh2tJoQU-6Qfdfhf1F5OV9um_z6gzZczDY3fqo2SyQq2-z3dNifR64hu2vEZF_GXkeRuHHuUnjK_Vnqec28slCsXmEicYDURH49A/s1600/IMG_2301.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This is where I discovered just how bent/curved/or otherwise not straight the vacuum needle was. &amp;nbsp;When I rotated the head unit with the stepper motor, the needle spun around and orbited too. &amp;nbsp;So, I bent the needle a little and was able to get it pretty concentric. &amp;nbsp;Then I removed the needle, and re-installed on the second start thread only to discover the needle was non-concentric again. &amp;nbsp;For now, I will continue with this setup, but it may be worth investigating some precision needles at some point - probably making them.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If you recall the shaft that needs to be fabricated, below you can find a drawing. &amp;nbsp;Basically the length of the diameter 8 mm shoulder is going to be determined by your particular setup. &amp;nbsp;As it is drawn below worked well for me, but you may do well to have a measure of your system first.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBL-wpmHnZ8WFMbV6D94gX_fqX7YXacniCJ0GCrzPtDLyPlrDfhFGUXp11EehGkgmdEV10ZoEea-p834VKTl9vl30wLmKpuqFOV-HpNG9Sj5DJI2tlsvAG4DtI5cPkOYxVHX69N3KhFVNM/s1600/Untitled.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBL-wpmHnZ8WFMbV6D94gX_fqX7YXacniCJ0GCrzPtDLyPlrDfhFGUXp11EehGkgmdEV10ZoEea-p834VKTl9vl30wLmKpuqFOV-HpNG9Sj5DJI2tlsvAG4DtI5cPkOYxVHX69N3KhFVNM/s1600/Untitled.png&quot; height=&quot;140&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;The PnP Fixture:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
You have probably seen the aluminum plate with milled slots, clocking holes, a shoulder register and a bunch of tapped holes. &amp;nbsp;This is my vision for making a low volume, home pick and place machine. &amp;nbsp;I can make as many different plates as I need based on the circuit board I want to fabricate. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRC7m8mKS-mNC2qFdrTUppsc50Vnc7j9v9wmqN_RaboD8-SqDobWgLolBPiQC1y2dVf1RD63-S1Dt9qYQKUrD5Qq5T-seM5DJMlm3e6YNf_gfAvcJMPsXjsrQLKPLy7NVkNEtuKDwUPHDt/s1600/IMG_2325.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRC7m8mKS-mNC2qFdrTUppsc50Vnc7j9v9wmqN_RaboD8-SqDobWgLolBPiQC1y2dVf1RD63-S1Dt9qYQKUrD5Qq5T-seM5DJMlm3e6YNf_gfAvcJMPsXjsrQLKPLy7NVkNEtuKDwUPHDt/s1600/IMG_2325.JPG&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The design is made pretty universal. &amp;nbsp;There are 4 tracks for resistors or transistors, two tracks for capacitors, one for a regulator and one for a mosfet. &amp;nbsp;I selected these parts and subsequently the track dimensions based on the boards I wanted to populate first. &amp;nbsp;If I have a new board design in the future, and this setup does not have tracks for the correct parts, I can make a new fixture.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here is how I envision this fixture working. &amp;nbsp;I say envision, because I am still learning how to write G-Code, and I am not sure how to do what I want just yet. &amp;nbsp;At the time of this writing, I am currently working on the programming I am about to describe.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If you look at the fixture you will see two countersunk holes for flat head screws. &amp;nbsp;This fixture will be bolted to the ShapeOko MDF work surface here.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Inboard and towards the front, you will see two round bores of different diameters. &amp;nbsp;They would have been the same size, but I messed one up while machining. &amp;nbsp;Since the fixture is unlikely to ever be bolted down, perfectly aligned with the machine coordinates, I am trying to do the following. &amp;nbsp;Probe each of these two holes, calculate the angle between the machine coordinate system and the line made by joining these two center points, and rotating a new set of coordinates for the machine to use that are aligned with this fixture.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There is an X-Y register for locating the circuit board. &amp;nbsp;This X-Y ( 0,0 ) is located 5.000&quot; right and 0.500&quot; toward the rear from the bottom left probe bore. &amp;nbsp;Using this new origin I know where my circuit board pads are ( from the gerber files ), and I also know where to tell the machine to look for each type of component to place.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To hold the circuit board in this register, orienting it&#39;s X-Y ( 0,0 ) I used a piece of an old coping saw blade. &amp;nbsp;Held in place on one end by a Jarrah wood clamp, the other end applies enough spring pressure to keep the board steady and registered during assembly.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLgkv-tQr6DK8omDPu689gaBe73yKkxtWHOARSg-_lUzFB2MGj6GfL9HVVsICDE7CjKr6pk_MfrWzZFffJL7BekFsBKLfESaERefTESbW3-4jQe_6P18Py9j97CuxhY4sMySPDLO6QiT_T/s1600/IMG_2321.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLgkv-tQr6DK8omDPu689gaBe73yKkxtWHOARSg-_lUzFB2MGj6GfL9HVVsICDE7CjKr6pk_MfrWzZFffJL7BekFsBKLfESaERefTESbW3-4jQe_6P18Py9j97CuxhY4sMySPDLO6QiT_T/s1600/IMG_2321.JPG&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Things are starting to look like this might just work. &amp;nbsp;I still have a long way to go with G-Code and tuning the machine operations. &amp;nbsp;I haven&#39;t even fed any parts yet! &amp;nbsp;Never the less, I keep chipping away at the subcomponents on this job. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Incidentally, I will probably be showing this machine off at the Ann Arbor Mini Maker Faire, so if you are in the area, be sure to stop by.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/7557412275223299448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/7557412275223299448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/7557412275223299448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/7557412275223299448'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2014/04/diy-pick-and-place-machine-part-3.html' title='DIY Pick and Place Machine - Part 3'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0DAvSwxZEo-_Yb5jiPOhPU_0F-YwKwF_pz7ioGqYd2y_a3_YbiiOF7knQS5_iN9ZdFr-axcMtc1gxzEpzTqRTTzNbJDr2WUuXbhblqhZpUm0XCP2cbh32dLJIvCT5SCQAKY7xW0WeksuY/s72-c/IMG_2335.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-3851676167577449604</id><published>2014-04-15T13:24:00.000-04:00</published><updated>2014-05-08T16:22:57.409-04:00</updated><title type='text'>DIY Pick and Place Machine - Part 2</title><content type='html'>*Update*&lt;br /&gt;
Be sure to check out the other posts in this series below.&lt;br /&gt;
&lt;a href=&quot;http://petemills.blogspot.com/2014/03/diy-pick-and-place-machine-part-1.html&quot;&gt;Part 1&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://petemills.blogspot.com/2014/04/diy-pick-and-place-machine-part-3.html&quot;&gt;Part 3&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Ok, so we are moving right along with this project. &amp;nbsp;Parts are coming in weekly, and other parts seem to be endlessly delayed, so we make do. &amp;nbsp;Since the last post I have been concentrating my CNC PnP education on the following areas:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Automagic Z-Axis probing for setting the machines vertical zero position relative to your PCB.&lt;/li&gt;
&lt;li&gt;Wiring in an emergency stop. &amp;nbsp;This should have been done before starting the first time.&lt;/li&gt;
&lt;li&gt;Configuring LinuxCNC&#39;s HAL for digital outputs.&lt;/li&gt;
&lt;li&gt;Investigations into robotic solder dispensing.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Much of this work has been around the back of the machine, so here is a picture of that, and lets discuss.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWjNFK1rVdIaLNL_qn9FE1K2rBLljY-bmgXDoWZGQ3o5P_h0hCGgBFz7WuwmZliMukSfUrwFU6WNS5LArTF_7J3pGwAxkWYwjPIe6mHz3loH4Mb69WrvGQFJGxV1nJKn-oJUVLiewNWBK1/s1600/photo+5.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWjNFK1rVdIaLNL_qn9FE1K2rBLljY-bmgXDoWZGQ3o5P_h0hCGgBFz7WuwmZliMukSfUrwFU6WNS5LArTF_7J3pGwAxkWYwjPIe6mHz3loH4Mb69WrvGQFJGxV1nJKn-oJUVLiewNWBK1/s1600/photo+5.JPG&quot; height=&quot;160&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Above is the back side of the machine. &amp;nbsp;Along the top is a piece of DIN Rail that extends from the left and right of the ShapeOko frame. &amp;nbsp;This is where the majority of parts are installed. &amp;nbsp;Below this, you see a grey vertical surface with parts mounted. &amp;nbsp;This is a long steel L-Bracket, surplus from some IKEA furniture, that I screwed to the ShapeOko MDF work surface.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Working ( approximately ) from left to right, here is a list of parts:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Green parallel port breakout board. &amp;nbsp;This gives screw terminal access to your PC parallel port. &amp;nbsp;To this we attach stepper drivers, digital outputs, digital probe inputs etc. Phoenix Contact P/N: FLKM-D25.&lt;/li&gt;
&lt;li&gt;DIN Rail mount Terminal Block. &amp;nbsp;Multicomp P/N: SPC10564&lt;/li&gt;
&lt;li&gt;I colored some of the above terminal blocks red or black with a sharpie. &amp;nbsp;These are electrically connected with Mulitcomp P/N: SPC11891 jumpers&lt;/li&gt;
&lt;li&gt;Big Easy Stepper Drivers - sold by SparkFun P/N: ROB-11876&lt;/li&gt;
&lt;li&gt;The two yellow circles are 3-way pneumatic valves. &amp;nbsp;Clippard.com P/N: EC-3-12 for the valve and P/N:&amp;nbsp;C2-RB18 for a connectorized lead. One of these will be used for solder dispensing/component tape advancing, and the&amp;nbsp;other is for the vacuum pickup system.&lt;/li&gt;
&lt;li&gt;Connected to the above valves, via blue tubing ( clippard P/N:&amp;nbsp;







&lt;div class=&quot;p1&quot;&gt;
URH1-0402-BLT-050 ), is a pressure regulator, clippard P/N: MMR-1N.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
The valves and regulator do not come with fittings so I also ordered clippard P/N: 11752-5-PKG&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
Next you can see a circuit board. &amp;nbsp;This custom job contains electronics for Opto-isolation, transistor amplification, and Back EMF suppression. &amp;nbsp;All of which allows us to switch inductive loads like relay coils and solenoids from our PC parallel port safely.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
Further to the right is a 12 V DC relay for switching the 110 V AC vacuum pump on and off. &amp;nbsp;The second set of contacts will eventually drive the vacuum solenoid to either create vacuum in the pickup needle line or vent to atmosphere. I&#39;m not sure if these are available or not, mine is scavenged from an old project Omron P/N: MK2P-S-DC12&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
On the very far right you can see a blue snubber that is wired across the aquarium ( vacuum ) pump. &amp;nbsp;I added this to reduce EMI on the 12 V Rail. &amp;nbsp;It was necessary. &amp;nbsp;ITW P/N: 104M06QC100.&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
So, that&#39;s kind of an overview of some components, that make the subsystems. &amp;nbsp;Let&#39;s talk a little more about some of the details of setting up the machine and how I intend to make this a useful robot instead of a list of cool parts. &amp;nbsp;This post will discuss setting up the Z-Axis probing and robotic solder paste dispensing.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Z-Axis Probing:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
In case it wasn&#39;t already obvious, this entire project has been made so easy by those who have gone before me and were willing to write up their own findings. &amp;nbsp;Clearly, the best example of this is LinuxCNC, without which, nothing on my machine would be moving this early in the game. &amp;nbsp;LinuxCNC is powerful and customizable. &amp;nbsp;And thru adding some text to the configuration files, we can setup the probe functionality built into LinuxCNC, or perhaps more correctly G-Code.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://7xcnc.com/&quot;&gt;7xCNC.com&lt;/a&gt; &lt;a href=&quot;http://7xcnc.com/software/probing/&quot;&gt;wrote up an article on how to setup Z-Axis probing&lt;/a&gt;. &amp;nbsp;This will allow me to know how high my pickup needle and solder dispensing needles are relative to the top of my circuit boards. &amp;nbsp;This is important because later on, when I write G-Code programs for the PnP I will need to reference the top face of the PCB. &amp;nbsp;Of course you could set the Z-Axis manually, but why would you want to?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbtISNB-ThctPTNAFuc6KDZYckVEKGPjrPyEKjyfW-Nq57rbl80HaBOfBZVuyEftCjCKXKCZO3a_SG0H7p9i3xWiPGcwKpOvD3eSK9ZIAONkPETktZOOxJ7Yz4N0263EZBz8gbEPotUNpZ/s1600/IMG_2212.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbtISNB-ThctPTNAFuc6KDZYckVEKGPjrPyEKjyfW-Nq57rbl80HaBOfBZVuyEftCjCKXKCZO3a_SG0H7p9i3xWiPGcwKpOvD3eSK9ZIAONkPETktZOOxJ7Yz4N0263EZBz8gbEPotUNpZ/s1600/IMG_2212.jpg&quot; height=&quot;320&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Have a look at the picture above, and I will try to explain what happens when we probe the Z-Axis. &amp;nbsp;The aluminum block you see is 0.75&quot; thick. &amp;nbsp;The wire connected to this aluminum block via a ring terminal is connected to the PC&#39;s parallel port ground. &amp;nbsp;The alligator clip, clipped to the same electrical point, is connected to the parallel port pin 13 on the other end. &amp;nbsp;What I just described is a closed switch as LinuxCNC sees it. &amp;nbsp;If we were to clip the alligator clip to the conductive needle instead, we would have a switch that closes when the end of the needle touches the aluminum block&#39;s top face. &lt;br /&gt;
&lt;br /&gt;
If you were to call a probe command in G-Code it may look something like this:&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt;  
G38.2 Z-2.500 F15
&lt;/pre&gt;
&lt;br /&gt;
G38.2::G38.5 are probing codes. &amp;nbsp;In the case of the above code it reads: ( G38.2 ) &lt;i&gt;Probe towards work piece, Stop on contact, Signal error if failure. &lt;/i&gt;adding ( Z-2.500 ) means that if you get to Z-2.500 before touching the probe surface, stop; something is awry. &amp;nbsp;The F15 is your feed rate.&lt;br /&gt;
&lt;br /&gt;
So, F15 is fast for probing, right? &amp;nbsp;Especially when you consider that &lt;a href=&quot;http://7xcnc.com/&quot;&gt;7xCNC.com&#39;s&lt;/a&gt;&amp;nbsp;tutorial implements debouncing for the probe signal. &amp;nbsp;IIRC, the debounce routine is 100 iterations of the base thread. &amp;nbsp;Say our base thread runs at 1 mS, well 100 iterations would be 100 mS, and 100 mS at F15 inches per minute equates to 0.0025&quot;. &amp;nbsp;In other words, if you just zoom down into the aluminum block and set Z = zero ( or 0.750&quot; rather ), you will be 2.5 thou too low. &amp;nbsp;the answer is to slow down that feed rate and consequently decrease the overshoot.&lt;br /&gt;
&lt;br /&gt;
Since we don&#39;t want to wait ages for a slow feed rate if we are a long way away from our aluminum probe block, I wrote the G-Code subroutine for probing as below. &amp;nbsp;If you read the comments you will see that essentially the code quickly probes down to the block, comes up a bit, then probe down slowly to get an accurate Z-Axis reference. &lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt;  
o100 sub

( Set current Z position to 0 so that we will always be moving down )
G10 L20 P0 Z0.0

( quickly probe down to touch off plate )
G38.2 Z-3.0 F15

( switch to relative coordinates )
G91

( rapid up 0.1 )
G0 Z0.05

( probe slowly to get a more accurate zero )
G38.2 Z-0.2 f0.5

( set Z0.0 to be 0.75 above work surface - this is due to the touchoff plate thickness )
G10 L20 P0 Z0.75

( switch back to absolute coordinates )
G90

( rapid to Z1.0 - probe tip is now 1&quot; above work surface )
G0 Z1.0

o100 endsub
&lt;/pre&gt;
&lt;br /&gt;
Below is a video of this Z-Axis probe action.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/XJKwADbW6r4?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, after making my way thru the probe tutorial above, and modifying the G-Code subroutine for faster probing, I learned enough about how to make buttons appear on my LinuxCNC GUI, and more importantly, make those buttons do something useful. &amp;nbsp;So, I set out to make some more buttons to speed up the machine setup. &amp;nbsp;I made buttons for zeroing the X and Y axes as well as one to turn on my solder paste solenoid for 3 seconds to purge any dry solder paste from the needle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAeW8dIcA9xPUljUqLUpNabQK7087rKuNZlUtFCncDyCuTGmLgMAkM6JubYYkC0BmQthxTp_L_4Cp5Pgad_eDYAsOfxVyG_BOUeHJTtSteaWNkwJ0iYDg5HM0lC6i7u-shhwbZ0-RT2ZsB/s1600/Screenshot.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAeW8dIcA9xPUljUqLUpNabQK7087rKuNZlUtFCncDyCuTGmLgMAkM6JubYYkC0BmQthxTp_L_4Cp5Pgad_eDYAsOfxVyG_BOUeHJTtSteaWNkwJ0iYDg5HM0lC6i7u-shhwbZ0-RT2ZsB/s1600/Screenshot.png&quot; height=&quot;200&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
To make this happen, I edited &lt;i&gt;myCNCconfigName.&lt;/i&gt;ini such that the HAL UI MDI commands look like below:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
[HAL]
HALUI = halui
HALFILE = 4axis_PnP.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal

[HALUI]
# add halui MDI commands here (max 64) 
MDI_COMMAND = o100 call 
MDI_COMMAND = o101 call 
MDI_COMMAND = o102 call 
MDI_COMMAND = o200 call 
&lt;/pre&gt;
&lt;br /&gt;
Then I edited custom_postgui.hal to contain the following:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
net remote-o101 halui.mdi-command-01 &amp;lt;= pyvcp.o101
net remote-o102 halui.mdi-command-02 &amp;lt;= pyvcp.o102
net remote-o200 halui.mdi-command-03 &amp;lt;= pyvcp.o200
&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
And finally, I added the following to custompanel.xml&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
[HALUI]
# add halui MDI commands here (max 64) 
&lt;button&gt;
     &lt;halpin&gt;&quot;o101&quot;&lt;/halpin&gt;
     &lt;text&gt;&quot;Zero X Axis&quot;&lt;/text&gt;
     (&#39;fixed&#39;,10)
&lt;/button&gt;

&lt;button&gt;
     &lt;halpin&gt;&quot;o102&quot;&lt;/halpin&gt;
     &lt;text&gt;&quot;Zero Y Axis&quot;&lt;/text&gt;
     (&#39;fixed&#39;,10)
&lt;/button&gt;

&lt;button&gt;
     &lt;halpin&gt;&quot;o200&quot;&lt;/halpin&gt;
     &lt;text&gt;&quot;Solder Purge 3S&quot;&lt;/text&gt;
     (&#39;fixed&#39;,10)
&lt;/button&gt;
&lt;/pre&gt;
&lt;br /&gt;
So, when you press one of these buttons on the LinuxCNC GUI the respective subroutines below are called:&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
o101 sub

( Set current X position to 0 )
G10 L20 P0 X0.0

o101 endsub
&lt;/pre&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
o102 sub

( Set current Y position to 0 )
G10 L20 P0 Y0.0

o102 endsub
&lt;/pre&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
o200 sub

M64 P1 ( DO 1 ON )
G04 P1.0 ( dwell seconds ) 
M65 P1 ( DO 1 OFF )

o200 endsub
&lt;/pre&gt;
&lt;br /&gt;
I will be revisiting this creation of buttons again soon. &amp;nbsp;I am thinking of how to probe the X and Y axes instead of manually setting the zeros.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Robotic Solder Paste Dispensing:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To start with this robotic solder paste dispensing problem, I decided to rig up a manual pneumatic dispenser. &amp;nbsp;With a switch connected to a solenoid, I was able to selectively apply CO2 to my syringe of solder paste. &amp;nbsp;The solder paste naturally escapes thru the dispensing needle, and the hope is, that the correct amount makes it onto the correct solder pad.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHOxK_WSQlPlepgQYnnJ3wCHjUHaCzUT-tvPiJ0EbFtN_XYAbctg6bS9ZKO-mHbeylsxPh-dq4kkmWrPRrtJytdbPiRk2mc7u9nu3NeiNwFLiVh41e_uZrD1khOCK_6GcSF4D05h9BUGRZ/s1600/IMG_2194.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHOxK_WSQlPlepgQYnnJ3wCHjUHaCzUT-tvPiJ0EbFtN_XYAbctg6bS9ZKO-mHbeylsxPh-dq4kkmWrPRrtJytdbPiRk2mc7u9nu3NeiNwFLiVh41e_uZrD1khOCK_6GcSF4D05h9BUGRZ/s1600/IMG_2194.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This sounds easy enough. &amp;nbsp;We have a fixed orifice, and a fixed pressure ( 40 PSI of CO2 ), so we should have a constant flow, and with a constant time, a deterministic volume dispensed. &amp;nbsp;What I don&#39;t have, however, is a fixed viscosity fluid. &amp;nbsp;My solder paste varies from dry to entirely too wet. &amp;nbsp;The reason for this, I think is that the paste is 2 years old, and it has a shelf life of 6 months. &lt;br /&gt;
&lt;br /&gt;
All this means is that my time based experiments in this area are largely useless at this point. &amp;nbsp;I have ordered a new tube of solder paste. &amp;nbsp;This has proven to be a good learning experience.&lt;br /&gt;
&lt;br /&gt;
Eventually the human operated switch was replaced by an opto-isolated, transistor amplified, and back EMF protected circuit, that means that I can now write G-Code to turn on and off this solenoid for a specific time period with the code:&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
M64 P1   ( turn D0 ON solder solenoid )
G04 P1.5  ( dwell seconds ) 
M65 P1   ( turn D0 OFF - solder solenoid )
&lt;/pre&gt;
&lt;br /&gt;
Strap the digitally controlled solder paste syringe to the pick and place gantry, and you can do this:&lt;br /&gt;
&lt;br /&gt;
Below is a picture of solder paste dispensing onto a piece of paper. &amp;nbsp;The 5 dots on the left were dispensed with a 1.5 second period, and for the 5 dots on the right the CO2 solenoid was open for 2 seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKpSuFUcaIADOAZ3IJVq8Pp40M5MSK1-ZGvfH3i14fatcBp7MkLce9Nduz59kXRB6-EGGC9Vgfn4XWiHhV1IJcXnteVa-20gmpGbgfePgpLGEQK5PhjPQKPvDwOLARRyNWbDmTRopCFqy4/s1600/IMG_2209.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKpSuFUcaIADOAZ3IJVq8Pp40M5MSK1-ZGvfH3i14fatcBp7MkLce9Nduz59kXRB6-EGGC9Vgfn4XWiHhV1IJcXnteVa-20gmpGbgfePgpLGEQK5PhjPQKPvDwOLARRyNWbDmTRopCFqy4/s1600/IMG_2209.JPG&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a video of the dispensing in action. You can notice that the first pad does not get enough solder dispensed onto it. &amp;nbsp;Given the viscosity disparity of this expired solder paste tube, and my elected method of application, i&#39;d say these results are pretty good.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/JMXmGYkEfZc?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
While the solder was being placed on the circuit boards, I was hand populating the components. &amp;nbsp;The resulting boards are just as good as they ever have been using a solder paste screen. &amp;nbsp;And certainly, one of the coolest features of robotic solder paste application is that I can make new boards while never having to purchase a ~$200 solder paste screen again.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyaeWlmJRRh6GjccwzTRCTaX9SzQKwkUJEDTzv91Ijio-2DMcHKEmhbOpCkgS1flMJl6uy72-jXkQ5hCBWQlCp8wl3hnotoMal7Mswfz-QZYjkU5GMyeKBmbHiLjOLytcsa7_X1HAYJuvL/s1600/IMG_2230.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyaeWlmJRRh6GjccwzTRCTaX9SzQKwkUJEDTzv91Ijio-2DMcHKEmhbOpCkgS1flMJl6uy72-jXkQ5hCBWQlCp8wl3hnotoMal7Mswfz-QZYjkU5GMyeKBmbHiLjOLytcsa7_X1HAYJuvL/s1600/IMG_2230.JPG&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Ok, well I can&#39;t think of anything else to talk about on this topic. &amp;nbsp;It&#39;s all pretty prototypical at this point, but I&#39;d say its moving in the right direction. &amp;nbsp;And if you&#39;ve made it this far into the reading, thank you; you&#39;re doing better than me.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/3851676167577449604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/3851676167577449604' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/3851676167577449604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/3851676167577449604'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2014/04/diy-pick-and-place-machine-part-2.html' title='DIY Pick and Place Machine - Part 2'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWjNFK1rVdIaLNL_qn9FE1K2rBLljY-bmgXDoWZGQ3o5P_h0hCGgBFz7WuwmZliMukSfUrwFU6WNS5LArTF_7J3pGwAxkWYwjPIe6mHz3loH4Mb69WrvGQFJGxV1nJKn-oJUVLiewNWBK1/s72-c/photo+5.JPG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-1378253169412568727</id><published>2014-03-16T23:00:00.002-04:00</published><updated>2014-05-08T16:17:45.139-04:00</updated><title type='text'>DIY Pick and Place Machine - Part 1</title><content type='html'>*Update*&lt;br /&gt;
Be sure to check out the other posts in this series below.&lt;br /&gt;
&lt;a href=&quot;http://petemills.blogspot.com/2014/04/diy-pick-and-place-machine-part-2.html&quot;&gt;Part 2&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://petemills.blogspot.com/2014/04/diy-pick-and-place-machine-part-3.html&quot;&gt;Part 3&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Well, it sure has been a while since i&#39;ve posted anything, but that does not mean i&#39;ve been idling my time away. &amp;nbsp;One of my projects since my last post has been starting &lt;a href=&quot;http://airpatchcable.com/&quot;&gt;AirPatchCable.com&lt;/a&gt;. &amp;nbsp;AIR Patch Cable was setup because I was disappointed with the selection of Aviation Intercom Recording cables on the market. &amp;nbsp;Everything was either way over priced, of such poor quality, or both, that I didn&#39;t want to plug them into my camera, let alone a planes intercom. &lt;br /&gt;
&lt;br /&gt;
For AIR Patch Cables I designed a cable with capacitive coupling and passive attenuator pad to make interfacing to the airplanes intercom simple and sound great. &amp;nbsp;To fit everything into the phono jack backshell meant that I had to put the attenuator and capacitive coupling passives onto a circuit board. &amp;nbsp;Below is a picture of these circuit boards. &amp;nbsp;P.S. If you or someone you know is a pilot, you should check out &lt;a href=&quot;http://airpatchcable.com/&quot;&gt;AirPatchCable.com&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCCM-yvOAebv0y44B50A7vtjncesjIJz5_f-imL11knkoIDFlGn17s0IxyLNuUb8AupQ7s8PeXmgZBzW_RikvaNpZL4xjEarBA_kViO_CBQ8uooJQomPAKsB8W2Q1v9idA6fqk1e7SdI3g/s1600/IMG_1148.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCCM-yvOAebv0y44B50A7vtjncesjIJz5_f-imL11knkoIDFlGn17s0IxyLNuUb8AupQ7s8PeXmgZBzW_RikvaNpZL4xjEarBA_kViO_CBQ8uooJQomPAKsB8W2Q1v9idA6fqk1e7SdI3g/s1600/IMG_1148.jpg&quot; height=&quot;320&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
So, how are all of these SMD circuit boards going to get populated? &amp;nbsp;Well, to start out, by hand. &amp;nbsp;That is no easy task, &amp;nbsp;however, and so I decided to build a robot to make these boards for me while I attend to other things. &lt;br /&gt;
&lt;br /&gt;
In actuality, this machine probably needs supervision, but there are other benefits to robotic assembly even if I have to sit there and supervise the robot. &amp;nbsp;A robot, or perhaps more accurately named a &quot;Pick and Place Machine&quot; in this case, is unlikely to place a 100 ohm resistor where the 1000 ohm resistor is supposed to go, or put that diode in backwards, thus rendering the entire circuit useless. &amp;nbsp;Perhaps the biggest benefit is that my eyes and neck will remain in relative comfort.&lt;br /&gt;
&lt;br /&gt;
OK, so this is where we are so far. &amp;nbsp;I titled this post &quot;... Part 1&quot; because my machine does not pick nor place just yet. &amp;nbsp;But what I have achieved is a milestone. &amp;nbsp;I have programmatic computer control over a 3 axis machine. &amp;nbsp;This would be considered a starting point for many projects. &amp;nbsp;From here you could make a laser cutter, a CNC mill, a 3D printer, or in my case a pick and place machine.&lt;br /&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;
Lets cut to the chase and put up the video and we can talk about it a little more later.&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/oH2QoTdPOCY?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Below you can see a shot of the overall setup. &amp;nbsp;I&#39;ll break it down a little later. &amp;nbsp;For now, just enjoy the pics.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjthnIYtf_EWYEiUstWCeLhqwi-kqUbpbKtDC7qdCpreCll1QGZ_CAPB-E9F6XG8ohyRaByL_l4962wvRvYaPxiYH0cQq9Il2t-C_vDRqvU_vl-kv_jj4baobouqoRaZPL5rIpbIukvLYV_/s1600/IMG_2098.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjthnIYtf_EWYEiUstWCeLhqwi-kqUbpbKtDC7qdCpreCll1QGZ_CAPB-E9F6XG8ohyRaByL_l4962wvRvYaPxiYH0cQq9Il2t-C_vDRqvU_vl-kv_jj4baobouqoRaZPL5rIpbIukvLYV_/s1600/IMG_2098.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4I-k07mFMcEwZXD5oqe2_2LcfGbwLYeBMepUm9nj_Z6jhGg6SHjWuaTDtG6b8oeb-AokKA72pcvT5uLXSWg3lZ7UNCcUpVU-H6JUwknODk3zD4r7x-udQ94Kuco2TqMFNbUeLvc_r1_-W/s1600/IMG_2103.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4I-k07mFMcEwZXD5oqe2_2LcfGbwLYeBMepUm9nj_Z6jhGg6SHjWuaTDtG6b8oeb-AokKA72pcvT5uLXSWg3lZ7UNCcUpVU-H6JUwknODk3zD4r7x-udQ94Kuco2TqMFNbUeLvc_r1_-W/s1600/IMG_2103.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggQyidR5tkv0MuF7FnAJf2LBYIDgbbxjxZ4uEcAX4IWAha6b521zxlyA7VuEONEEyWxvGNGQK6yvpswmU9F8zLcAUHolHYuk6cKTpRbGJ7G06-v0uz7VhFc1WgFz44tQv1gktfFv_iZOK8/s1600/IMG_2102.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggQyidR5tkv0MuF7FnAJf2LBYIDgbbxjxZ4uEcAX4IWAha6b521zxlyA7VuEONEEyWxvGNGQK6yvpswmU9F8zLcAUHolHYuk6cKTpRbGJ7G06-v0uz7VhFc1WgFz44tQv1gktfFv_iZOK8/s1600/IMG_2102.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In the top pic you can see the mechanical setup and the computer that controls the stepper motors. &amp;nbsp;The next pic down you can see the stepper motor drivers. &amp;nbsp;Finally, in the third pic is a photo of the software, LinuxCNC which are the brains of the operation. &lt;br /&gt;
&lt;br /&gt;
An over simplified explanation of operations is that LinuxCNC reads a G-Code program that you wrote. &amp;nbsp;LinuxCNC then controls the host computers parallel port where the stepper motor drivers are connected. &amp;nbsp;The stepper motor drivers are electrically connected to the stepper motors which are in turn mechanically coupled to the XYZ or 3 axes of the machine. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Mechanical:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
When I first considered making a PnP ( Pick and Place ) machine, I started looking at linear bearings from the usual suspects. &amp;nbsp;Thompson and Igus, namely. &amp;nbsp;I quickly found out what I already suspected. &amp;nbsp;Linear bearings are expensive. &amp;nbsp;During my search however, I came across a 3 axis mill kit for about $300. &lt;br /&gt;
&lt;br /&gt;
I could not pass this up. &amp;nbsp;It would suit all of my design criteria for this project and cost less than if I designed my own. &amp;nbsp;The kit is called a Shapeoko 2, and it is sold by a company called Inventables. &amp;nbsp;Here is a &lt;a href=&quot;https://www.inventables.com/technologies/desktop-cnc-mill-kit-shapeoko-2&quot;&gt;link the kit&lt;/a&gt;. &amp;nbsp;If you are planning to build the same robot I did, keep in mind I only ordered the mechanical kit as the electronics didn&#39;t really suit my needs.&lt;br /&gt;
&lt;br /&gt;
The kit was pretty easy to assemble. &amp;nbsp;I don&#39;t really know how long it took because I did it over the course of a while. &amp;nbsp;I would strongly consider building future rigs with the &quot;maker slide&quot; linear bearings that Shapeoko 2 uses. &amp;nbsp;Aluminum extrusions are plenty stiff for this project and I suspect many others.&lt;br /&gt;
&lt;br /&gt;
The mechanical kit from Inventables does not come with all the mechanical components. &amp;nbsp;I ordered &lt;a href=&quot;http://www.ebay.com/sch/i.html?_trksid=p2053587.m570.l1313.TR0.TRC0.H0.Xmxl+reprap&amp;amp;_nkw=mxl+reprap&amp;amp;_sacat=0&amp;amp;_from=R40&quot;&gt;MXL belting and pulleys from ebay&lt;/a&gt; to complete the mechanical side of things.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Electrical:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
I decided to use the &lt;a href=&quot;https://www.sparkfun.com/products/11876&quot;&gt;Big Easy Driver &lt;/a&gt;for driving my stepper motors. &amp;nbsp;This is a stepper motor driver designed by &lt;a href=&quot;http://www.schmalzhaus.com/&quot;&gt;Brian Schmalz &lt;/a&gt;and sold by &lt;a href=&quot;https://www.sparkfun.com/&quot;&gt;Sparkfun Electronics&lt;/a&gt;. &amp;nbsp;Brian was very helpful when I emailed him about some compatibility questions I had. &lt;br /&gt;
&lt;br /&gt;
There is a potentiometer onboard each Big Easy Driver to set the motor current. &amp;nbsp;Too low and the motor is uncontrollable. &amp;nbsp;Too high and the driver gets too hot. &amp;nbsp;This fact must me accomidated for when you are setting up your motors, one by one.&lt;br /&gt;
&lt;br /&gt;
I ordered 5 of the Big Easy Drivers to go with the quantity five, &lt;a href=&quot;http://www.ebay.com/sch/i.html?_trksid=p2050601.m570.l1311.R1.TR11.TRC1.A0.H1.Xnema&amp;amp;_nkw=nema+17&amp;amp;_sacat=0&amp;amp;_from=R40&quot;&gt;NEMA 17 motors I ordered from ebay&lt;/a&gt;. &amp;nbsp;I am told that NEMA 17 is about the biggest motor the Big Easy Driver should be used for. &lt;br /&gt;
&lt;br /&gt;
I was really impressed with the torque these NEMA 17 motors have when paired with the Big Easy Driver. &amp;nbsp;I couldn&#39;t pinch the 5 mm output shaft with my fingers to stop the motor from turning. &amp;nbsp;I offer that anecdotal statement in lieu of data sheets or a torque measurement. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Software:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
I am using &lt;a href=&quot;http://www.linuxcnc.org/&quot;&gt;LinuxCNC&lt;/a&gt; for stepper control. &amp;nbsp;I was really impressed with how easy everything was to set up. &amp;nbsp;I&#39;ll go ahead and post a couple of setup photos with parameters I have found to work with the Big Easy Driver.&lt;br /&gt;
&lt;br /&gt;
Oh, LinuxCNC runs on Ubuntu 8.04 or 10.04, so be prepared to downgrade. &amp;nbsp;Having said that, 10.04 is a dream to work on. &amp;nbsp;You can even &lt;a href=&quot;http://www.linuxcnc.org/index.php/english/download&quot;&gt;download Ubuntu 10.04 with LinuxCNC pre-compiled&lt;/a&gt;. &amp;nbsp;That&#39;s what I did.&lt;br /&gt;
&lt;br /&gt;
Below are some screen short of my configuration thru StepperConf in LinuxCNC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2rWjNlRuiICdGq4UHDztOwQKLdbdxyLgJGwUbMQJ29BBab8JtZYLqZ4GseG7j94e4UCjlR0yuyvnnKNBXjkoFktEtn-ff6M6U-0HHNTMWeOYVGaWl7kc5sk7IAqg1aPdtZ11agcaRSvDT/s1600/Screenshot.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2rWjNlRuiICdGq4UHDztOwQKLdbdxyLgJGwUbMQJ29BBab8JtZYLqZ4GseG7j94e4UCjlR0yuyvnnKNBXjkoFktEtn-ff6M6U-0HHNTMWeOYVGaWl7kc5sk7IAqg1aPdtZ11agcaRSvDT/s1600/Screenshot.png&quot; height=&quot;200&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirxPD9fCiGL1JifaXkB-0jZZx0KHckcssLVY0FDym7oAvX3wZMEZIgL1qjjxsYZCIZp04MQ5H_x-CpURg-MfeJ1bRIkbplZeGQNPQVDyFXpJWod0YVpP2NcqCvi13ksPsC72E-xB4Ob5_J/s1600/Screenshot-1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirxPD9fCiGL1JifaXkB-0jZZx0KHckcssLVY0FDym7oAvX3wZMEZIgL1qjjxsYZCIZp04MQ5H_x-CpURg-MfeJ1bRIkbplZeGQNPQVDyFXpJWod0YVpP2NcqCvi13ksPsC72E-xB4Ob5_J/s1600/Screenshot-1.png&quot; height=&quot;200&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1b4JKmDh4fSLFDdsR1WEvVPwAb5RF9E_vLiLOfKSlDgFIgzZ6Rwlt9UIsrHfHmF2uOJ_a3odg8wSoLVF6Li9UvA-iOqf6Adowkp-t8hJ2USIZ1N0xK5sM7KgXgohqzxglbAqExJY6I4Dm/s1600/Screenshot-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1b4JKmDh4fSLFDdsR1WEvVPwAb5RF9E_vLiLOfKSlDgFIgzZ6Rwlt9UIsrHfHmF2uOJ_a3odg8wSoLVF6Li9UvA-iOqf6Adowkp-t8hJ2USIZ1N0xK5sM7KgXgohqzxglbAqExJY6I4Dm/s1600/Screenshot-2.png&quot; height=&quot;200&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3dF9vdy1yCkvRrPGJ9-uieoCJX0EVdy-NbJ22nZlOF_-GZ4Y_ABmpC0K4WpMgCMweSQURceTif2cmCimpkdxirQIE5cPCh-g0mL4g4FddDZ3KQ15J0FtcP4isNDUOZh11xBovrOAa-map/s1600/Screenshot-3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3dF9vdy1yCkvRrPGJ9-uieoCJX0EVdy-NbJ22nZlOF_-GZ4Y_ABmpC0K4WpMgCMweSQURceTif2cmCimpkdxirQIE5cPCh-g0mL4g4FddDZ3KQ15J0FtcP4isNDUOZh11xBovrOAa-map/s1600/Screenshot-3.png&quot; height=&quot;200&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8kKmGFtg1lxVNh6IehDGO7PF-gQ7CC3khhJTIRc612WjmHP6d6eRTqVmGDL9aM-VUAkirivfSa7EVM1iTQCCZOmA052Yt-yMiOMB5yPftd8DQcJk15UV7RY3KV7hD26f3NalOmhyphenhyphenrN5HA/s1600/Screenshot-4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8kKmGFtg1lxVNh6IehDGO7PF-gQ7CC3khhJTIRc612WjmHP6d6eRTqVmGDL9aM-VUAkirivfSa7EVM1iTQCCZOmA052Yt-yMiOMB5yPftd8DQcJk15UV7RY3KV7hD26f3NalOmhyphenhyphenrN5HA/s1600/Screenshot-4.png&quot; height=&quot;200&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
I wrote a CNC program to control the PnP machine. &amp;nbsp;I stuck a pen on its Z axis, and below are photos of the result. &amp;nbsp;Pretty good so far I&#39;d say. &amp;nbsp;The first word I wrote was Gangsta., because, you know, G-Code. &amp;nbsp;After that, I had my PnP machine pen the Japanese phrase &quot;Domo arigato&quot;, leaving off the presumed &quot;Mr. Roboto&quot;.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkVhBMH7cKe75dK01N1KydAxjXrOhMmnBzp2YnG4c5pTuCHcrnrpvxtFcxpp9cDZ-eKlt628CpfexBMJ3P65h7Bfw62P5mwu0LZcJDRwXFGdTDcXf-S29vR4m3Nk7eX6FGjoqTnWDkwaDu/s1600/IMG_2092.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkVhBMH7cKe75dK01N1KydAxjXrOhMmnBzp2YnG4c5pTuCHcrnrpvxtFcxpp9cDZ-eKlt628CpfexBMJ3P65h7Bfw62P5mwu0LZcJDRwXFGdTDcXf-S29vR4m3Nk7eX6FGjoqTnWDkwaDu/s1600/IMG_2092.jpg&quot; height=&quot;320&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMvoyh-Vqhc5-zmg25flJHUodzh0yHFRGl9FGLLj91fLRdMffYq7MJTF9XRZOELtwXb5Pes9qwkvTBCOxw3VHQgONgfVKozQDrZxzGVQzYQA5ZnMv2p2DC9HGup4Pztr9U6YGH48lWHmVj/s1600/IMG_2094.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMvoyh-Vqhc5-zmg25flJHUodzh0yHFRGl9FGLLj91fLRdMffYq7MJTF9XRZOELtwXb5Pes9qwkvTBCOxw3VHQgONgfVKozQDrZxzGVQzYQA5ZnMv2p2DC9HGup4Pztr9U6YGH48lWHmVj/s1600/IMG_2094.jpg&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;Next Steps:&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
OK, so we have computer control of a 3 axis machine now, but what is left to make this a pick and place machine? &amp;nbsp;Well, quite a bit actually. &amp;nbsp;I need to tidy up the wiring, and properly mount things like the stepper drivers. &amp;nbsp;We need a method to feed the SMD tape. &amp;nbsp;A vacuum needle for picking up the parts. &amp;nbsp;An &quot;A&quot; axis for rotating the picked up part about the Z axis. &amp;nbsp;Oh, and I&#39;m planning to make this a robotic solder past dispenser too. &amp;nbsp;Machine vision is a lofty goal that I may revisit a a tertiary upgrade.&lt;br /&gt;
&lt;br /&gt;
If you have any questions or comments, feel free to leave a comment below or send me an email from the &quot;About Me&quot; section in the right pane.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/1378253169412568727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/1378253169412568727' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/1378253169412568727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/1378253169412568727'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2014/03/diy-pick-and-place-machine-part-1.html' title='DIY Pick and Place Machine - Part 1'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCCM-yvOAebv0y44B50A7vtjncesjIJz5_f-imL11knkoIDFlGn17s0IxyLNuUb8AupQ7s8PeXmgZBzW_RikvaNpZL4xjEarBA_kViO_CBQ8uooJQomPAKsB8W2Q1v9idA6fqk1e7SdI3g/s72-c/IMG_1148.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-9069721240978195951</id><published>2013-09-28T05:39:00.000-04:00</published><updated>2013-09-28T05:43:50.132-04:00</updated><title type='text'>LaTeX Airplane Checklist</title><content type='html'>The use of checklists is one of the tenets of aviation.&amp;nbsp; We have them for pre-flight inspections all the way thru shut down procedures and even emergency procedures.&amp;nbsp; Aviation checklists are so pervasive that they have even sprung up a cottage industry around their sale.&amp;nbsp; You can purchase colorful, durably laminated checklists for around $15, and you can buy iPhone/iPad or Android checklists too.&amp;nbsp; Although I am iEquipt and Android enabled, at this point I am preferring the paper checklists.&lt;br /&gt;
&lt;br /&gt;
At any rate, if you are a student pilot like myself, you may have been given a few checklists from your CFI or FBO.&amp;nbsp; And if your FBO is anything like mine, your checklist probably contains some vestigial entries from equipment long gone.&amp;nbsp; For example, the checklist I was given for my plane had checks for an autopilot system which does not exist.&amp;nbsp; It also had IFR procedures, but my plane is not currently IFR legal and I doubt it is a priority to make it such.&amp;nbsp; I found these superfluous entries distracting and they disrupted the flow of my procedures.&lt;br /&gt;
&lt;br /&gt;
Well, for better or worse I am a DIY type of guy, and so I reject the pre-made checklists - both old and new and decided to roll my own using LaTeX.&amp;nbsp; LaTeX ( pronounced latek ) is a typesetting system primarily used in technical and scientific writing.&amp;nbsp; I am pretty new to using LaTeX, but the more I use it the more I like it.&amp;nbsp; My pedagogical interest in LaTeX quickly turned utilitarian and it is rapidly filtering thru my life, both professionally and in academia.&amp;nbsp; The end result of all this is a really classy looking document with none of the formatting hassle associated with WYSIWYG editors such as MS Word or OpenOffice Text Document.&lt;br /&gt;
&lt;br /&gt;
Here is a LaTeX code snippet from my checklist. I basically just copied the checklist from my FBO, making changes where appropriate.&amp;nbsp; For example, I tried to maintain consistency in language throughout the list.&amp;nbsp; My brain is happier when I am not identifying inconsistencies in my checklists.&amp;nbsp; Having said that, if you see any typos please let me know.&amp;nbsp; I am also going to ask my CFI to double check the final checklist before we fly next.

&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt;  

\subsection{Before Takeoff - Run-Up}

 \begin{enumerate}
 
  \item Cabin Doors and Windows - \textbf{Closed \&amp;amp; Locked}
  \item Parking Brake - \textbf{Set}
  \item Flight Controls - \textbf{Free \&amp;amp; Correct}
  \item Flight Instruments - \textbf{Set}
  \item Fuel Selector Valve - \textbf{ON - Fullest Tank}
  \item Elevator Trim - \textbf{Takeoff}
  \item Mixture - \textbf{Rich or As Required}
  \item Throttle - \textbf{2000 RPM}
   \begin{enumerate}
    \item Magnetos - \textbf{Check}
    \item Carburetor Heat - \textbf{Check}
    \item Engine Instruments \&amp;amp; Ammeter - \textbf{Check}
    \item Suction Gauge - \textbf{Check 5&quot;$ \pm $0.1}
   \end{enumerate}
  \item Throttle - \textbf{Idle, then 1000 RPM}
  \item Radios - \textbf{Set}
  \item Transponder - \textbf{Set, then Altitude}
  \item Throttle Friction Lock - \textbf{Adjust}
  \item Fuel Pump - \textbf{ON}
  \item Lights - \textbf{As Required}
  \item Parking Brake - \textbf{Release}
 
 \end{enumerate}
&lt;/pre&gt;
And the result of this code output looks like this screen cap from the PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_s5aKTDXxONMa8utAkkoORwndrUzaEhAUBnDsBD-yHVdu2zS0BYZga92dcSoY90U8s3y1lUJb9kRhJlmEiwHE_jDJk4dd_z_sXWWzXQB_ZIIs9-9lvCQvafiDdY8lvndlzywBL6OCs1z_/s1600/Screen+Shot+2013-09-28+at+5.12.05+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_s5aKTDXxONMa8utAkkoORwndrUzaEhAUBnDsBD-yHVdu2zS0BYZga92dcSoY90U8s3y1lUJb9kRhJlmEiwHE_jDJk4dd_z_sXWWzXQB_ZIIs9-9lvCQvafiDdY8lvndlzywBL6OCs1z_/s320/Screen+Shot+2013-09-28+at+5.12.05+AM.png&quot; width=&quot;279&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Here is a picture overview of the checklist.&amp;nbsp; You can download a PDF checklist and the LaTeX code to make your own down further.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzfWZ9KMqcpm6LpdxzYxPT3T_F6P1hBY5rY7ObXMI9f-HE3WDAEPv9MwHHikKwZSCeRwY3_SAhPfLUTd3phXA7DQ4ZpJ-uVELO3jp3qu3EHv-6GW0WrL3mxQeAdmC54fWDdo8rkGF7PPkj/s1600/Screen+Shot+2013-09-28+at+5.23.29+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzfWZ9KMqcpm6LpdxzYxPT3T_F6P1hBY5rY7ObXMI9f-HE3WDAEPv9MwHHikKwZSCeRwY3_SAhPfLUTd3phXA7DQ4ZpJ-uVELO3jp3qu3EHv-6GW0WrL3mxQeAdmC54fWDdo8rkGF7PPkj/s320/Screen+Shot+2013-09-28+at+5.23.29+AM.png&quot; width=&quot;208&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the main advantages to having this template setup is that I can quickly make adjustments to the checklist contents.&amp;nbsp; If I need to add or clarify anything it is quick and easy and the formatting stays the same. &lt;br /&gt;
&lt;br /&gt;
If you would like a copy of the LaTeX code you can &lt;a href=&quot;https://sites.google.com/site/pemills2011/file/PA28-140_Checklist.tex?attredirects=0&amp;amp;d=1&quot;&gt;download it here&lt;/a&gt;.&amp;nbsp; You are welcome to download the output from the code aka my checklist, but I imagine you would want to customize your own checklist.&amp;nbsp; Either way, &lt;a href=&quot;https://sites.google.com/site/pemills2011/file/PA28-140_Checklist.pdf?attredirects=0&amp;amp;d=1&quot;&gt;here is the PDF checklist I made for the plane I usually fly&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/9069721240978195951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/9069721240978195951' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/9069721240978195951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/9069721240978195951'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2013/09/latex-airplane-checklist.html' title='LaTeX Airplane Checklist'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_s5aKTDXxONMa8utAkkoORwndrUzaEhAUBnDsBD-yHVdu2zS0BYZga92dcSoY90U8s3y1lUJb9kRhJlmEiwHE_jDJk4dd_z_sXWWzXQB_ZIIs9-9lvCQvafiDdY8lvndlzywBL6OCs1z_/s72-c/Screen+Shot+2013-09-28+at+5.12.05+AM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-5321551750826447590</id><published>2013-06-23T13:23:00.002-04:00</published><updated>2017-03-31T23:22:30.414-04:00</updated><title type='text'>Robotic Instagram Timelapse Video</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_oaAbLqTUQk5iI0PgxRDkzWKesb7pa_gbXoUBq2uexpJarnL3SC9jFZ6BXyLhRO2CemvDMRr9Z8bwEtLslCB1z-Dg0-TOOe3thdeep5zUr31eBXvGYiQKUh0WJbP52qfG-gYa0pfmwv6s/s1600/IMG_0204.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_oaAbLqTUQk5iI0PgxRDkzWKesb7pa_gbXoUBq2uexpJarnL3SC9jFZ6BXyLhRO2CemvDMRr9Z8bwEtLslCB1z-Dg0-TOOe3thdeep5zUr31eBXvGYiQKUh0WJbP52qfG-gYa0pfmwv6s/s320/IMG_0204.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
As you are probably already aware, Instagram has enabled video uploading.  You are limited to 3-15 second clips and can&#39;t upload previously recorded videos.  The record button in the Instagram app is non-latching, so you have to hold the button down all the while you want to record.&amp;nbsp; At the end, all of your little clips ( up to 15 seconds ) are stitched together into a video ( with sound please remember ) that you can then add a distinctly Instagram-esque filter to and upload.&lt;br /&gt;
&lt;br /&gt;
Working within these boundaries I have devised a method to make timelapse videos using a servo actuated, simulated finger to press the record button in the Instagram app at somewhat deterministic yet not entirely accurate intervals.  Let it be said that the future may hold software solutions for timelapse in instagram, but for now, I am making timelapse videos in Instagram before they are cool?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZp_NPaP9jVAGw05VGOfJHSWvuc3iTaVHQwSqLEp7ZMPyrrD9nL_HN0p696FVGHLL_T1hJ8CP2brzX1Fni9Z8fG3rOyxsH7usH2jDnivDg64QfctKtNKPR56ZsAkj6A_qbmLdIfSPE0qHY/s1600/IMG_0210.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZp_NPaP9jVAGw05VGOfJHSWvuc3iTaVHQwSqLEp7ZMPyrrD9nL_HN0p696FVGHLL_T1hJ8CP2brzX1Fni9Z8fG3rOyxsH7usH2jDnivDg64QfctKtNKPR56ZsAkj6A_qbmLdIfSPE0qHY/s320/IMG_0210.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
This project had a couple of interesting things.  For one, this was my second time using the Arduino platform for prototyping.  I had purchased an Uno R3, LCD shield and prototype shield for an upcoming project, but decided to borrow the hardware for the Instagram robot instead.  Although I am not a big fan of the abstraction that Arduino provides I was able to quickly prototype with the equipment I listed above.  From concept to build to first timelapse video took all of about 4 hours.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVP8pGgfcOEpMA9lzbxAM7OZ9RdbQ2-7x2DiaIfQ0FZBQXQTm_nhNA9FeySWE6sp7wdlm448fzP6yqZjDRY4vvPsUvnEsTYJaFmIG8PGiQvk6WOt4ebamBQbnsPrp0fFMzA0VaTY-sI2ZJ/s1600/IMG_0212.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;239&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVP8pGgfcOEpMA9lzbxAM7OZ9RdbQ2-7x2DiaIfQ0FZBQXQTm_nhNA9FeySWE6sp7wdlm448fzP6yqZjDRY4vvPsUvnEsTYJaFmIG8PGiQvk6WOt4ebamBQbnsPrp0fFMzA0VaTY-sI2ZJ/s320/IMG_0212.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above photo you can see values on the screen for sv_in which is the servo angle when the simulated finger is pressing the record button.&amp;nbsp; The variable for interval is milliseconds until the next record button press.&amp;nbsp; You can also see a &#39;P&#39; for pause, in the lower right corner which is toggled&amp;nbsp; &#39;R&#39; for run when a button is pressed.&amp;nbsp; The servo &quot; in &quot; position and interval time are adjustable by buttons on the front panel.&amp;nbsp; I guess now would be an appropriate time to mention that the record button press duration is 150 mS.&lt;br /&gt;
&lt;br /&gt;
At any rate, the other interesting part of this project was the simulated finger for pressing the record button.  I used some conductive foam, shipped with IC&#39;s jammed into the end of an Exacto knife holder.  The blade, of course was removed.  The handle of the exacto knife was then electrically tied to the negative supply of the Arduino.  This activated the screen quite well, however my first hardware design had the simulated finger &quot; swipe &quot; to come into contact with the screen aka tangentially.  The Instagram app did not respond to tangential activation and I had to redesign the servo configuration to allow more perpendicular action.&lt;br /&gt;
&lt;br /&gt;
&lt;strike&gt;I will post a video of the results as soon as Youtube snaps out of the mood its currently in.&amp;nbsp;&amp;nbsp;&lt;/strike&gt;&lt;br /&gt;
&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/gMBZZ3CaMbk?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/5321551750826447590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/5321551750826447590' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/5321551750826447590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/5321551750826447590'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2013/06/robotic-instagram-timelapse-video.html' title='Robotic Instagram Timelapse Video'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_oaAbLqTUQk5iI0PgxRDkzWKesb7pa_gbXoUBq2uexpJarnL3SC9jFZ6BXyLhRO2CemvDMRr9Z8bwEtLslCB1z-Dg0-TOOe3thdeep5zUr31eBXvGYiQKUh0WJbP52qfG-gYa0pfmwv6s/s72-c/IMG_0204.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-274254004226649704</id><published>2013-02-16T11:20:00.002-05:00</published><updated>2013-02-19T19:22:20.966-05:00</updated><title type='text'>Learning to fly and Perl for METAR Decoding</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT_lP-7XszykGsenclb9LnFexXw6RfXRP6BpPxjr3aUtf49uyNOFmtVYWSW43tFqhB3IBReNHCODZSJ1-4DOtj7Scbd_P__AyPHuDynRFRKFv97SnRWqpkSAm4ni_xJ58CtNfXswbAntYT/s1600/DSCN3883.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;137&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT_lP-7XszykGsenclb9LnFexXw6RfXRP6BpPxjr3aUtf49uyNOFmtVYWSW43tFqhB3IBReNHCODZSJ1-4DOtj7Scbd_P__AyPHuDynRFRKFv97SnRWqpkSAm4ni_xJ58CtNfXswbAntYT/s320/DSCN3883.jpeg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the ways I have been occupying myself is with flight training for a private pilot license or more correctly called a private pilot certificate.&amp;nbsp; It&#39;s been off and on lately because I have had to take some time off to focus on other projects, but next month I will be resuming at as fast of a pace as my pocketbook will allow.&amp;nbsp; Since I needed some pilot/flying related activities to keep my interest during this down time I decided to write a Perl parsing script for aviation weather reports called METAR&#39;s.&amp;nbsp; But, first how did I find myself in the left seat of an airplane for the first time?&amp;nbsp; Well, read on.&lt;br /&gt;
&lt;br /&gt;
About a year ago as a birthday present I was given a &quot;discovery flight&quot; by my parents.&amp;nbsp; A discovery flight is where a certified flight instructor sticks you in the pilot seat, guides you to take off and fly a plane&amp;nbsp; around for about an hour before landing at the airport where you took off from.&amp;nbsp; This is akin to the &quot;visitation&quot; rooms at the humane society where they let you play with the puppies and cats, all the while knowing that the puppy ( or aircraft, rather ) that you have been playing with is soon to become your highest priority.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKUm7irp7UX3T7451OfAHGvQ9-5B0ZjMhFL815hpQQctLBlXbfqoGpRE062O5Q4HiVKAv_umsZG7QcbIR9hPT5V7fuRK5FPrfCw55WmI1vm3SRKGKB9W2twHuwHbiUSdxm7rGzGXh-Psuy/s1600/Bit+Slayer_000627.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKUm7irp7UX3T7451OfAHGvQ9-5B0ZjMhFL815hpQQctLBlXbfqoGpRE062O5Q4HiVKAv_umsZG7QcbIR9hPT5V7fuRK5FPrfCw55WmI1vm3SRKGKB9W2twHuwHbiUSdxm7rGzGXh-Psuy/s320/Bit+Slayer_000627.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
That&#39;s how it happened with me anyway.&amp;nbsp; On my discovery flight I pushed the throttle forward.&amp;nbsp; We soon accelerated to 50 knots and when I pulled the yoke toward my chest, the Cessna 152 parted the runway and I became speechless; my breath had been taken thru amazement of the reality of flight.&amp;nbsp; It is one thing to understand the physics of flight and totally different to experience it.&amp;nbsp; General aviation or small aircraft flight isn&#39;t anything like the experience of large commercial airplanes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIYyYaKrwsSj7g87qfxsLrNYj1aMpXtIJVI61jaTEmTVYXm-ymQdDl1tRoiCbVXvnO0XslLiHILecAD5x5NXsFbURw0vbN6hh643zyr6LtznairPgyr2Gu0287rWxUI3JoeELUNnCiNaF_/s1600/Bit+Slayer_000593.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIYyYaKrwsSj7g87qfxsLrNYj1aMpXtIJVI61jaTEmTVYXm-ymQdDl1tRoiCbVXvnO0XslLiHILecAD5x5NXsFbURw0vbN6hh643zyr6LtznairPgyr2Gu0287rWxUI3JoeELUNnCiNaF_/s320/Bit+Slayer_000593.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In fact, I was so taken by this flying that I decided to continue flight lessons, working towards a private pilot certificate.&amp;nbsp; As I mentioned above I have experienced quite a few training delays along the way including taking time off to start &lt;a href=&quot;http://lakesideelectronics.net/&quot;&gt;Lakeside Electronics, LLC&lt;/a&gt;, so in the interim I wanted to come up with some activities related to flying. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_sAsBOuF8JXa0T_By1k1qZR0Ew_S8pZvQN1uC_3bJXqIJS7ZrfeN5rHbMyky9mHA5L6RFG3j5Jsk7cKJQtBCOjk3anyhyphenhyphenHic3Qwl_UxGxTmrELR4DUBviFSGbxg14hj3geY0nAGKNY1S4/s1600/Bit+Slayer_000630.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_sAsBOuF8JXa0T_By1k1qZR0Ew_S8pZvQN1uC_3bJXqIJS7ZrfeN5rHbMyky9mHA5L6RFG3j5Jsk7cKJQtBCOjk3anyhyphenhyphenHic3Qwl_UxGxTmrELR4DUBviFSGbxg14hj3geY0nAGKNY1S4/s320/Bit+Slayer_000630.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHUPAsZaeBMvbyJvMbeWzPEM4X8BIdpeiT7FnsHfZubGjTd7SJlgb6WU42CcbNaMldeEAJYvnnh5Kraqzeb6F6INILHzJre2scysqbMIN2SbfoqZgqgtsn33IoKvgUxL65ez_mBOBKeetD/s1600/DSCN3888.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;125&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHUPAsZaeBMvbyJvMbeWzPEM4X8BIdpeiT7FnsHfZubGjTd7SJlgb6WU42CcbNaMldeEAJYvnnh5Kraqzeb6F6INILHzJre2scysqbMIN2SbfoqZgqgtsn33IoKvgUxL65ez_mBOBKeetD/s320/DSCN3888.jpeg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
Early on in my flight training I recognized the impact and importance of weather on general aviation or I should say, aviation in general.&amp;nbsp; There are even aviation specific weather reports such as METARs that pilots access for preflight weather planning.&amp;nbsp; You can look up a report for an airport near you using their ICAO station identifier code here &lt;a href=&quot;http://aviationweather.gov/adds/metars/&quot;&gt;http://aviationweather.gov/adds/metars/&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Here is an example METAR string from the airport I fly out of in Ann Arbor, Michigan: &lt;span style=&quot;font-family: Monospace,Courier;&quot;&gt;KARB 021653Z 34015G23KT 10SM OVC033 04/M03 A2996 RMK AO2 SLP150 T00441033.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Monospace,Courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
As you read the above report you can probably make out what some of the sub-strings mean.&amp;nbsp; For example, before researching I postulated that &quot; OVC033 &quot; meant overcast, but I did not fathom that the second half was referring to cloud height in 100&#39;s of feet.&amp;nbsp; Could &quot; SLP150 &quot; be something to do with slip?&amp;nbsp; Nope, Sea Level Pressure - in tens, units and tenths to be added to 1000 hPa no less.&amp;nbsp; In other words, 15.0 hPa + 1000 hPa = 1015.0 hPa.&amp;nbsp; However, if the string were a high number like SLP965 you would add that value ( 96.5hPa ) to 900 hPa instead for a reading of 996.5 hPa.&amp;nbsp; Yes, its a strange little protocol...&lt;br /&gt;
&lt;br /&gt;
Almost certainly I needed to study up on how to interpret this METAR report.&amp;nbsp; Fortuitously, it would seem, I had concurrently begun learning the programming language Perl.&amp;nbsp; A perfect storm, it would seem, to write a Perl based parsing script for METAR weather reports and display these data in a more human readable format was afoot.&lt;br /&gt;
&lt;br /&gt;
The goal of course is two fold.&amp;nbsp; A) To learn Perl and B) to memorize a method of METAR interpretation for when I need to read the raw string.&amp;nbsp; Quite obviously there are numerable ways to accomplish these tasks.&amp;nbsp; There also exists METAR decoders and even a &lt;a href=&quot;http://jeremy.zawodny.com/perl/Geo-METAR/&quot;&gt;Perl Module&lt;/a&gt; for this task, but this would violate my goals as set forth and thus decided to write my own Perl METAR parsing script. &lt;br /&gt;
&lt;br /&gt;
When I turned to Google for information about the METAR protocol I found this page &lt;a href=&quot;http://www.met.tamu.edu/class/metar/quick-metar.html&quot;&gt;http://www.met.tamu.edu/class/metar/quick-metar.html&lt;/a&gt; helpful indeed.&amp;nbsp; If you recall, we discussed the sub-string for sea level pressure above.&amp;nbsp; There are too, other little gotchas along the way when trying to programmatically decode METAR reports.&amp;nbsp; For instance, some data are always reported, some data are optionally reported and within the raw string as a whole, the sometimes reported data is intermingled with the always reported data.&amp;nbsp; I also have reason to believe that the information contained in the remarks ( RMK ) section can partially exist as plain English, and so that is where my parsing stops - before we get to the optional remarks.&amp;nbsp; I may look into further coding of the remarks, but for now I am satisfied with the script.&lt;br /&gt;
&lt;br /&gt;
This &lt;a href=&quot;http://en.wikipedia.org/wiki/Perl&quot;&gt;Perl&lt;/a&gt; script uses &lt;a href=&quot;http://en.wikipedia.org/wiki/CURL&quot;&gt;Curl&lt;/a&gt; to fetch a &lt;a href=&quot;http://en.wikipedia.org/wiki/METAR&quot;&gt;METAR&lt;/a&gt; string from weather.noaa.gov.&amp;nbsp; Then it parses the string, does some formatting and a couple of calculations for Celsius to Fahrenheit conversion then writes the data to a text file.&amp;nbsp; Using a program on my macbook called &lt;a href=&quot;http://projects.tynsoe.org/en/geektool/&quot;&gt;GeekTools&lt;/a&gt; I am able to display the contents of the Perl generated text file on my desktop.&amp;nbsp; It looks like this on my desktop.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja2Le5qxEnoSUq3jCeSHrCwwJYyIvRbjCpxLUzG6ZPnUseXbLsJ0ieNUiq0h6pO84Iy8Dni6qFuGtV3EMn3EZwg-dWE0YVHztl-VSS44FdzgodZ-tOmeuyN6-QLcZkSUx52W00gEc5B1Xe/s1600/Screen+Shot+2013-02-09+at+11.32.48+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja2Le5qxEnoSUq3jCeSHrCwwJYyIvRbjCpxLUzG6ZPnUseXbLsJ0ieNUiq0h6pO84Iy8Dni6qFuGtV3EMn3EZwg-dWE0YVHztl-VSS44FdzgodZ-tOmeuyN6-QLcZkSUx52W00gEc5B1Xe/s320/Screen+Shot+2013-02-09+at+11.32.48+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Before continuing, I must say that you shouldn&#39;t use this script for flight planning and also, that it is largely untested.&amp;nbsp; Please report any bugs that you may find.&amp;nbsp; Part of my ongoing memorization of METAR syntax is to read the string and my scripts output and look for errors. &lt;br /&gt;
&lt;br /&gt;
If you want to play along, install Geektools from the link in the previous paragraph.&amp;nbsp; You will also want to copy the Perl script from below.&amp;nbsp; Save the Perl script in a folder somewhere on your computer.&amp;nbsp; I named my folder &quot;metar&quot; and located in ~/Documents/Weather/.&amp;nbsp; Start up GeekTools and configure like so...&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglTjs0eZG9i6GD0IWU3tREqE0fe15FM1XbUtiSyowmv0d1AwF1OIRrKTNCQlu4eVt13zxvVikFf9IqyKu0gXndqpdV5hC72K-fh8QtUt-7OVOK7UF3dZg2JtS7LJasmYHOdcIoP72C2OVS/s1600/Screen+Shot+2013-02-11+at+10.34.35+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;217&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglTjs0eZG9i6GD0IWU3tREqE0fe15FM1XbUtiSyowmv0d1AwF1OIRrKTNCQlu4eVt13zxvVikFf9IqyKu0gXndqpdV5hC72K-fh8QtUt-7OVOK7UF3dZg2JtS7LJasmYHOdcIoP72C2OVS/s320/Screen+Shot+2013-02-11+at+10.34.35+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The command in the above screen cap is &quot;cat ~/Documents/Weather/metar/metar_datafile.txt&quot; without quotes.&amp;nbsp; Change this as required for your particular path and file name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is the code.&amp;nbsp; It is definitely a work in progress.&amp;nbsp; Every time I spot an error I correct it but I haven&#39;t seen any errors in a while now.&amp;nbsp; Let me know if you do.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt;  
#!/usr/bin/perl -w

# this program gathers METAR data from NOAA, decodes it and does some formatting before writing the data to a text file
# this file is monitored and displayed on my macbook desktop using GeekTools
#
# Under no circumstances should you use this for flight planning.  Also, no guarantee is made that this software even works at all.
#
# Below is an example of the metar_datafile.txt after the curl command.  There are 2 lines as you can see.
#
# 2012/10/27 11:53
# KARB 300153Z AUTO 35018G34KT 10SM OVC095 06/M05 A2978 RMK AO2 PK WND 35034/0144 SLP090 T00561050
#
#

#while( 1 ){
my $ICAO_STATION = &quot;KARB&quot;; # airport nearby

my $raw_metar_data = `curl --silent http://weather.noaa.gov/pub/data/observations/metar/stations/$ICAO_STATION.TXT`;

chomp $raw_metar_data;

my  ( $date_time, $current_metar_line ) = split /\n/,$raw_metar_data;

chomp $date_time;
chomp $current_metar_line;

# put the METAR string into an array 
my @metar_array = split / /, $current_metar_line;
my $array_index = 0;

open (MYFILE, &#39;&gt;metar_datafile.txt&#39;); #open for write &gt;&gt; would be for apend

#
# print the full array we are about to decode separated by spaces
print MYFILE &quot;@metar_array\n&quot;;

#
# print the station ID as read
print MYFILE &quot;ICAO Station ID: $metar_array[ $array_index ]\n&quot;;
++$array_index;

#
# print the day of the metar transmission
my $day = substr( $metar_array[ $array_index ], 0, 2 );
print MYFILE &quot;Day: $day&quot;;

# print ^st, ^nd, ^rd or ^th at the end of the date just for a bit of fun
#my $right_digit = substr( $day, 1, 1 );

#$day = &quot;3&quot;;



if( ( scalar $day == 1 ) || ( scalar $day == 21 ) || ( scalar $day == 31 ) ){
 print MYFILE &quot;st\n&quot;;
}
elsif( ( scalar $day == 2 ) || ( scalar $day == 22 ) ){
 print MYFILE &quot;nd\n&quot;;
}
elsif( ( scalar $day == 3 ) || ( scalar $day == 23 ) ){
 print MYFILE &quot;rd\n&quot;;
}else{
 print MYFILE &quot;th\n&quot;;
}


#
# print the time of the metar transmission in zulu time aka 0 GMT
my $zulu_hours = substr( $metar_array[ $array_index ], 2, 2 );
my $zulu_minutes = substr( $metar_array[ $array_index ], 4, 2 );
print MYFILE &quot;Report Time ( Zulu ): $zulu_hours:$zulu_minutes\n&quot;;

++$array_index;


#
# decode and print report type ( auto or corrected or none )
#
# test String
# $metar_array[ $array_index ] = &quot;COR&quot;;


if( $metar_array[ $array_index ] eq &quot;AUTO&quot; ){
 print MYFILE &quot;Report Autonomy: Automatic - No human intervention.\n&quot;;
 ++$array_index;
 }
elsif( $metar_array[ $array_index ] eq &quot;COR&quot; ){
 print MYFILE &quot;Report Autonomy: Corected observations.\n&quot;;
 ++$array_index;
 } 
else{
 print MYFILE &quot;Report Autonomy: Human observer or Automatic with human oversight.\n&quot;;
}


#
# decode and print wind data

print MYFILE &quot;Wind Condition: &quot;;

# the first three characters are either VBR or they contain wind direction
my $wind_direction = substr( $metar_array[ $array_index ], 0, 3 );

# the next two characters always contain wind speed
my $wind_speed = substr( $metar_array[ $array_index ], 3, 2 );

if( $wind_direction eq &quot;VBR&quot; ){
 print MYFILE &quot;Direction variable at $wind_speed knots.\n&quot;;
 ++$array_index;
}
# else if the string contains a &#39;V&#39; for variable wind over 6 knots...
elsif( $metar_array[ $array_index ] =~ /V/ ){
 print MYFILE &quot;Wind from $wind_direction degrees at $wind_speed knots - &quot;;
 my $dir1 = substr( $metar_array[ $array_index ], 9, 3 );
 my $dir2 = substr( $metar_array[ $array_index ], 13, 3 );
 print MYFILE &quot;Variable between $dir1 and $dir2 degrees.\n&quot;;
 ++$array_index;
} 
# else if the string contains a &#39;G&#39; for gust
elsif( $metar_array[ $array_index ] =~ /G/ ){
 print MYFILE &quot;Wind from $wind_direction degrees at $wind_speed knots - &quot;;
 my $gust_speed = substr( $metar_array[ $array_index ], 6, 2 );
 print MYFILE &quot;Gusts to $gust_speed knots.\n&quot;;
 ++$array_index; 
}
else{
 print MYFILE &quot;Wind from $wind_direction degrees at $wind_speed knots.\n&quot;;
 ++$array_index;
}


#
# decode and print visibility

print MYFILE &quot;Visibility: &quot;;

# remove &quot;SM&quot; from the end of the string leaving the visibility in statute miles
my $visibility = $metar_array[ $array_index ];
chop $visibility;
chop $visibility;

# if the string still contains an &#39;M&#39; after the chops there is a special case
if( $visibility =~ /M/ ){
 print MYFILE &quot;Less than 1/4 statute miles.\n&quot;;
} 
elsif( $visibility eq 9999 ){
 print MYFILE &quot;Greater than maximum recorded value.\n&quot;;
}
else{
 print MYFILE &quot;$visibility statute miles.\n&quot;;
}
++$array_index;



#
# decode and print runway visual range if reported
# this string should contain a forward slash if it contains runway visual data
#
# test string
# $metar_array[ $array_index ] = &quot;R16/P20000VM211FT&quot;;

if( $metar_array[ $array_index ] =~ /\// ){
 
 print MYFILE &quot;Runway Visual Range: &quot;;
 
 my( $runway, $range ) = split /\//, $metar_array[ $array_index ];
 
 # remove the &#39;R&#39; from the runway number
 $runway =~ s/.//;
 
 # remove &quot;FT&quot; from the range(s)
 chop $range;
 chop $range;
 
 # there is a &#39;V&#39; in $range_a if the visual range is variable
 if( $range =~ /V/ ){
  my( $range_a, $range_b ) = split /V/, $range;
  print MYFILE &quot;Runway $runway has a visual range between &quot;;
  
  # check for the M or P modifier
  if( $range_a =~ /M/ ){
   #remove the &#39;M&#39;
   $range_a =~ s/.//;
   print MYFILE &quot;less than $range_a and &quot;;
  }
  elsif( $range_a =~ /P/ ){
   # remove the &#39;P&#39;
   $range_a =~ s/.//;
   print MYFILE &quot;greater than $range_a and &quot;;
  }
  else{
   print MYFILE &quot;$range_a and &quot;;
  }
  
  if( $range_b =~ /M/ ){
   #remove the &#39;M&#39;
   $range_b =~ s/.//;
   print MYFILE &quot;less than $range_b feet.\n&quot;;
  }
  elsif( $range_b =~ /P/ ){
   # remove the &#39;P&#39;
   $range_b =~ s/.//;
   print MYFILE &quot;greater than $range_b feet.\n&quot;;
  }
  else{
   print MYFILE &quot;$range_b feet.\n&quot;;
  }
  
  
  
 }
 else{
  print MYFILE &quot;Runway $runway has a visual range of &quot;;
  
  # check for the M or P modifier
  if( $range =~ /M/ ){
   #remove the &#39;M&#39;
   $range =~ s/.//;
   print MYFILE &quot;less than $range feet.\n&quot;;
  }
  elsif( $range =~ /P/ ){
   # remove the &#39;P&#39;
   $range =~ s/.//;
   print MYFILE &quot;greater than $range feet.\n&quot;;
  }
  else{
   print MYFILE &quot;$range feet.\n&quot;;
  }
    
 }
 ++$array_index;
}



#
# decode and print weather phenomena if it exists
#
# test string
#$metar_array[ $array_index ] = &quot;+RAPRTS-DRPL&quot;;

my $weather_phenom = $metar_array[ $array_index ];

# if the current string does not contain cloud cover data then it is weather phenomena

if( $weather_phenom !~ &quot;SCK&quot; &amp; $weather_phenom !~ &quot;CLR&quot; &amp; $weather_phenom !~ &quot;FEW&quot; &amp; $weather_phenom !~ &quot;SCT&quot; &amp;
 $weather_phenom !~ &quot;BKN&quot; &amp; $weather_phenom !~ &quot;OVC&quot; &amp; $weather_phenom !~ &quot;VV&quot; )
 {
  print MYFILE &quot;Weather Phenomena: &quot;;
  
  my $string_index = 0;
  my $string_length = length $weather_phenom;
  
  while( $string_index &lt; $string_length ){
  
   my $sub_string = substr( $weather_phenom, $string_index, 2 ); 
   
   if( $sub_string =~ /\+/ ){    
    print MYFILE &quot;Heavy &quot;;
    ++$string_index;
   }
   elsif( $sub_string =~ /\-/ ){
    print MYFILE &quot;Light &quot;;
    ++$string_index;
   }
   #else{
   # print MYFILE &quot;Moderate &quot;;
   #}
   
   $sub_string = substr( $weather_phenom, $string_index, 2 );
   
   # hash lookup
   
   %weather_type = ( &quot;VC&quot; =&gt; &quot;Vicinity &quot;,
        &quot;MI&quot; =&gt; &quot;Shallow &quot;,
        &quot;PR&quot; =&gt; &quot;Partial &quot;,
        &quot;BC&quot; =&gt; &quot;Patches &quot;,
        &quot;DR&quot; =&gt; &quot;Low Drifting &quot;,
        &quot;BL&quot; =&gt; &quot;Blowing &quot;,
        &quot;SH&quot; =&gt; &quot;Showers &quot;,
        &quot;TS&quot; =&gt; &quot;Thunderstorm &quot;,
        &quot;FZ&quot; =&gt; &quot;Freezing &quot;,
        &quot;DZ&quot; =&gt; &quot;Drizzle &quot;,
        &quot;RA&quot; =&gt; &quot;Rain &quot;,
        &quot;SN&quot; =&gt; &quot;Snow &quot;,
        &quot;SG&quot; =&gt; &quot;Snow grains &quot;,
        &quot;IC&quot; =&gt; &quot;Ice crystals &quot;,
        &quot;PL&quot; =&gt; &quot;Ice Pellets &quot;,
        &quot;GR&quot; =&gt; &quot;Hail &quot;,
        &quot;GS&quot; =&gt; &quot;Small hail &quot;,
        &quot;UP&quot; =&gt; &quot;Unknown &quot;,
        &quot;BR&quot; =&gt; &quot;Mist &quot;,
        &quot;FG&quot; =&gt; &quot;Fog &quot;,
        &quot;FU&quot; =&gt; &quot;Smoke &quot;,
        &quot;VA&quot; =&gt; &quot;Volcanic ash&quot;,
        &quot;DU&quot; =&gt; &quot;Widespread dust &quot;,
        &quot;SA&quot; =&gt; &quot;Sand &quot;,
        &quot;HZ&quot;  =&gt; &quot;Haze &quot;,
        &quot;PY&quot; =&gt; &quot;Spray &quot;,
        &quot;PO&quot; =&gt; &quot;Well developed dust/sand swirls &quot;,
        &quot;SQ&quot; =&gt; &quot;Squalls &quot;,
        &quot;FC&quot; =&gt; &quot;Funnel clouds including tornadoes or waterspouts &quot;,
        &quot;SS&quot; =&gt; &quot;Sandstorm &quot;,
        &quot;DS&quot;  =&gt;  &quot;Duststorm &quot;,
        );
        
   print MYFILE &quot;$weather_type{ $sub_string }&quot;;
   
   # see if there is another weather code
   $string_index += 2;
  }
  
  print MYFILE &quot;\n&quot;;
  ++$array_index;
}


#
# decode and print the cloud cover data ( always present )
#
# test string
#$metar_array[ $array_index ] = &quot;BKN120&quot;;

print MYFILE &quot;Cloud cover: &quot;;

# if there are multiple cloud conditions which can occur...
while( $metar_array[ $array_index ] =~ /(SCK|CLR|FEW|SCT|BKN|OVC|VV)/ ){
my $sky = 0;
my $cloud_height = 0;
 

if( $metar_array[ $array_index ] =~ /VV/ ){

 $sky = substr( $metar_array[ $array_index ], 0, 2 );
 $cloud_height = substr( $metar_array[ $array_index ], 2, 3 );
}
else{

 $sky = substr( $metar_array[ $array_index ], 0, 3 );
 $cloud_height = substr( $metar_array[ $array_index ], 3, 3 );
}


%sky_condition = ( &quot;SCK&quot; =&gt; &quot;Sky Clear &quot;,
     &quot;CLR&quot; =&gt; &quot;Clear sky&quot;,
     &quot;FEW&quot; =&gt; &quot;Few clouds &quot;,
     &quot;SCT&quot; =&gt; &quot;Scattered clouds &quot;,
     &quot;BKN&quot; =&gt; &quot;Broken clouds &quot;,
     &quot;OVC&quot; =&gt; &quot;Overcast clouds &quot;,
     &quot;VV&quot; =&gt; &quot;Vertical visibility &quot;,
     );
     
print MYFILE &quot;$sky_condition{ $sky }&quot;;

# if $sky has clouds in it then report the cloud height.
# if skies are clear, do not report cloud height

if( $sky =~ /(FEW|SCT|BKN|OVC|VV)/ ){
# cloud height is given in hundreds of feet
$cloud_height *= 100;

print MYFILE &quot; at $cloud_height feet. &quot;;
}
++$array_index;
}   

#
# decode and print the temperature and dewpoint ( always present )

my( $temperature_c, $dewpoint_c ) = split /\//, $metar_array[ $array_index ];

# if it is a negative number
if( $temperature_c =~ /M/ ){
 # remove the &#39;M&#39; from the temperature
 $temperature_c =~ s/.//;
 $temperature_c *= -1; # and make it a negative number
}

if( $dewpoint_c =~ /M/ ){
 # remove the &#39;M&#39; from the dewpoint
 $dewpoint_c =~ s/.//;
 $dewpoint_c *= -1; # and make it a negative number
}

my $temperature_f = $temperature_c * 1.8 + 32;
my $dewpoint_f = $dewpoint_c * 1.8 + 32;

print MYFILE &quot;\nTemperature: $temperature_c degrees C / Dewpoint: $dewpoint_c degrees C.\n&quot;;
print MYFILE &quot;Temperature: $temperature_f degrees F / Dewpoint: $dewpoint_f degrees F.\n&quot;;

++$array_index;


#
# decode and print atmospheric pressure ( always present )
#
# test_string
#$metar_array[ $array_index ] = &quot;Q1234&quot;; 
#$metar_array[ $array_index ] = &quot;A1234&quot;; 

my $atm = $metar_array[ $array_index ];

# if our pressure is reported in mb aka hPa
if(  $atm =~ /Q/ ){

 # remove the &#39;Q&#39; from the pressure
 $atm =~ s/.//;
 print MYFILE &quot;Atmospheric Pressure: $atm hPa\n&quot;;

}

# if our pressure is reported in mb aka hPa
elsif(  $atm =~ /A/ ){

 # remove the &#39;A&#39; from the pressure
 $atm =~ s/.//;
 
 my $whole_inhg = substr( $atm, 0, 2 );
 my $frac_inhg = substr( $atm, 2, 2 );
 
 print MYFILE &quot;Atmospheric Pressure: $whole_inhg.$frac_inhg inHg\n&quot;;

}

++$array_index;



#
# decode and print


close (MYFILE); 

#sleep( 60 );
#}






















&lt;/pre&gt;
&lt;br /&gt;
Ok, onward and upward.&amp;nbsp; Clear for takeoff.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/274254004226649704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/274254004226649704' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/274254004226649704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/274254004226649704'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2013/02/learning-to-fly-and-perl-for-metar.html' title='Learning to fly and Perl for METAR Decoding'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT_lP-7XszykGsenclb9LnFexXw6RfXRP6BpPxjr3aUtf49uyNOFmtVYWSW43tFqhB3IBReNHCODZSJ1-4DOtj7Scbd_P__AyPHuDynRFRKFv97SnRWqpkSAm4ni_xJ58CtNfXswbAntYT/s72-c/DSCN3883.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-4455801260032177713</id><published>2012-09-04T09:19:00.000-04:00</published><updated>2012-09-04T09:19:15.873-04:00</updated><title type='text'>Thor - A Programmable Brake Light Modulator</title><content type='html'>I have been rather busy developing products for my new company &lt;a href=&quot;http://lakesideelectronics.net/&quot;&gt;Lakeside Electronics, LLC&lt;/a&gt; and as such, haven&#39;t had much time to post anything in the way of projects over here.&amp;nbsp; This is OK however, because despite the massive amount of work involved in bringing a product like &lt;a href=&quot;http://lakesideelectronics.net/products-page/product-category/thor-a-programmable-brake-light-modulator/&quot;&gt;Thor&lt;/a&gt; to market, it turns out to be pretty fun too.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Of course, I still have a few irons in the hobby fire, and with Halloween coming up there are bound to be some scary, or at a minimum, vaguely direful ideas cropping up in my yet-to-be-zombified mind.&amp;nbsp; But, first, I have some microcontrollers to program for a Boy Scout Troop.&amp;nbsp; I was recently contacted by (them) and I am quite pleased to help them out making&lt;a href=&quot;http://petemills.blogspot.com/2011/08/halloween-spooky-eyes.html&quot;&gt; Halloween Spooky Eyes&lt;/a&gt;.&amp;nbsp; Anytime someone is interested in learning new things I think it is fantastic.&lt;br /&gt;
&lt;br /&gt;
Ok, so back to &lt;a href=&quot;http://lakesideelectronics.net/products-page/product-category/thor-a-programmable-brake-light-modulator/&quot;&gt;Thor - A Programmable Brake Light Modulator&lt;/a&gt; and Lakeside Electronics.&amp;nbsp; If you have been reading my recent posts you are probably already aware of what a &lt;a href=&quot;http://lakesideelectronics.net/technology/&quot;&gt;brake light modulator is&lt;/a&gt;.&amp;nbsp; If you have any feedback, &lt;a href=&quot;http://lakesideelectronics.net/about-us/&quot;&gt;I&#39;d like to hear it&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
And finally here is the video for Thor.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/fjrDrNV6ZOs?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/4455801260032177713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/4455801260032177713' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/4455801260032177713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/4455801260032177713'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2012/09/thor-programmable-brake-light-modulator.html' title='Thor - A Programmable Brake Light Modulator'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-8726127512117153426</id><published>2012-08-01T21:20:00.000-04:00</published><updated>2012-08-01T21:26:04.496-04:00</updated><title type='text'>More Flashing Brake Lights</title><content type='html'>It seems like summer is the season for brake light flashers and Greg, a reader of &lt;a href=&quot;http://petemills.blogspot.com/&quot;&gt;Pete&#39;s Blog&lt;/a&gt; just emailed me to show me what he has been up to.&amp;nbsp; After reading my original post &lt;a href=&quot;http://petemills.blogspot.com/2012/04/tenty-led-brake-lights.html&quot;&gt;Tenty LED Brake Lights&lt;/a&gt; which is a brake light modulator and LED light engine integrated onto perf board, Greg set out to make a version for his Yamaha V-Star 1100.&lt;br /&gt;
&lt;br /&gt;
I&#39;m impressed with Greg&#39;s craftsmanship which you can see in the photos below, but what you can&#39;t see is that he used an Arduino to program the ATTiny85 with the original code which can be &lt;a href=&quot;http://petemills.blogspot.com/2012/04/tenty-led-brake-lights.html&quot;&gt;found here.&lt;/a&gt;&amp;nbsp; This is cool because if you have an Arduino laying around, but no programmer, you can still make a modulating LED brake light for yourself.&amp;nbsp; Greg said the following links were useful to him in using his Arduino as a programmer &lt;a href=&quot;http://hlt.media.mit.edu/?p=1229&quot;&gt;http://hlt.media.mit.edu/?p=1229&lt;/a&gt; and &lt;a href=&quot;http://hlt.media.mit.edu/?p=1695&quot;&gt;http://hlt.media.mit.edu/?p=1695&lt;/a&gt; but ended up not changing the default 1 Mhz clock on the ATTiny85 and instead changed the delay between flashes in the code from 25 mS to 75 milliseconds.&lt;br /&gt;
&lt;br /&gt;
Have a look at video and pics&amp;nbsp; below to see for yourself how cool Greg&#39;s flashing LED brake light turned out.&amp;nbsp; I really like the pattern the LED&#39;s make on the tail light lens.&amp;nbsp; If you have any pictures or video of a project you have made with the help of Pete&#39;s blog, send me an email, I&#39;d like to see!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/ElhI2xmy4HY?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYai1X8otQ3RDyaENeb1-tnjy-mpMBRxgvw3JkwSKZtG2nxwHYdcZtJdyqFvbQejsr-cWkTWk9LjQ0QpxOTmF5VrznMKhZ-6sn0ewbkI_nWIFSRhIM6-8HxpUdQlVx5sBIg53gbw9wtyZt/s1600/SAM_3283.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYai1X8otQ3RDyaENeb1-tnjy-mpMBRxgvw3JkwSKZtG2nxwHYdcZtJdyqFvbQejsr-cWkTWk9LjQ0QpxOTmF5VrznMKhZ-6sn0ewbkI_nWIFSRhIM6-8HxpUdQlVx5sBIg53gbw9wtyZt/s320/SAM_3283.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3Z2vI6ooLYcl0gpbD-9hTFlYZi_chawWh03N8EjGtKvt7AvTmeaLhB3xjncA4ookFEjZpZ9wFe4zVzi7NmxV2PmHsgIJFoWSje93UhRy0oZsEW974uzKHWNb5M3dOQpmP_3DKtki9MEog/s1600/SAM_3281.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3Z2vI6ooLYcl0gpbD-9hTFlYZi_chawWh03N8EjGtKvt7AvTmeaLhB3xjncA4ookFEjZpZ9wFe4zVzi7NmxV2PmHsgIJFoWSje93UhRy0oZsEW974uzKHWNb5M3dOQpmP_3DKtki9MEog/s320/SAM_3281.JPG&quot; width=&quot;320&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUT-IBJh7BrLTlDyQijD8T-TgFrg8VSEaQAafga9oMSb8OyLR-r_UrHbRe-F4DtPiSCPzd0Sbpb3yARprhN7q1eHntJPs4daD-yYow1O00e1RC3gEmxp9Q55c4YBabFHqPUQ7nh5gbiuo5/s1600/SAM_3352.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUT-IBJh7BrLTlDyQijD8T-TgFrg8VSEaQAafga9oMSb8OyLR-r_UrHbRe-F4DtPiSCPzd0Sbpb3yARprhN7q1eHntJPs4daD-yYow1O00e1RC3gEmxp9Q55c4YBabFHqPUQ7nh5gbiuo5/s320/SAM_3352.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjua78QsCtrt2Tn_tXQAY_jWPi_QnticwK0rPAttWbDwLgJKsSL2qnayXUONOKBdArUEw-cJO2LrBF_tQAt-Jg8XAFEYCnrEpvWS5MRd3sgGTnrmuZQX7NgR6P0lTThaeQBAY4Z_FERdyZh/s1600/SAM_3282.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjua78QsCtrt2Tn_tXQAY_jWPi_QnticwK0rPAttWbDwLgJKsSL2qnayXUONOKBdArUEw-cJO2LrBF_tQAt-Jg8XAFEYCnrEpvWS5MRd3sgGTnrmuZQX7NgR6P0lTThaeQBAY4Z_FERdyZh/s320/SAM_3282.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcbUY6Jb-nno9-jCYT0Ibpl9p1buCylycpogxYj3u0hkYQh5rrz-LwJsK-wwcHH3MGZkt_Xc82v8HUzLgtNZxOB-Hl2TFNSsAc9K6Py1KEAHkw6QQDoGpaONjneGqCjLmCQgzaBc01DzGN/s1600/SAM_3284.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcbUY6Jb-nno9-jCYT0Ibpl9p1buCylycpogxYj3u0hkYQh5rrz-LwJsK-wwcHH3MGZkt_Xc82v8HUzLgtNZxOB-Hl2TFNSsAc9K6Py1KEAHkw6QQDoGpaONjneGqCjLmCQgzaBc01DzGN/s320/SAM_3284.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGNSqy-M1wL1NYWXEQlz9eqyNpEJ6t2Ei8T2HkEqx5KGlH5ic1KfiHspJbOOZqwLkqr7LML6edLoIuf_Y7l82s97NG_XHgBzXsOSEqlsZR1-96E1cs8E8GB0pHfUdMTNSVnhAc4Jguizm-/s1600/SAM_3353.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGNSqy-M1wL1NYWXEQlz9eqyNpEJ6t2Ei8T2HkEqx5KGlH5ic1KfiHspJbOOZqwLkqr7LML6edLoIuf_Y7l82s97NG_XHgBzXsOSEqlsZR1-96E1cs8E8GB0pHfUdMTNSVnhAc4Jguizm-/s320/SAM_3353.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisxjypcsbeicOwyWf3fulhrED-vB6tLMfc4__1ZBI9xdMqQ1daJ8bNdtPdx0i1vuen7XZ9I8EGeNZEytE0-Bx-EKr1F2-T6dQle8sjUP-4mF4EL8epcKlr2TOmp2570ZOs7i2qfgeR3if6/s1600/SAM_3354.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisxjypcsbeicOwyWf3fulhrED-vB6tLMfc4__1ZBI9xdMqQ1daJ8bNdtPdx0i1vuen7XZ9I8EGeNZEytE0-Bx-EKr1F2-T6dQle8sjUP-4mF4EL8epcKlr2TOmp2570ZOs7i2qfgeR3if6/s320/SAM_3354.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifwGDeoiQLw-U5jsWR_1xov8xC_89d3frUlUevxl0PfrlchGjaiTtT1fjFM2hprVRzbnmjZbkYJ_aEle-USAS_zhR7gG7DQGgYrUb43StvtvmMs9bADVzh_RB0Zpd5NpsrGPPF7XVnNQQy/s1600/SAM_3355.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifwGDeoiQLw-U5jsWR_1xov8xC_89d3frUlUevxl0PfrlchGjaiTtT1fjFM2hprVRzbnmjZbkYJ_aEle-USAS_zhR7gG7DQGgYrUb43StvtvmMs9bADVzh_RB0Zpd5NpsrGPPF7XVnNQQy/s320/SAM_3355.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/8726127512117153426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/8726127512117153426' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/8726127512117153426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/8726127512117153426'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2012/08/more-flashing-brake-lights.html' title='More Flashing Brake Lights'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYai1X8otQ3RDyaENeb1-tnjy-mpMBRxgvw3JkwSKZtG2nxwHYdcZtJdyqFvbQejsr-cWkTWk9LjQ0QpxOTmF5VrznMKhZ-6sn0ewbkI_nWIFSRhIM6-8HxpUdQlVx5sBIg53gbw9wtyZt/s72-c/SAM_3283.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-8413473698264539313</id><published>2012-07-25T08:43:00.002-04:00</published><updated>2012-07-25T10:02:42.341-04:00</updated><title type='text'>Betelgeuse Brake Light flasher by Lakeside Electronics, LLC</title><content type='html'>It&#39;s been a couple months since I have posted anything and that&#39;s because I&#39;ve been hard at work &lt;a href=&quot;http://lakesideelectronics.net/products-page/product-category/betelguese-a-programmable-led-brake-lamp/&quot;&gt;developing a product&lt;/a&gt; and starting a company called &lt;a href=&quot;http://lakesideelectronics.net/&quot;&gt;Lakeside Electronics, LLC&lt;/a&gt;.&amp;nbsp; The first product available thru Lakeside Electronics is a brake light flasher to add conspicuity to motorcycles primarily, but also cars, trucks, trailers or even custom vehicles.&amp;nbsp; Actually, &lt;a href=&quot;http://lakesideelectronics.net/products-page/product-category/betelguese-a-programmable-led-brake-lamp/&quot;&gt;Betelgeuse - A Programmable LED Brake Lamp&lt;/a&gt; is an LED brake light using 4 Cree X-Lamp LED&#39;s with an integrated flash pattern controller.&lt;br /&gt;
&lt;br /&gt;
Check out the video below to see some of the different flash or strobe patterns Betelgeuse ( pronounced BeetleJuice or Betel Juice ) can display.&amp;nbsp; Betelgeuse can even modulate the LED light in a way to look like old school filament bulbs.&amp;nbsp; If you are interested in purchasing Betelgeuse you can head over to the &lt;a href=&quot;http://lakesideelectronics.net/products-page/product-category/betelguese-a-programmable-led-brake-lamp/&quot;&gt;product page at LakesideElectronics.net&lt;/a&gt; and hit &quot;add to cart&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/WtoHFpIVaIU?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Betelgeuse is really cool because it requires no wiring modifications, you just twist the bulb in and you are done.&amp;nbsp; It is fully configurable by using only your brake lever for changing and storing the flash pattern.&amp;nbsp; It also has a recording feature where you can record your own flash or strobe pattern by recording your brakes.&amp;nbsp; The recording time is fixed at 10 seconds which is plenty of time to tap a brake light message in &lt;a href=&quot;http://en.wikipedia.org/wiki/Morse_code&quot;&gt;Morse Code&lt;/a&gt;.&amp;nbsp; Of course, Betelgeuse can also act as a traditional LED brake light with no flashing too.&lt;br /&gt;
&lt;br /&gt;
If you are interested in the full details you can &lt;a href=&quot;http://lakesideelectronics.net/Betelgeuse_User_Manual_2012.07.10.pdf&quot;&gt;download the Betelgeuse owners manual&lt;/a&gt; from the &lt;a href=&quot;http://lakesideelectronics.net/downloads/&quot;&gt;downloads page&lt;/a&gt; to see how capable this modulating brake light really is.&lt;br /&gt;
&lt;br /&gt;
Currently Betelgeuse&amp;nbsp; comes in type 1157 dual filament type bases.&amp;nbsp; Of course, dual filament bulbs fit is several bases in addition to the 1157.&amp;nbsp; There are a couple versions of Betelgeuse brake light strobes in the works, so if you are interested keep checking back to see what&#39;s new.&amp;nbsp; I&#39;m really excited about &lt;a href=&quot;http://lakesideelectronics.net/products-page/product-category/betelguese-a-programmable-led-brake-lamp/&quot;&gt;Betelgeuse - A Programmable LED Brake Lamp&lt;/a&gt; and I hope you are too.</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/8413473698264539313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/8413473698264539313' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/8413473698264539313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/8413473698264539313'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2012/07/betelgeuse-brake-light-flasher-by.html' title='Betelgeuse Brake Light flasher by Lakeside Electronics, LLC'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-157108525570231186</id><published>2012-05-27T13:19:00.004-04:00</published><updated>2012-05-27T13:27:55.062-04:00</updated><title type='text'>LED Stroboscope from a Clapper Lamp Prototype</title><content type='html'>&lt;br /&gt;
A little while ago a writer for Popular Science magazine approached me asking if I would be interested in collaborating with them write a &quot; How To &quot; article based on my &lt;a href=&quot;http://petemills.blogspot.com/2012/01/clever-clapper.html&quot;&gt;Clever Clapper post&lt;/a&gt; the other month.&amp;nbsp; Well, of course I would, that sounds awesome! And so, I made another Clapper lamp, this time leaving out the laser activated moon lamp so as to better fit the magazine space.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Clapper Demo&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/6clRa7tZMVk?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Party Mode Demo&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;object class=&quot;BLOGGER-youtube-video&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; data-thumbnail-src=&quot;http://i.ytimg.com/vi/obkR_kocgxU/0.jpg&quot; height=&quot;266&quot; width=&quot;320&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/obkR_kocgxU?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata&quot; /&gt;


&lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot; /&gt;


&lt;embed width=&quot;320&quot; height=&quot;266&quot;  src=&quot;http://www.youtube.com/v/obkR_kocgxU?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Fast forward a few months and you can find in the June 2012 issue, the &quot; Diy Clapper &quot; article on page 80.&amp;nbsp; You can see an online version of the article and links to software etc on the &lt;a href=&quot;http://www.popsci.com/diy/article/2012-05/how-build-homemade-clapper-adjust-lights-and-set-mood&quot;&gt;Popular Science page here.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
All in all, it was a pretty cool experience, but I am left with another clapper lamp now.&amp;nbsp; And worse, dueling clapper lamps that have no mechanism by which to synchronize themselves.&amp;nbsp; Two claps may or may not turn on both the new clapper lamp and original Clever Clapper leaving me with flip flopping lights until I have to resort to manual control of one or the other lamp.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc1lL-C0xWqee8eesBKDl5tUjQMLW-3BA2iWd-qlXLPKkrrd0uVmhgW4qXPdk2ulKpEXgIOqknLtxXo2P3yzWNx3kJ1k_f63t4Udo8snB7-DhWORHJynbGNAbIdNHkRTA2gkPcDOWhEAu9/s1600/WP_000520.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc1lL-C0xWqee8eesBKDl5tUjQMLW-3BA2iWd-qlXLPKkrrd0uVmhgW4qXPdk2ulKpEXgIOqknLtxXo2P3yzWNx3kJ1k_f63t4Udo8snB7-DhWORHJynbGNAbIdNHkRTA2gkPcDOWhEAu9/s320/WP_000520.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The non-necessity of having multiple clap activated lamps in my house prompted me to make an LED Stroboscope with the latest lamp - utilizing as much of the hardware as possible.&amp;nbsp; I only added a potentiometer to set the strobe frequency.&lt;br /&gt;
&lt;br /&gt;
I would not design a stroboscope with this hardware from scratch, but it is a good reuse of the lamp and circuit that would otherwise sit idle.&amp;nbsp; For instance, a fairly big drawback is the 8-bit timer in the ATTiny85.&amp;nbsp; The frequency step changes are quite noticeable and I would prefer a 16-bit timer like the ATMega328 has.&lt;br /&gt;
&lt;br /&gt;
And of course with those extra uC pins I could add a display to show the frequency rather than relying on an oscilloscope for measuring the output frequency.&amp;nbsp; Having said that however, with a lack of crystal on the ATTiny85, using the internal RC oscillator instead, it is probably better to measure the frequency externally rather than an internally calculated frequency display.&lt;br /&gt;
&lt;br /&gt;
You can see the hardware changes from the Clapper lamp outlined in the schematic below.&amp;nbsp; I disconnected a few connections and added a potentiometer, that&#39;s about it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkxCMJXDtYNiNV52OZxwkagkXXWJkhN2MXdh7w0kQwwrl5Z22m337yq2r-F_z5VXm38D0PGdyS7AT7PFtsZUCeBduGGtwovYkoy1EYunm1mOxvyAk2kap-58h5Mhk4BrvTSCIMRgOUmQdp/s1600/Screen+Shot+2012-05-27+at+12.09.59+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;215&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkxCMJXDtYNiNV52OZxwkagkXXWJkhN2MXdh7w0kQwwrl5Z22m337yq2r-F_z5VXm38D0PGdyS7AT7PFtsZUCeBduGGtwovYkoy1EYunm1mOxvyAk2kap-58h5Mhk4BrvTSCIMRgOUmQdp/s320/Screen+Shot+2012-05-27+at+12.09.59+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The software for the stroboscope can be downloaded &lt;a href=&quot;https://sites.google.com/site/pemills2011/file/stroboscope_v1.0.c?attredirects=0&amp;amp;d=1&quot;&gt;here&lt;/a&gt;.&amp;nbsp; It isn&#39;t the prettiest of code as, but it should suffice until I can build another stroboscope with a more concentrated effort.&lt;br /&gt;
&lt;br /&gt;
To operate the stroboscope you just turn it on and the lamp is strobing somewhere between ~4 Hz and ~31.3 kHz.&amp;nbsp; The maximum flash rate is high enough so as not to be noticed.&amp;nbsp; So you can use it as a reading lamp.&amp;nbsp; Pressing the tactile switch shuffles thru a loop, changing the timer presets thus decreasing the flash rate by 2 times, each press until it loops back to the beginning.&amp;nbsp; Find your range with the tact switch then turn the potentiometer to set the exact frequency required to stop motion.&lt;br /&gt;
&lt;br /&gt;
In the video below,&amp;nbsp; there are on screen comments noting the points where the strobe frequency is a multiple of the fan speed.&amp;nbsp; It is advantageous to use a mark on symmetrical parts to determine when the strobe frequency is a multiple of the part frequency or spot on.&amp;nbsp; I marked this fan blade with a sharpie so I know that if the rotational motion appears stopped and I see two arrows ( sharpie marks ) then the strobe frequency is 2x the fan speed.&amp;nbsp; It should follow that one sharpie mark showing means the strobe is 1x the fan speed.&amp;nbsp; This is the basic principle of stroboscopes, but for a more in depth look have a look at this &lt;a href=&quot;http://en.wikipedia.org/wiki/Stroboscope&quot;&gt;wikipedia entry&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/XALfAD7fWuA?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I am pretty pleased with the results and knowing the limitations of this stroboscope I can still see it being useful to me.&amp;nbsp; Of course I look forward to making a more full featured model with improved timer hardware etc, but for now I can inspect all kinds of rotating or oscillating mechanical bits in pseudo slow motion.&amp;nbsp; I can also measure the speed of unknown objects easily as well as prototype some zoetropes or similar.&lt;br /&gt;
&lt;br /&gt;
As an aside, have a look at this scope my Mother bought me out of the blue the other day - just in time to use it for this project too!&amp;nbsp; How cool is that?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8DLC9qnt3Ix_aq3mqrUc0ia7kYbwzFnkRhDyBIjrPTcfZU-hhezN6pBwUGmymtvKoIopYzd3dKyS7DFYb_x6gB6fRPbcNNLHUZaKDVY8D_fP7qK-t2J6zWc_XydNtgzZvdszj6BZrRk7a/s1600/Bit+Slayer_001033.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8DLC9qnt3Ix_aq3mqrUc0ia7kYbwzFnkRhDyBIjrPTcfZU-hhezN6pBwUGmymtvKoIopYzd3dKyS7DFYb_x6gB6fRPbcNNLHUZaKDVY8D_fP7qK-t2J6zWc_XydNtgzZvdszj6BZrRk7a/s320/Bit+Slayer_001033.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/157108525570231186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/157108525570231186' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/157108525570231186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/157108525570231186'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2012/05/led-stroboscope-from-clapper-lamp.html' title='LED Stroboscope from a Clapper Lamp Prototype'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc1lL-C0xWqee8eesBKDl5tUjQMLW-3BA2iWd-qlXLPKkrrd0uVmhgW4qXPdk2ulKpEXgIOqknLtxXo2P3yzWNx3kJ1k_f63t4Udo8snB7-DhWORHJynbGNAbIdNHkRTA2gkPcDOWhEAu9/s72-c/WP_000520.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-7474307834392813602</id><published>2012-04-15T21:39:00.000-04:00</published><updated>2012-07-17T12:53:04.044-04:00</updated><title type='text'>Tenty LED Brake Lights</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheY-_NV70w-x2GgzhajfM5jEctdPMqd5ngi0goKbNlnf0EkTaeSLQixtBU_5v6I5uneVYeEVn-dctDuQ1dd89tk9B3D6MhxIaIr_8-qBwXJwSWKrWsEY5RrieXCyXALG5FvOEqoTKSPmsc/s1600/Bit+Slayer_000788.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheY-_NV70w-x2GgzhajfM5jEctdPMqd5ngi0goKbNlnf0EkTaeSLQixtBU_5v6I5uneVYeEVn-dctDuQ1dd89tk9B3D6MhxIaIr_8-qBwXJwSWKrWsEY5RrieXCyXALG5FvOEqoTKSPmsc/s320/Bit+Slayer_000788.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
UPDATE:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This project was so overwhelmingly well received that it has spawned a commercial interest.&amp;nbsp; The version available for purchase varies somewhat in it&#39;s flash patterns and also in the ability to record and play back your own flash patterns.&amp;nbsp; If you would like to check it out take a look at &lt;a href=&quot;http://lakesideelectronics.net/?wpsc-product=betelguese-a-programmable-led-brake-lamp&quot;&gt;Betelgeuse - A Programmable LED Brake Lamp&lt;/a&gt; at my new company Lakeside Electronics, LLC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I Purchased a motorcycle about two weeks ago.&amp;nbsp; Interestingly, whenever I tell someone this news, they immediately proceed to tell me the most gruesome injuries and stomach turning plights that they or someone they know, has fallen victim to while motorcycling.&amp;nbsp; In some cases, these raconteur&#39;s briefly pause to look over their shoulder, presumably scanning for small children or otherwise offendable ears, before delivering the goriest details.&lt;br /&gt;
&lt;br /&gt;
One commonality in these stories, aside from the macabre and arguably poor timing involved in telling them to me is that many accidents come down to a lack of visibility of motorcycles and their riders.&amp;nbsp; Less than Argus-eyed motorists often pull out into the path of a motorcycle and with insufficient time for evasive action, that quickly an accident has occurred.&amp;nbsp; Other times, drivers may focus on the car ahead of the motorcycle and in the event of stopping at a red light or similar, fail to leave enough room for the motorcycle, unfortunately rear ending him or her.&lt;br /&gt;
&lt;br /&gt;
In the photo below, you can see that I am in one piece and the bike is also.&amp;nbsp; Let&#39;s see what we can do to help keep things that way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC0d1FzyVTQr1MmqgztsHz2DYnbdjF24ITCauk11g2RpNp0DqzqjLpldWKCWdlRv6gjughRB_XZ5dE2SZe131sMNvaXvsKaIVK79TYGcdYLbY591prgfDfzzJ_auFwPlY35prYi86FTjRY/s1600/Bit+Slayer_000709.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC0d1FzyVTQr1MmqgztsHz2DYnbdjF24ITCauk11g2RpNp0DqzqjLpldWKCWdlRv6gjughRB_XZ5dE2SZe131sMNvaXvsKaIVK79TYGcdYLbY591prgfDfzzJ_auFwPlY35prYi86FTjRY/s320/Bit+Slayer_000709.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
To partially combat the lack of visibility I decided to make a replacement brake light for my bike; one that would strobe briefly when I applied the brakes then stay solid on.&amp;nbsp; I got this idea when I noticed a similar strobing effect to the brake lights on an ambulance that I was following near to, but not immediately behind.&amp;nbsp; Those lights really got me to notice the ambulance which I had largely ignored up until that point.&lt;br /&gt;
&lt;br /&gt;
I would also want a way to be able to disable the brief flash before the brake light stays solid on.&amp;nbsp; This could be useful if the flash was ever to cause a safety hazard to other drivers or if I am ever stopped by the police for having this system I can easily disable the strobe part and still have a functioning brake light; I do not want to be stranded.&amp;nbsp; I wrote the software so that if you turn the key on while you have the brakes applied, the flash is disabled.&amp;nbsp; You must turn the key off, then back on, without the brake applied to restore the flash functionality.&lt;br /&gt;
&lt;br /&gt;
Here is a video of the prototype Tenty LED Brake Light installed and operating.&amp;nbsp; In the video, I demonstrate the flashing brake light 3 times and then key off.&amp;nbsp; Then I disable the strobing part by turning the key on while holding the brake on, demonstrate that several times and key off again.&amp;nbsp; Finally I re-enable the strobing functionality by key on with the brake off.&amp;nbsp; For the purposes of the video, I lengthened the duration of the flash on and off times.&amp;nbsp; This is so the camera can better capture the flashes.&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/bsCtKpdZ1XY?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to keep this system reversible should I ever have the need to put it back to stock, here is how I mounted the circuit board inside the tail light lens.&amp;nbsp; I bought some replacement bulbs at a local auto parts store, broke out the glass and desoldered the filament.&amp;nbsp; I replaced the filament by soldering wires to the tail light power, brake light power and ground.&amp;nbsp; I ran a file over the solder blobs just enough to level them out so they would make good contact with the socket.&amp;nbsp; I then filled the bayonet base with epoxy and inserted an 8-32 stainless steel screw into the base being careful not to touch the screw to any metal,&amp;nbsp; accidentally making the screw a conductor.&amp;nbsp; Below are a few pictures of this process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQbn6dQOZyd7rtX2nXl4rzaSR9rNRhDQnRh0eFPuBzDiLbNui7VoKaBi4Dz5dKtDlr6Gj5JJymNjxeVNQSb5U6F5NhIztzvkWFEf8umobctYp11xAJngKD8gXq6blIOi3U42rryXHs2vgr/s1600/Bit+Slayer_000683.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQbn6dQOZyd7rtX2nXl4rzaSR9rNRhDQnRh0eFPuBzDiLbNui7VoKaBi4Dz5dKtDlr6Gj5JJymNjxeVNQSb5U6F5NhIztzvkWFEf8umobctYp11xAJngKD8gXq6blIOi3U42rryXHs2vgr/s320/Bit+Slayer_000683.jpg&quot; width=&quot;320&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&amp;nbsp; &lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTqVB3Tr5C419AP6WwW7i5g_TKUxEWufY1UZkrA6hPE6uNYfyZPlm9oxzoe3ExWSJeKu01aTPATBZEqlGImNniqNxjzj8XxIz6HDqH0_dWDEln1bxD4oHQdq6FcKO2-uqpHAGfOlqJd_QH/s1600/Bit+Slayer_000686.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTqVB3Tr5C419AP6WwW7i5g_TKUxEWufY1UZkrA6hPE6uNYfyZPlm9oxzoe3ExWSJeKu01aTPATBZEqlGImNniqNxjzj8XxIz6HDqH0_dWDEln1bxD4oHQdq6FcKO2-uqpHAGfOlqJd_QH/s320/Bit+Slayer_000686.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNJqkCiS5_-dZYOWsR9n7KL4ClzJIesVt0yVkMt1A3hc1okU8hv4rA0C3e3vai8FW5W06hIu3nJjpqik7VFfKXAqBmG6lnw9886r0UA7JhBMQdfJ_3F3j05RriTUEFg02XRDDsl2cLgc57/s1600/Bit+Slayer_000701.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNJqkCiS5_-dZYOWsR9n7KL4ClzJIesVt0yVkMt1A3hc1okU8hv4rA0C3e3vai8FW5W06hIu3nJjpqik7VFfKXAqBmG6lnw9886r0UA7JhBMQdfJ_3F3j05RriTUEFg02XRDDsl2cLgc57/s320/Bit+Slayer_000701.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;After installing the modified bayonet screw mounts I threaded two nuts on each and jammed them together.&amp;nbsp; This is what the back of the circuit board will rest on.&amp;nbsp; You can see several pictures of the final assembly below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2VxDbdK5JysTeZ-95MLOJh59eJNF9FZGpIPSiQNhh7736VsAY3zlYmeceZM_Q3-_PPnO4LVARbXJH-YJT6N5b0694Xk7QN0jKr7MruQZXQE1N12-WXmLfQrTlhAdB3sADm-jT9LX0KSIV/s1600/Bit+Slayer_000785.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2VxDbdK5JysTeZ-95MLOJh59eJNF9FZGpIPSiQNhh7736VsAY3zlYmeceZM_Q3-_PPnO4LVARbXJH-YJT6N5b0694Xk7QN0jKr7MruQZXQE1N12-WXmLfQrTlhAdB3sADm-jT9LX0KSIV/s320/Bit+Slayer_000785.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeOilIbRATnqv9V5UeMvBiltOcnlvqzhUKyfwVCWC1b7piX5lbm6SB-WBoFwBhBazMwfrwJh8E2RXQ7PopU38J4RYyoeytDXbh4TczNRvIPt2Kz9XQXJmNO3p379c6pfH3eUuiLyLb6UGp/s1600/Bit+Slayer_000796.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeOilIbRATnqv9V5UeMvBiltOcnlvqzhUKyfwVCWC1b7piX5lbm6SB-WBoFwBhBazMwfrwJh8E2RXQ7PopU38J4RYyoeytDXbh4TczNRvIPt2Kz9XQXJmNO3p379c6pfH3eUuiLyLb6UGp/s320/Bit+Slayer_000796.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9pUwVwIeO-KyAOmMQTwjiJqFUO9fPNMvt2XXCFGgkUwA3BUH4h_12i_wjYZYpguxzx2lOj2OGU0ZY43IrDjJ0U9CivN7Oci2_GF0B0ryleYYYlO5Hyw0Sadna7u46QawjNeyZbctBcnjc/s1600/Bit+Slayer_000745.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9pUwVwIeO-KyAOmMQTwjiJqFUO9fPNMvt2XXCFGgkUwA3BUH4h_12i_wjYZYpguxzx2lOj2OGU0ZY43IrDjJ0U9CivN7Oci2_GF0B0ryleYYYlO5Hyw0Sadna7u46QawjNeyZbctBcnjc/s320/Bit+Slayer_000745.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFIIlbucUivuN8R0zA8tpXVrGC7QnBshpUbr7xJPxHszHD-ShMonbCT8FY46f1zM_-0LrvRaAdUaNnTkrnYteUgAqV9Pv-9JPJkEfgnjySdJzRtlq7IPkAICojRM2xyUCgNhorT4aAf3VA/s1600/Bit+Slayer_000799.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFIIlbucUivuN8R0zA8tpXVrGC7QnBshpUbr7xJPxHszHD-ShMonbCT8FY46f1zM_-0LrvRaAdUaNnTkrnYteUgAqV9Pv-9JPJkEfgnjySdJzRtlq7IPkAICojRM2xyUCgNhorT4aAf3VA/s320/Bit+Slayer_000799.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Circuit:&lt;br /&gt;
&lt;br /&gt;
The circuit is basically a large array of 
really bright red LED&#39;s ( Light Engine ) and an ATTiny85 microcontroller to tell the LED 
light engine how to behave.&amp;nbsp; There are also two high brightness LED&#39;s 
that shine downward onto the license plate.&amp;nbsp; They are solid on all the 
time as required by the Michigan vehicle code.&amp;nbsp; The &lt;a href=&quot;http://www.mouser.com/ProductDetail/Optek/OVFSRAC8/?qs=UY4NetwcvwlN6dUy2%2f5NtA%3d%3d&quot;&gt;red LED&#39;s&lt;/a&gt;,
 made by Optek have a 100 degree viewing angle and output 8000 mlm each -
 there are 16 of them.&amp;nbsp; The brake light switch delivers it&#39;s ~12 V 
signal translated thru an 2n3904 transistor to pull a microcontroller 
pin low.&amp;nbsp; I usually use 14.4 V when doing calculations for operating voltage on 12V systems like this.&amp;nbsp; Total current draw with all LED&#39;s at maximum brightness is less than 500 mA.&amp;nbsp; I ordered the logic level mosfet &lt;a href=&quot;http://www.mouser.com/ProductDetail/International-Rectifier/IRLU3410PBF/?qs=9%252bKlkBgLFf09xnqw0semuw%3d%3d&quot;&gt;IRLU3410PBF&lt;/a&gt; from mouser.com also, which is used for the PWM control of the light engine.&amp;nbsp; Below you will find a screen cap pic of the schematic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWn0K87ub9a5Gl8y0m3eIknaFwjVN4DwUxSgpfDhQsOaw0ZRkLGEnuIoVs8kSc9xQxCFQ-muH38TNhWqdMmsUwteiZrUsjn5ur5zi0f24TCLNwLJVq3cewhHXRFZfnVddOHVD2Y1z4v3cg/s1600/LED+Brake+Light+Schematic+v1.0.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;262&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWn0K87ub9a5Gl8y0m3eIknaFwjVN4DwUxSgpfDhQsOaw0ZRkLGEnuIoVs8kSc9xQxCFQ-muH38TNhWqdMmsUwteiZrUsjn5ur5zi0f24TCLNwLJVq3cewhHXRFZfnVddOHVD2Y1z4v3cg/s320/LED+Brake+Light+Schematic+v1.0.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software&lt;br /&gt;
&lt;br /&gt;
There are two modes of operation to this brake light - flashing and non flashing.&amp;nbsp; The non flashing brake light is activated by turning the key on while holding the brake and behaves just like a stock brake light would.&amp;nbsp; Flashing mode is enabled by default so key on with brake off and you are good to go.&amp;nbsp; In this mode, the LED light engine strobes briefly upon initial application of the brake then is a steady on light.&amp;nbsp; I set the period of the flashes to be higher for the videos so the camera could pick them up, you can see in the code below that the flash period is twice as fast in the operational version of the software.&amp;nbsp; Feel free to use the code as you see fit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;c&quot; name=&quot;code&quot;&gt;/*
Program Description: 

This program controls an LED light engine used as a brake light on a motorcycle.
When the brakes are applied the tail light flashes several times off then on before
being a steady on brake light.

The program also has a feature to disable the flashing brake light and the brake light will
behave like a standard lamp ie no flashing.  This mode is enabled ( flash mode disabled )
by turning the motorcycles key on while holding the brake on.  The state is reset after a power 
cycle.

Legal Note:  I read the entire vehicle code for my state.  It does not address brake light flashers, but
does prohibit &quot; rotating, oscillating or flashing red lights &quot;.  I believe a brake light flasher
differs from &quot; rotating, oscillating and flashing &quot; lights in the implied duration of operation.  
My state did not respond to emails I sent requesting clarification.  
Basically, modify your vehicle at your own risk.

Change Log
2012.4.21 - added 1 mS debounce to brake switch in main loop - Pete


A circuit description and other details can be found at http://petemills.blogspot.com

Filename: led_brakelight_main.c
Author: Pete Mills
petemills.blogspot.com
2012.4.15

Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms

*/



//********** Includes **********

#include &amp;lt;avr/io.h&amp;gt;     
#include &amp;lt;util/delay.h&amp;gt;   



//********** Definitions **********

// Output to LED Light Engine

#define LED   PB0  
#define LED_PORT PORTB
#define LED_DDR  DDRB


// Input for Brake Switch

#define BRAKE_SWITCH  PINB4  // bit is clear when brake switch is pressed
#define BRAKE_SWITCH_PORT PINB
#define BRAKE_SWITCH_DDR DDRB



// PWM Preset Values

#define TAIL_LIGHT_PWM  25
#define BRAKE_LIGHT_PWM  255



//********** Function Prototypes **********

void setup( void );
void brake_alert( uint8_t number_of_flashes );



//********** Global Variables **********

uint8_t disable_flash = 0; // if 1, the flashing part of the brake light will be disabled


int main(void)
{


setup();

_delay_ms( 5 );



// if the brake light is held on during boot up, disable the flashing
// flashing can only be disabled during boot up ( key on ) and is reset after power down ( key off )
// this could be useful if you suddenly learn your flashing light is causing a problem for other motorists 
// or citizens employed to monitor the adherence to legislation and cite violations for deviation from such 


if ( bit_is_clear( BRAKE_SWITCH_PORT, BRAKE_SWITCH ) )
{
 disable_flash = 1; 
}



 while(1)
 { 
  
  
  if ( bit_is_clear( BRAKE_SWITCH_PORT, BRAKE_SWITCH ) )  // if the brakes are applied
  {

   _delay_ms( 1 ); // filter time aka debounce

   if ( bit_is_clear( BRAKE_SWITCH_PORT, BRAKE_SWITCH ) )  // if the brakes are actually applied
   {  

   // if we are allowed to flash, do
   
   if( disable_flash == 0 ) 
   {
    brake_alert( 5 );
   }
  

   // if the brakes are still applied, hold the LED light engine to a brighter output
   // until you release the brakes
   
   while( bit_is_clear( BRAKE_SWITCH_PORT, BRAKE_SWITCH ) )
   {
    OCR0A = BRAKE_LIGHT_PWM;
   }
   
   _delay_ms( 100 ); // debounce the brake switch release ( break )
   
   }   

  }
  
  OCR0A = TAIL_LIGHT_PWM;  // restore the tail light on
  
  
  
  /*
  // demo mode
  for( ;; )
  {
  brake_alert(6);
  OCR0A = BRAKE_LIGHT_PWM;
  _delay_ms(2000);
  OCR0A = TAIL_LIGHT_PWM;
  _delay_ms(4000);
  }
  */
   
 }
}




//********** Functions **********

void setup(void)
{



 //********* Port Config *********

 LED_DDR |= ( 1 &amp;lt;&amp;lt; LED);   // set PB0 to &quot;1&quot; for output 
 LED_PORT &amp;amp;= ~( 1 &amp;lt;&amp;lt; LED );   // turn the led light engine off

 BRAKE_SWITCH_DDR &amp;amp;= ~( 1 &amp;lt;&amp;lt; BRAKE_SWITCH );   // set BRAKE_SWITCH pin to 0 for input
 BRAKE_SWITCH_PORT |= ( 1 &amp;lt;&amp;lt; BRAKE_SWITCH );   // write a 1 to BRAKE_SWITCH to enable the internal pullup



 //********** PWM Config *********
 
 TCCR0A |= ( ( 1 &amp;lt;&amp;lt; COM0A1 ) | ( 1 &amp;lt;&amp;lt; WGM01 ) | ( 1 &amp;lt;&amp;lt; WGM00 ) ); // non inverting fast pwm
 TCCR0B |= ( 1 &amp;lt;&amp;lt; CS00 ); // start the timer
 
 
}




void brake_alert( uint8_t number_of_flashes )
{
 // here we create a visual alert that the brakes have been applied
 // pass this function the number of flashes desired ( off then on = 1 )
 
 //uint8_t delay_between_flashes = 50; // for video demonstration purposes ( video aliasing issues ) 
 uint8_t delay_between_flashes = 25; // every day use
 uint8_t alert_pwm_min = 2;   // minimum and max values to flash between during the alert
 uint8_t alert_pwm_max = 255;
 
 
 for( int i = 0; i &amp;lt; number_of_flashes; i++ )
 {
  OCR0A = alert_pwm_min;
  _delay_ms( delay_between_flashes );
  OCR0A = alert_pwm_max;
  _delay_ms( delay_between_flashes );
 }

}
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Legal Note:&lt;br /&gt;
&lt;br /&gt;
I&#39;m not too sure what to say about the legality of this project.&amp;nbsp; I read the entire vehicle code for my state.&amp;nbsp; There was no reference to brake light flashers for cars or motorcycles.&amp;nbsp; The vehicle code for Michigan does prohibit &quot; rotating, oscillating or flashing lights &quot; on non-emergency vehicles, however I believe my brake light does not qualify as the clear intent in the vehicle code was &quot; rotating, oscillating or flashing &quot; lights that continue to do so for an extended period of time as emergency or police vehicles do. Really, my device is no different than tapping your brake pedal several times before stopping your motorcycle.&amp;nbsp; In the end, I did send an email to the state of Michigan requesting clarification.&amp;nbsp; At the time of this writing there has been no response.&amp;nbsp; I think the bottom line is, don&#39;t modify your vehicle unless you are willing to accept full responsibility for any outcome.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are a couple pictures of the build process.&amp;nbsp; The abstract looking pictures are of the LED light engine shining thru my desk magnifier onto the ceiling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij-UHepTwq3svDwAckZH3opMzIeWje4sI2HvNiwa4wlRdRymuQ58KUwdC3IB0F5OW0adI0hKPnxdFj9IO3NLu0ANvfch_sGsvsSa4zi-O2Si1BJgoEImTxlA7gtgwlRS-tSNf5cNrXz3BL/s1600/Bit+Slayer_000773.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij-UHepTwq3svDwAckZH3opMzIeWje4sI2HvNiwa4wlRdRymuQ58KUwdC3IB0F5OW0adI0hKPnxdFj9IO3NLu0ANvfch_sGsvsSa4zi-O2Si1BJgoEImTxlA7gtgwlRS-tSNf5cNrXz3BL/s320/Bit+Slayer_000773.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTSiEI7_ti8opulhePWU7fhi3y7Hl62cOEOmzShEe_595LRBEldtFKXxdW53SSnHcJp7-F8Zxf7puowdiqpg887Bnoj64uBgqljuEvrbl2iCVL_zhQxVlRxD255myzrQKL3YAQ0_iu_rfa/s1600/Bit+Slayer_000763.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTSiEI7_ti8opulhePWU7fhi3y7Hl62cOEOmzShEe_595LRBEldtFKXxdW53SSnHcJp7-F8Zxf7puowdiqpg887Bnoj64uBgqljuEvrbl2iCVL_zhQxVlRxD255myzrQKL3YAQ0_iu_rfa/s320/Bit+Slayer_000763.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyylTtlRJBlYLqIuNQ5v8ZIL67zl02HrT6hR-KTtZ0CYWylkW3ArnE95njeO0YuPmIupXDL60Fbw0KY1IjwZhcQaVmd7kRRBi8KOzBzrh2BBxu7FGqUM2t0XthSGoSHyJHvx_fOjTrTxdo/s1600/Bit+Slayer_000752.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyylTtlRJBlYLqIuNQ5v8ZIL67zl02HrT6hR-KTtZ0CYWylkW3ArnE95njeO0YuPmIupXDL60Fbw0KY1IjwZhcQaVmd7kRRBi8KOzBzrh2BBxu7FGqUM2t0XthSGoSHyJHvx_fOjTrTxdo/s320/Bit+Slayer_000752.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhprUN0lyKS1Yra55NpmDR3wvrj7_U7jzKMEAkHxsVb_xO19pVw5nCZWWImLs3xb72KUGWLzBFy_kUw3hMKUFdyWeuRLhsqekooBFEZDyY5mE5IoX3QCr0dsivt19s-JRKSbAZ0cn5Eq7X-/s1600/Bit+Slayer_000802.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhprUN0lyKS1Yra55NpmDR3wvrj7_U7jzKMEAkHxsVb_xO19pVw5nCZWWImLs3xb72KUGWLzBFy_kUw3hMKUFdyWeuRLhsqekooBFEZDyY5mE5IoX3QCr0dsivt19s-JRKSbAZ0cn5Eq7X-/s320/Bit+Slayer_000802.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl8JJ2ctxY1xeqAir3dIqj3t_xWlOSZHA7JKsh-VultO46P2LX6iiFBQzAzgLDbFlMfwxLP-ZjRKhXlYMXYAR0bgz_R8LKMkGuNKZfied6e0PgDfbdBOdt39ZqKPrEHW5chMZSYtA2Z1Pe/s1600/Bit+Slayer_000804.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl8JJ2ctxY1xeqAir3dIqj3t_xWlOSZHA7JKsh-VultO46P2LX6iiFBQzAzgLDbFlMfwxLP-ZjRKhXlYMXYAR0bgz_R8LKMkGuNKZfied6e0PgDfbdBOdt39ZqKPrEHW5chMZSYtA2Z1Pe/s320/Bit+Slayer_000804.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/7474307834392813602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/7474307834392813602' title='42 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/7474307834392813602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/7474307834392813602'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2012/04/tenty-led-brake-lights.html' title='Tenty LED Brake Lights'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheY-_NV70w-x2GgzhajfM5jEctdPMqd5ngi0goKbNlnf0EkTaeSLQixtBU_5v6I5uneVYeEVn-dctDuQ1dd89tk9B3D6MhxIaIr_8-qBwXJwSWKrWsEY5RrieXCyXALG5FvOEqoTKSPmsc/s72-c/Bit+Slayer_000788.jpg" height="72" width="72"/><thr:total>42</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-2094762146898586673</id><published>2012-02-05T10:17:00.000-05:00</published><updated>2012-02-06T16:46:36.036-05:00</updated><title type='text'>ATTiny Candle</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXSUQmQbvi1jLaPkM98gX69oKY57cHpf7owP6rNXhZKlWkXYCSFpD92H3AwdHzMPr5ny8asngjT7PnTkIinl-CRtPZq27TSdpCsEbmyWcG5KchC711oAn7N_reoCkGyER-g0rg_nRMKXoW/s1600/WP_000356.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXSUQmQbvi1jLaPkM98gX69oKY57cHpf7owP6rNXhZKlWkXYCSFpD92H3AwdHzMPr5ny8asngjT7PnTkIinl-CRtPZq27TSdpCsEbmyWcG5KchC711oAn7N_reoCkGyER-g0rg_nRMKXoW/s320/WP_000356.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The ATTiny Candle is an LED candle.&amp;nbsp; It uses a high brightness LED and some software to mimic the look of a traditional candle without the dangers associated with an open flame.&amp;nbsp; I imagine they could be useful as movie props where you cannot afford to have a candle go out during a take or in your home in places not suitable for traditional candles such as in a wall niche or alcove. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwwkBeNLv4VrMnhZkjOrZu78DlEN7b_XI8sqmCjd-Pup9Fr7t6cIltgToQ4jX4tB1F5SzS1zXoAenKo8_nF_xfOHwtbzxj28uyhwJk-w_99_Q1Y_S0Q5VzpFiNWzNvuaDJ1qzDOxScyijQ/s1600/WP_000381.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwwkBeNLv4VrMnhZkjOrZu78DlEN7b_XI8sqmCjd-Pup9Fr7t6cIltgToQ4jX4tB1F5SzS1zXoAenKo8_nF_xfOHwtbzxj28uyhwJk-w_99_Q1Y_S0Q5VzpFiNWzNvuaDJ1qzDOxScyijQ/s320/WP_000381.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have wanted to make an LED candle for some time now, so when I was approached by a work colleague about making one, I was provided the yeast to give it a go.&amp;nbsp; I figured the hardest part of this project would be making the flicker look realistic, so I decided to let nature do that part for me.&amp;nbsp; I made this candle with a Light Detecting Resistor ( LDR ) and a fixed resistor acting as a voltage divider.&amp;nbsp; This is fed to one of the ATTiny85&#39;s ADC inputs and sampled at discrete time intervals.&amp;nbsp; At this time, the sample rate is 100mS.&amp;nbsp; These 8-bit light level values are then stored to EEPROM so that the candle can recall the flicker pattern to play back on the LED that is connected to a PWM channel after being turned off.&amp;nbsp; You only need to program the pattern once, but you can program it over and over again with just the push of a button.&lt;br /&gt;
&lt;br /&gt;
What I have really created here is a datalogger for light levels.&amp;nbsp; Albeit, a datalogger with fairly small storage space of 500 bytes for the ATTiny85.&amp;nbsp; Never the less, 500 bytes @ 100mS sample rate gives me a loop of ~50 Seconds.&amp;nbsp; This is sufficiently long to not see a pattern repeating in the flicker pattern.&amp;nbsp; I guess there is a transformation that occurs when you jam the whole thing into the middle of a candle it becomes an electronic LED Candle instead.&amp;nbsp; Below is a picture of the aforementioned transformation process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEircfWlCmm35eGxujiK_sgF63U7rKeQ5Zt-AOsFaEMzramuGW8aOGRtA4b9oV0bmV_0Gdz7CjegmNRMxvQy_1N7puwbi0XHCmAjR4QkG2HXOirPAWDLdOz_sSnoXBQVBtjL1I5s2I8P4Mmd/s1600/WP_000352.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEircfWlCmm35eGxujiK_sgF63U7rKeQ5Zt-AOsFaEMzramuGW8aOGRtA4b9oV0bmV_0Gdz7CjegmNRMxvQy_1N7puwbi0XHCmAjR4QkG2HXOirPAWDLdOz_sSnoXBQVBtjL1I5s2I8P4Mmd/s320/WP_000352.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I did not mention yet, that I used a perfectly functional LED candle as the housing for my ATTiny Candle.&amp;nbsp; It was about 50c from the thrift store, so it is a cheap enclosure.&amp;nbsp; I also scavenged the high brightness LED from the original circuit.&amp;nbsp; Not knowing the specs on the led I set out to measure the forward voltage.&amp;nbsp; I lit the LED with a high value resistor in series.&amp;nbsp; In the picture below you can see I am using an LED tester I made that has probably an R860 or 1k0 resistor in it.&amp;nbsp; The LED plugs into some female header sockets.&amp;nbsp; Measuring the voltage across the LED legs shows I have a forward voltage of 2.01v.&amp;nbsp; I will assume 20mA max and select my series resistor based on 3, 1.5v ( nominal ), AA batteries.&amp;nbsp; So, ( ( 3*1.5v ) - 2.01Vf ) / 0.02mA = R124.5.&amp;nbsp; I guess the closest value I had on had was an R220 because that is what I used so the LED current is now ~11mA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAYwEb_lltjRKDU7vBVrdPOIbOQuURagVREkX7kn9ouwuhgDiM1Mxr14XYQI9RYCo-mhHmLJ31mm0KsIxj2KgtxuZ1r_Sx4c5PnYalZhuT5DKVvTkvPy-4TEg6aVTMu6fEzi864lNwY5jT/s1600/WP_000321.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAYwEb_lltjRKDU7vBVrdPOIbOQuURagVREkX7kn9ouwuhgDiM1Mxr14XYQI9RYCo-mhHmLJ31mm0KsIxj2KgtxuZ1r_Sx4c5PnYalZhuT5DKVvTkvPy-4TEg6aVTMu6fEzi864lNwY5jT/s320/WP_000321.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a picture of the schematic and one of the assembled circuit about to be installed ( hot glued ) into the inside of a candle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge4SXNzrVzE7dpioXv_P4ESisbyMeEYTz_nDeIUg2bjp6bfmy6E5_pcvyEy1l9rSz-yVKvVwvWFcW3Sfm3G7KA1FVKyUn-We02cY-JWOCezp-09ywzDrHuFi4wkhMfIsTWQmFdKyoIzImb/s1600/WP_000345.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge4SXNzrVzE7dpioXv_P4ESisbyMeEYTz_nDeIUg2bjp6bfmy6E5_pcvyEy1l9rSz-yVKvVwvWFcW3Sfm3G7KA1FVKyUn-We02cY-JWOCezp-09ywzDrHuFi4wkhMfIsTWQmFdKyoIzImb/s320/WP_000345.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlhVc3bZtho1kN_paaKjOqcPlafPFRAuBe-lbxdItddKsP_BA8oBzlOiyw9TsCJDUJlawKjmlv3aY3UUU400Pn7aAEI59Q4j46Rqyxwm0XlfIWinuZxEi3iukw5cF-4tGdsMIu_s3wvO7k/s1600/ATTiny+Candle+Sch.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlhVc3bZtho1kN_paaKjOqcPlafPFRAuBe-lbxdItddKsP_BA8oBzlOiyw9TsCJDUJlawKjmlv3aY3UUU400Pn7aAEI59Q4j46Rqyxwm0XlfIWinuZxEi3iukw5cF-4tGdsMIu_s3wvO7k/s320/ATTiny+Candle+Sch.jpg&quot; width=&quot;311&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwwkBeNLv4VrMnhZkjOrZu78DlEN7b_XI8sqmCjd-Pup9Fr7t6cIltgToQ4jX4tB1F5SzS1zXoAenKo8_nF_xfOHwtbzxj28uyhwJk-w_99_Q1Y_S0Q5VzpFiNWzNvuaDJ1qzDOxScyijQ/s1600/WP_000381.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
//Software &amp;amp;c&lt;br /&gt;
&lt;br /&gt;
Here is a listing of the current working code.&amp;nbsp; I have several improvements I would like to add in the future, but I will outline them later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;c&quot; name=&quot;code&quot;&gt;/*
Program Description: This program reads a light detecting resistor thru an internal ADC and stores the value, 
after scaling it, to eeprom.  This ADC value is sent to a PWM channel with attached led.  This is essentially a data logger
for light and replay by LED.  If, if you aim the LDR at a flickering candle during its recording phase, you have a flickering 
led candle.  

A circuit description and other details can be found at http://petemills.blogspot.com

Filename: ATTiny_Candle_v1.0.c
Author: Pete Mills

Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms

*/



//********** Includes **********

#include &amp;lt;avr/io.h&amp;gt;     
#include &amp;lt;util/delay.h&amp;gt;   
#include &amp;lt;avr/eeprom.h&amp;gt;




//********** Definitions **********

// LED for flame simulation

#define LED   PB0  
#define LED_PORT PORTB
#define LED_DDR  DDRB



// Light Detecting Resistor for recording a live flame

#define LDR   PINB3 
#define LDR_PORT PINB
#define LDR_DDR  DDRB



// Tactile Switch Input

#define SW1   PINB4
#define SW1_PORT PINB
#define SW1_DDR  DDRB


#define ARRAY_SIZE 500  // size of the flicker array
#define SAMPLE_RATE 100  // ms delay for collecting and reproducing the flicker



//********** Function Prototypes **********

void setup(void);
void toggle_led(void);
void program_flicker(void);
void led_alert(void);
void eeprom_save_array(void);
void eeprom_read_array(void);
void scale_array(void);
uint8_t get_adc(void);
uint8_t scale( uint8_t input, uint8_t inp_low, uint8_t inp_hi, uint8_t outp_low, uint8_t outp_hi);
uint8_t is_input_low(char port, char channel, uint8_t debounce_time, int input_block);




//********** Global Variables **********

uint8_t flicker_array[ ARRAY_SIZE ] = { 0 };
uint8_t EEMEM ee_flicker_array[ ARRAY_SIZE ] = { 0 };


int main(void)
{

uint16_t replay = 0;

setup();

eeprom_read_array();



 while(1)
 { 
 
  
  
  
  if( is_input_low( SW1_PORT, SW1, 25, 250 ) )
  {
   
   // program the flicker
   // after entering and upon completion, a predetermined flash pattern will occur as described in led_alert()  
   // aim the ldr at a flickering candle or any other light source ( like a laser ) you want to record during this time
   // and upon completion the values are stored to eeprom.  They are played back immediately as well 
   // as being recalled from eeprom upon first start up
   
   led_alert();
   program_flicker();
   scale_array();
   eeprom_save_array();
   led_alert();
  }
  
  
  
  // replay the recorded flicker pattern 
  
  OCR0A = flicker_array[ replay ];
  ++replay;
  
  if( replay &amp;gt;= ( ARRAY_SIZE - 13 ) ) // if the end of the stored array has been reached
  { 
   replay = 0;          // start again from the beginning
   //led_alert();
  }
  
  _delay_ms( SAMPLE_RATE );
  _delay_ms( 3 );    // ADC Conversion time
   
 }
}




//********** Functions **********

void setup(void)
{



 //********* Port Config *********

 LED_DDR |= ( 1 &amp;lt;&amp;lt; LED);   // set PB0 to &quot;1&quot; for output 
 LED_PORT &amp;amp;= ~( 1 &amp;lt;&amp;lt; LED );   // turn the led off

 LDR_DDR &amp;amp;= ~( 1 &amp;lt;&amp;lt; LDR );   // set LDR pin to 0 for input
 LDR_PORT |= ( 1 &amp;lt;&amp;lt; LDR );   // write 1 to enable internal pullup

 SW1_DDR &amp;amp;= ~( 1 &amp;lt;&amp;lt; SW1 );   // set sw1 pin to 0 for input
 SW1_PORT |= ( 1 &amp;lt;&amp;lt; SW1 );   // write a 1 to sw1 to enable the internal pullup



 //********** PWM Config *********
 
 TCCR0A |= ( ( 1 &amp;lt;&amp;lt; COM0A1 ) | ( 1 &amp;lt;&amp;lt; WGM01 ) | ( 1 &amp;lt;&amp;lt; WGM00 ) ); // non inverting fast pwm
 TCCR0B |= ( 1 &amp;lt;&amp;lt; CS00 ); // start the timer
 
 
 
 //********** ADC Config **********
 
 ADMUX |= ( ( 1 &amp;lt;&amp;lt; ADLAR ) | ( 1 &amp;lt;&amp;lt; MUX1 ) | ( 1 &amp;lt;&amp;lt; MUX0 ) );  // left adjust and select ADC3
 ADCSRA |= ( ( 1 &amp;lt;&amp;lt; ADEN ) | ( 1 &amp;lt;&amp;lt; ADPS2 ) | ( 1 &amp;lt;&amp;lt; ADPS1 ) ); // ADC enable and clock divide 8MHz by 64 for 125khz sample rate
 DIDR0 |= ( 1 &amp;lt;&amp;lt; ADC3D ); // disable digital input on analog input channel to conserve power

}




void toggle_led()
{
    LED_PORT ^= ( 1 &amp;lt;&amp;lt; LED );
}




uint8_t is_input_low( char port, char channel, uint8_t debounce_time, int input_block )
{

/*
This function is for debouncing a switch input
Debounce time is a blocking interval to wait until the input is tested again.
If the input tests low again, a delay equal to input_block is executed and the function returns ( 1 )
*/
        
 if ( bit_is_clear( port, channel ) )
 {
  _delay_ms( debounce_time );
   
   if ( bit_is_clear( port, channel ) ) 
   {
    _delay_ms( input_block );
    return 1;
   }
 
 }

 return 0;
}




uint8_t get_adc()
{
 ADCSRA |= ( 1 &amp;lt;&amp;lt; ADSC );   // start the ADC Conversion
 
 while( ADCSRA &amp;amp; ( 1 &amp;lt;&amp;lt; ADSC ));  // wait for the conversion to be complete
 
 return ~ADCH; // return the inverted 8-bit left adjusted adc val

}




void program_flicker()
{ 
 // build the flicker array
 
 for( int i = 0; i &amp;lt; ARRAY_SIZE; i++ )
 {
  flicker_array[ i ] = get_adc();  
  _delay_ms( SAMPLE_RATE );
 }

}




void led_alert()
{
 // this is a function to create a visual alert that an event has occured within the program
 // it toggles the led 10 times.
 
 for( int i = 0; i &amp;lt; 10; i++ )
 {
  OCR0A = 0;
  _delay_ms( 40 );
  OCR0A = 255;
  _delay_ms( 40 );
 }

}




void eeprom_save_array()
{ 
 for( int i = 0; i &amp;lt; ARRAY_SIZE; i++ )
 {
  eeprom_write_byte( &amp;amp;ee_flicker_array[ i ], flicker_array[ i ] );
  
 }
}




void eeprom_read_array()
{
 for( int i = 0; i &amp;lt; ARRAY_SIZE; i++ )
 {
  flicker_array[ i ] = eeprom_read_byte( &amp;amp;ee_flicker_array[ i ] );
  
 }
}




uint8_t scale( uint8_t input, uint8_t inp_low, uint8_t inp_hi, uint8_t outp_low, uint8_t outp_hi)
{
return ( ( ( input - inp_low ) * ( outp_hi - outp_low ) ) / ( ( inp_hi - inp_low ) + outp_low ) );
}




void scale_array()
{
 uint8_t arr_min = 255;
 uint8_t arr_max = 0;
 uint8_t out_low = 20;
 uint8_t out_high = 255;
 
 
 
 // find the min and max values
 
 for( int i = 0; i &amp;lt; ARRAY_SIZE; i++ )
 {
  if( flicker_array[ i ] &amp;lt; arr_min )
   arr_min = flicker_array[ i ];
   
  if( flicker_array[ i ] &amp;gt; arr_max )
   arr_max = flicker_array[ i ];
 }
 
 
 
 // now that we know the range, scale it
 
 for( int i = 0; i &amp;lt; ARRAY_SIZE; i++ )
 {
  flicker_array[ i ] = scale( flicker_array[ i ], arr_min, arr_max, out_low, out_high );
 }
 
}&amp;nbsp;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
After I programmed a flickering candle to the EEPROM using the above code I read back the data.&amp;nbsp; Below is 500 bytes of candle flicker data just in case you don&#39;t care to have a reprogrammable flicker you could use this static one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;c&quot; name=&quot;code&quot;&gt;:10000000777B7D7B78BA95535E3E3E4352353E7595
:100010004B657B5263586B5562777287858C5D7A2E
:10002000535D5062556F6758784E55956B6D7D7373
:100030007D5B6B686A6A606B7777987A87605B6BC9
:10004000534A5368453B65679C6067537375638A81
:100050007F8388806358586B7A787B838A878A8508
:1000600083888A8A8A8A8A8C8A8A8A8A8A88837F0B
:100070007D7B7A78777570707270704D416D6860B5
:1000800035353D3B4145525E41535D60656A5048A0
:100090004B4E3535313333363B40504E525D605315
:1000A000564B352D2E2E353838393B383158406077
:1000B0004D505A5D434053585A554E31312B2E33D3
:1000C0003136353638393938404A413B506240364E
:1000D000292D455E5D523E333B433545383531333E
:1000E00036363936383B4136363039332B29335A98
:1000F0006356413D5052556065553B302E303B4E66
:10010000362E2B3B393D4A503D45584E4B4E4A45C5
:10011000584B555D5B56585E60775E385A52464B79
:10012000504A4A354E412E363638524B463B3340C4
:100130004E605A504D434A504B48403D4046525BFA
:100140006263635B52465B43554526353B5B434DDB
:100150004056585A5D50464545413B437287908A08
:100160008F979D9573656B4D464555554156555531
:10017000565A5A5B5E56625565585A62686D6D6B89
:10018000686A6F656D316F55485055675A41555EC5
:100190006065686863606A60676A7F838C8788923D
:1001A0008D8F888C8C85826A4E35231119433B4193
:1001B000674A4A3B2E3045414A5848705B6D72622F
:1001C0007567565A5E554D77532D36415D55404003
:1001D0004040403E415E82928888909488857B634F
:1001E000555356555053550334013A7EFF01603E36
:1001F0003E28018EFFFFFFFFFFFFFFFFFFFFFFFF16
:00000001FF


&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a video of a LDR programmed candle flicker.&amp;nbsp; I was blowing gently on the candle flame during recording so that it would be a lively flicker for the video.&amp;nbsp; It reminds me of a candle on the porch when a storm is coming in.&amp;nbsp; Of course, it can be reprogrammed with a more subtle flame, the light from a bonfire or fire place, a laser pointer or even your hand shading light from the LDR.&amp;nbsp; You could take a walk thru the woods and record the sunlight shining thru and shadows coming from the treetops.&amp;nbsp; I have found the best results when programming the ATTiny Candle in a darkened room.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/5qKXFkSmUbo?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The list of improvements...&lt;br /&gt;
&lt;br /&gt;
A) I would get the lower power version of the ATTiny85 to allow operation from 2 AA batteries.&amp;nbsp; I only had ATTiny85-20PU in stock so I had to use 3 batteries.&amp;nbsp; The black box external to the candle is the battery box.&amp;nbsp; Unsatisfactory, really.&lt;br /&gt;
&lt;br /&gt;
B) Once the batteries are tucked away and the switch is no longer accessible it may be a good idea to put the candle to sleep instead of switching it off.&amp;nbsp; It could, for example, turn itself off after an hour or two of operation too.&amp;nbsp; Then it could wake up with an external interrupt.&amp;nbsp; And what would interrupt it? Improvement C of course.&lt;br /&gt;
&lt;br /&gt;
C) A &quot;blow&quot; detector to be able to blow &quot;out&quot; and back &quot;on&quot;,&amp;nbsp; the candle.&amp;nbsp; I did some quick experimentation with a piezo to detect a &quot;blow&quot; ( I guess ), although it worked, I abandoned the idea, saving it for later iterations.&amp;nbsp; I couldn&#39;t find a location for the large piezo speakers I have, so I will have to order some smaller ones.&lt;br /&gt;
&lt;br /&gt;
D) If you have any ideas please leave a comment!&lt;br /&gt;
&lt;br /&gt;
Here are a couple more photos.&amp;nbsp; Let me know if you have any success building an ATTiny Candle yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaq90EpUiGTVqqhWXwFLwte4bvPCVOXWQBGHE5nPNFYLX_hz1ZXQ3g9FflZao7kro6AcUHku8jdCOCO7cWAiXsm7wxnJI3jiZUaZwaBViX3-ovnFVKEYK4X-rUZmhM9j-Hvhxh5ICxb0re/s1600/WP_000376.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaq90EpUiGTVqqhWXwFLwte4bvPCVOXWQBGHE5nPNFYLX_hz1ZXQ3g9FflZao7kro6AcUHku8jdCOCO7cWAiXsm7wxnJI3jiZUaZwaBViX3-ovnFVKEYK4X-rUZmhM9j-Hvhxh5ICxb0re/s320/WP_000376.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIwds9v7IDZcRoiMsILkn4Ywlzq1LbFeQa5Vnh_cZ1v7C-3HFiOiz9YZl18EM3hTN6eAY-iskMixB7pkFsZI-a5Z9avApxQ-5m0BKRqPjNHIXiY9dQsth2NiA80j-FsF_6MeZ8v63okmRP/s1600/WP_000370.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIwds9v7IDZcRoiMsILkn4Ywlzq1LbFeQa5Vnh_cZ1v7C-3HFiOiz9YZl18EM3hTN6eAY-iskMixB7pkFsZI-a5Z9avApxQ-5m0BKRqPjNHIXiY9dQsth2NiA80j-FsF_6MeZ8v63okmRP/s320/WP_000370.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/2094762146898586673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/2094762146898586673' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/2094762146898586673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/2094762146898586673'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2012/02/attiny-candle.html' title='ATTiny Candle'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXSUQmQbvi1jLaPkM98gX69oKY57cHpf7owP6rNXhZKlWkXYCSFpD92H3AwdHzMPr5ny8asngjT7PnTkIinl-CRtPZq27TSdpCsEbmyWcG5KchC711oAn7N_reoCkGyER-g0rg_nRMKXoW/s72-c/WP_000356.jpg" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-232571224126390222</id><published>2012-01-14T22:49:00.000-05:00</published><updated>2012-02-10T18:43:20.649-05:00</updated><title type='text'>The Clever Clapper</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix9EI26dB1nXW92AD0GNdDdDIBLpFVYiMwQSeEI4GE78auoe8tnMA3lOg9uR5x-1Gd7AcVS9i_97VPbC5K4-lMpdKQOgsDj5GflQjdvtDC2GJMGxOy2qXw7X4tE2oKxbVIuM_unMvzR6TM/s1600/WP_000247.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix9EI26dB1nXW92AD0GNdDdDIBLpFVYiMwQSeEI4GE78auoe8tnMA3lOg9uR5x-1Gd7AcVS9i_97VPbC5K4-lMpdKQOgsDj5GflQjdvtDC2GJMGxOy2qXw7X4tE2oKxbVIuM_unMvzR6TM/s320/WP_000247.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The other day when I was at the reuse center I came across a few ikea lamps.&amp;nbsp; I picked up two low voltage spot lights for $2 total.&amp;nbsp; I think they came from &lt;a href=&quot;http://www.ikea.com/gb/en/catalog/products/40091847/&quot;&gt;this lamp&lt;/a&gt;.&amp;nbsp; I also bought a &lt;a href=&quot;http://www.ikea.com/us/en/catalog/products/70010840/&quot;&gt;moon lamp&lt;/a&gt; for $0.86 and I am still not sure why they charged such an odd amount for it.&amp;nbsp; I wasn&#39;t too sure about the moon lamp, but I knew right away what I would do with the spot lights.&amp;nbsp; It wasn&#39;t even 12 hours prior that I was trying to sketch up an idea on my slate chalkboard in low light conditions and thought I needed some task lighting.&amp;nbsp; That distraction was what spawned this project.&lt;br /&gt;
&lt;br /&gt;
Surely these lights would do great on their own with just an on/off toggle switch, but where is the fun in that?&amp;nbsp; So, I decided to make a clapper circuit that turned out to be something a little more too.&lt;br /&gt;
&lt;br /&gt;
A &lt;a href=&quot;http://en.wikipedia.org/wiki/The_Clapper&quot;&gt;&quot;Clapper&quot;&lt;/a&gt; is a device that will turn on or off an AC appliance that is plugged into it, such as a lamp or fan when it &quot;hears&quot; you clap twice in approximate succession.&amp;nbsp; They were originally sold in the mid eighties and it appears you can still &lt;a href=&quot;http://www.google.com/products/catalog?q=the+clapper&amp;amp;hl=en&amp;amp;safe=off&amp;amp;client=firefox-a&amp;amp;hs=47F&amp;amp;rls=org.mozilla:en-US:official&amp;amp;prmd=imvns&amp;amp;bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&amp;amp;biw=1400&amp;amp;bih=798&amp;amp;um=1&amp;amp;ie=UTF-8&amp;amp;tbm=shop&amp;amp;cid=13601606191737059431&amp;amp;sa=X&amp;amp;ei=t_cQT9m-N4Lg0QG28LD9Ag&amp;amp;ved=0CHYQxBUwAA&quot;&gt;buy&lt;/a&gt; them today.&lt;br /&gt;
&lt;br /&gt;
In my version of the clapper if you clap twice within one second, the circuit toggles the lamp output.&amp;nbsp; On becomes off and vice versa. If you clap three times within one second, the lamps begin dimming up and down via PWM until a fourth clap is detected or a one minute timeout occurs, whichever comes first.&amp;nbsp; The brightness value is then stored and restored for subsequent toggling of the lights on/off with the two clap event.&amp;nbsp; I also added a relay output to turn on and off the moon lamp.&amp;nbsp; To trigger this relay, you shine a laser beam at the circuit to toggle it.&amp;nbsp; Laser beams begets moon beams.&amp;nbsp; It&#39;s science.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a video of the Clever Clapper in action.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;object class=&quot;BLOGGER-youtube-video&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; data-thumbnail-src=&quot;http://i.ytimg.com/vi/kaP7LGRPf_I/0.jpg&quot; height=&quot;266&quot; width=&quot;320&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/kaP7LGRPf_I?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata&quot; /&gt;
&lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot; /&gt;
&lt;embed width=&quot;320&quot; height=&quot;266&quot;  src=&quot;http://www.youtube.com/v/kaP7LGRPf_I?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In case you are confused by the title of this post being the Clever Clapper and the text on the chalk board that says The Dandy Dapper Clapper you should know that the Clever Clapper is the hardware that a Dandy Dapper Clapper uses to clap his or her way to optimal lighting conditions.&lt;br /&gt;
&lt;br /&gt;
These spot lamps didn&#39;t come with anything other than the lamp and holder.&amp;nbsp; I needed a way to hold the holder so I banged a couple of nails into a some poplar wood to attach the lamp holder to.&amp;nbsp; Ok, so I didn&#39;t &quot;bang&quot; these framing nails into the 1&quot; x 2&quot; bit of poplar wood so much as I drilled a hole slightly smaller than the O.D. of the nail and pressed them in, but you get the idea.&amp;nbsp; This is not a finished installation; just the prototyping stage.&lt;br /&gt;
&lt;br /&gt;
Here is a pic of the lamp, lamp holder, lamp holder holder and the lamp holder holder holder ( aka wall ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvp2bTvCDhLACsokf85rSKExB4LoBV7nfETQ_Nu2TnU6DbptKUKwf3jFcqZKeir2z6Ao5Ur6GQGoHIerEgZh6Lp3r6NVjEkzWN1LIs5_AdpGb8js9AFwi2ZPii5sFifdUkQdVxzP0SeyGG/s1600/WP_000187.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvp2bTvCDhLACsokf85rSKExB4LoBV7nfETQ_Nu2TnU6DbptKUKwf3jFcqZKeir2z6Ao5Ur6GQGoHIerEgZh6Lp3r6NVjEkzWN1LIs5_AdpGb8js9AFwi2ZPii5sFifdUkQdVxzP0SeyGG/s320/WP_000187.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since we are talking about mechanical stuff, below is a picture of how the circuit and moon lamp are mounted to a piece of red oak.&amp;nbsp; The wood board was drilled and tapped to accept aluminum standoffs to screw the circuit board and TIP120 heatsinks to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt5asRaqAbPt-2_jMpGvSJHwhcw3fndl4pBFYsWtY3wgI8qGNJamfsX4saFDqQPup79aom4PqdXZVTdyg3Sxbmm53obFruoqgF070jjNAb9Pekz8Y0RBG7wr-sV42hzOMjcgkKSq2dY623/s1600/WP_000232.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt5asRaqAbPt-2_jMpGvSJHwhcw3fndl4pBFYsWtY3wgI8qGNJamfsX4saFDqQPup79aom4PqdXZVTdyg3Sxbmm53obFruoqgF070jjNAb9Pekz8Y0RBG7wr-sV42hzOMjcgkKSq2dY623/s320/WP_000232.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are a couple of pictures showing the inside of the moon lamp.&amp;nbsp; I added this black box with relay inside to control the hot AC line of this lamp with a microcontroller.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0XHYK46a3jfK0XoIwCTwkz3-FrTdSSLVyKVKYLyIE3e3GitgummKszw_t-wAlSu7hN2mVjpAmwOIjBOkl8WbgNL-z8-kYLzuWzavZDWsoYu9E01cf22d32_hmuuiyMmO3PiyLaIMKDxhb/s1600/WP_000235.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0XHYK46a3jfK0XoIwCTwkz3-FrTdSSLVyKVKYLyIE3e3GitgummKszw_t-wAlSu7hN2mVjpAmwOIjBOkl8WbgNL-z8-kYLzuWzavZDWsoYu9E01cf22d32_hmuuiyMmO3PiyLaIMKDxhb/s320/WP_000235.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZQCKNdKoSU-urI2UNdfpyN_2CKfwRLZ0rx0L5qyH_okz6PNuw6pdxrXBQNEeZVTiYiGdVFVAu6vogAh1t8_y3-WTX9SKORAM7wdS8Gy3h-i4mNUgfVV_Xn6J_zZw1rkFCVuqdFW1mV6aL/s1600/WP_000117.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZQCKNdKoSU-urI2UNdfpyN_2CKfwRLZ0rx0L5qyH_okz6PNuw6pdxrXBQNEeZVTiYiGdVFVAu6vogAh1t8_y3-WTX9SKORAM7wdS8Gy3h-i4mNUgfVV_Xn6J_zZw1rkFCVuqdFW1mV6aL/s320/WP_000117.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
You can download a .rar of the ATTiny2313 code and Clever Clapper circuit schematic &lt;a href=&quot;https://sites.google.com/site/pemills2011/file/Clever_Clapper.rar?attredirects=0&amp;amp;d=1&quot;&gt;here.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
There isn&#39;t much to say about the software except that there may be some &quot;legacy&quot; code in it still.&amp;nbsp; That is, variables and the like that I didn&#39;t delete when changing things around or removing functionality so the program would fit into the available program space.&lt;br /&gt;
&lt;br /&gt;
Below is a picture of the schematic.&amp;nbsp; Starting at the top left you can see an electret microphone and it&#39;s filtered power supply.&amp;nbsp; This is fed into one half of an LM358 Op-amp setup for 100x amplification.&amp;nbsp; The 100k0 potentiometer is used for clap detection sensitivity adjustment.&amp;nbsp; There is a connection to PD3 here that is no longer used, but more on that later.&amp;nbsp; Then, the signal, or more accurately, part of the signal passes thru a low pass filter and on to the other half of the LM358 setup as a comparator.&amp;nbsp; The output of this comparator stage is fed to the ATTiny2313.&amp;nbsp; Otherwise the circuit is pretty straight forward, standard 7805 power supply and uC accoutrements, TIP120 darlington transistor with pulldown resistors.&amp;nbsp; Oh, and don&#39;t forget that 1n4004 flywheel diode across the relay coil or you will be replacing your uC in very short order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh52wl1NFcaVoDa1HMVebCqoNibKIQWKkd9SqyRq9omeRGDxtUhmLTUd2VfTEGghaSKOfrGR4N3lmMCQHSPq3pZ3ZAjqPa8omEVjF73uOB6gUJDEnhiqJTqtrtzFvNg7TP3p74VlYfpNO08/s1600/clever+clapper+v1.3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;172&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh52wl1NFcaVoDa1HMVebCqoNibKIQWKkd9SqyRq9omeRGDxtUhmLTUd2VfTEGghaSKOfrGR4N3lmMCQHSPq3pZ3ZAjqPa8omEVjF73uOB6gUJDEnhiqJTqtrtzFvNg7TP3p74VlYfpNO08/s320/clever+clapper+v1.3.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Here is a close up of the circuit.&amp;nbsp; You can see the electret mic in the lower middle.&amp;nbsp; There are two phototransistors on the board but only one is connected.&amp;nbsp; They are the clear things with one at the center top of the ATTiny2313. There is also a red tactile switch who&#39;s input to the microcontroller is interpreted as two hand claps.&amp;nbsp; This is used in the event you want to be quiet and still toggle the lights on and off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8fN8Xys5aVIyOUCXdVab9ucOvMJR04FmBNoBpnv_6RnnC12z6PVh1s7ujZ1zkt7XKr-TRnYnccbgHNKLOX4JX0gkfK7RgnQv6LKFltUu6XGXS3WSPAf7VsyCM0TY8V8Np7_EVUM_mXZSW/s1600/WP_000238.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8fN8Xys5aVIyOUCXdVab9ucOvMJR04FmBNoBpnv_6RnnC12z6PVh1s7ujZ1zkt7XKr-TRnYnccbgHNKLOX4JX0gkfK7RgnQv6LKFltUu6XGXS3WSPAf7VsyCM0TY8V8Np7_EVUM_mXZSW/s320/WP_000238.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
When I first started this project I knew that I wanted to detect hand claps.&amp;nbsp; As a human, I am quite good at this but, I had no idea how to describe a hand clap to a microcontroller.&amp;nbsp; So, to &quot;see&quot; as a digital device would, I opened &lt;a href=&quot;http://audacity.sourceforge.net/&quot;&gt;Audacity &lt;/a&gt;and started clapping my hands.&amp;nbsp; Below is a picture of the spectrum analysis.&amp;nbsp; To help prevent false triggers, it appears I can easily block non-clapping frequencies above ~5khz.&amp;nbsp; This significantly improved the reliability of the circuit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtvYCUOGiOs8AodVWV-7AHAoUGnSBmVbiTQB0tCRHxconSC-gaSMLXFASJiSdYF49B5GWqS6zPNvGMhER5Sexwx27uuzeQz-kU6ZlzthRfoSyPsNsq7hQK0iIHM5pNpwTu3kuntNWD21Fi/s1600/F_Plot+Hand+Clap.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;278&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtvYCUOGiOs8AodVWV-7AHAoUGnSBmVbiTQB0tCRHxconSC-gaSMLXFASJiSdYF49B5GWqS6zPNvGMhER5Sexwx27uuzeQz-kU6ZlzthRfoSyPsNsq7hQK0iIHM5pNpwTu3kuntNWD21Fi/s320/F_Plot+Hand+Clap.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
As I alluded to earlier I was not able to implement all of the features I wanted in my clapper.&amp;nbsp; This is because I ran out of program memory.&amp;nbsp; The last build used 100.0% of the available space.&amp;nbsp; Of course I could have re-written the code trying to optimize for space or more likely I will just use a different uC in subsequent hardware iterations, should I decide the current implementation is prosaic.&amp;nbsp; I feel code and hardware optimizations are a worthy subject of focus, but too, sometimes you just want to get the job done.&lt;br /&gt;
&lt;br /&gt;
Here is a video of one feature that didn&#39;t make the cut due to the lack of program memory space.&amp;nbsp; This mode would have been activated by a succession of four claps.&amp;nbsp; In this mode, the raw speaker input ( pre-lowpass filter ) is fed to the microcontroller and modulates the PWM output to the lamps.&amp;nbsp; The light looks like it is &quot;talking&quot; to you.&amp;nbsp; It is a little hard to see in the video as I think the automatic white balance function of the video camera takes some of the resolution away.&amp;nbsp; I was sad to see this feature go.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/A7XXPJOxyOs?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Over all I am quite pleased with the Clever Clapper.&amp;nbsp; It is a lot of fun walking into a room and command-clapping lights to turn on - to your desired brightness value no less.&amp;nbsp; I have yet to decide if I want to remake the hardware to allow for more features.&amp;nbsp; I may, as one feature I wanted was clap programmable clap codes for instantly setting different lighting moods.&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
// clap off&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/232571224126390222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/232571224126390222' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/232571224126390222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/232571224126390222'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2012/01/clever-clapper.html' title='The Clever Clapper'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix9EI26dB1nXW92AD0GNdDdDIBLpFVYiMwQSeEI4GE78auoe8tnMA3lOg9uR5x-1Gd7AcVS9i_97VPbC5K4-lMpdKQOgsDj5GflQjdvtDC2GJMGxOy2qXw7X4tE2oKxbVIuM_unMvzR6TM/s72-c/WP_000247.jpg" height="72" width="72"/><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-4058177286825125909</id><published>2011-12-11T15:43:00.004-05:00</published><updated>2011-12-11T22:57:07.458-05:00</updated><title type='text'>Capricious Clock</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiZtz5-5TEgqHwxfvvMNS-V0xg9qHrSn9S-PI1r-bU0JRfNQwsxxIiPCMaibZrFNifVbdiUneIv-s4YlBFZv3DKFR_d1UWfImKtVHe4fz9zdk1u4j16PhUp1c8aC7pJlTRWGjtEFqIau7D/s1600/WP_000029.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;193&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiZtz5-5TEgqHwxfvvMNS-V0xg9qHrSn9S-PI1r-bU0JRfNQwsxxIiPCMaibZrFNifVbdiUneIv-s4YlBFZv3DKFR_d1UWfImKtVHe4fz9zdk1u4j16PhUp1c8aC7pJlTRWGjtEFqIau7D/s320/WP_000029.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
A couple of months ago I took a break from working on a precision pendulum clock project to build this.&amp;nbsp; I call it a capricious clock for reasons that will be obvious after watching the video below.&amp;nbsp; It ticks and tocks in an unnerving and aperiodic or spasmodic manner that anthropomorphically demands your attention.&amp;nbsp; Even as the author of the software, I find myself lured in, staring the capricious clock down, face to face, anticipating and wondering when and sometimes if, the next tick will occur.&amp;nbsp; Mercurial, you say? Precisely, but alliteration won out and &quot;Capricious Clock&quot; it is.&lt;br /&gt;
&lt;br /&gt;
The most marvelous part of all of this, of course, is that the clock keeps accurate time over the long term.&amp;nbsp; Neglecting inaccuracies inherent to quartz clocks, this clock could conceivably be off by no more than 8 seconds at any point in time.&amp;nbsp; However, at no point in time do you ever feel the displayed time is something to be believed.&amp;nbsp; I would like to place this clock in a public area to gauge peoples reactions.&amp;nbsp; For now, it is on a show and tell basis, hanging on a wall at home.&lt;br /&gt;
&lt;br /&gt;
Here is a video of the Capricious Clock running next to a regular AC wall clock.&amp;nbsp; In the video, I fast forward by 500% at &lt;a href=&quot;http://youtu.be/zQXS6WjeTdg?t=1m12s&quot;&gt;1:12&lt;/a&gt; until near the very end.&amp;nbsp; This video is illustrative of the erratic ticking of the capricious clock on the right next to a smooth AC clock motor sweeping second hand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/zQXS6WjeTdg?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
The idea for a mind-melting ticking machine came from the author Terry Pratchett.&amp;nbsp; There is &lt;a href=&quot;http://en.wikipedia.org/wiki/Havelock_Vetinari#Appearance.2C_habits_and_miscellaneous&quot;&gt;&quot;Lord Vetinari&#39;s Clock&quot;&lt;/a&gt; in the series &lt;a href=&quot;http://www.terrypratchettbooks.com/discworld/&quot;&gt;Discworld&lt;/a&gt;.&amp;nbsp; I&#39;m not exactly sure how, as it seems everyone around me is familiar with Discworld , but I am just finding out about it now.&amp;nbsp; Actually, it was a similar clock that &lt;a href=&quot;http://hackaday.com/2011/10/12/building-a-better-clock-to-drive-you-insane/&quot;&gt;someone else built&lt;/a&gt; that got me thinking about how I would go about making something like this for myself.&lt;br /&gt;
&lt;br /&gt;
That is the what and why, now on to the how...&lt;br /&gt;
&lt;br /&gt;
In the pictures below you can see how the quartz clock movement was modified to intercept the 1pps signal and output my own clock &quot;motor&quot; drive pulse.&amp;nbsp; I cut the traces going to and from the &quot;black blob&quot; IC on the circuit board for the 1pps signal and motor drive pulse.&amp;nbsp; These were then soldered to fine gauge enameled wire and brought out to a strip PCB for later access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUBH4t1wrVk0JuqkTZjHu77wKsI-f_GFT5oFsN3yJorA5dlRY76wfTgsMBw2wgq1I8yp2AHfVyLgbFnttCxPmWeQzphxRRu7cjw5Q7XwFkMpf-YL55mzRw4FCGv9gi8NIkyO1rY4zFbsxT/s1600/IMAG2103.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUBH4t1wrVk0JuqkTZjHu77wKsI-f_GFT5oFsN3yJorA5dlRY76wfTgsMBw2wgq1I8yp2AHfVyLgbFnttCxPmWeQzphxRRu7cjw5Q7XwFkMpf-YL55mzRw4FCGv9gi8NIkyO1rY4zFbsxT/s320/IMAG2103.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
In the picture below you can see how the quartz clock movement works.&amp;nbsp; The black cylinder on the end of the white plastic gear is a magnet.&amp;nbsp; It&#39;s poles are aligned perpendicular to its axis of rotation.&amp;nbsp; When the movement is assembled, the copper wire electromagnet is pulsed once per second, alternating&amp;nbsp; polarity and consequently magnetic poles to drive the movement.&amp;nbsp; The relative location of the gear magnet and electromagnet ensure that the clock moves in the clockwise direction usually.&amp;nbsp; It is possible with different electromagnet pulse durations to sometimes generate an anticlockwise tick.&amp;nbsp; Nothing reliable enough for an open loop system like this though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwSY9E55qJsaN5wCk7e91oU0boceHG-poOWm6jimOt6D98wACLTPJFcVObclpcwm1IfVWtLou_HKnATvu1Au3QAHXHbeVTt0cUiCbd_vk9r-TPuA8PTq48u8hROdanAwl0JnM4ihlYA4vV/s1600/IMAG2107.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwSY9E55qJsaN5wCk7e91oU0boceHG-poOWm6jimOt6D98wACLTPJFcVObclpcwm1IfVWtLou_HKnATvu1Au3QAHXHbeVTt0cUiCbd_vk9r-TPuA8PTq48u8hROdanAwl0JnM4ihlYA4vV/s320/IMAG2107.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Below is the quartz movement with enameled wire soldered to the cut PCB traces.&amp;nbsp; You may notice this is a different quartz movement than the one finally installed in the clock.&amp;nbsp; I had to modify a new movement after accidentally applying 5v to one of the black blob IC traces and consequently rendered it useless.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4t1MHEfZG-0g2WedxGiOG5Y5TvmV8pjuiUWQEMV3Ij1QRKah3Pe8TN27Gq9-323M9iNxqia0V2hTDB50KenUPu82chBVr0VnU7LLVulmO0bP2ohJxdC3Z9fmyBQYk0RXYrCPqlpew-gK3/s1600/IMAG2111.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4t1MHEfZG-0g2WedxGiOG5Y5TvmV8pjuiUWQEMV3Ij1QRKah3Pe8TN27Gq9-323M9iNxqia0V2hTDB50KenUPu82chBVr0VnU7LLVulmO0bP2ohJxdC3Z9fmyBQYk0RXYrCPqlpew-gK3/s320/IMAG2111.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Here you can see the fine enameled wire brought out to some blank PCB for more robust attachment of wires that will be controlling the clock and receiving the 1 pps signal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2SVmNM6W3UVrKmcqWTpWoA2cEBKiicROboWwVPmXNv1LLyOEIUCUWmhyphenhyphenqPkS7kFGz863ESGo2gI6lcMhOtJARFFf8iRCo1n3Xbs9OE1bslY9Gbk51HK5VyaSgGV-pnfxYfttkSA3qNhqP/s1600/IMAG2123.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2SVmNM6W3UVrKmcqWTpWoA2cEBKiicROboWwVPmXNv1LLyOEIUCUWmhyphenhyphenqPkS7kFGz863ESGo2gI6lcMhOtJARFFf8iRCo1n3Xbs9OE1bslY9Gbk51HK5VyaSgGV-pnfxYfttkSA3qNhqP/s320/IMAG2123.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
At this point you could jumper the correct traces back together and the quartz motor would function as originally intended, but next a microcontroller comes in to modify the 1 pps to something a little less phlegmatic.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Here is the schematic for what we have done so far to the quartz movement and what is to come by adding a uC. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF3pCtLqvaFZ9-3dgOgsSbbR_KViHwW58i0IYCxcy7vrahy5ZgZTLXsytfczVGjwuQW0uNyV7JX0qyMQroRmFUIJ0Mn3X6yblRE4B90TOY79LMglGr9CIZCDa2cZomQKWOybOE65ZITzwF/s1600/Capricious+Clock+Schematic.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF3pCtLqvaFZ9-3dgOgsSbbR_KViHwW58i0IYCxcy7vrahy5ZgZTLXsytfczVGjwuQW0uNyV7JX0qyMQroRmFUIJ0Mn3X6yblRE4B90TOY79LMglGr9CIZCDa2cZomQKWOybOE65ZITzwF/s320/Capricious+Clock+Schematic.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&amp;nbsp;I mention in at least 4 places ( here included ) that after programming the chip you have to set the RSTDISBL fuse if you want to use PB5 as an IO pin.&amp;nbsp; Once you do this, you cannot use ISP programming and instead have to do high voltage programming to bring the reset line up to 12v.&amp;nbsp; For this reason, I have yet to test my code using PB5 as the intended &quot;Mute&quot; switch.&amp;nbsp; I want to use it to toggle on or off the ability for the uC to make a tick-tock sound with the piezo.&amp;nbsp; Until I am happy with the code, and I think I am nearly, I don&#39;t want to commit to the RSTDISBL fuse programming.&amp;nbsp; I guess this capricious clock is not currently mutable?... 0_0&lt;br /&gt;
&lt;br /&gt;
One way around the RSTDISBL / PB5 issue I describe is to use a boot loader on the ATtiny.&amp;nbsp; I may do this because I don&#39;t like the idea of not being able to easily change the firmware at a later date and I have never used a boot loader on an ATtiny before and it may be fun. &lt;br /&gt;
&lt;br /&gt;
A couple of other ideas I had for erratic ticking I had were to tick faster from 0s-30s and slower from 30s-60s as if the clock was operating in a larger gravitational field than its surroundings and the motor just barely keeps up.&amp;nbsp; Or, the same erratic ticking over a longer time though so that it drifts +/- 5 minutes an hour or so.&amp;nbsp; I think this will eventually catch someones attention, but it would take longer to notice.&amp;nbsp; For these reasons I think I have just convinced myself to remake this project with an added bootloader on the ATtiny85.&lt;br /&gt;
&lt;br /&gt;
Here are a couple of pictures from the inside of the clock.&amp;nbsp; This clock made it really easy to shoehorn the additional electronics inside.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNtjJru8RpFjSypp60NItWfI9s7aQUAvr8j5oxPJ-8DZOsF4ob2RjACJD1e0c2F7N-Kzqy171sSiO7j8yt41Ianz0J8MB_W8wPh9vgtiZOWPyE08RS-XsL4-2r0LWJFCOAHXmXY9tvikeC/s1600/WP_000014.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNtjJru8RpFjSypp60NItWfI9s7aQUAvr8j5oxPJ-8DZOsF4ob2RjACJD1e0c2F7N-Kzqy171sSiO7j8yt41Ianz0J8MB_W8wPh9vgtiZOWPyE08RS-XsL4-2r0LWJFCOAHXmXY9tvikeC/s320/WP_000014.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggsgiD7UGTUUAwGeyFvAh-ahekE7GbHvsg0JokO8qPQemS2zMXoJp0Qr4mdF1xblHJ_dHTSr4deNQKJszwctd0uj6LNmfN_sF2B1iBJhgEq5OhOXkS2FvQpAQa6ESZsr1wEBCoQgOJlxJj/s1600/WP_000015.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggsgiD7UGTUUAwGeyFvAh-ahekE7GbHvsg0JokO8qPQemS2zMXoJp0Qr4mdF1xblHJ_dHTSr4deNQKJszwctd0uj6LNmfN_sF2B1iBJhgEq5OhOXkS2FvQpAQa6ESZsr1wEBCoQgOJlxJj/s320/WP_000015.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
// software&lt;br /&gt;
&lt;br /&gt;
The code keeps track of the 1pps pulses coming from the quartz clock movement, it delays for a random period of time then moves the second hand.&amp;nbsp; If the &quot;Real Time&quot; elapsed is greater than the displayed time the program will delay anywhere from 1-0.125s to catch up to the &quot;Real Time&quot;.&amp;nbsp; If the display time is faster, the program will select a random time from 1-8s to slow down so that &quot;Real Time&quot; can catch up.&lt;br /&gt;
&lt;br /&gt;
Rather than just turning the thing on and letting it run in an endless loop I used external interrupts, nested interrupts and the watchdog timer with power down sleep mode to wake up from a sleep period to update the display.&lt;br /&gt;
&lt;br /&gt;
Using the aforementioned capabilities of the ATtiny85 was necessary for the reliability of counting the 1pps pulse and the ability to conserve battery power - a very important thing to do in battery powered devices.&amp;nbsp; You can see in the calculations below the clock will theoretically run for ~225 days or&amp;nbsp; ~61.6% of a year before needing new batteries.&amp;nbsp; Now, that is theoretical and does not account for sleep current, wake up current and time or battery self discharge.&amp;nbsp; However, in this case, where the ratio of active to sleep current is so great, you can safely ignore those calculations. By entering into power down sleep mode the battery life is extended by nearly 3 months.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj30-zG9REuhvz0NXE7IH1j6ulZPaJUlrdwwhiY3Zf9LrI_tD728073lt0UHc-L2SoZ_K9sqgNgaji79KtkbcMcf3kmlp-S4_Wd766KtGlrgU6OzcStwuvcbfUgmAuuOGg1lKMkAYmZ9awG/s1600/Power+Consumption.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;308&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj30-zG9REuhvz0NXE7IH1j6ulZPaJUlrdwwhiY3Zf9LrI_tD728073lt0UHc-L2SoZ_K9sqgNgaji79KtkbcMcf3kmlp-S4_Wd766KtGlrgU6OzcStwuvcbfUgmAuuOGg1lKMkAYmZ9awG/s320/Power+Consumption.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code.&amp;nbsp; As previously stated the switch on PB5 is commented out in the code so it will not work.&amp;nbsp; I did this because I am not done using the ISP and will probably use a bootloader in the end.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;c&quot; name=&quot;code&quot;&gt;/*

Program Title: Capricious Clock
Author: Pete Mills
Date: 2011.12.09
petemills.blogspot.com

Filename: capricious_clock_v1.0_main.c

Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 0 ms
ck div by 8 for 1MHz system clock

Set RSTDISBL fuse after programming to allow use of PB5
After setting RSTDISBL you will have to use HV programming to reprogram the AVR - no more ISP

*/

// Includes

#include &amp;lt;avr/io.h&amp;gt;     
#include &amp;lt;util/delay.h&amp;gt;    
#include &amp;lt;avr/interrupt.h&amp;gt;
#include &amp;lt;avr/sleep.h&amp;gt;


// Definitions

#define IO_PORT  PORTB
#define LED   PB0  // LED pin PORTB Pin 4
#define BUZZER   PB1  // piezo output buzzer
#define PPS_IN   PB2  // 1 Hz input signal
#define SEC_MOT_1 PB3  // output to drive seconds motor coil on quartz clock
#define SEC_MOT_2  PB4  // another output to seconds motor coil on quartz clock assy
#define MUTE_SW  PB5  // input switch for muting piezo and ...?


// function prototypes

void setup(void);
void toggle_led(void);
void inc_sec(void);
void tick_tock(void);



// Global Constants


volatile uint32_t rt_sec = 0; // actual time elapsed
volatile uint32_t my_sec = 0; // seconds displayed on the clock
volatile uint8_t  do_tick = 0; // decide to tick or not



int main(void)
{

setup();
sei(); 
set_sleep_mode(SLEEP_MODE_PWR_DOWN);



 while(1)
 { 
  /*
  // turn on or off the ticking sound
  if ( bit_is_clear( PINB, MUTE_SW ) ) 
  {
   ++do_tick;
   
   if( do_tick &amp;gt; 1 )
   {
    do_tick = 0;
   }
  
  }
  */
  
  asm(&quot;nop&quot;);  // ISR&#39;s return to main to execute a minimum of one instruction 
  asm(&quot;nop&quot;);  // before executing pending interrupts
  
  sleep_mode(); // go back to sleep
  
 }
 
}




// functions

void setup(void)
{

// Port Configuration

 DDRB |= ( ( 1 &amp;lt;&amp;lt; SEC_MOT_1 ) | ( 1 &amp;lt;&amp;lt; SEC_MOT_2 ) | ( 1 &amp;lt;&amp;lt; BUZZER ) | ( 1 &amp;lt;&amp;lt; LED ) ) ;  // set PB1::PB4 to &quot;1&quot; for output 
 IO_PORT &amp;amp;= ~( ( 1 &amp;lt;&amp;lt; SEC_MOT_1 ) | ( 1 &amp;lt;&amp;lt; SEC_MOT_2 ) | ( 1 &amp;lt;&amp;lt; BUZZER ) | ( 1 &amp;lt;&amp;lt; LED ) ); // set the outputs low

 DDRB &amp;amp;= ~( ( 1 &amp;lt;&amp;lt; PPS_IN ) | ( 1 &amp;lt;&amp;lt; MUTE_SW ) ); // set PB0 and PB5 to &quot;0&quot; for input
 IO_PORT |= ( 1 &amp;lt;&amp;lt; MUTE_SW );      // enable internal pullup on input switch
 

// Interrupt Configuration

 // External Interrupt INT0 ( INT0_vect )
 
 // low level on INT0 causes interrupt
 
 GIMSK |= ( 1 &amp;lt;&amp;lt; INT0 ); // enable external interrupt on INT0
 
 
 // Watchdog Timer Interrupt ( WDT_vect )
 
 WDTCR |= ( ( 1 &amp;lt;&amp;lt; WDCE ) | ( 1 &amp;lt;&amp;lt; WDE ) );
 WDTCR &amp;amp;= ~( 1 &amp;lt;&amp;lt; WDE );
 
 WDTCR |= ( 1 &amp;lt;&amp;lt; WDIE ); // watchdog timeout interrupt enable
 WDTCR |= ( ( 1 &amp;lt;&amp;lt; WDP0 ) | ( 1 &amp;lt;&amp;lt; WDP2 ) ); // half second sleep

}


void toggle_led()
{
    IO_PORT ^= (1&amp;lt;&amp;lt;LED);
}



// function to drive the quartz clock motor
void inc_sec()
{

 if( my_sec % 2 == 0 )
 {
  IO_PORT |= ( 1 &amp;lt;&amp;lt; SEC_MOT_1 ); 
 }
 else
 {
  IO_PORT |= ( 1 &amp;lt;&amp;lt; SEC_MOT_2 ); 
 }
 
 _delay_ms(30); // empirically derived pulse duration
 
 IO_PORT &amp;amp;= ~( ( 1 &amp;lt;&amp;lt; SEC_MOT_1 ) | ( 1 &amp;lt;&amp;lt; SEC_MOT_2 ) );

}



// making the tick tock escapement sound
void tick_tock()
{

 if( rt_sec % 2 == 0 )
 {
  IO_PORT |= ( 1 &amp;lt;&amp;lt; BUZZER );
  _delay_us(200);
  IO_PORT &amp;amp;= ~( 1 &amp;lt;&amp;lt; BUZZER ); 
 }
 else
 {
  IO_PORT |= ( 1 &amp;lt;&amp;lt; BUZZER );
  _delay_ms(1);
  IO_PORT &amp;amp;= ~( 1 &amp;lt;&amp;lt; BUZZER );  
 }
 
}




// this ISR is called once per second as the quartz clock movement outputs its pps signal 
ISR( INT0_vect )
{
 ++rt_sec;
 
 if( do_tick )
 {
  tick_tock();
  //toggle_led();
 }

 
 while( bit_is_clear( PINB, PPS_IN ) )
 {
  // stay in ISR until input signal is high again to stop multiple triggers
 }

}



// this ISR is called to update the output display
ISR( WDT_vect )
{
 sei(); // allow this interrupt to be interrupted...
 
 uint8_t rand_num = (uint8_t) rand();
 uint8_t case_sel = 0;

 ++my_sec;  // increment displayed time counter
 inc_sec();  // move the second hand
 
 rand_num = (uint8_t) rand();
  
  
  case_sel =  rand_num % 4 ;
  
  if( my_sec &amp;gt; rt_sec )
   case_sel += 3;
  
  
  switch (case_sel)   // set sleep time
  {
   case 0: 
    WDTCR &amp;amp;= ~( ( 1 &amp;lt;&amp;lt; WDP3 ) | ( 1 &amp;lt;&amp;lt; WDP2 ) ); 
    WDTCR |= ( ( 1 &amp;lt;&amp;lt; WDP1 ) | ( 1 &amp;lt;&amp;lt; WDP0 ) );     // ~0.125s sleep
   break;
   
   case 1: 
    WDTCR &amp;amp;= ~( ( 1 &amp;lt;&amp;lt; WDP3 ) | ( 1 &amp;lt;&amp;lt; WDP1 ) | ( 1 &amp;lt;&amp;lt; WDP0 ) ); 
    WDTCR |= ( 1 &amp;lt;&amp;lt; WDP2 );          // ~0.25s sleep
   break;
   
   case 2: 
    WDTCR &amp;amp;= ~( ( 1 &amp;lt;&amp;lt; WDP3 ) | ( 1 &amp;lt;&amp;lt; WDP1 ) ); 
    WDTCR |= ( ( 1 &amp;lt;&amp;lt; WDP2 ) | ( 1 &amp;lt;&amp;lt; WDP0 ) );     // ~0.50s sleep
   break;
   
   case 3: 
    WDTCR &amp;amp;= ~( ( 1 &amp;lt;&amp;lt; WDP3 ) | ( 1 &amp;lt;&amp;lt; WDP0 ) ); 
    WDTCR |= ( ( 1 &amp;lt;&amp;lt; WDP2 ) | ( 1 &amp;lt;&amp;lt; WDP1 ) );     // ~1.00s sleep
   break;
   
   case 4: 
    WDTCR &amp;amp;= ~( ( 1 &amp;lt;&amp;lt; WDP3 ) ); 
    WDTCR |= ( ( 1 &amp;lt;&amp;lt; WDP2 ) | ( 1 &amp;lt;&amp;lt; WDP1 ) | ( 1 &amp;lt;&amp;lt; WDP0 ) ); // ~2.00s sleep
   break;
   
   case 5: 
    WDTCR &amp;amp;= ~( ( 1 &amp;lt;&amp;lt; WDP2 ) | ( 1 &amp;lt;&amp;lt; WDP1 ) | ( 1 &amp;lt;&amp;lt; WDP0 ) ); 
    WDTCR |= ( 1 &amp;lt;&amp;lt; WDP3 );          // ~4.00s sleep
   break;
   
   case 6: 
    WDTCR &amp;amp;= ~( ( 1 &amp;lt;&amp;lt; WDP2 ) | ( 1 &amp;lt;&amp;lt; WDP1 ) ); 
    WDTCR |= ( ( 1 &amp;lt;&amp;lt; WDP3 ) | ( 1 &amp;lt;&amp;lt; WDP0 ) );     // ~8.00s sleep
   break;
   
   default: 
    WDTCR &amp;amp;= ~( ( 1 &amp;lt;&amp;lt; WDP3 ) | ( 1 &amp;lt;&amp;lt; WDP0 ) );      // should never occur
    WDTCR |= ( ( 1 &amp;lt;&amp;lt; WDP2 ) | ( 1 &amp;lt;&amp;lt; WDP1 ) );     // but set the WDT for 1s if it does
   
  }
  
}


&lt;/pre&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/4058177286825125909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/4058177286825125909' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/4058177286825125909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/4058177286825125909'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2011/12/capricious-clock.html' title='Capricious Clock'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiZtz5-5TEgqHwxfvvMNS-V0xg9qHrSn9S-PI1r-bU0JRfNQwsxxIiPCMaibZrFNifVbdiUneIv-s4YlBFZv3DKFR_d1UWfImKtVHe4fz9zdk1u4j16PhUp1c8aC7pJlTRWGjtEFqIau7D/s72-c/WP_000029.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-8720017083704740171</id><published>2011-09-08T13:48:00.003-04:00</published><updated>2012-01-31T18:44:30.876-05:00</updated><title type='text'>Arcade Push Button Light Switch Redux</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhewIJXa10N3NwwRPdc2BcdvK2mRU4PagJ6FC_FfyMQEZFyRAnVjYqMZMkh3it2-vG1VPhRXIyggRQeTSsG66ev8NOfCOhoPeAU7LgadWtGT2RWLSAZKqa3M6D7LPxLjA8rhgr3HsI9OPNG/s1600/IMAG1858.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhewIJXa10N3NwwRPdc2BcdvK2mRU4PagJ6FC_FfyMQEZFyRAnVjYqMZMkh3it2-vG1VPhRXIyggRQeTSsG66ev8NOfCOhoPeAU7LgadWtGT2RWLSAZKqa3M6D7LPxLjA8rhgr3HsI9OPNG/s320/IMAG1858.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I got a lot of feedback on my post from a couple days ago about making an &lt;a href=&quot;http://petemills.blogspot.com/2011/09/arcade-pushbutton-light-switch.html&quot;&gt;Arcade Push Button Light Switch&lt;/a&gt;.&amp;nbsp; Mostly that this task could be easily accomplished with a single DPDT 110VAC relay.&amp;nbsp; While this true, the original post was really about using what I had on hand at the moment to remake &lt;a href=&quot;http://www.etsy.com/listing/74059377/working-arcade-light-switch&quot;&gt;something I saw online&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Never the less, while I was at Grainger this morning picking up supplies for another project I also grabbed a &lt;a href=&quot;http://www.grainger.com/Grainger/OMRON-Square-Base-General-Purpose-Relay-2W928&quot;&gt;DPDT relay, part no. LY2-AC110/120&lt;/a&gt;, to make another version of the arcade button light switch.&amp;nbsp; This is how I would make the switch if I was going to be purchasing parts for it.&lt;br /&gt;
&lt;br /&gt;
Here is a schematic.&amp;nbsp; This sort of design has been around for ages.&amp;nbsp; I guess people used to use relays for all kinds of control applications and called it &lt;a href=&quot;http://en.wikipedia.org/wiki/Relay_logic&quot;&gt;Relay Logic&lt;/a&gt;.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://sites.google.com/site/pemills2011/file/ACRelayFlipflop.pdf?attredirects=0&amp;amp;d=1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;194&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsJ_oYVo5sTYoEo4vCyUPL20rk_WR1xiME6ERa6IyUlVhA-sV_D0xjli5Q8n1Tsie5sKv_dMOq16-8DjxhyMZQbcFpkgAk4RJ_cqYO3nsmXoFJqRrFIHAefy8eabZmOqU2BY0iDaxayh1a/s320/Untitled.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
* Update *&lt;br /&gt;
&lt;br /&gt;
A few people have asked for more pictures of what wires go where.&amp;nbsp; Unfortunately, I do not have any photographs that would be useful.&amp;nbsp; I did draw the picture below, though and I know of at least one person that built this switch based on it.&amp;nbsp; If you are unfamiliar with working with 120v household wiring be sure to ask someone who is in the know for some help.&amp;nbsp; Getting a shock from 120vac is unpleasant.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6XXQihiWTMe96jg4gjcFdoMVyiBi1Y6W8sD7EjRjvRuCXqidCE3snWgiXyYbRxmObpX629WmaVdpTkHwBdT2ioCuOQzBE4K6p_MCrecXiFVGUYsuRC1AgcpD8ZIHCTM7oKnmQKMhxwKEE/s1600/WP_000140.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6XXQihiWTMe96jg4gjcFdoMVyiBi1Y6W8sD7EjRjvRuCXqidCE3snWgiXyYbRxmObpX629WmaVdpTkHwBdT2ioCuOQzBE4K6p_MCrecXiFVGUYsuRC1AgcpD8ZIHCTM7oKnmQKMhxwKEE/s320/WP_000140.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a picture of the microswitches in the arcade pushbuttons.&amp;nbsp; As you can see they are more than capable of switching the voltage and current required for this design.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI4zBTGy3O4CtAupqV4h6GvHmN7oB9WH32et4Lk6CQtWiiWTXvFniHgbWH7OWXuLcerSXhB74LJL-GGSHWLfqrnAhWRL1Zhe_p_CmLT4O78td7S738PbSps4_LNq8qrzaDXzzyE5S4j54a/s1600/IMAG1845.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI4zBTGy3O4CtAupqV4h6GvHmN7oB9WH32et4Lk6CQtWiiWTXvFniHgbWH7OWXuLcerSXhB74LJL-GGSHWLfqrnAhWRL1Zhe_p_CmLT4O78td7S738PbSps4_LNq8qrzaDXzzyE5S4j54a/s320/IMAG1845.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
So, wire it all up, apply some hot glue and drink some coffee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzCKaU1KZN-KFOWWyYDGhWp08C6wrpu0aqA5GcOBA-VLBMRfGswfz4ahuIqAMIXHFbg2LghUE2TYfbkE53iHYa6cP9TJjC4UFGdAzgxh9qP9gwdTpWbMw4JSUFb0bPXgL-9h21d0ElTDcn/s1600/IMAG1849.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzCKaU1KZN-KFOWWyYDGhWp08C6wrpu0aqA5GcOBA-VLBMRfGswfz4ahuIqAMIXHFbg2LghUE2TYfbkE53iHYa6cP9TJjC4UFGdAzgxh9qP9gwdTpWbMw4JSUFb0bPXgL-9h21d0ElTDcn/s320/IMAG1849.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh98PN8E8VXS7t7pBn5MNysc-X9In3Uyx3k17_mXhFaTzc8UDARi6ysv-gLwfSkVGGFBiuEk7kdYU8BqbfPB1OGHLlSVh1ro8lsT7bWhQf8y15UQOBl2hNAYy1d7EYx7GQE3P_GTULW73oV/s1600/IMAG1852.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh98PN8E8VXS7t7pBn5MNysc-X9In3Uyx3k17_mXhFaTzc8UDARi6ysv-gLwfSkVGGFBiuEk7kdYU8BqbfPB1OGHLlSVh1ro8lsT7bWhQf8y15UQOBl2hNAYy1d7EYx7GQE3P_GTULW73oV/s320/IMAG1852.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYlD1vYneBp4KZrmFYH-F98koOvPonXkyjYTqn-fZuksXhk3SbfENsv1LcGyLi2hwjnhPRHlKobEfcsEfHmVKUaI0x0wmf4E-vGKTeW72nfdnepaWXK3T6cIbRuIA8oFxGvHcn-AB4KMYB/s1600/IMAG1855.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYlD1vYneBp4KZrmFYH-F98koOvPonXkyjYTqn-fZuksXhk3SbfENsv1LcGyLi2hwjnhPRHlKobEfcsEfHmVKUaI0x0wmf4E-vGKTeW72nfdnepaWXK3T6cIbRuIA8oFxGvHcn-AB4KMYB/s320/IMAG1855.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
And then take an action video.&amp;nbsp; I am switching my frequency counter in this video.&amp;nbsp; It is kind of handy anyway as the power switch for the counter is on the back of the unit.&amp;nbsp; I don&#39;t always use my frequency counter, but when I do, it&#39;s a pain to turn it on.&amp;nbsp; Well, not anymore.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/k7fpAzwMngw?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/8720017083704740171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/8720017083704740171' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/8720017083704740171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/8720017083704740171'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2011/09/arcade-push-button-light-switch-redux.html' title='Arcade Push Button Light Switch Redux'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhewIJXa10N3NwwRPdc2BcdvK2mRU4PagJ6FC_FfyMQEZFyRAnVjYqMZMkh3it2-vG1VPhRXIyggRQeTSsG66ev8NOfCOhoPeAU7LgadWtGT2RWLSAZKqa3M6D7LPxLjA8rhgr3HsI9OPNG/s72-c/IMAG1858.jpg" height="72" width="72"/><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-2976123930503882914</id><published>2011-09-06T20:16:00.006-04:00</published><updated>2011-09-08T13:53:26.790-04:00</updated><title type='text'>Arcade Pushbutton Light Switch</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;UPDATE:&amp;nbsp; If you would like to see different circuit design, have a look at &lt;a href=&quot;http://petemills.blogspot.com/2011/09/arcade-push-button-light-switch-redux.html&quot;&gt;version 2&lt;/a&gt;. &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirjQOZrzr8xN07EGxa5u1u6m0uPYbj-qqu0IHAYvWNN7Mvw760KWPiC-7BEOZoMy4KKG8Om8xFLgHE0uAGzwoXzDcaFqLgoYmhVGh6sDUVojZbcw5WC4gOVE9i2EMK8LnxrrQsq6L3QgL0/s1600/IMAG1841.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirjQOZrzr8xN07EGxa5u1u6m0uPYbj-qqu0IHAYvWNN7Mvw760KWPiC-7BEOZoMy4KKG8Om8xFLgHE0uAGzwoXzDcaFqLgoYmhVGh6sDUVojZbcw5WC4gOVE9i2EMK8LnxrrQsq6L3QgL0/s320/IMAG1841.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
I was poking around the internets on Labor day when I came across &lt;a href=&quot;http://www.etsy.com/listing/74059377/working-arcade-light-switch&quot;&gt;this&lt;/a&gt;.&amp;nbsp; It is a wall switch intended to replace a boring old toggle switch in your arcade room.&amp;nbsp; My single arcade machine does not warrant its own room, but I do like the idea of an arcade button light switch.&amp;nbsp; So, in an effort to get up and do something I made this arcade button switch for switching an extension cord.&amp;nbsp; I have it plugged into the &lt;a href=&quot;http://www.google.com/search?q=flourescent+magnifier&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;aq=t&amp;amp;rls=org.mozilla:en-US:official&amp;amp;client=firefox-a#q=fluorescent+magnifier&amp;amp;hl=en&amp;amp;safe=off&amp;amp;client=firefox-a&amp;amp;hs=cV5&amp;amp;sa=X&amp;amp;pwst=1&amp;amp;rls=org.mozilla:en-US:official&amp;amp;prmd=ivns&amp;amp;source=univ&amp;amp;tbm=shop&amp;amp;tbo=u&amp;amp;ei=g6RmTpDpO8TCqgGf-8miCQ&amp;amp;ved=0CFcQrQQ&amp;amp;bav=on.2,or.r_gc.r_pw.r_cp.&amp;amp;fp=5ee5b0df8e0cbfe6&amp;amp;biw=1400&amp;amp;bih=798&quot;&gt;magnifier with fluorescent lamp&lt;/a&gt; on my electronics bench.&lt;br /&gt;
&lt;br /&gt;
Since it was a holiday, I wanted to use only parts I had on hand so that I could finish this project the same day.&amp;nbsp; Fortunately, I have a pretty large selection of bits that included &lt;a href=&quot;http://www.sparkfun.com/products/9341&quot;&gt;arcade buttons&lt;/a&gt;.&amp;nbsp; Sadly, I had no triacs, though and settled for a relay instead.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
There are quite a few ways that you could make a set/reset flipflop circuit for this purpose.&amp;nbsp; I settled on a 555 timer setup with relay.&amp;nbsp; The flipflop could have just as easily been two NPN transistors, but I felt like reminiscing with the venerable &lt;a href=&quot;http://en.wikipedia.org/wiki/555_timer_IC&quot;&gt;555 timer&lt;/a&gt;.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
Download the schematic here if you like...&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://sites.google.com/site/pemills2011/file/ArcadePushbuttonLightswitchSchematic.pdf?attredirects=0&amp;amp;d=1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;194&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz-tM7iWd1VsezvxPzvBuD_quRBnlc-heubsPNMra4qL7L39b-sWGQqlxJk52ILBFPVQA_3SmsMK2x7KLmj0EOSFQZcUUT9QMqHTSsWRfLLrUniYPZu0-c4V87JKf0KOzUu6BrgQdkEtfQ/s320/Untitled.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
I very slowly drilled two holes in a cover plate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDKrLCiL6PnYwjVPnnG7v8a_GFwp86BZ2NTDVPNeAFuxUhOajy1qHxweg5CjcziIeI8ejNvD7CNetkD9-JNGg8rg_KUm-GbxvU2Zxb3vCJY59X5oOmc4O5tb7Hkjjv9lWBn45W0bietn_1/s1600/IMAG1809.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDKrLCiL6PnYwjVPnnG7v8a_GFwp86BZ2NTDVPNeAFuxUhOajy1qHxweg5CjcziIeI8ejNvD7CNetkD9-JNGg8rg_KUm-GbxvU2Zxb3vCJY59X5oOmc4O5tb7Hkjjv9lWBn45W0bietn_1/s320/IMAG1809.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Circuit assembly began with the relay I had on hand.&amp;nbsp; I soldered some leads to the normally open contacts on the relay and put heatshrink on the solder joints.&amp;nbsp; The unused, normally closed, pin on the relay was snipped off flush and insulated with a dab of hot glue.&amp;nbsp; Otherwise, this pin would have been an exposed hot leg of 110VAC.&amp;nbsp; Not a huge deal as everything is inside a plastic box, but it is a good idea to do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmDRJpmwfRSKscGWLO7R9I5NTCYFXI65fmY0l_mu1C_a_-A7qlNqvPsUwqb1Pk5oRx6xCBqtpto87iPz5wR9t980jZnw1FN4hdjXivCULUI8rd2679RrVn8M2LSSlGvTYaMr53W7nJrQFd/s1600/IMAG1822.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmDRJpmwfRSKscGWLO7R9I5NTCYFXI65fmY0l_mu1C_a_-A7qlNqvPsUwqb1Pk5oRx6xCBqtpto87iPz5wR9t980jZnw1FN4hdjXivCULUI8rd2679RrVn8M2LSSlGvTYaMr53W7nJrQFd/s320/IMAG1822.jpg&quot; width=&quot;191&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Circuit assembly continued on a piece of perf board and was hot glued to the top of the relay which, in turn, was hot glued betwixt the arcade push buttons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8fneLhJvxK1e5QOEw8zlvnEgcuviqA7VHF8Acm5lxvwbIT4BS4AjxQeSH28iqhKbRa9KjI9jyURwtXJXPY4y4tL80WZSwr2lLr2OYX0oaIfjqQZdQRP00HfurSeUtSDftN7AHCCDKNxrC/s1600/IMAG1823.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8fneLhJvxK1e5QOEw8zlvnEgcuviqA7VHF8Acm5lxvwbIT4BS4AjxQeSH28iqhKbRa9KjI9jyURwtXJXPY4y4tL80WZSwr2lLr2OYX0oaIfjqQZdQRP00HfurSeUtSDftN7AHCCDKNxrC/s320/IMAG1823.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
In the picture below, you can see where the hot lead of the extension cord is interrupted by the normally open contacts on the relay.&amp;nbsp; You can also see a knot tied into the extension cord in the top left of the picture as strain relief.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV3BClYtek1_OOLtCLpaJYeERu_voEIHGLpScEpByVA7dwT0pZGCrR1ld797PjFBOYA58Jq85Kn8Z_rg2HA7fQsf65X9wGWijX01DxdgLrPYOzLbcDm28CxowZsDP_0G5A7FgUzxoG_c-g/s1600/IMAG1835.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV3BClYtek1_OOLtCLpaJYeERu_voEIHGLpScEpByVA7dwT0pZGCrR1ld797PjFBOYA58Jq85Kn8Z_rg2HA7fQsf65X9wGWijX01DxdgLrPYOzLbcDm28CxowZsDP_0G5A7FgUzxoG_c-g/s320/IMAG1835.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Below you can see everything fits into the box nicely.&amp;nbsp; What isn&#39;t too apparent is a pair of black wires coming out of the box too.&amp;nbsp; I chose to use a wall wart transformer to power my circuit instead of the 110VAC coming into the box as this is just a bench top installation and not an, in the wall, permanent fixture.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmzFaBeEkVHUAYw1JjoZ8e5pv_j8ZKJSbFAUDPUZ3-H79BjVajxy9ySC5cHrjZAL-TVsJEkPL74kdner-3l8a-5iOpkwl260WP32U2kLhZif42A_Lc0rUfqWrGm9luCsORte-v7nWFMWpH/s1600/IMAG1838.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmzFaBeEkVHUAYw1JjoZ8e5pv_j8ZKJSbFAUDPUZ3-H79BjVajxy9ySC5cHrjZAL-TVsJEkPL74kdner-3l8a-5iOpkwl260WP32U2kLhZif42A_Lc0rUfqWrGm9luCsORte-v7nWFMWpH/s320/IMAG1838.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Here is a video of the switch in action.&amp;nbsp; You can see the camera adjusting it&#39;s auto white balance as the lamp I have the switch plugged into is turning on and off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/hJLqrkK4mJA?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This project was a fun way to spend the afternoon.&amp;nbsp; It certainly adds some geek cred to my electronics bench.&amp;nbsp; I think I am more interested in a monostable 555 circuit attached to the relay output, however.&amp;nbsp; That way, I could turn things on for a period of time and have them turn off automatically, instead of returning a day or two later to find out I left my soldering station on again.</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/2976123930503882914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/2976123930503882914' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/2976123930503882914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/2976123930503882914'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2011/09/arcade-pushbutton-light-switch.html' title='Arcade Pushbutton Light Switch'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirjQOZrzr8xN07EGxa5u1u6m0uPYbj-qqu0IHAYvWNN7Mvw760KWPiC-7BEOZoMy4KKG8Om8xFLgHE0uAGzwoXzDcaFqLgoYmhVGh6sDUVojZbcw5WC4gOVE9i2EMK8LnxrrQsq6L3QgL0/s72-c/IMAG1841.jpg" height="72" width="72"/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1634572204034071649.post-5220066643487482788</id><published>2011-08-28T13:52:00.003-04:00</published><updated>2015-06-03T06:54:49.471-04:00</updated><title type='text'>Guitar Pickup Winder</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyB4rqnKXo6KokK2CMRsB8-KJ-HCTUUtu2SVUieaEgUvfsX6H2QupjHCJazWQfgsLIYnsrMd5iq7hJYsIlcM3zshnluxp_McYsSAhAKR6NxMKGIukGfDessLeaXpybuVQ3V5Br648xmT9x/s1600/IMAG1664.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyB4rqnKXo6KokK2CMRsB8-KJ-HCTUUtu2SVUieaEgUvfsX6H2QupjHCJazWQfgsLIYnsrMd5iq7hJYsIlcM3zshnluxp_McYsSAhAKR6NxMKGIukGfDessLeaXpybuVQ3V5Br648xmT9x/s320/IMAG1664.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiojWfmPPZTDUYgxgYLMgqGepDi8esbxgrHVBuVGB0ZoGdtx0M4QTDv0a121IeIAo0GrGIogypl_saVm8PIxzybBqFjtdMpEkyAU8G0Ah_Li1CNaJlP1RwJc47JP8H2B14SrN61kgmMQmy9/s1600/IMAG1717.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiojWfmPPZTDUYgxgYLMgqGepDi8esbxgrHVBuVGB0ZoGdtx0M4QTDv0a121IeIAo0GrGIogypl_saVm8PIxzybBqFjtdMpEkyAU8G0Ah_Li1CNaJlP1RwJc47JP8H2B14SrN61kgmMQmy9/s320/IMAG1717.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
This projected started in June of 2011.&amp;nbsp; Remember the &lt;a href=&quot;http://www.google.com/logos/2011/lespaul.html&quot;&gt;Google Doodle&lt;/a&gt; commemorating Les Paul&#39;s 96th birthday?&amp;nbsp; Well, that got me thinking about how electric guitar pickups work.&amp;nbsp; I had a general idea about how they work, postulating they are essentially variable reluctance sensors,&amp;nbsp; but doing a bit of research, I kind of got bitten by the electric guitar bug and dove right into the research of solid body electric guitars as a whole.&lt;br /&gt;
&lt;br /&gt;
I have been primarily focused on guitar pickups and passive electronics at the moment.&amp;nbsp; In short order however, I would be requiring a test bed for these pickups.&amp;nbsp; That is why I made the decision from the very beginning that I would not only try my hand at building electric guitar pickups, but a complete scratch built guitar; &lt;a href=&quot;http://youtu.be/CwfPZNRoyf8&quot;&gt;wood has been harvested&lt;/a&gt;.&amp;nbsp; Later posts will focus on other topics about solid body electric guitar building.&amp;nbsp; Here, I will try to stay on the topic of an electric guitar pickups, but more specifically the pickup winder I built to wind my own pickups.&lt;br /&gt;
&lt;br /&gt;
After announcing my new obsession to anyone who would listen, an electric guitar was given to me to experiment with.&amp;nbsp; It is a smaller than average guitar, possibly for a child, but it will do just fine to test my pickups with a full guitar still being built down the road.&amp;nbsp; Below is a picture of the pickguard with the old electronics installed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNgC7U-u1quHKAZEIm6h-LDKDlWURPBLb6wuXdx59oy95mGGgMWQdtlnYegwwv_bZnKmtMKKNg-Il5dZwhf__9rNHrs9ydOI2y9U8lrTvpxN2aDN4VA3W4SDVBzFH2FzrSB7rM2zTGHeCV/s1600/IMAG1712.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNgC7U-u1quHKAZEIm6h-LDKDlWURPBLb6wuXdx59oy95mGGgMWQdtlnYegwwv_bZnKmtMKKNg-Il5dZwhf__9rNHrs9ydOI2y9U8lrTvpxN2aDN4VA3W4SDVBzFH2FzrSB7rM2zTGHeCV/s320/IMAG1712.jpg&quot; width=&quot;191&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Since I was going to be using an microcontroller to count the turns and stop the machine when the predetermined number of turns has been reached, I could make this winder do more stuff too.&amp;nbsp; So, I made this pickup winder into more of a pickup winding station.&amp;nbsp; Here is a feature list:&lt;br /&gt;
&lt;br /&gt;
-Pickup Winding with turn counting, RPM, ETA and auto stop&lt;br /&gt;
-Stroboscopic guitar tuner&lt;br /&gt;
-Ohm meter for coil resistance measurement&lt;br /&gt;
-Gaussmeter for measuring polarity and magnetic flux density of pole pieces&lt;br /&gt;
&lt;br /&gt;
I decided to use an Arduino to control my guitar pickup winder.&amp;nbsp; I  figured it would be a good way to put it into use.&amp;nbsp; I bought the thing  years ago and have only used it a couple of times.&amp;nbsp; It really just gathers  (figurative) dust as was the graphic LCD I used here too.&amp;nbsp; I was glad to  put some inventory to use in this project.&lt;br /&gt;
&lt;br /&gt;
The code is ~850 lines so probably a bit much for inline posting with syntax highlighter.&amp;nbsp; Instead, you can download the arduino &quot;sketch&quot; (code) below.&amp;nbsp; Also, there is a link to a collection of free PDF&#39;s I came across while doing research for this project.&amp;nbsp; There is some good information in there about guitar pickups.&amp;nbsp; I also put a schematic for wiring my guitar in there too as I found the pictorial &quot;schematics&quot; confusing.&lt;br /&gt;
&lt;br /&gt;
Files:&lt;br /&gt;
&lt;br /&gt;
You can download the pickup winder schematic &lt;a href=&quot;https://sites.google.com/site/pemills2011/file/GPW_v1.0.pdf?attredirects=0&amp;amp;d=1&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
You can download the v1.5 Arduino code &lt;a href=&quot;https://sites.google.com/site/pemills2011/file/GPW_1_5.pde?attredirects=0&amp;amp;d=1&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
You can download the guitar electronics schematic plus PDF collection &lt;a href=&quot;https://sites.google.com/site/pemills2011/file/GuitarPickupPDF%27s.rar?attredirects=0&amp;amp;d=1&quot;&gt;here&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
The need for a pickup winder is obvious when you take a look at the construction of an &lt;a href=&quot;http://en.wikipedia.org/wiki/Pickup_%28music_technology%29&quot;&gt;electric guitar pickup&lt;/a&gt;.&amp;nbsp; Essentially, there is a bobbin made from AlNiCo rod magnets and insulating material.&amp;nbsp; Around this, there are ~6,000 to ~10,000 turns of 42 ga wire.&amp;nbsp; Depending on the pickup, the number of turns of wire and the wire gauge will differ, but this approximation will illustrate the need for a machine that can turn the bobbin and reliably count the completed turns.&lt;br /&gt;
&lt;br /&gt;
Here are some pictures showing the complete bobbins and&amp;nbsp; the &lt;a href=&quot;http://en.wikipedia.org/wiki/Eucalyptus_marginata&quot;&gt;Jarrah wood&lt;/a&gt; spacers and tools for assembly.&amp;nbsp; Everything is sitting on my tree stump anvil that I collected while sawyering in the above youtube video.&amp;nbsp; The magnets are appropriately called &quot;pole pieces&quot; and this configuration is called &quot;staggered&quot;.&amp;nbsp; The height of the pole piece corrects for volume as the fretboard is radiused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3PR5shUn9XAV3mdEz9ozQvJJtXFuKwZ5buKFrYYtL9Cde4S0yKi4_1sPomUffLdsFYI6amqG7uOj-sRQbNN5XkBWX2dcU6pQYQmhoCKpth2mtK4Fbk8MND-i_0m6BIG3mTdL3yk0UQP6S/s1600/IMAG1705.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3PR5shUn9XAV3mdEz9ozQvJJtXFuKwZ5buKFrYYtL9Cde4S0yKi4_1sPomUffLdsFYI6amqG7uOj-sRQbNN5XkBWX2dcU6pQYQmhoCKpth2mtK4Fbk8MND-i_0m6BIG3mTdL3yk0UQP6S/s320/IMAG1705.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhJQL76hwy0MXd50tAH_OkGY3hlbFgGx1IzSx1mJ1WYvuiXzdhmiZtTw2QR0W8jY_L1wMgQK7bIE6N3JC27gS72qMoxgOuw8mlU8CEsnqcxCuWWYg27_PKlTB8tIxTKMHYsX6S8VKHKgTg/s1600/IMAG1709.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhJQL76hwy0MXd50tAH_OkGY3hlbFgGx1IzSx1mJ1WYvuiXzdhmiZtTw2QR0W8jY_L1wMgQK7bIE6N3JC27gS72qMoxgOuw8mlU8CEsnqcxCuWWYg27_PKlTB8tIxTKMHYsX6S8VKHKgTg/s320/IMAG1709.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, 42 ga wire is tiny and fragile!&amp;nbsp; Here is a microscopy photo showing the copper 42 ga wire on the right next to a hair from my head. &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihoX23Di1I-HDSrvJKff9CshPW1TovHsBc4Mo8ZNPZrx60iRXG9OcQNAO6bMGyS6UQnGw7d5qz4xQcI0nDafqPKVgxt5j7xOfiEHX44YYqxgBIHWrxJzF9PSeaJGirqE-bPXnsFZX4mEMY/s1600/IMAG1737.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihoX23Di1I-HDSrvJKff9CshPW1TovHsBc4Mo8ZNPZrx60iRXG9OcQNAO6bMGyS6UQnGw7d5qz4xQcI0nDafqPKVgxt5j7xOfiEHX44YYqxgBIHWrxJzF9PSeaJGirqE-bPXnsFZX4mEMY/s320/IMAG1737.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
O Kapton! My Kapton!&amp;nbsp; I wrapped the bobbins with &lt;a href=&quot;http://parts.digikey.com/1/parts-kws/kapton-tape&quot;&gt;Kapton tape&lt;/a&gt; to prevent possible abrasion from wearing thru the wire insulation and shorting out the pickup.&amp;nbsp; I also super glued the inside joint where the alnico 5 rod magnets meet the flatwork to discourage pressing them thru and abrading the coil wire.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlF11EUq-mo2RlHu4gYSOQqieXIBdfrktwwzOU070TxKNgqazDcInHQd_LHx1GbG5gFh2TzwLaS9enRpMMFJ_JzO8fRACaspt_LA9LA_4ME59dBEA7icZAHAcJbXNCz-4XKVvUrHZY35Ny/s1600/IMAG1711.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlF11EUq-mo2RlHu4gYSOQqieXIBdfrktwwzOU070TxKNgqazDcInHQd_LHx1GbG5gFh2TzwLaS9enRpMMFJ_JzO8fRACaspt_LA9LA_4ME59dBEA7icZAHAcJbXNCz-4XKVvUrHZY35Ny/s320/IMAG1711.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I looked up some commercially available &lt;a href=&quot;http://www.stewmac.com/shopby/item/1465?utm_source=google&amp;amp;utm_medium=shopping&amp;amp;utm_campaign=2011-08-gp&quot;&gt;pickup winders&lt;/a&gt; to get an idea of what I was trying to make.&amp;nbsp; The speed ranges were all around 1000 RPM and variable.&amp;nbsp; Some of the commercial winders have a thru axle offering &quot;reverse&quot; winding capabilities.&amp;nbsp; I decided I can achieve &quot;reverse&quot; winding by mounting the pickup to wind &quot;upside down&quot; and the direction of wind will be opposite.&amp;nbsp; This way I do not have to worry about motor direction control.&lt;br /&gt;
&lt;br /&gt;
I found a variable speed motor in the form of a sewing machine motor  in one of my many junk boxes.&amp;nbsp; I made an infrared non-contact tachometer to  measure the no load speed of this motor and was rather surprised to find  that it turned at 10,000 RPM.&amp;nbsp; Clearly this is way too fast even with  the variable speed throttle pedal.&lt;br /&gt;
&lt;br /&gt;
I did not give up on sewing machine motors, though and went to the &lt;a href=&quot;http://www.recycleannarbor.org/&quot;&gt;ReUse center&lt;/a&gt; and found an old &lt;a href=&quot;http://petemills.blogspot.com/2011/07/engineering-bow-tie.html&quot;&gt;Remington sewing machine&lt;/a&gt;  for $5.&amp;nbsp; This machine was too sweet looking to hack apart so I decided  to keep it as a sewing machine after a bit of tuning it up and make up an adapter to make it work  for pickup winding too.&amp;nbsp; Also, leaving the sewing machine in tact gives  me the benefits of mechanical gear reduction, friction to help slow it  down, a flywheel and a face plate area to mount an adapter for putting the pickup  bobbins.&amp;nbsp; It&#39;s a win-win situation.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://sites.google.com/site/pemills2011/file/PT0066A-CoilWinderJigModel%281%29.pdf?attredirects=0&amp;amp;d=1&quot;&gt;Here&lt;/a&gt;  is a drawing of the adapter jig.&amp;nbsp; It mounts in the flywheel on the end  of the sewing machine with three rare earth magnets as seen in the  picture below.&amp;nbsp; A ferrous piece of material, such as steel is screwed on  to the aluminum jig to allow the pickup bobbin to be mounted with it&#39;s  Alnico 5 magnets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0sXnsR-vXWNFz6FIF1HQHqrWriXbj88QPKBALKvhdrM4TjHhvz7yQHm-ZY0eA7aJQE9FrBmUj9Xndg79S8EiJsjt_plHB1dQcl7-aadFsQzGZAfV8ukQdb_R5FwDNOu9TnmIjXRKZD8WH/s1600/IMAG1632.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0sXnsR-vXWNFz6FIF1HQHqrWriXbj88QPKBALKvhdrM4TjHhvz7yQHm-ZY0eA7aJQE9FrBmUj9Xndg79S8EiJsjt_plHB1dQcl7-aadFsQzGZAfV8ukQdb_R5FwDNOu9TnmIjXRKZD8WH/s320/IMAG1632.jpg&quot; width=&quot;191&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXk7LbqwZCrNQvVPxVOZ3qty6172Mf96RbBe6qfZC-NK8ankJDaD6mNNmu4B0khPStQaHSEGjq98t_tvWvqpQiMAJop50D7onCKSX6qEgaeQqrQsMml8kiWKgV8JA3JX11dmADgBvQZ9oA/s1600/IMAG1634.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXk7LbqwZCrNQvVPxVOZ3qty6172Mf96RbBe6qfZC-NK8ankJDaD6mNNmu4B0khPStQaHSEGjq98t_tvWvqpQiMAJop50D7onCKSX6qEgaeQqrQsMml8kiWKgV8JA3JX11dmADgBvQZ9oA/s320/IMAG1634.jpg&quot; width=&quot;191&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I found that the pickup bobbin  mounted magnetically to the steel bar did not have a high enough  coefficient of static friction; it would rotate with a small amount of torque applied yet it had quite a strong magnetic attraction to the steel bar.&amp;nbsp; I tried a piece of duct tape, sticky side towards the steel plate, and it helped, but the real solution was gluing a couple pieces of sand paper on the outer edges of the steel bar, atop the duct tape as shown below.&amp;nbsp; This allows for secure winding.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIY94kTQMhbeMQ5P-q_nXzCcDkzW7x_FW58B6y5Xwjm9KAIwUSbW9mqQO7x-aba09TWW1aAKxx8fMncA13V1bPo-WiAPekNj6Chnl0meH9dCsK5z6nuGGSRtf6wknJbtJWLEFjnvXfBiiT/s1600/IMAG1690.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIY94kTQMhbeMQ5P-q_nXzCcDkzW7x_FW58B6y5Xwjm9KAIwUSbW9mqQO7x-aba09TWW1aAKxx8fMncA13V1bPo-WiAPekNj6Chnl0meH9dCsK5z6nuGGSRtf6wknJbtJWLEFjnvXfBiiT/s320/IMAG1690.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Below you can see how I mounted the pickup bobbin in &quot;standard&quot; orientation.&amp;nbsp; This allows what is known as clockwise winding.&amp;nbsp; The picture also shows how I used a straight edge to line up the wire guide stops.&amp;nbsp; Those wire guide stops are mounted to a 3/8&quot; diameter rod from the hardware store.&amp;nbsp; The rod is held in place by a magnetic base dial indicator stand.&amp;nbsp; All sewing machines that I am aware of have a flywheel on the side that rotates the same direction.&amp;nbsp; Using the picture below for reference, the top of the flywheel moves to the left.&amp;nbsp; This is anti-clockwise as you look at the front end of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1pa18Vcy_rrsRdSH_Ym0tUslrna8tUuFir89yo8La1LGFwX1m54exKnN2raH189H6nWF25vbVFhfuXSxI0qd7ZtO3kTaU051AUcMnYsb15gjAwjOhp55hr2UOddXIHEpVCYVaH7TWwiBO/s1600/IMAG1679.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1pa18Vcy_rrsRdSH_Ym0tUslrna8tUuFir89yo8La1LGFwX1m54exKnN2raH189H6nWF25vbVFhfuXSxI0qd7ZtO3kTaU051AUcMnYsb15gjAwjOhp55hr2UOddXIHEpVCYVaH7TWwiBO/s320/IMAG1679.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following pictures you will see how I mounted the bobbin to the faceplate to allow &quot;reverse&quot; or anti-clockwise winding.&amp;nbsp; I pressed some rare earth magnets into a piece of Jarrah wood.&amp;nbsp; The pickup bobbin is charged magnetically so it&#39;s alnico 5 rod magnets are attracted to the opposite poles on the rare earth magnets.&amp;nbsp; The rare earth magnets hold the Jarrah wood spacer and bobbin to the steel bar on the faceplate.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivAeOyPScDMbtWBvEx9yfGF71iLzLCsSP-mMQsOACxiSDM6am11vDfilwyJaiyZdIcfGg5R5PfqI164R4js8KMGXd6t5XP0g1d04pj30T_skc_NdRQbsiKRmQ90SVmkqRNfOY8x318qwat/s1600/IMAG1731.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivAeOyPScDMbtWBvEx9yfGF71iLzLCsSP-mMQsOACxiSDM6am11vDfilwyJaiyZdIcfGg5R5PfqI164R4js8KMGXd6t5XP0g1d04pj30T_skc_NdRQbsiKRmQ90SVmkqRNfOY8x318qwat/s320/IMAG1731.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2GMQMb-BMmzlsSaELavhbWdoFMeGoLO9L5brpWJimejEgKO2O6-D71o9p8FJyIGmcY3e8jx7_rZSkCrl10EZs39oZT50ULSUZnDQSEvf4zntASTx_5ibns5YeJlIqop_Oqihxe5LWDwOb/s1600/IMAG1735.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2GMQMb-BMmzlsSaELavhbWdoFMeGoLO9L5brpWJimejEgKO2O6-D71o9p8FJyIGmcY3e8jx7_rZSkCrl10EZs39oZT50ULSUZnDQSEvf4zntASTx_5ibns5YeJlIqop_Oqihxe5LWDwOb/s320/IMAG1735.jpg&quot; width=&quot;191&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Did you happen to notice a piece of black electrical tape across the flywheel in any of the pictures above?&amp;nbsp; That is for the infrared non-contact tachometer.&amp;nbsp; You can check the schematic for more details on that.&amp;nbsp; Since I am measuring rotation events over time (RPM), it is a trivial matter to count the total number of events (rotations) or coil winds.&amp;nbsp; I am also able to calculate estimated time to completion based on current RPM and number of winds left.&amp;nbsp; The software opens a relay when the number of winds is greater than or equal to the desired number of winds.&amp;nbsp; This cuts the power to the sewing machine so it stops when you have the correct number of winds.&amp;nbsp; Of course, inertia adds a few winds, but you can compensate for that by lowering the number of winds desired or just unwinding a few turns when you see how many over the machine went. It seems to overshoot by 10-15 turns due to inertia so I just set the desired turns number lower.&amp;nbsp; That is a pretty complete description of the coil winder operation.&amp;nbsp; There isn&#39;t much to it, but there is a lot of information on the internet and in books about coil winding that are worth a read.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
You can see a picture of the non-contact IR tach sensor below.&amp;nbsp; It has 2 magnets to attach to the cast iron sewing machine body.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggNtWR4B0ITL0u6Fe5VsqHO0aQlIlHT3fQcTpA5GXQh01Va5ea5O2qDRTS6VHwbqgWRMXgbA1o5g0cMea3tV7copazIOZ7ph8Tdz7aV4TD8N5fhIhjSx2f5gh8KExy0nsxEFoPdxCrTVfY/s1600/IMAG1650.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggNtWR4B0ITL0u6Fe5VsqHO0aQlIlHT3fQcTpA5GXQh01Va5ea5O2qDRTS6VHwbqgWRMXgbA1o5g0cMea3tV7copazIOZ7ph8Tdz7aV4TD8N5fhIhjSx2f5gh8KExy0nsxEFoPdxCrTVfY/s320/IMAG1650.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Even with the gear reduction offered by keeping the sewing machine in tact and the added friction, I found the flywheel where my adapter jig is mounted still rotated too fast.&amp;nbsp; I found it necessary to slow the motor down further and I did this by adding a &quot;resistor&quot; for the AC hot line of the sewing machine motor.&amp;nbsp; I used a 100-watt light bulb for this purpose and now the final speed at the flywheel is a manageable maximum of ~1000 RPM.&amp;nbsp; The throttle pedal still controls speed and the light bulb is inserted in the circuit with standard 110ac 2 prong plugs so it can be removed for high speed sewing. &amp;nbsp;&amp;nbsp; Below is a picture of the dimly glowing bulb acting as a resistor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_wp2SleZAaTlgtbJDrVIXoEhftzdt9UjsldDi89h6epsWuHMOU0XDA3d-HC4ef6uq_gSv1M-Xhjz2MRwlmEfThLG8hh9NWJK0IwE1FZSVNp8g14ibrA08HU64m9dlg_kav7Z6rq8zvi5x/s1600/IMAG1589.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_wp2SleZAaTlgtbJDrVIXoEhftzdt9UjsldDi89h6epsWuHMOU0XDA3d-HC4ef6uq_gSv1M-Xhjz2MRwlmEfThLG8hh9NWJK0IwE1FZSVNp8g14ibrA08HU64m9dlg_kav7Z6rq8zvi5x/s320/IMAG1589.jpg&quot; width=&quot;191&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a short demo video.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/mhwhA7tNNbc?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Stroboscopic tuner:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB7C_JDup5jcikXDiKme_DKUHEthBKcwmDddT69s8H1XvSvU6LtXfTVL_ly3huyX_QQek6eZSEiloM11g0-7BVcRi8h9zBD3sxsoSDdZMjYhVGie4EZ1bsTvBIlslcGB6lhqT9zM2jC38C/s1600/IMAG1757.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB7C_JDup5jcikXDiKme_DKUHEthBKcwmDddT69s8H1XvSvU6LtXfTVL_ly3huyX_QQek6eZSEiloM11g0-7BVcRi8h9zBD3sxsoSDdZMjYhVGie4EZ1bsTvBIlslcGB6lhqT9zM2jC38C/s320/IMAG1757.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The stroboscopic guitar tuner works by flashing an LED at the resonant frequency of an in-tune guitar string.&amp;nbsp; I made a guitar pick with an led on it to pluck a guitar string.&amp;nbsp; An LED plectrum if you will.&amp;nbsp; The pick was etched using the sharpie and ferric chloride method.&amp;nbsp; It says &quot;LED Guitar Tuner&quot; on it.&amp;nbsp; You aim the led at the string while it vibrates and turn the tuning machines of the guitar until the string appears to be still.&amp;nbsp; Below is a picture of the LED pick and a video of the tuning in progress.&amp;nbsp; It is a little difficult to see in the video but in person, the strobe tuner is quite effective.&amp;nbsp; The video is taken after the pickups I made were installed in this guitar.&amp;nbsp; The sound you are hearing is coming from an LM386 audio amp I made for a different project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAAeCqkROKI4p5DYVoickb6AgvB8F534IFlN6WaHrcuCGJyGL1-buegoNnEROgKJ_F21Swfzov_5mpMRyYWfbBV7xCj5DB19hN6d4_4paNWPtVVmLR2EsJeoPHn6RCVPhJ9SQPbsiwUqNn/s1600/IMAG1652.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAAeCqkROKI4p5DYVoickb6AgvB8F534IFlN6WaHrcuCGJyGL1-buegoNnEROgKJ_F21Swfzov_5mpMRyYWfbBV7xCj5DB19hN6d4_4paNWPtVVmLR2EsJeoPHn6RCVPhJ9SQPbsiwUqNn/s320/IMAG1652.jpg&quot; width=&quot;191&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/rdoBzNkqZ64?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
I have found in practice that the stroboscopic guitar tuner is much easier to use on the lower frequency strings.&amp;nbsp; Like the low-E at 82.41 Hz.&amp;nbsp; The video above is of the G string at 196 Hz and it is easy enough to see in person too.&amp;nbsp; I guess, as with anything, practice is helpful to getting it right.&amp;nbsp; You can use relative tone matching by ear for tuning the higher frequency strings.&amp;nbsp; There is nothing to say you cannot strobe tune all strings with the strobe tuner, however.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Gaussmeter:&lt;br /&gt;
&lt;br /&gt;
I think it will be useful to know the relative Gauss strength of the pickup pole pieces and knowing the polarity, north or south, will be paramount to success.&amp;nbsp; Many websites on pickup making suggest using a &lt;a href=&quot;http://www.stewmac.com/shop/Electronics,_pickups/Tools:_Polarity_tester/Magnet_Polarity_Tester.html&quot;&gt;polarity tester&lt;/a&gt; for determining polarity but, using a continuous, ratiometric hall effect sensor I can measure the magnetic flux density of the pickup pole pieces at 1.3mV/G as well as the polarity.&amp;nbsp; This is an uncalibrated value, but it is sufficient for my purposes.&amp;nbsp; The sensor I used is an &lt;a href=&quot;http://www.allegromicro.com/en/Products/Part_Numbers/1301/1301.pdf&quot;&gt;Allegro A1302&lt;/a&gt; hall effect sensor.&amp;nbsp; In the gaussmeter mode, peak gauss values are recorded and instantaneous values are reported.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXmzMSUaB5jzMF4H6GaPGiHs8NTgKHJv7SMwIjigdCpg0UcEAjEoYeYuQmt3JGquxLLOMoHuzwfRQGW0KOOdnYdvNkSPD8T1RqNnOKAxC89OskuUW53JDOrVzRwGTfqa4U1Hf6IZUIdiqi/s1600/IMAG1754.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXmzMSUaB5jzMF4H6GaPGiHs8NTgKHJv7SMwIjigdCpg0UcEAjEoYeYuQmt3JGquxLLOMoHuzwfRQGW0KOOdnYdvNkSPD8T1RqNnOKAxC89OskuUW53JDOrVzRwGTfqa4U1Hf6IZUIdiqi/s320/IMAG1754.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
It is important to note that if the gaussmeter displays the polarity as &quot;North&quot;, that means you have a &quot;South&quot; pole of a magnet facing it and your pickup is a &quot;South&quot; polarity pickup.&amp;nbsp; This is the same as how a compass would work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ohm Meter:&lt;br /&gt;
&lt;br /&gt;
Not too much to say here.&amp;nbsp; There is a voltage divider circuit made with a 10k0 resistor and the guitar pickup under test.&amp;nbsp; The instantaneous ohmic value is reported and peak value stored and displayed.&amp;nbsp; I remember measuring the resistance of a coil right after winding.&amp;nbsp; It measured ~6k2.&amp;nbsp; After leaving it for some time it went down to 6k0.&amp;nbsp; I believe the friction from my hand when winding caused the temperature to rise enough to cause this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgxycfUqGPnSrDdRC9T531PUW-Ubk1dOb1JiR7gk6earXGrBPhorpKWYDyIcgqwj5uQ308SanXKSN4UPZFhSJWoUvu3dnF_-yAzC9s6iKXiWexFZ5uwEARVO5K_iPVU-8boHBQoQ9nTlzC/s1600/IMAG1744.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgxycfUqGPnSrDdRC9T531PUW-Ubk1dOb1JiR7gk6earXGrBPhorpKWYDyIcgqwj5uQ308SanXKSN4UPZFhSJWoUvu3dnF_-yAzC9s6iKXiWexFZ5uwEARVO5K_iPVU-8boHBQoQ9nTlzC/s320/IMAG1744.jpg&quot; width=&quot;191&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I had originally planned to make this pickup winder have an automatic wire feed traversal so it could wind coils on its own.&amp;nbsp; I may get back to doing that at some point but for now I will &quot;hand&quot; wind them.&amp;nbsp; That is, feed the wire to the spinning bobbin by hand.&amp;nbsp; This seems to be the preferred method of winding of some musicians anyhow.&amp;nbsp; I left a PWM channel available to connect a servo motor to at some point for this purpose should I choose to implement it.&lt;br /&gt;
&lt;br /&gt;
Once the pickups are wound and wire ends soldered to the eyelets they are was potted.&amp;nbsp; I wrap one round of kapton tape around the coil wire before potting in 20% beeswax and 80% by mass of gulf wax.&amp;nbsp; I put the jar in a bath of ~160 Deg F water to melt the wax.&amp;nbsp; I put the pickup in the wax and wait for it to come up to temperature.&amp;nbsp; You can see in the video below that the pole pieces are that last to warm.&amp;nbsp; The whole thing locally cools the was and it solidifies.&amp;nbsp; Within about a minute, depending on the relative thermal masses the pickup is up to temperature and all the wax around it is remelted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/g7lybwCouDA?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Once they are up to temperature I apply a partial vacuum to the jar removing air and replacing it with wax in all the nooks and crannies of the coil winds.&amp;nbsp; Besides being good practice for durability of this tiny wire this also stops what guitar players refer to as &lt;a href=&quot;http://www.premierguitar.com/Magazine/Issue/2009/Apr/Microphonic_Pickups_Vintage_or_Modern_Sounds.aspx&quot;&gt;microphonic pickups&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/Z-5rtvA3jxI?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a shot of the pickups wax potted and ready to be installed into the guitar.&amp;nbsp; The black wire is the ground.&amp;nbsp; I make the ground wire whichever eyelet is the coil finish so that the outer coils of the pickup can act as a shield also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifJRoZUM58f1iE6x15wS6C58ChmpRBS0093ewuKfHpLf_UsgN3esYuCZRSpF63U-Tx5KhCTa9Tjx9w4zLumy1YLDLeu_fhG3Z75Xbz1YUd3jaY4uG7w2wQereDj9NkLgLz03CrqlUGVMw3/s1600/IMAG1752.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifJRoZUM58f1iE6x15wS6C58ChmpRBS0093ewuKfHpLf_UsgN3esYuCZRSpF63U-Tx5KhCTa9Tjx9w4zLumy1YLDLeu_fhG3Z75Xbz1YUd3jaY4uG7w2wQereDj9NkLgLz03CrqlUGVMw3/s320/IMAG1752.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I wound my middle pickup to be opposite of my neck and bridge pickup.&amp;nbsp; It will be reverse-wound, reverse-polarity for hum cancellation in guitar switch positions 2 and 4.&lt;br /&gt;
&lt;br /&gt;
As far as charging the pole pieces goes it&#39;s pretty easy.&amp;nbsp; Alnico is very coercive.&amp;nbsp; I bring the assembled and potted pickup into contact with one pole of a strong rare earth magnet.&amp;nbsp; I use a 3-inch diameter 400 lb pull magnet.&amp;nbsp; I suspect you can get away with a much smaller magnet, that is just what I had on hand.&amp;nbsp; So, if I want a &quot;North&quot; polarity pickup I bring the top of the pickup into contact with the &quot;North&quot; side of the charging magnet.&amp;nbsp; The approach and withdraw is axial.&amp;nbsp; Then I do the same on the other side bringing the bottom of the pickup close to the magnets&#39; &quot;South&quot; pole.&amp;nbsp; This makes the top of the pickup &quot;North&quot; and thus attracts a compass &quot;South&quot; needle, thus a &quot;North&quot; polarity pickup.&lt;br /&gt;
&lt;br /&gt;
I installed the new pickups I made into the old pickguard.&amp;nbsp; I had to whittle away some of the bass wood of the body cavity to fit an extra tone potentiometer.&amp;nbsp; As I stated earlier, I have a reverse wound, reverse polarity middle pickup here.&amp;nbsp; I wired them up according the the schematic I drew up and linked to above. I think this is the standard &quot;Strat 2-tone wiring&quot;. &amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
So, in the end, everything seems to have worked.&amp;nbsp; It makes noise anyway.&amp;nbsp; I am waiting for someone who knows how to play a guitar to come over and test it out, but I think I am off to a good start.&amp;nbsp; If you have any suggestions on how to improve my pickups let me know.&amp;nbsp; Or, if you have any tips on scratch building guitar bodies/necks that would be appreciated too.&amp;nbsp; I still need to make a better case for the Pickup winder electronics.&amp;nbsp; Probably a wooden box to set the plexiglass in to keep fingers and 110 vac separate.&lt;br /&gt;
&lt;br /&gt;
A final &quot;finished product&quot; picture... for now anyway.&amp;nbsp; Also, the missing string has been replaced already.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPb1pAk80Owy3y6RClC6ckvfZlyxtBv1o9Ex-4W1_wGsyf0Kt0G3mCrU2-A1fCUxQ2cMdhC1dzoNJ4sLWi3YPkKcnfggYcLLKj6v6pguXce7BUoTBGwLHh4tWzHsj6qvJjEFfrwr93BnyK/s1600/IMAG1756.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPb1pAk80Owy3y6RClC6ckvfZlyxtBv1o9Ex-4W1_wGsyf0Kt0G3mCrU2-A1fCUxQ2cMdhC1dzoNJ4sLWi3YPkKcnfggYcLLKj6v6pguXce7BUoTBGwLHh4tWzHsj6qvJjEFfrwr93BnyK/s320/IMAG1756.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIRZGVNqduIKw2nDHlE4HnrKJCTiK1c9M7mm4QaeNfi2DhewCRTVOOtzuyhpcRD39-SuXkjq-FLgfpMyAUSJtlDE3WL7_8ozeoavMcAgdKnjksaQMdL3M-QKRqdm45BXg_G1YT2jfXzpeW/s1600/IMAG1763.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIRZGVNqduIKw2nDHlE4HnrKJCTiK1c9M7mm4QaeNfi2DhewCRTVOOtzuyhpcRD39-SuXkjq-FLgfpMyAUSJtlDE3WL7_8ozeoavMcAgdKnjksaQMdL3M-QKRqdm45BXg_G1YT2jfXzpeW/s320/IMAG1763.jpg&quot; width=&quot;191&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://petemills.blogspot.com/feeds/5220066643487482788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1634572204034071649/5220066643487482788' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/5220066643487482788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1634572204034071649/posts/default/5220066643487482788'/><link rel='alternate' type='text/html' href='http://petemills.blogspot.com/2011/08/guitar-pickup-winder.html' title='Guitar Pickup Winder'/><author><name>Pete</name><uri>http://www.blogger.com/profile/10432659350949374712</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyB4rqnKXo6KokK2CMRsB8-KJ-HCTUUtu2SVUieaEgUvfsX6H2QupjHCJazWQfgsLIYnsrMd5iq7hJYsIlcM3zshnluxp_McYsSAhAKR6NxMKGIukGfDessLeaXpybuVQ3V5Br648xmT9x/s72-c/IMAG1664.jpg" height="72" width="72"/><thr:total>14</thr:total></entry></feed>