tag:blogger.com,1999:blog-6763825181430715142024-03-04T23:21:11.759-08:00Arduino-Pi RamblingsA discussion on my Autonomous Rover (some call them robots) based on a Raspberry Pi and Arduino.security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.comBlogger62125tag:blogger.com,1999:blog-676382518143071514.post-16059987750350777622016-06-03T19:07:00.003-07:002016-06-03T19:07:57.045-07:00Initial thoughts on creating a Mars Curiosity inspired Rover<a href="https://1.bp.blogspot.com/-de0nM1O-nwM/V1ImhX4xT0I/AAAAAAAABMg/80KJXklrR-EjLXrOxuK6rwTRVrwbLY7GQCLcB/s1600/msl_428x321.GIF" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="https://1.bp.blogspot.com/-de0nM1O-nwM/V1ImhX4xT0I/AAAAAAAABMg/80KJXklrR-EjLXrOxuK6rwTRVrwbLY7GQCLcB/s320/msl_428x321.GIF" width="320" /></a><span style="font-size: large;"><span style="font-family: "Trebuchet MS",sans-serif;">It's been a while since I did any "robot" work. I've been rather absorbed in my 3D Printer firmware.</span></span><br />
<span style="font-size: large;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: large;"><span style="font-family: "Trebuchet MS",sans-serif;">I thought it was time I took a little side break, and kicked up something I've been thinking about for a while. </span></span><br />
<br />
<span style="font-size: large;"><span style="font-family: "Trebuchet MS",sans-serif;">I want to create an autonomous rover based on the concept of the <a href="https://en.wikipedia.org/wiki/Curiosity_%28rover%29" target="_blank">Mars Curiosity Rover</a>. </span></span><br />
<span style="font-size: large;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: large;"><span style="font-family: "Trebuchet MS",sans-serif;">No, it won't have a <a href="https://en.wikipedia.org/wiki/Radioisotope_thermoelectric_generator" title="Radioisotope thermoelectric generator">radioisotope thermoelectric generator</a> (RTG), nor will it have fancy bio-chemical analysis thing-a-ma-bobbers... </span></span><br />
<span style="font-size: large;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<b><span style="font-size: large;"><span style="font-family: "Trebuchet MS",sans-serif;">But it will be cool! </span></span></b><br />
<span style="font-size: large;"><br /></span>
<br />
<h2>
<b><br /></b></h2>
<h2>
<b><br /></b></h2>
<h2>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3TxRYcb5k-cj0vmNGnnB6wrG5i9tlpJViRSrml-hmxPrtidqMt9brBijsMBFGl7DcGiiQrW-YvVJ2K7dBggMteuXWgMBvZ7idttZgLBbQJyvNkj8_GGDqsLWg37Y6z1lPVJXCrbzTAVMq/s1600/main-qimg-1bb784a79b6ac6ab5692937175325239.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3TxRYcb5k-cj0vmNGnnB6wrG5i9tlpJViRSrml-hmxPrtidqMt9brBijsMBFGl7DcGiiQrW-YvVJ2K7dBggMteuXWgMBvZ7idttZgLBbQJyvNkj8_GGDqsLWg37Y6z1lPVJXCrbzTAVMq/s200/main-qimg-1bb784a79b6ac6ab5692937175325239.png" width="200" /></a><b>Requirements: </b></h2>
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">Independent 6-wheel "<a href="https://www.quora.com/What-are-the-reasons-behind-using-rocker-bogie-suspensions-in-mars-curiosity-rover" target="_blank">rocker-bogie</a>" suspension to allow it to crawl over fairly rough terrain unimpeded.</span><br />
<span style="font-size: large;"><br /></span>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><span style="font-size: large;"><a href="https://2.bp.blogspot.com/-x-_GH8b_y5I/V1IsMFhENEI/AAAAAAAABM8/_Q2FjXJL87s0_i1wTzkAnhn6-M4IsGC-wCLcB/s1600/XV-11-Wheels.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://2.bp.blogspot.com/-x-_GH8b_y5I/V1IsMFhENEI/AAAAAAAABM8/_Q2FjXJL87s0_i1wTzkAnhn6-M4IsGC-wCLcB/s200/XV-11-Wheels.jpg" width="200" /></a></span></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Neato XV-11 Wheel assembly</span></td></tr>
</tbody></table>
<br />
<br />
<span style="font-size: large;">I happened to acquire a few <a href="http://makezine.com/2010/11/22/neato-robotics-xv-11-tear-down/" target="_blank">Neato XV11 robot vacuums,</a> </span><br />
<span style="font-size: large;">and will be tearing them down for parts. Each one has a pair of geared motors with optical encoders. </span><br />
<br />
<br />
<span style="font-size: large;">A<a href="https://www.pjrc.com/teensy/teensy31.html" target="_blank"> Teensy 3.2</a> will be used for each pair to ensure accurate positioning and velocity profiling. </span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-0eluMe674_I/V1IwcZqo3vI/AAAAAAAABNo/wucX1D3Hug0w8HEGMWeaKPPEy-J7ffosQCLcB/s1600/teensy32.jpeg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://1.bp.blogspot.com/-0eluMe674_I/V1IwcZqo3vI/AAAAAAAABNo/wucX1D3Hug0w8HEGMWeaKPPEy-J7ffosQCLcB/s200/teensy32.jpeg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Teensy 3.2 for Motion Control</td></tr>
</tbody></table>
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi73Ae3eV_RhooEfEIcwHpSXfy3pAy9J3NOhFLYNKNg-xOOAveW8p3QXFhE5jDPp7MOnbhCK4grNN5j6yuHeJvsOybglY5pqL5jtA7hZq5EOoLvO9En23q0AfZsrzFGIUre8Nq4Clx5KBlQ/s1600/thegoodstuffunmasked-crop.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi73Ae3eV_RhooEfEIcwHpSXfy3pAy9J3NOhFLYNKNg-xOOAveW8p3QXFhE5jDPp7MOnbhCK4grNN5j6yuHeJvsOybglY5pqL5jtA7hZq5EOoLvO9En23q0AfZsrzFGIUre8Nq4Clx5KBlQ/s320/thegoodstuffunmasked-crop.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Neato XV-11 LIDAR sensor</td></tr>
</tbody></table>
<br />
<br />
<span style="font-size: large;">The Neato XV-11 also has a very unique <a href="https://en.wikipedia.org/wiki/Lidar" target="_blank">LIDAR system</a> for mapping out room dimensions and identifying obstacles.</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<br />
<br />
<br />
<br />
<br />
<br />
<span style="font-size: large;"><a href="https://xv11hacking.wikispaces.com/LIDAR+Sensor" target="_blank">LIDAR mapping</a>, <a href="http://arduino-pi.blogspot.ca/2014/03/a-path-finding-examples-in-python-and.html" target="_blank">A* Path planning</a>, and Object Avoidance via multiple <a href="https://www.sparkfun.com/products/242" target="_blank">Sharp Infra-red proximity sensors</a> will be done on a <a href="https://www.raspberrypi.org/blog/raspberry-pi-3-on-sale/" target="_blank">Raspberry Pi 3B</a>. </span><br />
<span style="font-size: large;">GPS, as well as a <a href="https://www.adafruit.com/product/2472" target="_blank">9 degree of freedom fusion sensor</a> on the chassis </span><span style="font-size: large;">will also be managed by this Pi.</span><br />
<br />
<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://4.bp.blogspot.com/-vCXsPJNXU7s/V1It2GCJDjI/AAAAAAAABNU/p32VANzibnIuYERlZ4MTu-_oeHyNS0jGgCLcB/s1600/2011-02-11-143839_1366x768_scrot.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="245" src="https://4.bp.blogspot.com/-vCXsPJNXU7s/V1It2GCJDjI/AAAAAAAABNU/p32VANzibnIuYERlZ4MTu-_oeHyNS0jGgCLcB/s320/2011-02-11-143839_1366x768_scrot.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A* Path Planning</td></tr>
</tbody></table>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<span style="font-size: large;">A Second Raspberry Pi 3B will be responsible for communications and streaming cameras. Running <a href="http://nodebots.io/" target="_blank">Nodebots</a>, a javascript engine for Robot management, this Pi will have api's to allow connectivity via Android tablet, as well as a full web server. </span><br />
<span style="font-size: large;"><br /></span>
<br /><span style="font-size: large;">The 4 dof manipulator arm will be managed by another Teensy 3.2 and a separate </span><span style="font-size: large;"><span style="font-size: large;"> <a href="https://www.adafruit.com/product/2472" target="_blank">9 degree of freedom fusion sensor</a> will sit on the wrist positional feedback.</span></span><br />
<br />
<span style="font-size: large;"><span style="font-size: large;"> </span> </span><br />
<span style="font-size: large;"></span><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3LVVDSHa7mmt0VmEy_9KUoELlXbQpA4G26iASRbbqu450JADb40cMcJfuv261d6D_9zRQSGGL1MQUI8pOTIOvGkMYF5bO9dQtWBr0bpS65O1Py2Mn6DUMZTDua0UP1oMQWDSDrRpBV8wI/s1600/IMG_20140407_114740.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3LVVDSHa7mmt0VmEy_9KUoELlXbQpA4G26iASRbbqu450JADb40cMcJfuv261d6D_9zRQSGGL1MQUI8pOTIOvGkMYF5bO9dQtWBr0bpS65O1Py2Mn6DUMZTDua0UP1oMQWDSDrRpBV8wI/s400/IMG_20140407_114740.jpg" width="335" /></a><br />
<span style="font-size: large;">I found on <a href="http://arduino-pi.blogspot.ca/2014/04/adding-5dof-arm-to-my-autonomour-rover.html" target="_blank">my previous rover</a>, that another set of Infrared proximity sensors were needed on the bottom, front and back. </span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">Positioned on a 45 degree angle, these "cliff sensors" would alert you when the rover was in danger of falling over the edge of a cliff... ie, a set of stairs</span>.<br />
<br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><span style="font-weight: normal;">Similar to my previous rover, I will use a commercial 20,000ma Li-Ion power bank</span><b><span style="font-weight: normal;"> to power the electronics, and a separate Lead Acid 12v battery for the motors and servos.</span></b></span><br />
<span style="font-size: large;"><br /></span>
<br />
<br />
<br />
<span style="font-size: large;"><b></b></span><br />
<span style="font-size: large;"><b><br /></b></span>
<span style="font-size: large;">I am also going to attempt foldable solar panels. Four panels, attached with hinges and servos, will fold away when not in use, but be able to extend off the back, fold out, and position for maximum light transfer when required. </span><br />
<span style="font-size: large;"><b><br /></b></span>
<span style="font-size: large;"><b><br /></b></span>
<span style="font-size: large;"><b>Any thoughts or suggestions are welcome as I embark on this awesome summer project. </b></span><br />
<span style="font-size: large;"><b><br /></b></span>
<span style="font-size: large;"><b><br /></b></span>
<b><br /></b>
<h2>
<b>References:</b></h2>
https://en.wikipedia.org/wiki/Curiosity_%28rover%29<br />
http://www.instructables.com/id/How-to-Build-an-Internet-Controlled-Mars-Rover/<br />
https://www.quora.com/What-are-the-reasons-behind-using-rocker-bogie-suspensions-in-mars-curiosity-rover<br />
https://www.sparkfun.com/news/490<br />
https://xv11hacking.wikispaces.com<br />
http://www.nasa.gov/sites/default/files/atoms/files/mars_survival_kit_-_rover_final_4.pdf<br />
http://arduino-pi.blogspot.ca/2014/04/adding-5dof-arm-to-my-autonomour-rover.html<br />
https://www.sparkfun.com/products/242<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com1tag:blogger.com,1999:blog-676382518143071514.post-42796808621300186772016-01-27T14:59:00.000-08:002016-01-27T16:43:01.812-08:00I just received an Onion Omega! <a href="http://3.bp.blogspot.com/-kYM7n8CNGMc/Vqk-1UnhHiI/AAAAAAAABH0/wcgZ7gRbi_I/s1600/omega-hand.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="213" src="http://3.bp.blogspot.com/-kYM7n8CNGMc/Vqk-1UnhHiI/AAAAAAAABH0/wcgZ7gRbi_I/s320/omega-hand.jpg" width="320" /></a><b>Back in May of last year,</b> I became aware of a <a href="https://www.kickstarter.com/projects/onion/onion-omega-invention-platform-for-the-internet-of" target="_blank">KickStarter campaign</a> for a new uController board called the <a href="https://onion.io/omega" target="_blank">Onion Omega.</a><br />
The Campaign met it's target goal of $15k USD, and then doubled it within a couple days!<br />
<br />
Within a month, they had Successfully raised $267,851 USD with 4,459 backer.<br />
<br />
<div style="text-align: center;">
<b>What makes this little board incredible besides it's diminutive size, are it's enormous specs! </b></div>
<br />
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 descriptions" id="general-description">
<ul>
<li><b>Dimensions:</b> 28mm x 42mm<b> </b></li>
<li><b>OS:</b> OpenWRT Linux<b> </b></li>
<li><b>Processor:</b> 400MHz<b> </b>32bit <a href="http://www.eeboard.com/wp-content/uploads/downloads/2013/08/AR9331.pdf" target="_blank">Broadcom Atheros AR9331</a><b><br /></b></li>
<li><b>RAM:</b> 64MB DDR2<b> </b></li>
<li><b>Flash:</b> 16MB<b> </b></li>
<li><b>Wireless:</b> 802.11 b/g/n<b> </b></li>
<li><b>Ports:</b> 18 GPIO<b> </b></li>
<li><b>Language:</b> Python, Node.JS, PHP, Ruby, Lua and more...</li>
</ul>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-R09GzqQFDfc/VqlCzNBYcBI/AAAAAAAABIE/hPrvQZLhr-8/s1600/onion-omega-specs.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="123" src="http://1.bp.blogspot.com/-R09GzqQFDfc/VqlCzNBYcBI/AAAAAAAABIE/hPrvQZLhr-8/s320/onion-omega-specs.jpg" width="320" /></a></div>
<br />
<br />
These specs put this cool little board smack dab between the 8bit loveable <a href="http://arduino.cc/" target="_blank">Arduino </a>and it's big 32bit brother, the <a href="http://raspberrypi.org/" target="_blank">RaspberryPi.</a><br />
<br />
The 18 GPIO are all digital, however there are I2C, I2S, and SPI buses for expansion should you require analog support.<br />
<br />
The biggest "feature" of this awesome little board is the Web Interface! The <a href="https://onion.io/console" target="_blank">Onion Console</a> is intended to represent a virtual desktop in your browser to control applications running on the Onion Omega!<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8WNre3BthJoJqZBNnBLOKRpkxhq09iXg_suWAx781eXTour5_m446hNR8lTgobwPWIA3SkyeHLVBHTnqVoGFOY2tCc_2CVD4E5kpiwbiVYMZcFFZXCMRq8-thTbtHJqgAoP6OHyLqQhsC/s1600/onion-console.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="211" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8WNre3BthJoJqZBNnBLOKRpkxhq09iXg_suWAx781eXTour5_m446hNR8lTgobwPWIA3SkyeHLVBHTnqVoGFOY2tCc_2CVD4E5kpiwbiVYMZcFFZXCMRq8-thTbtHJqgAoP6OHyLqQhsC/s320/onion-console.jpg" width="320" /></a></div>
<br />
<br />
<div style="text-align: center;">
<b><span style="font-size: large;">How cool is THAT??? </span></b></div>
<br />
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<b>Anyway, cutting to the chase... </b>A couple weeks ago, on Twitter, <b><a class="ProfileHeaderCard-screennameLink u-linkComplex js-nav" href="https://twitter.com/OnionIoT" target="_blank"> @OnionIoT</a></b><span class="u-linkComplex-target"> held a giveaway contest, and I entered... I mean, who wouldn't? I've been working with embedded controllers and System on Chip boards for a while now, and this one definitely intrigues me. </span></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<br /></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span class="u-linkComplex-target">The following day, I received THIS tweet:</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-O61Ax_JXH2U/VqlK07CxwjI/AAAAAAAABIg/GvvEPhFsiJQ/s1600/Screenshot%2Bfrom%2B2016-01-27%2B16%253A58%253A14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="147" src="http://4.bp.blogspot.com/-O61Ax_JXH2U/VqlK07CxwjI/AAAAAAAABIg/GvvEPhFsiJQ/s320/Screenshot%2Bfrom%2B2016-01-27%2B16%253A58%253A14.png" width="320" /></a></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
</div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span style="font-size: large;"><b><span class="u-linkComplex-target"> YES!!!! </span></b></span></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span style="font-size: large;"><b><span class="u-linkComplex-target"><br /></span></b></span></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span style="font-size: large;"><b><span class="u-linkComplex-target">And today finally, my board, plus a dock showed up! </span></b></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-vSq20Ll8bss/VqlLOsFbvPI/AAAAAAAABIo/2rljFk6sr30/s1600/2016-01-27%2B16.53.06.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="http://3.bp.blogspot.com/-vSq20Ll8bss/VqlLOsFbvPI/AAAAAAAABIo/2rljFk6sr30/s400/2016-01-27%2B16.53.06.jpg" width="400" /></a></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span class="u-linkComplex-target"><br /></span></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<br /></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<br /></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span class="u-linkComplex-target"><span style="font-size: large;">Now go away... I have some playing to do! </span></span></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<br /></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span class="u-linkComplex-target"><span style="font-size: large;">Thank you <a href="http://onion.io/">Onion.io</a> </span> </span></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<br /></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span class="u-linkComplex-target"> </span></div>
<h2 class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span class="u-linkComplex-target">References:</span></h2>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span class="u-linkComplex-target"><a href="https://community.imgtec.com/hardware/single-hardware/onion-omega/" target="_blank"><span style="font-weight: normal;">https://community.imgtec.com/hardware/single-hardware/onion-omega/ </span></a></span></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span class="u-linkComplex-target"><a href="http://postscapes.com/wifi-iot-prototyping-board-onion-omega" target="_blank">http://postscapes.com/wifi-iot-prototyping-board-onion-omega</a></span></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span class="u-linkComplex-target"><a href="http://www.cnx-software.com/2015/03/31/onion-omega-is-an-atheros-ar9331-wi-fi-module-supporting-various-docks-and-add-on-boards-crowdfunding/" target="_blank">http://www.cnx-software.com/2015/03/31/onion-omega-is-an-atheros-ar9331-wi-fi-module-supporting-various-docks-and-add-on-boards-crowdfunding/</a> </span></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span class="u-linkComplex-target"><a href="https://wikidevi.com/wiki/Atheros_AR9331" target="_blank">https://wikidevi.com/wiki/Atheros_AR9331</a></span></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span class="u-linkComplex-target"><a href="http://wiki.openwrt.org/toh/tp-link/tl-wr703n/ar9331_pinout" target="_blank">http://wiki.openwrt.org/toh/tp-link/tl-wr703n/ar9331_pinout</a></span></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span class="u-linkComplex-target"><a href="http://makezine.com/2015/04/14/get-know-onion-omega-tiny-new-dev-board/" target="_blank">http://makezine.com/2015/04/14/get-know-onion-omega-tiny-new-dev-board/</a> </span></div>
<div class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span class="u-linkComplex-target"><br /></span></div>
<h2 class="ProfileHeaderCard-screenname u-inlineBlock u-dir" dir="ltr">
<span class="u-linkComplex-target"> </span></h2>
<br />security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com1Bowmanville, ON L1C 5P8, Canada43.901128 -78.70598899999998843.8982675 -78.71103149999999 43.9039885 -78.700946499999986tag:blogger.com,1999:blog-676382518143071514.post-51128672444077129282016-01-22T10:29:00.000-08:002016-01-22T10:36:50.931-08:00Thermistor to Temperature conversion in ARM-mbed <span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><a href="http://2.bp.blogspot.com/-EVDvXvMNGu8/VqJoDPCKWuI/AAAAAAAABG8/_YxZP5-On6U/s1600/FRDM-K64F_400x300.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://2.bp.blogspot.com/-EVDvXvMNGu8/VqJoDPCKWuI/AAAAAAAABG8/_YxZP5-On6U/s1600/FRDM-K64F_400x300.jpg" /></a><span style="font-size: x-small;"><b>This is a short article about how</b> to quickly convert a Thermistor Value to Temperature on the Freescale (Now NXP) FRDM-K64F board. Honestly, this code will work for any of the FRDM boards, as there is nothing specific to the K64F.</span></span></span><br />
<span style="font-size: small;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><span style="font-size: x-small;"><b>The <a href="http://www.nxp.com/products/software-and-tools/hardware-development-tools/freedom-development-boards/freedom-development-platform-for-kinetis-k64-k63-and-k24-mcus:FRDM-K64F" target="_blank">FRDM-K64F developer board</a> from NXP</b> (formerly Freescale) is a 32bit </span>ARM® Cortex™-M4 core with DSP instructions and Floating Point Unit (FPU)running at 120 Mhz. It has 1M flash memory and 256k RAM. It is compatible with most Arduino shields. </span></span><br />
<span style="font-size: small;"><br /></span>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">Add to this: </span></span><br />
<ul>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"> FlexBus, </span></span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">16 channel DMA, </span></span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">2 16bit ADC, </span></span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">2 16bit DAC, </span></span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">3 analog comparators, </span></span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">CANbus, </span></span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">3 SPI ports, </span></span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">3 I2C ports, </span></span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">6 UARTs, </span></span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">1 Secure Digital Host Controller, </span></span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">Ethernet, </span></span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">Micro-SD card </span></span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">Hardware CRC and random-number generator module, </span></span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">Hardware encryption supporting DES, 3DES, AES, MD5, SHA-1 and SHA-256 algorithms
</span></span></li>
<li><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">6-axis combo Sensor Accelerometer and Magnetometer
</span></span></li>
</ul>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><br /></span></span><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><b>NXP/Freescale do have their own free IDE available</b>, the <a href="http://www.nxp.com/products/software-and-tools/run-time-software/kinetis-software-and-tools/ides-for-kinetis-mcus/kinetis-design-studio-integrated-development-environment-ide:KDS_IDE" target="_blank">Kinetis Design Studio</a> that I've <a href="http://arduino-pi.blogspot.ca/2014/08/running-kinetis-design-studio-32bit.html" target="_blank">discussed here</a> in the past. It is quite a rich and capable development platform, however with that richness comes complexity. </span></span><br />
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><br /></span></span>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><b>For those less familiar with configuring hardware clocks</b> and startup code for embedded processors, I suggest you look at the <a href="https://www.mbed.com/en/" target="_blank">ARM-mbed platform</a>. </span></span><br />
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><br /></span></span>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><br /></span></span>
<b><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><br /></span></span>
</b><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><b>ARM-mbed is a fairly good online IDE</b> for working with various ARM based developer boards.</span></span><br />
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><a href="http://2.bp.blogspot.com/-2VOwnRkC2ig/VqJsA_d76tI/AAAAAAAABHM/sp-Jkmsjb4Q/s1600/Screenshot%2Bfrom%2B2016-01-22%2B12%253A49%253A38.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="272" src="http://2.bp.blogspot.com/-2VOwnRkC2ig/VqJsA_d76tI/AAAAAAAABHM/sp-Jkmsjb4Q/s400/Screenshot%2Bfrom%2B2016-01-22%2B12%253A49%253A38.png" width="400" /></a></span></span></div>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><br /></span></span>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><br /></span></span>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><span style="font-size: x-small;"><br /></span></span></span>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><span style="font-size: x-small;"><br /></span></span></span>
<br />
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><span style="font-size: x-small;"><b>I was rummaging through my code today</b>, and found this piece that I had struggled with last year when I was working on my 3D printer firmware. I wanted to be able to read two thermistors, one for the extruder nozzle, and one for the heated bed. These thermistors are used to regulate the temperature for accurate printing.</span></span></span></div>
<div style="text-align: left;">
<b><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><span style="font-size: x-small;"><br /></span></span></span></b></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><span style="font-size: x-small;"><b>Several of the standard 3D printer firmware options</b> (<a href="https://github.com/MarlinFirmware/Marlin" target="_blank">Marlin</a>, <a href="https://github.com/Traumflug/Teacup_Firmware" target="_blank">Teacup</a>, etc...) that were developed for the 8bit Arduino platform used conversion tables to reduce the processing overhead. Because I was using a 32bit ARM processor at 120Mhz, I didn't feel that this was the right method to follow. </span></span></span></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><span style="font-size: x-small;">Looking around, I quickly found out about the <a href="https://en.wikipedia.org/wiki/Steinhart%E2%80%93Hart_equation" target="_blank">Stenhart-Hart equation</a> for converting Thermistor resistance values to Temperature values. </span></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><a href="http://2.bp.blogspot.com/-cyNO8DDvt6A/VqJyncUcGRI/AAAAAAAABHg/sN9blprNQ_c/s1600/steinhart.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="78" src="http://2.bp.blogspot.com/-cyNO8DDvt6A/VqJyncUcGRI/AAAAAAAABHg/sN9blprNQ_c/s320/steinhart.png" width="320" /></a></span></span></div>
<div style="text-align: left;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><span style="font-size: x-small;"><br /></span></span></span></div>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">
It looked rather daunting at first, but then Adafruit came to the rescue with this awesome tutorial:</span></span><br />
<div style="text-align: center;">
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><a href="https://learn.adafruit.com/thermistor/using-a-thermistor" target="_blank">https://learn.adafruit.com/thermistor/using-a-thermistor </a></span></span></div>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><br /></span></span>
<br />
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><b>Anyway, with no further ado...</b> here is my demo code for displaying Temperature values from a 16bit analog read of a 100k thermistor on the FRDM-K64F development board.</span></span><br />
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><br /></span></span>
<br />
<blockquote class="tr_bq" style="background-color: white;">
<div class="code" style="background-color: #f5f8fa; border: 1px solid rgb(92, 123, 144); margin: 10px 0px 10px 10px; max-height: 600px; min-height: 16px; overflow: auto; padding: 18px 10px 10px; width: 510.391px;">
<div class="line" id="LC5">
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span style="font-size: xx-small;">/* FRDM-Thermistor-Demo<br />* This is a Thermistor to Temerature conversion demo <br />* for the @NXP (@freescale) FRDM-K64F demo board<br />* Much thanks to @Adafruit for this tutorial:<br />* https://learn.adafruit.com/thermistor/using-a-thermistor<br />*<br />* The 100K Thermistor is configured with a 4.7k series resistor <br />* tied to vcc (3.3v) like this:<br />*<br />* +3.3v<br />* |<br />* \<br />* / 4.7k series resistor<br />* \<br />* /<br />* |<br />* .-----------O To Anlog pin on FRDM board<br />* |<br />* \<br />* /<br />* Thermistor 100k Nominal<br />* \<br />* /<br />* |<br />* ---<br />* GND<br />* <br />*<br />*********************************************************************/<br /><br /><br />#include "mbed.h"<br /><br />#define THERMISTORNOMINAL 100000 // 100k <br />// temp. for nominal resistance (almost always 25 C)<br />#define TEMPERATURENOMINAL 25 <br />// The beta coefficient of the thermistor (usually 3000-4000)<br />#define BCOEFFICIENT 3950<br />// the value of the 'other' resistor<br />#define SERIESRESISTOR 4700 <br /> <br />AnalogIn Thermistor(A3);<br /><br />Serial pc(USBTX, USBRX);<br /><br /><br />// This is the workhorse routine that calculates the temperature<br />// using the Steinhart-Hart equation for thermistors<br />// https://en.wikipedia.org/wiki/Steinhart%E2%80%93Hart_equation<br />float get_temperature()<br />{<br /> float temperature, resistance;<br /> float steinhart;<br /> int a;<br /> <br /> a = Thermistor.read_u16(); // Read 16bit Analog value<br /> pc.printf("Raw Analog Value for Thermistor = %d\r\n",a);<br /> <br /> /* Calculate the resistance of the thermistor from analog votage read. */<br /> resistance = (float) SERIESRESISTOR / ((65536.0 / a) - 1);<br /> pc.printf("Resistance for Thermistor = %f\r\n",resistance);<br /> <br /> steinhart = resistance / THERMISTORNOMINAL // (R/Ro)<br /> steinhart = log(steinhart); // ln(R/Ro)<br /> steinhart /= BCOEFFICIENT; // 1/B * ln(R/Ro)<br /> steinhart += 1.0 / (TEMPERATURENOMINAL + 273.15); // + (1/To)<br /> steinhart = 1.0 / steinhart; // Invert<br /> temperature = steinhart - 273.15; // convert to C<br /><br /> return temperature;<br />}<br /> <br /><br />int main()<br />{<br /> pc.baud(115200); <br /> pc.printf("\r\nThermistor Test - Build " __DATE__ " " __TIME__ "\r\n");<br /> <br /> while(1) { <br /> pc.printf("Temperature %f *C\r\n",get_temperature()); <br /><br /> wait(.5); <br /> }<br />}</span></span><br />
<div style="line-height: normal;">
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">
</span><span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><br /></span></span></div>
</div>
</div>
</blockquote>
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;">
</span></span><br />
<b><span style="font-size: large;"><br /></span></b>
<b><span style="font-family: "trebuchet ms" , sans-serif; font-size: large;"><span style="color: #666666;">References:</span></span></b><br />
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><a href="http://www.nxp.com/products/software-and-tools/hardware-development-tools/freedom-development-boards/freedom-development-platform-for-kinetis-k64-k63-and-k24-mcus:FRDM-K64F" target="_blank">NXP.COM: FRDM-K64F Developer board</a></span></span><br />
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><a href="https://developer.mbed.org/platforms/FRDM-K64F/" target="_blank">ARM-mbed: FRDM-K64F </a></span></span><br />
<span style="font-family: "trebuchet ms" , sans-serif; font-size: small;"><span style="color: #666666;"><a href="https://learn.adafruit.com/thermistor/using-a-thermistor" target="_blank">Adafruit: Using a thermistor to tell temperature</a> </span></span><br />
<span style="font-size: small;"><br /></span>security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0Bowmanville, ON L1C 5P8, Canada43.901128 -78.70598899999998843.8982675 -78.71103149999999 43.9039885 -78.700946499999986tag:blogger.com,1999:blog-676382518143071514.post-6729543230004042492015-10-21T12:31:00.000-07:002015-10-21T12:31:21.764-07:00My Reprap Prusa i3 Kit [ second of a multipart blog] - The Build! <h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://2.bp.blogspot.com/-KapgZe2OzFY/Vh1LQt30MdI/AAAAAAAAA9s/A1R7MCc92OE/s1600/2015-Upgraded-Quality-High-Precision-Reprap-Prusa-i3-DIY-3d-Printer-kit-with-2-Rolls-Filament.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-KapgZe2OzFY/Vh1LQt30MdI/AAAAAAAAA9s/A1R7MCc92OE/s320/2015-Upgraded-Quality-High-Precision-Reprap-Prusa-i3-DIY-3d-Printer-kit-with-2-Rolls-Filament.jpg" width="320" /></a><span style="font-size: large;"><span style="font-weight: normal;">This past weekend, I finally had the time to start building my <a href="http://reprap.org/wiki/Prusa_i3" target="_blank">Reprap Prusa i3</a> 3D Printer, <span>which I ordered a few weeks ago from </span><a class="mod-shopsign-name" href="http://www.aliexpress.com/store/1502993" style="font-style: italic;" target="_blank">Shenzhen Sunhokey Electronics Co., Ltd.</a> on<span>
<a href="http://aliexpress.com/" target="_blank">Aliexpress.com</a></span></span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span> </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span> </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span> </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span> </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span> </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span> </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span> </span></span><a href="http://2.bp.blogspot.com/-_WFmWCUStwo/ViffHiI_e9I/AAAAAAAABDo/WnqttxcoxAw/s1600/Screenshot%2Bfrom%2B2015-10-21%2B14%253A52%253A41.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="227" src="http://2.bp.blogspot.com/-_WFmWCUStwo/ViffHiI_e9I/AAAAAAAABDo/WnqttxcoxAw/s320/Screenshot%2Bfrom%2B2015-10-21%2B14%253A52%253A41.png" width="320" /></a><span style="font-weight: normal;"><span> </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span> </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span> </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span>The kit came with a DVD which included about a dozen videos of the step-by-step assembly process. There is no speech in the videos, just some background music, and periodic overlay of the hardware required to assemble each step.</span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span> </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span>The videos run at a fairly leisurely pace, but yes... I did have to pause them many times to keep up. </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span> </span></span></span></span><a href="http://1.bp.blogspot.com/-M2V25XnrSrA/VifflPRHKTI/AAAAAAAABDw/ZaM7JylY4ps/s1600/Screenshot%2Bfrom%2B2015-10-21%2B14%253A54%253A52.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="261" src="http://1.bp.blogspot.com/-M2V25XnrSrA/VifflPRHKTI/AAAAAAAABDw/ZaM7JylY4ps/s400/Screenshot%2Bfrom%2B2015-10-21%2B14%253A54%253A52.png" width="400" /></a></h3>
<h3 class="post-title entry-title" itemprop="name">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dytqIeu_T7NKjPwhQkp9N7md6_MXsnkgtcMVCU8n2-PBi_Z3o17V00sdB3--eNP4rNbSMpYzEKL81BzQuOx2g' class='b-hbp-video b-uploaded' frameborder='0'></iframe><span style="font-weight: normal;"><span> <span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">Here's a sample video to show you what </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-weight: normal;"><span><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">the process looks like.</span></span></span></span><span style="font-weight: normal;"><span><div class="" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6sQP5sOg9itcOsciHM-H9NWklj-quL1tiXcCzhDexbTkp6uN5g9VhCs8z6Z_teLKJ-Kp0x8H8l7frQ78BliOBhgQ6wbVO_ChucsAo9tVyVmIpWJMyOEVHDyb8S5lTJEd_xwI1eWg_8M3J/s1600/2015-10-16+22.45.43.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6sQP5sOg9itcOsciHM-H9NWklj-quL1tiXcCzhDexbTkp6uN5g9VhCs8z6Z_teLKJ-Kp0x8H8l7frQ78BliOBhgQ6wbVO_ChucsAo9tVyVmIpWJMyOEVHDyb8S5lTJEd_xwI1eWg_8M3J/s320/2015-10-16+22.45.43.jpg" width="320" /></a> </div>
</span></span><span style="font-weight: normal;"><span><br /></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span> The build started fairly smoothly, with the X-axis motor block and opposite belt tensioner slider assemblies. (Yeah, I'm too lazy to look up the official names of these two components)</span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span><br /></span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span></span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span><br /></span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://4.bp.blogspot.com/-C6iWJu8ABvg/VifheP5SpcI/AAAAAAAABEE/YBwNkUQcfk0/s1600/2015-10-16%2B20.58.33.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-C6iWJu8ABvg/VifheP5SpcI/AAAAAAAABEE/YBwNkUQcfk0/s320/2015-10-16%2B20.58.33.jpg" width="240" /></a><span style="font-weight: normal;"><span> </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span> </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span> </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span>My Assistant and fellow builder - Camden, found himself getting rather tired, early into the build! But, like a trooper, he put in a good couple hours. Thank you Camden. </span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span><br /></span></span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span><br /></span></span></span></span></h3>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://3.bp.blogspot.com/-bigVB-eFIfs/VifhpsWZKOI/AAAAAAAABEM/C__iJrzLBZU/s1600/2015-10-17%2B08.52.02.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-bigVB-eFIfs/VifhpsWZKOI/AAAAAAAABEM/C__iJrzLBZU/s320/2015-10-17%2B08.52.02.jpg" width="240" /></a></span></span></div>
<br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">Next up, was the actual hotend carriage assembly. I'll have to admit, it was very exciting to see these pieces built first. Good job</span></span><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><a class="mod-shopsign-name" href="http://www.aliexpress.com/store/1502993" style="font-style: italic;" target="_blank"><span style="color: black;"> </span>Shenzhen Sunhokey Electronics Co., Ltd.</a>! </span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;">At first, I wasnt sure how I would feel about the transparent acrylic frame and parts, but as the build progressed, I grew rather fond of it.</span></span></span><br />
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><span> </span></span> </span></span><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<a href="http://1.bp.blogspot.com/-XmkZtZ2AdmU/Vifj-u62B4I/AAAAAAAABEw/H6cYr8olW_Q/s1600/2015-10-17%2B14.21.43.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-XmkZtZ2AdmU/Vifj-u62B4I/AAAAAAAABEw/H6cYr8olW_Q/s320/2015-10-17%2B14.21.43.jpg" width="320" /></a><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"> </span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbfmGf182MDdW1wnXqSkN2nVrCuW2LHQXhfEeeQ_R7EUTP1LkJSMgZIYcsXex3cjA0ZnB-Kept9E-2usonqbtiaVnAbL5JZBfDq4XllNgM38N4snrRX7H1EJ43QJsWQf7sWuxT8XwpTxul/s1600/2015-10-18+13.58.00.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="http://2.bp.blogspot.com/-16BhbQylFqU/Vifj-ZPpHOI/AAAAAAAABEk/kTjWQvhH_-c/s1600/2015-10-17%2B14.38.53.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-16BhbQylFqU/Vifj-ZPpHOI/AAAAAAAABEk/kTjWQvhH_-c/s320/2015-10-17%2B14.38.53.jpg" width="320" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy61AdNfDOgPtx111xMizpo94Y07LxjGfEZ4Rpa91eRVE-bIlM_NOg1fe6Ci8sISztx29kPMLzkuJKHg0vKiretp1JKPVsv8tP7pyqx7xrrLTQtsVSjSOIxWBNBZcq_V-2rhQednw9xima/s1600/2015-10-17+16.45.23.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy61AdNfDOgPtx111xMizpo94Y07LxjGfEZ4Rpa91eRVE-bIlM_NOg1fe6Ci8sISztx29kPMLzkuJKHg0vKiretp1JKPVsv8tP7pyqx7xrrLTQtsVSjSOIxWBNBZcq_V-2rhQednw9xima/s320/2015-10-17+16.45.23.jpg" width="240" /></a><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"> </span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"> </span></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;">Next came Z-Axis Motor brackets, end stops, and then the frame and rails for the Y-Axis heated bed </span></span></span><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-etP7dyLZw0E/Vifj_SsviII/AAAAAAAABE4/8sAR4_bF9ak/s1600/2015-10-18%2B11.59.01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-etP7dyLZw0E/Vifj_SsviII/AAAAAAAABE4/8sAR4_bF9ak/s320/2015-10-18%2B11.59.01.jpg" width="320" /></a></div>
</span></span><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;">I wrapped up for the weekend at this point. Two days of "duration", and about 6 hours of "effort". </span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbfmGf182MDdW1wnXqSkN2nVrCuW2LHQXhfEeeQ_R7EUTP1LkJSMgZIYcsXex3cjA0ZnB-Kept9E-2usonqbtiaVnAbL5JZBfDq4XllNgM38N4snrRX7H1EJ43QJsWQf7sWuxT8XwpTxul/s1600/2015-10-18+13.58.00.jpg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbfmGf182MDdW1wnXqSkN2nVrCuW2LHQXhfEeeQ_R7EUTP1LkJSMgZIYcsXex3cjA0ZnB-Kept9E-2usonqbtiaVnAbL5JZBfDq4XllNgM38N4snrRX7H1EJ43QJsWQf7sWuxT8XwpTxul/s320/2015-10-18+13.58.00.jpg" width="240" /></a><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"> </span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"> </span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;">The next three articles over the upcoming week will be: </span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><b>1)</b> wiring all of the motors, switches, heaters, etc to the control board and firing it up. <b><br /></b></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><b>2)</b> calibrating and troubleshooting (probably not in that order!) <b><br /></b></span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"><b>3)</b> finally running a first print. </span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"> </span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;">Cheers.</span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"> </span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-weight: normal;"> </span></span></h3>
<h3 class="post-title entry-title" itemprop="name">
</h3>
security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0Bowmanville, ON L1C 5P8, Canada43.901128 -78.70598899999998843.8982675 -78.71103149999999 43.9039885 -78.700946499999986tag:blogger.com,1999:blog-676382518143071514.post-61612707990836999472015-10-13T13:18:00.004-07:002015-10-13T13:18:48.521-07:00My Reprap Prusa i3 Kit [ first of a multipart blog] - The unboxing!<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSw3gNnvKM9zV3CXPxRtgzivJP-rYoWaCtRI6oCYJscWI2jtq8fE3ptefBfpTEGEsAqp4UhUrDrhYHQDIu7CK6ekTGDc7svKRM7E-kCWwCpKe8TJsZxnEI94MA-U4LjQH0ghA02yaXzGzP/s1600/2015-Upgraded-Quality-High-Precision-Reprap-Prusa-i3-DIY-3d-Printer-kit-with-2-Rolls-Filament.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSw3gNnvKM9zV3CXPxRtgzivJP-rYoWaCtRI6oCYJscWI2jtq8fE3ptefBfpTEGEsAqp4UhUrDrhYHQDIu7CK6ekTGDc7svKRM7E-kCWwCpKe8TJsZxnEI94MA-U4LjQH0ghA02yaXzGzP/s200/2015-Upgraded-Quality-High-Precision-Reprap-Prusa-i3-DIY-3d-Printer-kit-with-2-Rolls-Filament.jpg" width="200" /></a><span style="font-size: small;"><b>I finally bit the bullet,</b> and ordered an actual real 3d Printer from <a href="http://www.aliexpress.com/item/2015-Upgraded-Quality-High-Precision-Reprap-Prusa-i3-DIY-3d-Printer-kit-with-2-Rolls-Filament/2026704108.html" target="_blank">Aliexpress.com. </a>I've needed an actual functioning mechanical printer to finish my testing and calibration on the Printer firmware that I've been working on for several months now. </span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><b>The homemade rig</b> that I cobbled together was not capable of the tolerances that my firmware and electronics could theoretically achieve.</span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>I've put it off</b> until now for many reasons: Mostly because I'm pig headed and didn't want to admit that I'm not a mechanical genius....</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Anyway,</b> a few friends convinced me that this was the right way to go, to finish my ACTUAL project, which was the combination of electronics and <span style="font-size: small;">associated software/firmware to support it.</span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><b>The kit I ordered</b> was from </span><a class="mod-shopsign-name" href="http://www.aliexpress.com/store/1502993" style="font-size: 20px; font-style: italic; font-weight: bold;" target="_blank">Shenzhen Sunhokey Electronics Co., Ltd.</a></span>
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><b>I must say</b> that I was rather impressed with the speed in which this kit was delivered from China to Canada. From the time I ordered, it took about a business week to process the order, but once I received notification that the package had shipped, It was here with about 4 days. Thank you <a href="http://aliexpress.com/" target="_blank">Aliexpress.com</a></span></span> <br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;"><b>Without further ado, let's begin the unpacking:</b></span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2VHRpYxratmtKm8O2eNhZx23RS75g6NNNe0qO58TzUDlZg-X137HSFjRhyphenhyphenP4kn_C-fLn59gEAcoyu-A6V8OM1fO81eKxwC-3xHsDED7rw7SBCCanxb5h9QTU0cixAMc9rNE2SJmXcqRK4/s1600/2015-10-09+13.07.33.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2VHRpYxratmtKm8O2eNhZx23RS75g6NNNe0qO58TzUDlZg-X137HSFjRhyphenhyphenP4kn_C-fLn59gEAcoyu-A6V8OM1fO81eKxwC-3xHsDED7rw7SBCCanxb5h9QTU0cixAMc9rNE2SJmXcqRK4/s320/2015-10-09+13.07.33.jpg" width="320" /></a></span></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><b>The Fedex dude</b> pretty much had a hernia dropping this little box at my door. The packaging said 13.5kg, which is about 30lbs for you Americans... But it felt a lot heavier than that. Must make a note to self to return (go?) to the gym.</span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://3.bp.blogspot.com/-OSxX_Nyo2i4/Vh1Oh7Up89I/AAAAAAAAA_c/99kgcpUBvJc/s1600/2015-10-13%2B08.40.53.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-OSxX_Nyo2i4/Vh1Oh7Up89I/AAAAAAAAA_c/99kgcpUBvJc/s320/2015-10-13%2B08.40.53.jpg" width="240" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihOUzsmJXj7WAI4ChQ1LIqxP9jynW_R6RDA5wvQsVmP08vWErxyW6ZzcW0FVux_sTFdHXiD2j4XaRhbsmI0pHw8ZXrAz69ZQAMqd8S0PZa8e9XIChw8muOMAjQAXhjwePxMI3R4vCHrnNf/s1600/2015-10-13+08.41.20.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihOUzsmJXj7WAI4ChQ1LIqxP9jynW_R6RDA5wvQsVmP08vWErxyW6ZzcW0FVux_sTFdHXiD2j4XaRhbsmI0pHw8ZXrAz69ZQAMqd8S0PZa8e9XIChw8muOMAjQAXhjwePxMI3R4vCHrnNf/s320/2015-10-13+08.41.20.jpg" width="240" /></a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<br />
<br />
<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>I've removed the thick protective foam</b> top that covered everything to show that this is indeed very well packaged. </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>With the box containing</b> the acrylic frame components removed, you can see the electronic and mechanical components nestled tightly within the foam. </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>The distributor even</b> has little cutouts to cover the stepper motors and linear and threaded rods!</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<br />
<br />
<br />
<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNt6ofLVUPF871NfSwv04QCwRliwfTV25H-M97XjDpco40h71KFLgxZAxa1SfbkYoeRMRDPd6-IyUK7r0-38N6h66XDII2g3DndK4kJbxtHuZVVwU2nbKjLP_W-6fXOQ-VLrWdJjcb4J21/s1600/2015-10-13+08.42.54.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNt6ofLVUPF871NfSwv04QCwRliwfTV25H-M97XjDpco40h71KFLgxZAxa1SfbkYoeRMRDPd6-IyUK7r0-38N6h66XDII2g3DndK4kJbxtHuZVVwU2nbKjLP_W-6fXOQ-VLrWdJjcb4J21/s320/2015-10-13+08.42.54.jpg" width="240" /></a> </span><br />
<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"> </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>The </b><a href="http://reprapworld.com/documentation/metal%20extruder%20cold%20end%20v1.0.pdf" target="_blank"><b>aluminum bowden extruder</b> </a>was pre-assembled to the stepper motor, and the machining on the hotend looks to be quite good.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://1.bp.blogspot.com/-uNWISbYkEow/Vh1kKpAkXkI/AAAAAAAABBA/0qP6owF6Zfg/s1600/2015-10-13%2B16.02.51-1.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="http://1.bp.blogspot.com/-uNWISbYkEow/Vh1kKpAkXkI/AAAAAAAABBA/0qP6owF6Zfg/s200/2015-10-13%2B16.02.51-1.jpg" width="159" /></a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span><div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://1.bp.blogspot.com/-PYyiZmLZ7do/Vh1aL4gaF-I/AAAAAAAABAs/gQO6KnpnOi4/s1600/2015-10-13%2B08.44.02.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-PYyiZmLZ7do/Vh1aL4gaF-I/AAAAAAAABAs/gQO6KnpnOi4/s320/2015-10-13%2B08.44.02.jpg" width="320" /></a></span></div>
<span style="font-family: "Trebuchet MS",sans-serif;"> <b>The power supply</b> is a beefy 12v 30A (360watt) unit. </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>My only complaint</b>, is that I was not aware that you had to specify North American AC adapter. It comes, by default, with a European adapter. </span><br />
<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<div style="text-align: center;">
<span style="font-size: large;"><b><span style="font-family: "Trebuchet MS",sans-serif;">Yeah, I'm RTFM challenged, ok!?</span></b></span></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://1.bp.blogspot.com/-P1gpXpWsdNI/Vh1aLgujuCI/AAAAAAAABAo/BOHx5j__fHM/s1600/2015-10-13%2B08.45.46.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-P1gpXpWsdNI/Vh1aLgujuCI/AAAAAAAABAo/BOHx5j__fHM/s320/2015-10-13%2B08.45.46.jpg" width="320" /></a></span></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>The Controller board</b> is a <a href="http://reprap.org/wiki/MKS_GEN_V1.1" target="_blank">MKS Gen 2Z v1.1</a>. </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;">This is basically a combination of the <a href="https://www.arduino.cc/en/Main/ArduinoBoardMega2560" target="_blank">Arduino MEGA2560</a> plus a <a href="http://reprap.org/wiki/RAMPS_1.4" target="_blank">RAMPS1.4 </a>board. It still uses the <a href="https://www.pololu.com/product/1182" target="_blank">A4988</a> stepper driver boards. </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Included in this kit </b>is an un-named LCD display with SDCARD and a rotary encoder for menu selection. </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"> </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://3.bp.blogspot.com/-z16tDMmCg2E/Vh1OlITIJGI/AAAAAAAABAI/HIKES2f6qh4/s1600/2015-10-13%2B08.50.04.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-z16tDMmCg2E/Vh1OlITIJGI/AAAAAAAABAI/HIKES2f6qh4/s320/2015-10-13%2B08.50.04.jpg" width="320" /></a><b>All of the frame components</b> are cut out of clear acrylic. (With a nice pink protective layer... hmmm... should I leave that on? )</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://2.bp.blogspot.com/-NB3GoiR1j2w/Vh1OkhXxWDI/AAAAAAAABAE/Kggf5ZUzcOE/s1600/2015-10-13%2B08.48.06.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="300" src="http://2.bp.blogspot.com/-NB3GoiR1j2w/Vh1OkhXxWDI/AAAAAAAABAE/Kggf5ZUzcOE/s400/2015-10-13%2B08.48.06.jpg" width="400" /></a></span></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Also included </b>were two 1kg spools of 1.75mm PLA to get me started.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;">I didn't request any particular colors, so I kind of expected something funky. </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">They provided Black and White, which I'm quite happy about.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<b><span style="font-family: "Trebuchet MS",sans-serif;">That's it for now. </span></b><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">Later in the week, I'll begin assembling and documenting. </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<b><span style="font-family: "Trebuchet MS",sans-serif;">Wish me luck!</span></b><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com1Bowmanville, ON L1C 5P8, Canada43.901128 -78.70598899999998843.8982675 -78.71103149999999 43.9039885 -78.700946499999986tag:blogger.com,1999:blog-676382518143071514.post-62388565233189675372015-04-18T13:09:00.001-07:002015-04-18T13:09:09.519-07:00How we learned about electronics pre-Arduino days...<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9UGgKo9xW_tX7yj0ZMSuHHELs2G2IuMD20fGkBrUAIIL-VKFWEaGEhGcDvty_91HFi1btPjhjJLYUj9XIHdt9L0Wloe5qKtJ4pQBhDcUnlaW4zvLNA_PjkqGalX5z-KXoCc3p719m6YZI/s1600/sciencefair_electronics_kit.jpeg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9UGgKo9xW_tX7yj0ZMSuHHELs2G2IuMD20fGkBrUAIIL-VKFWEaGEhGcDvty_91HFi1btPjhjJLYUj9XIHdt9L0Wloe5qKtJ4pQBhDcUnlaW4zvLNA_PjkqGalX5z-KXoCc3p719m6YZI/s1600/sciencefair_electronics_kit.jpeg" height="400" width="225" /></a></div>
<span style="font-size: large;"><span style="font-family: "Trebuchet MS",sans-serif;">Very short post here: </span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>I was cleaning</b> the basement, and came across <span style="font-size: large;">this</span>. It is "brand new", as in everything was still wrapped in it's original bubble wrap and had the cardboard corner protectors... huh... go figure..</span><br />
<b><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></b>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Anyway boys and girls...</b> this is what an Arduino looked like 20+ years ago. LOL</span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>130 rainy day</b> electronics projects in one box... </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>I tend to be a very forgetful person,</b> but I *vividly* remember MY first computer. </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>In 1976</b>, <a href="http://www.exemark.com/Microcontrollers/PopularElecwebc.pdf" target="_blank">Popular Electronics Magazine</a> ran an article about building your very own personal computer.</span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>The "<a href="http://www.cosmacelf.com/history1.htm" target="_blank">Cosmac ELF</a>" </b> was basically a PCB that you purchased, sourcing all of the electronic parts through the mail. I think at the age of 10, it took me several months to get the components. Sending off for one of two as my allowance came in, and soldering them to the circuit board. </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-dWVIpZevluE/VTK46FNCFII/AAAAAAAAA2Q/k44nImZBhNk/s1600/elf2_big.JPG" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" src="http://4.bp.blogspot.com/-dWVIpZevluE/VTK46FNCFII/AAAAAAAAA2Q/k44nImZBhNk/s1600/elf2_big.JPG" height="240" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Picture from : http://www.homebrewcpu.com/projects.htm</td></tr>
</tbody></table>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Using an 8bit RCA 1802</b> processor meant for the newly invented digital gas pumps, the Cosmac Elf boasted 256 bytes (BYTES!) of memory, two 7 segment LEDs, 8 toggle switches for address and data input, a RUN switch, and a PROGRAM switch. </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>No BIOS or bootloader...</b> nada... and yet some simple games could be loaded (in binary!) and played for hours of fun.</span><br />
<br />
<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Two years later</b>, I was up to 4k of memory, a cassette tape drive, and a monochrome video display of 128x64 bits... and a home rolled character generator!</span><br />
<br />
<b><span style="font-family: "Trebuchet MS",sans-serif;">Those were the days...</span></b><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">I'd <b>LOVE</b> to hear your stories in the comments below... </span><br />
<br />
<br />
<br />security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com1Bowmanville, ON L1C 5P8, Canada43.901128 -78.70598899999998843.8982675 -78.71103149999999 43.9039885 -78.700946499999986tag:blogger.com,1999:blog-676382518143071514.post-45703557050317686712015-04-17T08:29:00.000-07:002015-04-17T10:56:46.865-07:00PlatformIO - A Cross-Platform Code Builder and Missing Library Manager<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://1.bp.blogspot.com/-VrXhEVbWtsE/VTD1mvgcYYI/AAAAAAAAA1Q/eL939FoDsDY/s1600/platformio.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://1.bp.blogspot.com/-VrXhEVbWtsE/VTD1mvgcYYI/AAAAAAAAA1Q/eL939FoDsDY/s1600/platformio.png" height="214" width="320" /></a><b><span style="font-size: large;">I ran across this awesome site</span> </b>a couple weeks ago, and was astounded by their claims. I had to try it out!</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>In a nutshell</b>, PlatformIO has automated the various build aspects of cross compiling for your favorite Microcontroller across Mac OS X, Windows, and Linux, both on Intel as well as ARM (Meaning you can run PlatformIO on your Raspberry PI, or Beagle Board!) <span style="font-size: large;"> </span></span><br />
<div style="text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;">AND, <a href="http://docs.platformio.org/en/latest/librarymanager/index.html" target="_blank">they manage library dependencies for you!</a> </span></span></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Basically</b>, you can write your embedded code once, and compile across several target boards with very little additional work. </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>PlatformIO</b> for each Operating system includes compiler,
debugger, uploader (for embedded) and a bunch of useful tools.
</span><span style="font-family: "Trebuchet MS",sans-serif;">Popular settings for most popular Embedded Platform
Boards are pre-configured out of the box. </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>To date</b>, PlatformIO out-of-the-box support includes:</span><br />
<br />
<ul>
<li><span style="font-family: "Trebuchet MS",sans-serif;"><b><a href="http://www.atmel.com/products/microcontrollers/avr/" target="_blank">Atmel AVR</a></b>, 8bit MCUs as found on <a href="http://www.arduino.cc/" target="_blank">Arduino</a> and a million clones.</span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;"><b><a href="http://www.atmel.com/products/microcontrollers/arm/default.aspx" target="_blank">Atmel SAM</a> </b> Smart ARM MCUs as found on the <a href="http://www.arduino.cc/en/Main/arduinoBoardDue" target="_blank">Arduino Due</a>.</span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;"><b><a href="https://espressif.com/en/products/esp8266/" target="_blank">Esspressif </a></b> Intelligent embedded Wifi for the Internet of Things.</span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;"><b><a href="http://www.freescale.com/webapp/sps/site/homepage.jsp?code=KINETIS" target="_blank">Freescale Kinetis</a></b> 32bit ARM MCUs in thousands of automotive and industrial products. Their <a href="http://freescale.com/freedom" target="_blank">FRDM series of platform development boards</a> are </span><br /><span style="font-family: "Trebuchet MS",sans-serif;">Arduino Shield Compatible.</span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;"><b><a href="https://www.nordicsemi.com/eng/Products/nRF51-Series-SoC" target="_blank">Nordic nRF51</a></b> Series of embedded wireless (Bluetooth, etc..) communications boards.</span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;"><b><a href="http://www.nxp.com/products/microcontrollers/" target="_blank">NXP LPC</a></b>, 32bit ARM MCUs also in automotive, industrial, commercial products. Their <a href="http://www.lpcware.com/LPCXpressoBoards" target="_blank">LPC Expresso development platform boards</a> are Arduino Shield Compatible.</span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;"><b><a href="http://www.st.com/web/en/catalog/mmc/FM141/SC1169?sc=stm32" target="_blank">ST STM32</a></b>, 32bit ARM MCUs. They can be found in the <a href="http://www.st.com/web/en/catalog/tools/FM116/SC959/SS1532/PF250863?sc=stm32-discovery" target="_blank">STM Discovery boards</a> and the <a href="http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847?sc=stm32nucleo" target="_blank">STM Nucleo development platform</a>.</span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;">TI MSP430, 32bit ARM MCUs can be found in their <a href="http://www.ti.com/tool/msp-exp430g2" target="_blank">Launchpad Development Platform boards</a>. </span></li>
</ul>
<br />
<br />
<a href="http://cdn.shopify.com/s/files/1/0174/8616/products/DSC_0164_1024x1024.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://cdn.shopify.com/s/files/1/0174/8616/products/DSC_0164_1024x1024.JPG" height="156" width="200" /></a><span style="font-family: "Trebuchet MS",sans-serif;"><b>And of Special Note</b>, <a href="http://platformio.org/">PlatformIO.org</a> has worked with the <a href="http://www..pjrc.com/" target="_blank">guys that developed</a> the <a href="https://www.pjrc.com/teensy/teensy31.html" target="_blank">Teensy 3.1 board</a> to include it in <a href="http://docs.platformio.org/en/latest/platforms/index.html" target="_blank">their supported systems</a>. I make note of this, as the Teensy does use the <a href="http://freescale.com/" target="_blank">Freescale</a> <a href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=K20_72" target="_blank">Kinetis K20dx256</a> 32bit ARM cortex-4 MCU, but they have simply made this board more readily available to work with. (<a href="http://arduino-pi.blogspot.ca/2015/04/ive-successfully-replaced-analog.html" target="_blank">I also have a vested interest in this board</a>!) </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"> Once installed, you can get a list of the 60 or more supported boards by typing <i>“platformio boards”</i> ... </span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://3.bp.blogspot.com/-_ryiGgu3Dt4/VTD9ent6_2I/AAAAAAAAA1g/6AeaVIO9JBc/s1600/platformio2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-_ryiGgu3Dt4/VTD9ent6_2I/AAAAAAAAA1g/6AeaVIO9JBc/s1600/platformio2.png" height="133" width="200" /></a></span></div>
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"> It's really as simple as installing PlatformIO onto your Laptop, Desktop, or Single board Computer (<a href="https://www.raspberrypi.org/" target="_blank">Raspberry Pi</a>, <a href="http://beagleboard.org/BLACK" target="_blank">BeagleBone</a>, etc...), and choosing your target Embedded System to develop for. </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">You Install PlatformIO itself, then invoke it to install the toolsets and libraries for your preferred board/processor, </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;">something akin to <i>"platformio install freescalekinetis"</i> and it pulls down all of the cross compiler tools, and kinetis core libraries.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">You then initiate a project with <i>"platformio init -bteensy31"</i>. It creates the directory structure, and you are free to use your favorite editor/IDE to write the code. </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>No... this is not Visual Studio / Programming-with-your-mouse tool</b>, but it DOES take care of a lot of the planning, configuration, build, and upload issues for you. </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">Once you have written your code, again invoking PlatformIO to build and upload is a simple process.. <i>"platformio run -t upload"</i>... </span><br />
<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-cdwHjok7jl4/VTEgIe5JFRI/AAAAAAAAA1w/sNCavLvYgTk/s1600/platformio-embedded-development.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://3.bp.blogspot.com/-cdwHjok7jl4/VTEgIe5JFRI/AAAAAAAAA1w/sNCavLvYgTk/s1600/platformio-embedded-development.png" height="320" width="311" /></a></div>
<span style="font-family: "Trebuchet MS",sans-serif;">PlatformIO Library Manager
allows you to organize external libraries. Searching for new
libraries can be via commandline or Web Interfaces. Python code in the background takes care of the rest. Think of this as a package manager for your embedded libraries.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;"><b>My fellow Teensy developers...</b> If you feel constrained by the limitations of the <a href="http://www.arduino.cc/en/main/software" target="_blank">Arduino IDE</a> (even though they did such an awesome job extending it with <a href="https://www.pjrc.com/teensy/teensyduino.html" target="_blank">Teensyduino</a>) And you are not up to the complexity of a full fledged bloated developer suite.. Please do yourself the favor, and try out <a href="http://platformio.org/" target="_blank">PlatformIO</a>.</span></span><br />
<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;"><b>References:</b></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b><a href="http://platformio.org/" target="_blank">PlatformIO.org</a> </b></span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><a class="reference external" href="http://blog.atmel.com/2015/03/23/cross-board-and-cross-vendor-embedded-development-with-platformio/">Cross-board and cross-vendor embedded development with PlatformIO</a><b> </b></span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><a class="reference external" href="http://brainwagon.org/2015/03/22/discovered-a-new-tool-for-embedded-development-platformio/">Discovered a new tool for embedded development: PlatformIO</a><b> </b></span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><a class="reference external" href="http://www.ikravets.com/computer-life/platformio/2014/10/07/integration-of-platformio-library-manager-to-arduino-and-energia-ides">Integration of PlatformIO library manager to Arduino and Energia IDEs</a></span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><a class="reference external" href="http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio">Building and debugging Atmel AVR (Arduino-based) project using Eclipse IDE+PlatformIO</a></span></span><br />
<br />security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0Bowmanville, ON L1C 5P8, Canada43.901128 -78.70598899999998843.8982675 -78.71103149999999 43.9039885 -78.700946499999986tag:blogger.com,1999:blog-676382518143071514.post-66899084586194339582015-04-08T14:39:00.002-07:002015-04-08T14:51:10.441-07:00Marlin Firmware on Teensy 3.1 - Analog Temperature success!<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><b>I've successfully replaced</b> the Analog functions in Marlin's temperature.cpp, with calls to </span></span><span style="font-size: x-small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><a href="https://forum.pjrc.com/members/35645-Pedvide" target="_blank">Pedro Villanueva</a>'s <a href="https://github.com/pedvide/ADC" target="_blank">ADC library for the Teensy 3.1,</a> and am getting good temperature readings out of it.</span></span></span><br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<span style="font-size: large;"><b><span style="font-family: "Trebuchet MS",sans-serif;">Here's a couple shots from Repetier Host. </span></b></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrC9HUp6GS2S3UTIf7Ub5C5STa0LI5P1lynRxCBb3QfEQbvUBVrwi5VgT94bf4bnRCnBNyFXHTyFwOqxxWxEstsH6GqsXw-FE-wBSUmEsob3ZTeSvt-0BRCTprFseq8IpMXFyIGLEaKu4V/s1600/Screenshot+from+2015-04-08+17:32:02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrC9HUp6GS2S3UTIf7Ub5C5STa0LI5P1lynRxCBb3QfEQbvUBVrwi5VgT94bf4bnRCnBNyFXHTyFwOqxxWxEstsH6GqsXw-FE-wBSUmEsob3ZTeSvt-0BRCTprFseq8IpMXFyIGLEaKu4V/s1600/Screenshot+from+2015-04-08+17:32:02.png" height="262" width="400" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-yVpCQ-uAgzA/VSWfX-9NmOI/AAAAAAAAA0o/jvvBqDdtQ7Y/s1600/Screenshot%2Bfrom%2B2015-04-08%2B17%3A32%3A37.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-yVpCQ-uAgzA/VSWfX-9NmOI/AAAAAAAAA0o/jvvBqDdtQ7Y/s1600/Screenshot%2Bfrom%2B2015-04-08%2B17%3A32%3A37.png" height="214" width="320" /></a></div>
<br />
<br />
<br />
<br />
<br />
Now on to updating the PID functions for the heaters...<br />
<br />
This is looking quite doable my friends!<br />
<br />
<br />
<b>My Previous blogs on this project:</b><br />
<span style="font-size: xx-small;">(little did I know I'd be working on this on and off for a year... and the real work is just beginning)</span><br />
<br />
<ul>
<li><span style="font-size: xx-small;"><a href="http://arduino-pi.blogspot.ca/2015/04/you-have-to-see-this-rich-adc-library.html" target="_blank">You have to see this Rich ADC library for Teensy 3.1 !!! </a> </span></li>
<li><span style="font-size: xx-small;"><a href="http://arduino-pi.blogspot.ca/2015/03/marlin-firmware-compiled-on-teensy-31.html" target="_blank">Marlin Firmware Compiled on Teensy 3.1 and ... well..</a> </span></li>
<li><span style="font-size: xx-small;"><a href="http://arduino-pi.blogspot.ca/2015/03/repscrap-dc-motor-control-for-x-y.html" target="_blank">Repscrap: DC Motor Control for X-Y working - now to Teacup_Firmware</a></span></li>
<li><span style="font-size: xx-small;"><a href="http://arduino-pi.blogspot.ca/2015/01/teensy-31-based-repstrap-control-board.html" target="_blank">Teensy 3.1 based Repstrap control board initial wiring completed - test #1</a></span></li>
<li><span style="font-size: xx-small;"><a href="http://arduino-pi.blogspot.ca/2014/12/prototype-printer-controller-contd.html" target="_blank">Prototype Printer Controller Cont'd - Teensy 3.1 w/DC motor/encoders</a></span></li>
<li><span style="font-size: xx-small;"><a href="http://arduino-pi.blogspot.ca/2014/12/prototype-board-dc-motorencoder-teensy.html" target="_blank">Prototype Board: DC motor/Encoder - Teensy 3.1 based 3D printer controller </a></span></li>
<li><span style="font-size: xx-small;"><a href="http://arduino-pi.blogspot.ca/2014/12/teensy-31-repstrap-printer-with-dc.html" target="_blank">Teensy 3.1 Repstrap printer with DC motor control and Flex Timer Quadrature Encoders</a></span></li>
<li><span style="font-size: xx-small;"><a href="http://arduino-pi.blogspot.ca/2014/07/developing-robot-shield-for-teensy-31.html" target="_blank">Developing a Robot Shield for Teensy 3.1: Looking for feedback</a></span></li>
<li><span style="font-size: xx-small;"><a href="http://arduino-pi.blogspot.ca/2014/05/arduino-pid-library-for-position.html" target="_blank">Using the Arduino PID Library for position control of X and Y axis on RepScrap printer </a></span></li>
<li><span style="font-size: xx-small;"><a href="http://arduino-pi.blogspot.ca/2014/05/further-progress-on-framing-my-repscrap.html" target="_blank">Further Progress on framing my RepScrap 3D printer.</a></span></li>
<li><span style="font-size: xx-small;"><a href="http://arduino-pi.blogspot.ca/2014/05/my-repscrap-dc-motors-and-rotary.html" target="_blank">My Repscrap: DC motors and rotary encoders for Z-Axis too? </a></span></li>
<li><span style="font-size: xx-small;"><a href="http://arduino-pi.blogspot.ca/2014/04/arduino-sketch-to-manage-high.html" target="_blank">Arduino Sketch to manage high resolution - high speed linear encoders</a></span></li>
<li><span style="font-size: xx-small;"><a href="http://arduino-pi.blogspot.ca/2014/04/followup-on-3d-printer-from-scavenged.html" target="_blank">Followup on 3D printer from Scavenged DC Motor / Encoders Blog</a></span></li>
<li><span style="font-size: xx-small;"><a href="http://arduino-pi.blogspot.ca/2014/04/using-dc-motors-and-encoders-for-3d.html" target="_blank">Using DC Motors and Encoders for 3D printer: Challenging the norm!</a></span></li>
<li><span style="font-size: xx-small;"><a href="http://arduino-pi.blogspot.ca/2014/04/my-journey-into-building-3d-printer.html" target="_blank">My journey into building a 3d printer from old printer parts</a></span></li>
</ul>
<br />
<br />
<br />
<br />
<br />security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0Bowmanville, ON L1C 5P8, Canada43.901128 -78.70598899999998843.8982675 -78.71103149999999 43.9039885 -78.700946499999986tag:blogger.com,1999:blog-676382518143071514.post-82203895299569319872015-04-06T08:36:00.000-07:002015-04-06T11:29:54.666-07:00You have to see this Rich ADC library for Teensy 3.1 !!!<a href="http://2.bp.blogspot.com/-vkcEeDeJRdE/VSKcEZB7wYI/AAAAAAAAA0M/-QE5z4zrOs4/s1600/DSC_0164_1024x1024.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://2.bp.blogspot.com/-vkcEeDeJRdE/VSKcEZB7wYI/AAAAAAAAA0M/-QE5z4zrOs4/s1600/DSC_0164_1024x1024.JPG" height="156" width="200" /></a><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>Several months ago, </b>while <a href="http://arduino-pi.blogspot.ca/2014/07/developing-robot-shield-for-teensy-31.html" target="_blank">working on my Robotic shield for the Teensy 3.1, </a><b></b>I had stumbled across this extremely <a href="https://github.com/pedvide/ADC" target="_blank">rich and robust implementation of an ADC library</a>, <a href="https://forum.pjrc.com/threads/25532-ADC-library-update-now-with-support-for-Teensy-3-1" target="_blank">here on the Teensy forum</a>. </span></span><br />
<a href="https://forum.pjrc.com/threads/25532-ADC-library-update-now-with-support-for-Teensy-3-1" target="_blank"><span style="font-size: x-small;"><span style="font-family: "Trebuchet MS",sans-serif;">(https://forum.pjrc.com/threads/25532-ADC-library-update-now-with-support-for-Teensy-3-1 ) <b> Edit: </b>updated as per author of library (15/04/06)</span></span></a><br />
<span style="font-size: x-small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>Written by a </b><a href="https://forum.pjrc.com/members/35645-Pedvide" target="_blank">user of the Teensy, Pedro Villanueva</a> started this library just over a year ago, but has implemented most, if not all, functions of the Teensy 3.1 including use of both ADC available in the Teensy 3.1, as well as </span></span><span style="font-family: "Trebuchet MS",sans-serif;">differential readings on the two built-in differential channels (A10-A11 and A12-A13).</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"> </span> <br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>Along with this library,</b> he has written a simple ring buffer implementation which will prove quite handy. There are also a number of very informative and well thought out examples. </span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b><span style="font-size: large;">List of methods of the library:</span></b></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>int ADC::analogRead ( uint8_t pin ) </b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Returns the analog value of the pin.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
It waits until the value is read and then returns the result. If a
comparison has been set up and fails, it will return ADC_ERROR_VALUE.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>int ADC::analogReadContinuous ( ) </b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Reads the analog value of a continuous conversion.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Set the continuous conversion with with analogStartContinuous(pin) or startContinuousDifferential(pinP, pinN)</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Returns</span></span><b> </b><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">the last converted value. </span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>int ADC::analogReadDifferential ( uint8_t pinP, uint8_t pinN ) </b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Reads the differential analog value of two pins (pinP - pinN).</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
It waits until the value is read and then returns the result. If a
comparison has been set up and fails, it will return
ADC_ERROR_DIFF_VALUE.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>void ADC::disableCompare ( ) </b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Disable the compare function.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>void ADC::disableDMA ( ) </b> </span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Disable ADC DMA request.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>void ADC::disableInterrupts ( ) </b> </span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Disable interrupts.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>void ADC::enableCompare ( int16_t compValue, int greaterThan ) </b> </span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Enable the compare function to a single value.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
A conversion will be completed only when the ADC value is >=
compValue (greaterThan=1) or < compValue (greaterThan=0) Call it
after changing the resolution Use with interrupts or poll conversion
completion with isADC_Complete()</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b><br />
void ADC::enableCompareRange ( int16_t lowerLimit, int16_t upperLimit,<br />
int insideRange, int inclusive ) </b> </span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Enable the compare function to a range.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
A conversion will be completed only when the ADC value is inside
(insideRange=1) or outside (=0) the range given by (lowerLimit,
upperLimit),including (inclusive=1) the limits or not (inclusive=0). See
Table 31-78, p. 617 of the <a href="https://www.pjrc.com/teensy/K20P64M72SF1RM.pdf" target="_blank">freescale manual.</a> Call it after changing the
resolution Use with interrupts or poll conversion completion with
isComplete()</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>void ADC::enableDMA ( ) </b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Enable DMA request.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
An ADC DMA request will be raised when the conversion is completed
(including hardware averages and if the comparison (if any) is true).</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>void ADC::enableInterrupts ( ) </b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Enable interrupts.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
An IRQ_ADC0 Interrupt will be raised when the conversion is completed
(including hardware averages and if the comparison (if any) is true).</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>double ADC::getMaxValue ( ) </b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Returns the maximum value for a measurement, that is: 2^resolution.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>int ADC::getResolution ( ) </b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Returns the resolution of the ADC.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>int ADC::isComplete ( ) </b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Is an ADC conversion ready?</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Returns</span></span> <span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">1 if yes, 0 if not. When a value is read this function returns 0
until a new value exists So it only makes sense to call it before
analogRead(), analogReadContinuous() or analogReadDifferential() </span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>int ADC::isConverting ( ) </b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Is the ADC converting at the moment?</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Returns</span></span> <span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">1 if yes, 0 if not </span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>void ADC::setAveraging ( unsigned int num ) </b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Set the number of averages.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Parameters</span></span> <br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
num can be 0, 4, 8, 16 or 32.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>void ADC::setReference ( uint8_t type ) </b> </span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Set the voltage reference you prefer, default is vcc.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Parameters</span></span> <br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
type can be DEFAULT, EXTERNAL or INTERNAL</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>void ADC::setResolution ( unsigned int bits ) </b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Change the resolution of the measurement.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Parameters</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
bits is the number of bits of resolution. For single-ended
measurements: 8, 10, 12 or 16 bits. For differential measurements: 9,
11, 13 or 16 bits. If you want something in between (11 bits
single-ended for example) select the inmediate higher and shift the
result one to the right.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>void ADC::startContinuous ( uint8_t pin ) </b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Starts continuous conversion on the pin.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
It returns as soon as the ADC is set, use analogReadContinuous() to read the value.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>void ADC::startContinuousDifferential ( uint8_t pinP, uint8_t pinN ) </b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Starts continuous conversion between the pins (pinP-pinN).</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
It returns as soon as the ADC is set, use analogReadContinuous() to read the value.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>void ADC::stopContinuous ( ) </b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
Stops continuous conversion.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span>
</blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>int </b></span></span><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>ADC::</b></span></span>startSingleRead(uint8_t pin)</b></span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">Starts an analog measurement on
the pin and enables interrupts. It returns inmediately, get value with
readSingle(). If the pin is incorrect it returns ADC_ERROR_VALUE This
function is interrupt safe. The ADC interrupt will restore the adc to
its previous settings and restart the adc if it stopped a measurement.
If you modify the adc_isr then this won't happen.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>int </b></span></span><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>ADC::</b></span></span>startSingleDifferential(uint8_t pinP, uint8_t pinN)</b> </span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">Same as above but with differential measurements.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>int </b></span></span><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>ADC::</b></span></span>readSingle()</b> </span></span><br />
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">Reads the analog value of a single conversion.
Set the conversion with with startSingleRead(pin) or
startSingleDifferential(pinP, pinN). </span></span></blockquote>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>
<br />
<br />
<span style="font-size: large;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>References:</b></span></span><br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://forum.pjrc.com/members/35645-Pedvide" target="_blank">Teensy Forum: User Pedvide</a> </span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://github.com/pedvide/ADC" target="_blank">Github: Pedvide/ADC</a> </span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://forum.pjrc.com/threads/24399-quot-Complete-quot-implementation-of-Teensy-3-0-ADC-as-a-library" target="_blank">https://forum.pjrc.com/threads/24399-quot-Complete-quot-implementation-of-Teensy-3-0-ADC-as-a-library </a></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://www.pjrc.com/teensy/K20P64M72SF1RM.pdf" target="_blank">Freescale: K20 Sub-Family Reference Manual</a> </span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4373.pdf" target="_blank">Freescale: App Note - ADC measurements done properly</a></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://cache.freescale.com/files/32bit/doc/app_note/AN4590.pdf" target="_blank">Freescale: Using DMA to Emulate ADC Flexible Scan Mode on Kinetis K Series</a> </span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://www.freescale.com/files/microcontrollers/doc/app_note/AN2438.pdf" target="_blank">Freescale: App Note - AN2438/D 2/2003 ADC Definitions and Specifications</a> </span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></span>security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0Bowmanville, ON L1C 5P8, Canada43.901128 -78.70598899999998843.8982675 -78.71103149999999 43.9039885 -78.700946499999986tag:blogger.com,1999:blog-676382518143071514.post-28952552685665266482015-04-01T10:51:00.001-07:002015-04-01T12:48:20.806-07:00Repetier successfully connected and functional with Marlin Firmware on Teensy 3.1<span style="font-family: "Trebuchet MS",sans-serif;"><b> </b><b>I've had a few informative back and forth emails </b>with <a href="https://community.freescale.com/projects/freescale-based-3d-printer/blog" target="_blank">Nikki V from Freescale</a> regarding my failure to get connected to <a href="http://www.repetier.com/" target="_blank">Repetier Host</a> from the <a href="http://reprap.org/wiki/Marlin" target="_blank">Marlin Firmware</a> on my <a href="https://www.pjrc.com/teensy/teensy31.html" target="_blank">Teensy 3.1</a>. </span><br />
<br />
<div style="text-align: center;">
<span style="font-size: x-small;"><span style="font-family: "Trebuchet MS",sans-serif;">(Here's a link to Nikki's 3D printer blog: <a href="https://community.freescale.com/groups/demolab/projects/freescale-based-3d-printer-engine-based-on-rampsmarlin" target="_blank">https://community.freescale.com/grou...on-rampsmarlin)</a> </span></span></div>
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b><a href="http://arduino-pi.blogspot.ca/2015/03/marlin-firmware-compiled-on-teensy-31.html" target="_blank">As mentioned in my previous article</a></b>, I was finally able to compile and install the Marlin Firmware when I used </span><span style="font-family: "Trebuchet MS",sans-serif;">the <a href="https://github.com/PaulStoffregen/Marlin" target="_blank">fork that Paul Stoffregen</a> started, along with Nikki's <a href="https://forum.pjrc.com/threads/26015-3D-Printer-Software-with-Teensy-3-1?p=53635&viewfull=1#post53635" target="_blank"><b>Configuration.h </b>and <b>pins.h</b></a> files. However, I could not connect to the firmware with Repetier. </span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-n4tfd3D4W1g/VRwnqlAzg9I/AAAAAAAAAzo/i_9hJYNqCpA/s1600/Screenshot%2Bfrom%2B2015-03-29%2B14%3A16%3A34.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://4.bp.blogspot.com/-n4tfd3D4W1g/VRwnqlAzg9I/AAAAAAAAAzo/i_9hJYNqCpA/s1600/Screenshot%2Bfrom%2B2015-03-29%2B14%3A16%3A34.png" height="125" width="200" /></a></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Marlin was sending </b>the appropriate communications out through the USB serial port, as evidenced by this screenshot: </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>But the Repetier connect request was not initializing Marlin</b>, and returning the printer information. </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Nikki pointed me</b> <a href="https://forum.pjrc.com/threads/26015-3D-Printer-Software-with-Teensy-3-1" target="_blank">back to the same thread</a> on the Teensy Forum that I've already read 100 times... </span><br />
<br />
<span style="font-size: large;"><b><span style="font-family: "Trebuchet MS",sans-serif;">Yeah... but I'm apparently blind or ignorant... or both...</span></b></span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>She brought my attention</b> to the fact that this issue has already been identified, and could be remediated </span><span style="font-family: "Trebuchet MS",sans-serif;"> by </span><span style="font-family: "Trebuchet MS",sans-serif;">clicking a "fake OK" button from within the Manual control page.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;">I couldn't find the "Fake OK" button, so I read a little deeper.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>And then </b><a href="https://forum.pjrc.com/threads/26015-3D-Printer-Software-with-Teensy-3-1?p=50008&viewfull=1#post50008" target="_blank"><b>Paul chimed in</b> with a comment about compiling on Linux,</a> and it all came together... Thank you Nikki, Thank you Paul.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Here's what Paul had to say </b>that made all the difference: </span><br />
<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;">I tried the Linux version. It also has only "OK", not "Fake OK", but it seems to work fine.</span>
<span style="font-size: x-small;"><br />
I had to edit the baud rate to 57600 in Configuration.h. The Linux
driver doesn't seem to like 250000 (even though Teensy 3.1 complete
ignores the baud rate).</span>
<span style="font-size: x-small;"><br />
Repetier-Host does seem to be getting hung up on something and requires
the "OK" button clicked. I believe it's due to the missing temperature
feature. The blue bar will stay stuck as "1 Command Waiting". Clicking
"OK" gets it unstuck.</span></blockquote>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<a href="http://1.bp.blogspot.com/-dt8smyv_p40/VRwq00tAjFI/AAAAAAAAAz0/W2pdh9f0NXk/s1600/Screenshot%2Bfrom%2B2015-04-01%2B13%3A28%3A20.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://1.bp.blogspot.com/-dt8smyv_p40/VRwq00tAjFI/AAAAAAAAAz0/W2pdh9f0NXk/s1600/Screenshot%2Bfrom%2B2015-04-01%2B13%3A28%3A20.png" height="187" width="200" /></a><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>I set the baudrate</b> in <b>configuration.h</b> to 57600, and recompiled and uploaded to the Teensy 3.1. I then launched Repetier, and went into the printer configuration, and selected 57600.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<span style="font-size: large;"><b><span style="font-family: "Trebuchet MS",sans-serif;">I applied, saved, and hit "Connect" .....</span></b></span><br />
<span style="font-size: large;"><b><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></b></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;"><b>And Voila! </b></span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"> </span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-8dPt5-nb-UY/VRwkH795LpI/AAAAAAAAAzc/i4XIKEwzPzk/s1600/Screenshot%2Bfrom%2B2015-03-31%2B18%3A19%3A25.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-8dPt5-nb-UY/VRwkH795LpI/AAAAAAAAAzc/i4XIKEwzPzk/s1600/Screenshot%2Bfrom%2B2015-03-31%2B18%3A19%3A25.png" height="250" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;"><b> Marlin Firmware now connects, and provides printer information. </b></span></span></div>
<span style="font-family: "Trebuchet MS",sans-serif;">
</span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></div>
<span style="font-family: "Trebuchet MS",sans-serif;">
</span>
<b>As of today,</b> I have hard wired in 100k thermistors for Extruder and Bed heater temperature sensing, and set the pullup resistors for the endstops...<br />
<br />
<b>The Quadrature encoders</b> are functioning on X and Y axis via the Flextimer module <a href="https://forum.pjrc.com/threads/26803-Hardware-Quadrature-Code-for-Teensy-3-x" target="_blank">QuadDecode</a> library, and <b>*MY*</b> PID routines (using the Arduino PID library) <b>are successfully driving both X and Y axis DC motors</b> from the manual controls in Repetier.<br />
<br />
<b>The Quadrature encoders</b> are functioning on Z axis with Phase A/B hardware pin interrupts , and <b>*MY*</b> PID routines <b>are successfully driving one Z axis DC motors</b> from the manual controls in Repetier. <br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span>
I have a functional I2C 20x4 LCD display, as well as SDcard reader.<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span>
<b>As far as capacity</b> on the Teensy, here is the size of code - all in - so far:<br />
<blockquote class="tr_bq">
<b>From the Arduino IDE:</b><br />
Binary sketch size: 108,816 bytes (of a 262,144 byte maximum)<br />
Estimated memory use: 14,080 bytes (of a 65,536 byte maximum)</blockquote>
<br />
<span style="font-size: large;">Is
it running... sure... is it printing... no...</span> my budget hasn't allowed
me the pleasure of a real extruder. I'm simply stepping a NEMA17 I had
kicking around. I keep saying "next paycheck!"<br />
<br />
<br />
<b><span style="font-size: large;">TODO:</span></b><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span>
<br />
<ol>
<li>Acquire a real extruder/hotend (today I'm simply driving a NEMA17 that I had kicking around.) (anyone want to help?? LOL)</li>
<li>Wire up FET transistors to drive extruder and bed heater elements</li>
<li>Wire up endstops </li>
<li>Lots and lots and lots of PID tuning. Things have changed since porting/merging my DC motor code into the Marlin Firmware.</li>
<li><b>Take video this weekend and upload to Youtube! LOL </b></li>
<li>Remove MY PID routines, and create macro/wrapper to use existing Marlin PID routines meant for temperature management.</li>
<li>Put "conditional" code back in so I can merge this stuff back to github</li>
<li>Figure out how to merge stuff back to github </li>
<li>figure out whether 7. or 8. should come first...</li>
</ol>
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span>
<span style="font-family: "Trebuchet MS",sans-serif;"></span>
<span style="font-family: "Trebuchet MS",sans-serif;"></span>
<span style="font-family: "Trebuchet MS",sans-serif;"></span>security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0Bowmanville, ON L1C, Canada43.9126042 -78.68801943.8668492 -78.7687 43.9583592 -78.607338tag:blogger.com,1999:blog-676382518143071514.post-82697073744174987732015-03-30T19:40:00.002-07:002015-03-30T19:40:10.871-07:00Connecting to those underside pins on the Teensy 3.1<span style="font-family: "Trebuchet MS",sans-serif;">This is a VERY short post to describe how "I" connected permanently to the underside pins on my <a href="http://www.pjrc.com/teensy/teensy31.html" target="_blank">Teensy 3.1</a>'s</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://4.bp.blogspot.com/-hRuych8p9DQ/VRoGn9xbf8I/AAAAAAAAAyI/XTDLS8fqwSE/s1600/IMG_20141222_140437.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-hRuych8p9DQ/VRoGn9xbf8I/AAAAAAAAAyI/XTDLS8fqwSE/s1600/IMG_20141222_140437.jpg" height="400" width="325" /></a></span></div>
<span style="font-family: "Trebuchet MS",sans-serif;"> </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;">To get
access to the extra pins on the bottom of the teensy, I used a dual row
header, and bent the inside pins at a 90 degree angle, trimmed, and
soldered. That's it. Easy peasy!</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://4.bp.blogspot.com/-etEmGZonGq8/VRoHQ0RBVfI/AAAAAAAAAyQ/LghGi0quBag/s1600/IMG_20141229_224638.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-etEmGZonGq8/VRoHQ0RBVfI/AAAAAAAAAyQ/LghGi0quBag/s1600/IMG_20141229_224638.jpg" height="640" width="424" /></a></span></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">This shot shows the Real Time Clock crystal soldered into place. </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">There's some further discussion on the subject <a href="https://forum.pjrc.com/threads/25218-Teensy-3-1-Underside-Pad-Problems" target="_blank">here</a>... </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">There are also <a href="https://www.tindie.com/products/loglow/teensy-31-breakout/" target="_blank">breakout boards</a> designed to give you easy access to these pins...</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://d3s5r33r268y59.cloudfront.net/4373/products/thumbs/2014-09-24T03:11:06.261Z-Photo%20Sep%2020,%2012%2017%2014%20PM.jpg.855x570_q85_pad_rcrop.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://d3s5r33r268y59.cloudfront.net/4373/products/thumbs/2014-09-24T03:11:06.261Z-Photo%20Sep%2020,%2012%2017%2014%20PM.jpg.855x570_q85_pad_rcrop.jpg" width="400" /></a></span></div>
<div style="text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;">(<a href="https://www.tindie.com/products/loglow/teensy-31-breakout/" target="_blank">from Tindie</a>)</span></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0tag:blogger.com,1999:blog-676382518143071514.post-81255976625416526032015-03-29T13:23:00.000-07:002015-03-29T13:23:14.452-07:00Marlin Firmware Compiled on Teensy 3.1 and ... well.. <span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">So while I'm waiting for some assistance on my <a href="http://arduino-pi.blogspot.ca/2015/03/success-teacupfirmware-on-teensy31-and.html" target="_blank">Teacup Firmware implementation</a>, I thought I would poke around a bit in the <a href="https://github.com/PaulStoffregen/Marlin" target="_blank">Marlin fork that Paul Stoffregen</a> started. (<a href="https://forum.pjrc.com/threads/26015-3D-Printer-Software-with-Teensy-3-1/page2" target="_blank">Also read here.</a>)</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">Marlin looks like it is a bit more mature than Teacup. It has some of the same people working on it, but it supports LCD panel, as well as SD cards. Teacup was designed to be a minimalist firmware implementation to fit the constraints of many of the Arduino variants. It is written in pure C for the most part, and is better managed from the command line. Marlin is a bit larger, but not significantly so, and is written in C++. </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">I cloned it local, and it did "compile" clean, but didn't "do" anything. The USB serial interface did initialize, in that /dev/ttyACM0 showed up, but there was no communication.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">A little bit of tinkering with MACROs, and I got the USB serial working. It is now successfully listening for and processing commands... </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://3.bp.blogspot.com/-TCVKxjtcnJ4/VRhBurrCBAI/AAAAAAAAAx0/QGKq0M85qbU/s1600/Screenshot%2Bfrom%2B2015-03-29%2B14%3A16%3A34.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-TCVKxjtcnJ4/VRhBurrCBAI/AAAAAAAAAx0/QGKq0M85qbU/s1600/Screenshot%2Bfrom%2B2015-03-29%2B14%3A16%3A34.png" height="250" width="400" /></a></span></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">I've reached out to <a href="https://community.freescale.com/projects/freescale-based-3d-printer/blog" target="_blank">Nikki V from Freescale</a>, to see if she has got any further in getting functionality working in Marlin.</span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">In the meantime, I've also got the <a href="https://github.com/nox771/i2c_t3" target="_blank">i2C_t3 Teensy variant of the Wire library</a> installed and running the LiquidCrystal LCD library for my 20x4 LCD display. </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">Now I'm looking at the ADC code in Teacup and seeing how easy it might be to bring across... This is NOT my strength for sure.. </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">Cheers.</span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"> </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<br />
<b><span style="font-family: "Trebuchet MS",sans-serif;">References:</span></b><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">https://forum.pjrc.com/threads/26015-3D-Printer-Software-with-Teensy-3-1/page2</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0tag:blogger.com,1999:blog-676382518143071514.post-65260309209777241562015-03-21T11:30:00.000-07:002015-03-21T12:13:12.163-07:00Success: Teacup_Firmware on Teensy3.1 and connected to Repetier Host!<span style="font-size: large;"><span style="font-family: "Trebuchet MS",sans-serif;">Further update on my Repscrap 3D printer progress...</span></span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">Here is the current schematic. Once I realized that I had <a href="http://arduino-pi.blogspot.ca/2015/03/repscrap-dc-motor-control-for-x-y.html" target="_blank">blundered with the I2C based motor shield</a>, I re-worked the design to directly drive four H-Bridges plus the stepper driver for the Extruder. </span><br />
<br />
To get enough pins on the Teensy 3.1, I had to give up the second endstop on each axis, but I can now directly accept four Quadrature Encoders, and drive four DC motors.<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="http://4.bp.blogspot.com/-G5rgdh8ApFE/VQyYp3dZICI/AAAAAAAAAw0/dvopvVgBBHc/s1600/teensy-print2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-G5rgdh8ApFE/VQyYp3dZICI/AAAAAAAAAw0/dvopvVgBBHc/s1600/teensy-print2.png" height="210" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Features included on this build:</b></span></div>
<ul>
<li><span style="font-family: "Trebuchet MS",sans-serif;">Two Flex Timer Hardware controlled Quadrature Decoders (X/Y AXIS)</span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;">Two Hardware interrupt based Quadrature Decoders (Both Z AXIS)</span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;">Four PID controlled PWM DC motor drivers (X/Y/Z1/Z2)</span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;">One stepper driver for the extruder</span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;">Three thermistor inputs (Extruder and two bed)</span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;">Three heater PWM drivers ( (Extruder and hot bed)</span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;">uSD card reader</span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;">I2C interface for LCD display, etc...</span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;">Serial Interface over USB </span></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/--Y2W0_55d6A/VQyZRvEmvwI/AAAAAAAAAw8/3cnwNXw8cl8/s1600/teensy31-printer-pinout1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/--Y2W0_55d6A/VQyZRvEmvwI/AAAAAAAAAw8/3cnwNXw8cl8/s1600/teensy31-printer-pinout1.png" height="640" width="356" /></a></div>
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>So... On to Teacup_Firmware:</b></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">I've been <a href="https://github.com/Traumflug/Teacup_Firmware/issues/122" target="_blank">conversing with the fine folk on the Teacup project</a> "<a href="https://github.com/Traumflug" target="_blank">Traumflug</a>", "<a href="https://github.com/drf5n" target="_blank">drf5n</a>", and "<a href="https://github.com/triffid" target="_blank">triffid</a>" with regards to getting the firmware to compile on my Ubuntu Linux 14.10 desktop. </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">I copied his instructions verbatim..</span><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-2LNeGtscJ7I/VQ2vrhmmuzI/AAAAAAAAAxQ/gkSMuIgCvgo/s1600/teacup_compile_instructions1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-2LNeGtscJ7I/VQ2vrhmmuzI/AAAAAAAAAxQ/gkSMuIgCvgo/s1600/teacup_compile_instructions1.png" height="291" width="400" /></a></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Notice the "git co teensy3" ? yeah...</b> that "co" is alias for "checkout", and I checked out the teensy3 branch rather than the <i>known-to-be-working</i> teensy3.1 branch.</span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>I spent a week,</b> off and on trying to get that branch to compile and work on my Teensy3.1. It compiled and uploaded fine, but I was not able to see the virtual serial port over USB (/dev/ttyACM0). </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b><span style="font-size: large;">DAMN YOU PRIDE! </span> </b></span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>I'm already feeling stupid</b> for taking so long to complete this project, I didn't want to admit that I was actually having troubles... </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>I finally sent</b> a request yesterday to the Teacup_firmware issues log, indicating what I had done to this point and describing my inability to see the serial port. </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>I've also opened</b> an issue on the <a href="https://forum.pjrc.com/" target="_blank">Teensy forum</a> to see if anyone can point me in the right direction.</span><br />
<div class="postrow">
<blockquote class="tr_bq">
<h2 class="title icon">
<span style="font-size: small;"><a href="https://forum.pjrc.com/threads/28131-Teacup_Firmware-on-Teensy-3-1-not-initializing-USB-Serial?p=68350#post68350" target="_blank">Teacup_Firmware on Teensy 3.1 not initializing USB Serial</a></span>
</h2>
</blockquote>
<div class="content">
<blockquote>
</blockquote>
<div id="post_message_68350">
<blockquote>
<blockquote class="postcontent restore ">
<span style="font-size: x-small;">I've successfully compiled the latest <a href="https://github.com/Traumflug/Teacup_Firmware/tree/teensy3.1" target="_blank">Teensy 3.1 branch of Teacup_Firmware</a> as per instructions on the Reprap wiki <br />
<br />
I'm using Ubuntu Linux 14.10.<br />
<br />
No more errors in compile using <a href="https://www.pjrc.com/teensy/td_download.html" target="_blank">Paul's most recent teensyduino 1.21</a>
I've associated it with <a href="http://arduino.cc/download.php?f=/arduino-1.0.6-linux64.tgz" target="_blank">Arduino IDE v1.0.6</a>, but am actually compiling
with Teacup_Firmware's Makefile using the ARM toolchain supplied with
Teensyduino at the commandline. <br />
<br />
As I said, It compiles fine, and the HEX file uploads to the Teensy, but
I do not get /dev/ttyACM0 on Teensy reboot. If I replace the HEX with
another sketch I compiled in the Arduino IDE (any thing) I get
/dev/ttyACM0 to show up. <br />
<br />
I know about the need to initialize the virtual serial over USB by
sending a string out from the Teensy. I do not see this happening in
Teacup_Firmware, however I know others have been able to compile and use
it successfully on the Teensy. I'm at a loss as to where to start
looking.<br />
<br />
Any guidance would be appreciated.
</span></blockquote>
</blockquote>
<br />
<b><span style="font-size: large;">Finally, I noticed my mistake. </span></b><br />
<br />
<b>Remember that "git co teensy3" ?</b> <br />
<br />
Today I backed up the branch I had been working on, and ran the proper "git co teensy3.1" <br />
<br />
Using the proper <a href="https://github.com/Traumflug/Teacup_Firmware/tree/teensy3.1" target="_blank">Teensy3.1 branch of Teacup_Firmware</a>, I started copying the correct files into place: <br />
<blockquote class="tr_bq">
<pre><code>$ cp config.teensy3.h config.h
$ cp ThermistorTable.single.h ThermistorTable.h
$ cp Makefile-teensy3 Makefile</code></pre>
</blockquote>
<span style="font-family: "Trebuchet MS",sans-serif;">Then I modied the make file to point to the correct toolchain as provided by teensyduino, AS WELL AS THE POINTER TO THE CORE FILES. <-- This step is not documented as best as I can find. It's in the make file, but nowhere are you told empirically to modify it. Doh! <facepalm></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"> </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>In the issue log</b>, Dave (<a href="https://github.com/drf5n" target="_blank">drf5n</a>) also noticed that modification was required to allow the teensy3 branch to compile as below: </span><br />
<blockquote class="tr_bq">
<pre><code>#if defined (_mk20dx128_h_) || defined ( __MK20DX128__ ) </code></pre>
<pre><code>// Teensy 3.0 uses a MK20DX128 32 bit ARM Cortex-M4 48 MHz Test on this for config.h
#include "arduino_teensy3.h"
#endif</code><span style="font-family: "Trebuchet MS",sans-serif;"></span></pre>
</blockquote>
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">I had to also update the define for the teensy3.1 processor MK20DX256 as so:<br /> </span><br />
<blockquote class="tr_bq">
<pre><code>#if defined (_mk20dx256_h_) || defined ( __MK20DX256__ ) </code></pre>
<pre><code> </code><code>// Teensy 3.1 uses a MK20DX256 32 bit ARM Cortex-M4 48 MHz Test on this for config.h
#include "arduino_teensy3.h"
#endif</code></pre>
</blockquote>
<pre><code>
</code></pre>
<span style="font-family: "Trebuchet MS",sans-serif;">Low and behold...</span> <span style="font-family: "Courier New",Courier,monospace;">make clean && make && make project</span> <span style="font-family: "Trebuchet MS",sans-serif;"> and I had a fairly clean compile. There were a few warnings that I was prepared for, but it compiled ... and uploaded... <b><span style="font-size: large;">AND I had my /dev/ttyACM0 !!!</span></b></span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b><span style="font-size: large;"><span style="font-size: small;">So at this point,</span></span></b><span style="font-size: large;"><span style="font-size: small;"> I hurriedly launched <a href="http://help.printrbot.com/Guide/Installing+Repetier-Host+for+Linux/75" target="_blank">Repetier Host</a>, configured the printer port, and pressed "<b>connect</b>"... Mais voila! </span></span></span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-HADN-osajVQ/VQ22hZx2yYI/AAAAAAAAAxg/Utk3BAKmsQ4/s1600/Screenshot%2Bfrom%2B2015-03-21%2B13%3A46%3A47.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-HADN-osajVQ/VQ22hZx2yYI/AAAAAAAAAxg/Utk3BAKmsQ4/s1600/Screenshot%2Bfrom%2B2015-03-21%2B13%3A46%3A47.png" height="250" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><b><span style="font-size: large;"><span style="font-size: small;"> It's a miracle!!! </span></span></b><span style="font-size: large;"><span style="font-size: small;">There is my teensy 3D printer controller, showing up in Repetier as Teacup! Yay!</span></span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b><span style="font-size: large;"><span style="font-size: small;"> </span> </span></b></span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b><span style="font-size: large;">Now, the real fun begins... </span></b><span style="font-size: small;">bringing my Quadrature encoders over to Teacup, and modifying my PID loops to use Teacup's dda_clock(). </span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><br /></span></span>
<br />
<div style="text-align: center;">
<span style="font-size: x-large;"><b><span style="font-family: "Trebuchet MS",sans-serif;">Wish me luck!</span></b></span></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><br /></span></span>
<br />
<b>My Previous blogs on this project:</b><br />
<span style="font-size: xx-small;">(little did I know I'd be working on this on and off for a year... and the real work is just beginning)</span><br />
<ul>
<li><span style="font-size: x-small;"><a href="http://arduino-pi.blogspot.ca/2015/03/repscrap-dc-motor-control-for-x-y.html" target="_blank">Repscrap: DC Motor Control for X-Y working - now to Teacup_Firmware</a></span></li>
<li><span style="font-size: x-small;"><a href="http://arduino-pi.blogspot.ca/2015/01/teensy-31-based-repstrap-control-board.html" target="_blank">Teensy 3.1 based Repstrap control board initial wiring completed - test #1</a></span></li>
<li><span style="font-size: x-small;"><a href="http://arduino-pi.blogspot.ca/2014/12/prototype-printer-controller-contd.html" target="_blank">Prototype Printer Controller Cont'd - Teensy 3.1 w/DC motor/encoders</a></span></li>
<li><span style="font-size: x-small;"><a href="http://arduino-pi.blogspot.ca/2014/12/prototype-board-dc-motorencoder-teensy.html" target="_blank">Prototype Board: DC motor/Encoder - Teensy 3.1 based 3D printer controller </a></span></li>
<li><span style="font-size: x-small;"><a href="http://arduino-pi.blogspot.ca/2014/12/teensy-31-repstrap-printer-with-dc.html" target="_blank">Teensy 3.1 Repstrap printer with DC motor control and Flex Timer Quadrature Encoders</a></span></li>
<li><span style="font-size: x-small;"><a href="http://arduino-pi.blogspot.ca/2014/07/developing-robot-shield-for-teensy-31.html" target="_blank">Developing a Robot Shield for Teensy 3.1: Looking for feedback</a></span></li>
<li><span style="font-size: x-small;"><a href="http://arduino-pi.blogspot.ca/2014/05/arduino-pid-library-for-position.html" target="_blank">Using the Arduino PID Library for position control of X and Y axis on RepScrap printer </a></span></li>
<li><span style="font-size: x-small;"><a href="http://arduino-pi.blogspot.ca/2014/05/further-progress-on-framing-my-repscrap.html" target="_blank">Further Progress on framing my RepScrap 3D printer.</a></span></li>
<li><span style="font-size: x-small;"><a href="http://arduino-pi.blogspot.ca/2014/05/my-repscrap-dc-motors-and-rotary.html" target="_blank">My Repscrap: DC motors and rotary encoders for Z-Axis too? </a></span></li>
<li><span style="font-size: x-small;"><a href="http://arduino-pi.blogspot.ca/2014/04/arduino-sketch-to-manage-high.html" target="_blank">Arduino Sketch to manage high resolution - high speed linear encoders</a></span></li>
<li><span style="font-size: x-small;"><a href="http://arduino-pi.blogspot.ca/2014/04/followup-on-3d-printer-from-scavenged.html" target="_blank">Followup on 3D printer from Scavenged DC Motor / Encoders Blog</a></span></li>
<li><span style="font-size: x-small;"><a href="http://arduino-pi.blogspot.ca/2014/04/using-dc-motors-and-encoders-for-3d.html" target="_blank">Using DC Motors and Encoders for 3D printer: Challenging the norm!</a></span></li>
<li><span style="font-size: x-small;"><a href="http://arduino-pi.blogspot.ca/2014/04/my-journey-into-building-3d-printer.html" target="_blank">My journey into building a 3d printer from old printer parts</a></span></li>
</ul>
<br />
<br />
<br /></div>
</div>
</div>
security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0tag:blogger.com,1999:blog-676382518143071514.post-9259452423318095972015-03-07T08:08:00.003-08:002015-03-07T08:11:42.259-08:00Repscrap: DC Motor Control for X-Y working - now to Teacup_Firmware<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/mEqda8GQVlY/0.jpg" frameborder="0" height="266" src="http://www.youtube.com/embed/mEqda8GQVlY?feature=player_embedded" style="clear: right; float: right;" width="320"></iframe></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>I am quite happy</b> with my results in getting the Xaxis and Yaxis PID control working <a href="https://forum.pjrc.com/threads/26803-Hardware-Quadrature-Code-for-Teensy-3-x" target="_blank">Trudy's Quadrature Decoder</a> for the <a href="https://community.freescale.com/thread/320695" target="_blank">Freescale Kinetis K20 (K20DX256-72MHz)</a> used in the <a href="https://www.pjrc.com/teensy/teensy31.html" target="_blank">Teensy 3.1</a>. </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;">A big thank you to <a href="https://plus.google.com/113179837473309823193/posts" target="_blank">Miguel Sanchez</a> for his help and inspiration.</span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Here's a video</b> snip of a quick demo showing the tuned X and Y carriages tracing out a simple 1500x1500 square. The purpose of this demo was to simply allow me to tune the PID parameters for each axis.</span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>I'm currently torn</b> between two separate development tracks. The first track is using the <a href="http://playground.arduino.cc/Code/PIDLibraryAdvancedMethods" target="_blank">Beta6 version of the PID library</a>, <a href="http://www.idt.mdh.se/kurser/ct3340/ht09/ADMINISTRATION/IRCSE09-submissions/ircse09_submission_22.pdf" target="_blank">cascading Velocity and Position</a>, and defining velocity profiles for each axis. I've had a fair bit of success in this track, and will publish code and results in a few weeks. </span><br />
<br />
<a href="http://2.bp.blogspot.com/-qHF3EhTHofY/U3GATVU6iUI/AAAAAAAAAlE/GQJ6F2JLar4/s1600/IMG_20140508_200307.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://2.bp.blogspot.com/-qHF3EhTHofY/U3GATVU6iUI/AAAAAAAAAlE/GQJ6F2JLar4/s1600/IMG_20140508_200307.jpg" height="200" width="135" /></a><span style="font-family: "Trebuchet MS",sans-serif;"><b>However, the main track</b> I'm following currently is to get my <a href="http://arduino-pi.blogspot.ca/2015/01/teensy-31-based-repstrap-control-board.html" target="_blank">DC motor control on the Teensy 3.1</a>, working within <a href="http://reprap.org/wiki/Teacup_Firmware" target="_blank">Teacup_firmware</a>. For expedience and simplicity, this forces me to emulate a stepper at the moment, passing STEP/DIR commands from Teacup into my motor drive logic. The reason for splitting the tracks is that the cascaded PID control does not function well in small encoder increments. Ramp time in the Velocity PID is calculated from position delta... blah blah blah.. </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">My Teacup inspiration came from <a href="https://community.freescale.com/projects/freescale-based-3d-printer/blog/2014/07/10/build-your-own-3d-printer-engine-in-2-weeks--day-1213" target="_blank">Nikki V's awesome blog series</a> in when she builds a Teensy 3.1/RAMPS based 3D printer controller over the course of about a month. I highly suggest you go read through it.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Anyway....</b> I have had some difficulty (my own lack of awareness) in getting Teacup compiled properly on Ubuntu 14.10 for the Teensy. Yesterday, I opened <a href="https://github.com/Traumflug/Teacup_Firmware/issues/122" target="_blank">issue #122</a> and was answered within hours! </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">I'm currently using </span>the newest teensy3 folder from Paul Stoffregen's git repo <a href="https://github.com/PaulStoffregen/cores">https://github.com/PaulStoffregen/cores</a><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">Dave "<a href="https://github.com/drf5n" target="_blank">drf5n</a>" answered my logged issue, and set me straight. <span style="font-size: x-small;"> (It also looks like he's working on Marlin... I should ask him about that..)</span></span><br />
<br />
I backed up and then removed the version of Teacup_firmware I was currently working from, then issued:<br />
<br />
<blockquote class="tr_bq">
<pre><span style="font-family: "Courier New",Courier,monospace;"><code>git clone https://github.com/Traumflug/Teacup_Firmware.git && cd Teacup_Firmware</code></span></pre>
</blockquote>
<pre><span style="font-family: "Courier New",Courier,monospace;"><code> </code></span></pre>
After downloading and changing to the directory, I checked out the teensy3 branch:<br />
<br />
<blockquote class="tr_bq">
<pre><code><code>git co teensy3</code></code></pre>
</blockquote>
<pre><code><code> </code></code></pre>
Then, again carefully following instructions, updated the correct files in the folder to reflect the Teensy hardware. The makefile also needs to be modified to point to your ARM toolchain and link to the above mentioned Teensy Core library.<br />
<br />
<blockquote class="tr_bq">
<pre><code>$ cp config.teensy3.h config.h
$ cp ThermistorTable.single.h ThermistorTable.h
$ cp Makefile-teensy3 Makefile
$ make</code></pre>
</blockquote>
<pre><code> </code></pre>
Aaaaaaand..... Success! Compiled! <br />
<br />
<br />
Tonight's plan is to modify the config.teensy3.h file to properly reflect the Teensy pinouts for the hardware configuration I have built. <br />
<br />
<br />
<pre><code><code> </code></code></pre>
<pre><code><code> </code> </code></pre>
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<div style="color: #666666; font-size: 13px; line-height: 18.48px;">
<span style="color: black;"><span style="font-size: large;"><span style="font-family: "Trebuchet MS",sans-serif;"><b style="background-color: white;">References:</b></span></span></span><br />
<span style="color: black;"><span style="font-family: "Trebuchet MS",sans-serif;"><b style="background-color: white;"><br /></b></span></span>
<span style="color: black;"><span style="font-family: "Trebuchet MS",sans-serif;"><b style="background-color: white;">https://community.freescale.com/thread/320695</b></span></span><br />
<span style="color: black;"><span style="font-family: "Trebuchet MS",sans-serif;"><b style="background-color: white;">http://reprap.org/wiki/Teacup_Firmware</b></span> </span><br />
<span style="color: black;"><span style="font-family: "Trebuchet MS",sans-serif;"></span></span><span style="color: black;"><span style="font-family: "Trebuchet MS",sans-serif;"><b style="background-color: white;">https://github.com/Traumflug/Teacup_Firmware</b></span></span><br />
<span style="color: black;"><span style="font-family: "Trebuchet MS",sans-serif;"><b style="background-color: white;">https://github.com/Traumflug/Teacup_Firmware/issues/122</b></span></span><br />
<br />
<span style="color: black;"><span style="font-family: "Trebuchet MS",sans-serif;"><b style="background-color: white;">http://www.idt.mdh.se/kurser/ct3340/ht09/ADMINISTRATION/IRCSE09-submissions/ircse09_submission_22.pdf</b></span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b style="background-color: white;"> </b></span><span style="font-family: "Trebuchet MS",sans-serif;"><b style="background-color: white;"> </b></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b style="background-color: white;"><br /></b></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b style="background-color: white;"><br /></b></span></div>
security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0Bowmanville, ON L1C, Canada43.9126042 -78.68801943.8668492 -78.7687 43.9583592 -78.607338tag:blogger.com,1999:blog-676382518143071514.post-50094265148848198712015-01-02T13:39:00.001-08:002015-01-02T13:42:13.462-08:00Teensy 3.1 based Repstrap control board initial wiring completed - test #1<div style="text-align: right;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/Qq7HVK6YvY8?feature=player_embedded' frameborder='0'></iframe><span style="color: #666666; font-size: medium;">Sorry that this is taking so long, but... (<a href="http://arduino-pi.blogspot.ca/2014/12/prototype-printer-controller-contd.html" target="_blank">continued from last week...</a>)</span></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="color: #666666;">I finally have enough of the control board wired up that I can test the <a href="https://forum.pjrc.com/threads/21680-New-I2C-library-for-Teensy3" target="_blank">I2C library</a> with <a href="http://www.adafruit.com/products/1438" target="_blank">Adafruit's Motor Shield V2</a> as well as the <a href="http://www.adafruit.com/products/292" target="_blank">Adafruit LCD Backpack.</a></span></span></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="color: #666666;">I simply took the DCMotorTest2 arduino example from the <a href="https://github.com/adafruit/Adafruit_Motor_Shield_V2_Library" target="_blank">Motor Shield library</a>, and added the <a href="https://github.com/adafruit/LiquidCrystal" target="_blank">LCD functionality.</a> </span></span></div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="color: #666666;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="color: #666666;">Note: Both the Motor Shield Library, as well as the LiquidCrystal libraries needed to be modified to work with Teensy 3.1.</span></span></div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="color: #666666;"><br /></span></span></div>
<div style="text-align: left;">
<span style="color: #666666; font-size: medium;"><span style="font-size: small;">As the Teensy is not AVR based, the I2C functions a bit different (<a href="https://forum.pjrc.com/threads/21680-New-I2C-library-for-Teensy3" target="_blank">better, trust me!</a>) </span></span></div>
<br />
<br />
In both instances, references to the "Wire" library had to be replaced with Teensy's "I2C_T3" library. ie:<br />
<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;">//#include <Wire.h><br />#include <i2c_t3.h> // Replacement I2C library for Teensy 3.1</span></blockquote>
<br />
<blockquote>
<br /></blockquote>
Also in the Motorshield library as well as it's underlying PWMServoDriver library, I had to force it to use the correct I2C channel. As the ARM processor in the Teensy has two separate I2C channels, it was defaulting to the second one.<br />
<br />
<br />
I found this little snippet at the beginning of each library, and modified it to use the first I2C channel.<br />
<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;">#include "Adafruit_MotorShield.h"</span><br />
<span style="font-size: x-small;">#include <Adafruit_PWMServoDriver.h></span><br />
<span style="font-size: x-small;">#ifdef __AVR__ // Teensy definitely is not AVR, so it defaults</span><br />
<span style="font-size: x-small;"> #define WIRE Wire</span><br />
<span style="font-size: x-small;">#else // Arduino Due // to wire1 as per the next line.</span><br />
<span style="font-size: x-small;"> // #define WIRE Wire1 // Wire1 in Teensy world is the second I2C</span></blockquote>
<blockquote>
<span style="font-size: x-small;"> #define WIRE Wire // So i simply commented out and replaced.</span><br />
<span style="font-size: x-small;">#endif // Not elegant, but... </span></blockquote>
<br />
And here is the example code to simply ramp the DC motor from 0-255 forward, back down to 0 and then do it again in reverse. All the while displaying status on the 20x4 LCD panel.<br />
<br />
<br />
<br />
<blockquote class="tr_bq" style="background-color: white;">
<div class="code" style="background-color: #f5f8fa; border: 1px solid rgb(92, 123, 144); margin: 10px 0px 10px 10px; max-height: 600px; min-height: 16px; overflow: auto; padding: 18px 10px 10px; width: 510.390625px;">
<div class="line" id="LC5">
<div class="separator" style="clear: both;">
</div>
<span style="font-size: x-small;">/* <br />This is a test sketch for the Adafruit assembled Motor Shield for Arduino v2<br />It won't work with v1.x motor shields! Only for the v2's with built in PWM<br />control<br /><br />For use with the Adafruit Motor Shield v2 <br />----> http://www.adafruit.com/products/1438<br />*/<br /><br />//#include <Wire.h><br />#include <i2c_t3.h> <br />// wire for Teensy 3.1 per https://forum.pjrc.com/threads/21680-New-I2C-library-for-Teensy3<br />#include <Adafruit_MotorShield.h><br />#include "utility/Adafruit_PWMServoDriver.h"<br /><br />// Create the motor shield object with the default I2C address<br />Adafruit_MotorShield AFMS = Adafruit_MotorShield(); <br />// Or, create it with a different I2C address (say for stacking)<br />// Adafruit_MotorShield AFMS = Adafruit_MotorShield(0x61); <br /><br />// Select which 'port' M1, M2, M3 or M4. In this case, M1<br />Adafruit_DCMotor *myMotor = AFMS.getMotor(1);<br />// You can also make another motor on port M2<br />//Adafruit_DCMotor *myOtherMotor = AFMS.getMotor(2);<br /><br />/*<br />Using with the Adafruit LCD Backpack to display information<br />----> http://www.adafruit.com/products/292<br />*/<br /><br />#include "LiquidCrystal.h"<br /><br />// Connect LiquidCrystal display via i2c, default address #0x20 (A0-A2 not jumpered)<br />LiquidCrystal lcd(0);<br /><br />int spd = 150; // Motor PWM speed from 0 - 255 <br />int mState = FORWARD; // State of the motor<br /><br />void setup() {<br /> Serial.begin(9600); // set up Serial library at 9600 bps<br /> Serial.println("Adafruit Motorshield v2 - DC Motor test!");<br /><br /> // set up the LCD's number of rows and columns: <br /> lcd.begin(20, 4);<br /> lcd.print("Adafruit Motorshield v2");<br /> lcd.setCursor(0, 1);<br /> lcd.print("DC Motor test!");<br /><br /> AFMS.begin(); // create with the default frequency 1.6KHz<br /> //AFMS.begin(1000); // OR with a different frequency, say 1KHz<br /> <br /> // Set the speed to start, from 0 (off) to 255 (max speed)<br /> myMotor->setSpeed(spd);<br /> myMotor->run(mState);<br /> mState = RELEASE;<br /> // turn on motor<br /> myMotor->run(mState);<br />}<br /><br />void loop() {<br /> <br /> Serial.print("tick");<br /> lcd.setCursor(0, 3);<br /> lcd.print("tick");<br /><br /> mState = FORWARD;<br /> myMotor->run(mState);<br /> lcd.setCursor(9, 2);<br /> lcd.print(" Dir = FWD "); // Display direction on LCD<br /> <br /> for (spd=0; spd<255; spd++) {<br /> myMotor->setSpeed(spd); <br /> lcd.setCursor(0, 2);<br /> lcd.print("PWM = "); lcd.print(spd); lcd.print(" ");<br /> }<br /> for (spd=255; spd!=0; spd--) {<br /> myMotor->setSpeed(spd); <br /> lcd.setCursor(0, 2);<br /> lcd.print("PWM = "); lcd.print(spd); lcd.print(" ");<br /> }<br /> <br /> Serial.print("tock");<br /> lcd.setCursor(0, 3);<br /> lcd.print("tock");<br /><br /> mState = BACKWARD;<br /> myMotor->run(mState);<br /> lcd.setCursor(9, 2);<br /> lcd.print(" Dir = REV "); // Display direction on LCD<br /><br /> for (spd=0; spd<255; spd++) {<br /> myMotor->setSpeed(spd); <br /> lcd.setCursor(0, 2);<br /> lcd.print("PWM = "); lcd.print(spd); lcd.print(" ");<br /> }<br /> for (spd=255; spd!=0; spd--) {<br /> myMotor->setSpeed(spd); <br /> lcd.setCursor(0, 2);<br /> lcd.print("PWM = "); lcd.print(spd); lcd.print(" ");<br /> }<br /> <br /><br /> Serial.print("tech");<br /> lcd.setCursor(0, 3);<br /> lcd.print("tech");<br /> <br /> myMotor->run(RELEASE);<br /> delay(1000);<br />}<br /></span></div>
</div>
</blockquote>
<br />
Again, trivial, but it validated that my wiring is correct this far, and that the I2C libraries are functional.<br />
<br />
Over the weekend, I'll get the Quadrature Decoders and PID control running, and post another update then.<br />
<br />
<br />security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0Bowmanville, ON L1C, Canada43.913042999999988 -78.68961718.391008499999987 -119.998211 69.435077499999991 -37.381023tag:blogger.com,1999:blog-676382518143071514.post-13718657112072118512014-12-29T20:53:00.000-08:002014-12-29T20:53:20.447-08:00Prototype Printer Controller Cont'd - Teensy 3.1 w/DC motor/encoders<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-3apcqDOg5Ds/VKIbST7F3hI/AAAAAAAAAs4/fBvy8v9qycs/s1600/teensy-printer-board-2b.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://2.bp.blogspot.com/-3apcqDOg5Ds/VKIbST7F3hI/AAAAAAAAAs4/fBvy8v9qycs/s1600/teensy-printer-board-2b.png" height="252" width="400" /></a></div>
<span style="font-size: large;"><span style="font-family: "Trebuchet MS",sans-serif;">Here's some more shots of the controller prototype..</span></span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">I've added a DC/DC converter for clean 5v power to the electronics (5amp). I've also added a separate 5v linear regulator for the Extruder stepper circuitry.</span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://2.bp.blogspot.com/-XpGIaP2WVZc/VKIbvqiowUI/AAAAAAAAAtA/DQLRbtrCHB8/s1600/IMG_20141222_140437.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-XpGIaP2WVZc/VKIbvqiowUI/AAAAAAAAAtA/DQLRbtrCHB8/s1600/IMG_20141222_140437.jpg" height="200" width="162" /></a></span></div>
<a href="http://2.bp.blogspot.com/-WY8J08cmdd8/VKIihtcVHFI/AAAAAAAAAtk/MnQnZSLGcRo/s1600/IMG_20141229_224638.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://2.bp.blogspot.com/-WY8J08cmdd8/VKIihtcVHFI/AAAAAAAAAtk/MnQnZSLGcRo/s1600/IMG_20141229_224638.jpg" height="200" width="132" /></a><span style="font-family: "Trebuchet MS",sans-serif;">To get access to the extra pins on the bottom of the teensy, I used a dual row header, and bent the inside pins at a 90 degree angle, trimmed, and soldered.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;">The shot on the right shows the Real Time Clock crystal soldered into place. </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://1.bp.blogspot.com/-4kmplDBnhpI/VKIc2WaWrZI/AAAAAAAAAtM/RvPmRzHAvJk/s1600/IMG_20141229_200501.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://1.bp.blogspot.com/-4kmplDBnhpI/VKIc2WaWrZI/AAAAAAAAAtM/RvPmRzHAvJk/s1600/IMG_20141229_200501.jpg" height="320" width="269" /></a></span></div>
<span style="font-family: "Trebuchet MS",sans-serif;">And of course I use my<span style="font-size: large;"><b> </b></span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://en.wikipedia.org/wiki/Hot-melt_adhesive" target="_blank"><span style="font-size: large;"><b>legacy 3D extruder</b></span></a> </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;">religiously to lay down layers of plastic "wire holders". </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-Fv3HSgNd38A/VKIej-TxyWI/AAAAAAAAAtY/UIL13d8Q5SI/s1600/IMG_20141229_211548.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-Fv3HSgNd38A/VKIej-TxyWI/AAAAAAAAAtY/UIL13d8Q5SI/s1600/IMG_20141229_211548.jpg" height="225" width="400" /></a></div>
<span style="font-family: "Trebuchet MS",sans-serif;">This is where I wish I had kept all of my old wire wrap tools... Who knew I'd pick up electronics again after almost a 20 year hiatus.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;">Anyway, power and ground</span><span style="font-size: large;"><b><span style="font-size: small;">...</span> </b></span>check. </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">Now to the rest of the wires..</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"> </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0Bowmanville, ON L1C, Canada43.913042999999988 -78.68961718.391008499999987 -119.998211 69.435077499999991 -37.381023tag:blogger.com,1999:blog-676382518143071514.post-38283461481301494222014-12-28T09:33:00.002-08:002014-12-28T09:33:49.899-08:00Prototype Board: DC motor/Encoder - Teensy 3.1 based 3D printer controller <div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;">This will be a short post today.</span> </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">I had mentioned putting up pictures as I go along, so I took this to show the first prototype of the controller board.</span><br />
<br />
<div style="text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Here is the layout of my Teensy 3.1 based 3D printer controller. </b></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://1.bp.blogspot.com/-iBgSkYCUBPU/VKA5DJ2RvEI/AAAAAAAAAso/aPBJ2guh-rY/s1600/teensy-printer-board-1b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-iBgSkYCUBPU/VKA5DJ2RvEI/AAAAAAAAAso/aPBJ2guh-rY/s1600/teensy-printer-board-1b.png" height="242" width="400" /></a></span></div>
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>As of this shot</b>, I have not yet wired it. Nor have I installed the analog components (power supply, heater drivers, pullup resistors, filter capacitors, etc...). It is also missing the connector for the extruder stepper motor. </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">As I described in my previous post, my motor control design is based on </span><span style="font-family: "Trebuchet MS",sans-serif;"><b><a href="http://www.adafruit.com/product/1438" target="_blank">Adafruit's Motor Shield V2.3</a></b>. For my prototype... well... I'm using their shield, pilfered from one of my older robots. This fantastic design employs an <a href="http://nxp.com/" target="_blank">NXP</a> <a href="http://www.nxp.com/documents/data_sheet/PCA9685.pdf" target="_blank">PCA9865 16 channel 12 bit PWM controller</a>, intended to drive LEDs, but instead to driving a pair of <a href="https://www.sparkfun.com/datasheets/Robotics/TB6612FNG.pdf" target="_blank">dual Mosfet H bridge TB6612FNG</a> motor drivers.</span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">The <a href="https://github.com/adafruit/Adafruit_Motor_Shield_V2_Library" target="_blank">Library for this Shield</a> works with the Teensy 3.1 just fine. (It is just I2C after all).</span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">Ok... I'm off to wire this up... wish me luck.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"> </span><br />
<br />
<br />
<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"> </span><br />
<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com1tag:blogger.com,1999:blog-676382518143071514.post-92013713727320875512014-12-18T07:31:00.002-08:002014-12-28T14:24:26.529-08:00Teensy 3.1 Repstrap printer with DC motor control and Flex Timer Quadrature Encoders<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-n4z7l5m0lfQ/VJLrqsnuaaI/AAAAAAAAAsU/jdLNR2L1U1Q/s1600/teensy-printer-pinout-v1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijBacnOiXaqoiikHlU0NMJWRNMcKge8u6OMCKXEi8U4wr-vzXNLZ62MZOuXv1LUPfUoj3QnnjSbxTPozzlUMBEAeRJDKDcWf33uC9ukXX3f69PnurNsLlmpuBX4YuliZgPJEgMjk66TlEY/s1600/IMG_20140508_153642.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijBacnOiXaqoiikHlU0NMJWRNMcKge8u6OMCKXEi8U4wr-vzXNLZ62MZOuXv1LUPfUoj3QnnjSbxTPozzlUMBEAeRJDKDcWf33uC9ukXX3f69PnurNsLlmpuBX4YuliZgPJEgMjk66TlEY/s1600/IMG_20140508_153642.jpg" height="200" width="136" /></a><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;">As I re-engage my</span> <a href="http://arduino-pi.blogspot.ca/2014/05/further-progress-on-framing-my-repscrap.html" target="_blank">3D Repscrap printer project</a>, I have decided to replace the two <a href="http://www.atmel.com/products/microcontrollers/avr/" target="_blank">8bit AVR</a> based <a href="http://arduino.cc/en/Main/ArduinoBoardProMini" target="_blank">Arduino pro minis</a> running at 16Mhz with a single <a href="https://www.pjrc.com/teensy/teensy31.html" target="_blank">Teensy 3.1</a>, <a href="https://www.pjrc.com/teensy/K20P64M72SF1.pdf" target="_blank">32bit ARM core M0</a> based board running at 96Mhz. The Teensy is significantly faster, more powerful, and still only $20USD.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.pjrc.com/teensy/teensy31_front_pinout.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://www.pjrc.com/teensy/teensy31_front_pinout.png" width="275" /></a></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;">I was considerably influenced</span> to change my direction based on this incredibly detailed<a href="https://community.freescale.com/projects/freescale-based-3d-printer/blog" target="_blank"> Blog over at Freescale</a>. <b> <a href="https://community.freescale.com/people/nikki.v" target="_blank">Nikki Verriddagari</a>,</b> a <a href="http://freescale.com/" target="_blank">Freescale</a> developer, managed to replace the typical <a href="http://arduino.cc/en/Main/arduinoBoardMega" target="_blank">Arduino Mega2560</a> seen in most Reprap style printers with the <a href="https://www.pjrc.com/teensy/teensy31.html" target="_blank">Teensy 3.1</a> inside of 3-4 weeks, as a side project.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">Both the <a href="http://forum.pjrc.com/threads/26015-3D-Printer-Software-with-Teensy-3-1" target="_blank">Teensy</a> and <a href="https://github.com/Traumflug/Teacup_Firmware/issues/93" target="_blank">Reprap</a> <a href="http://reprap.org/pipermail/reprap-dev/2014-June/004795.html" target="_blank">communities</a> rallied to assist Nikki through a few difficult spots, and <b>huge kudos to the developer of the Teensy 3.1, <a href="http://forum.pjrc.com/members/632-PaulStoffregen" target="_blank">Paul Stoffregen</a>,</b> for working on the <a href="https://github.com/Traumflug/Teacup_Firmware/tree/teensy3.1" target="_blank">Teacup code</a> with Nikki and getting it debugged and working!</span><br />
<div class="jive-video-view jive-content-video" id="167c5685_284c_4484_bc40_a25919aa29e4" style="background-color: white; width: 200px;">
</div>
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span><span style="font-family: "Trebuchet MS",sans-serif;"> </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;">The <a href="https://www.pjrc.com/teensy/K20P64M72SF1.pdf" target="_blank">Freescale MK20DX256VLH7 processor</a> used on the Teensy has two hardware based Quadrature Decoder modules built in. There is a <a href="http://cache.freescale.com/files/32bit/doc/app_note/AN4381.pdf" target="_blank">good appnote</a> on how to use them at Freescale. </span><br />
<blockquote class="tr_bq">
<span style="font-family: "Trebuchet MS",sans-serif;">"</span><span style="font-size: small;">The FlexTimer is a complex, general-purpose timer</span><span style="font-size: small;"> module that also possesses special features dedicated to </span>a motor control application"</blockquote>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">While perusing the <a href="http://forum.pjrc.com/" target="_blank">Teensy 3.1 developer's site</a>, I came across a forum article where <a href="http://forum.pjrc.com/members/34765-tlb" target="_blank">Trudy Benjamin</a> had <a href="http://forum.pjrc.com/threads/26803-Hardware-Quadrature-Code-for-Teensy-3-x" target="_blank">created a library to use these FTM</a> to read two quadrature encoders. This looked like as good as anything for a starting point.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">I'm using her QuadDecode library for the X and Y axis, and have decided to manage both Z-Axis encoders through hardware interrupts. My thoughts being that the Z-Axis travel is both minimal and predictable. I believe (<a href="http://arduino-pi.blogspot.ca/2014/05/arduino-user-error-ain0-is-not-a0.html" target="_blank">I've been wrong before!</a>) that Z-Axis movement is conducted typically after a horizontal layer of X/Y is completed. However!!! This does not preclude error correction in the Z-Axis PIDs. If something were to bump the extruder or a collision occurred that caused the Z-Axis to change, the PID would try to correct, and the interrupts must be responsive enough to handle this. Running at 96Mhz, I'm <a href="http://forum.pjrc.com/threads/27055-Teensy-3-1-Quadrature-Encoder-Speed-with-Multiple-Encoders" target="_blank">confident enough</a> to give this a good shot.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<b><span style="font-family: "Trebuchet MS",sans-serif; font-size: large;">My Design Concept:</span></b><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">I'm basing my requirements loosely on the <a href="http://reprap.org/wiki/RAMPS_1.4" target="_blank">RAMPS/Mega</a> design, but for DC motors and quadrature encoders.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">There will be four DC motors: One each for the X and Y axis, and two for the Z axis. All will have inexpensive DC brushed motors. The X and Y axis will have linear optical encoders, while the Z axis will have rotary optical encoders. (This is a mechanical decision for MY implementation, the electronics and firmware should not care). All motor/encoder pairs will have endstops at each end of their travel.</span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">To manage PWM for four DC motors, as well as PWM for the Extruder heater, Bed heater, and fans, I am choosing to borrow a design from <a href="http://www.adafruit.com/product/1438" target="_blank">Adafruit's Motor Shield V2.3</a>. In this shield, they employ a <a href="http://www.nxp.com/documents/data_sheet/PCA9685.pdf" target="_blank">PCA9865 I2C 12 bit PWM controller</a>, driving a pair of <a href="https://www.sparkfun.com/datasheets/Robotics/TB6612FNG.pdf" target="_blank">dual Mosfet H bridge TB6612FNG</a> motor drivers.</span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;">A standard <a href="http://www.pololu.com/product/1182" target="_blank">Pololu stepper motor driver board</a> will be used to manage the extruder.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">Primary communications will be via the Teensy's USB Serial interface, however I am including a uSD card reader for future plans to read G-Code directly from uSD card.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;">Starting with the example pinout used in the </span><span style="font-family: "Trebuchet MS",sans-serif;">QuadDecode library, I have drafted up a connectivity chart and initial schematic that I will be wiring up over the next few days.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="http://1.bp.blogspot.com/-n4z7l5m0lfQ/VJLrqsnuaaI/AAAAAAAAAsU/jdLNR2L1U1Q/s1600/teensy-printer-pinout-v1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-n4z7l5m0lfQ/VJLrqsnuaaI/AAAAAAAAAsU/jdLNR2L1U1Q/s1600/teensy-printer-pinout-v1.png" height="640" width="417" /></a></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-fnyqnCV9NHA/VJHmGG2hyAI/AAAAAAAAAsE/IA6ZwFi5EaY/s1600/teensy-print1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://4.bp.blogspot.com/-fnyqnCV9NHA/VJHmGG2hyAI/AAAAAAAAAsE/IA6ZwFi5EaY/s1600/teensy-print1.png" height="336" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Teensy 3.1 Based 3D printer with DC motor/Quad Encoders</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"></span></div>
<b><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span></b>
<b><span style="font-family: "Trebuchet MS",sans-serif;">Next blog will include photos of the build.</span></b><br />
<br />
<b><span style="font-family: "Trebuchet MS",sans-serif;"></span></b><br />
<b><span style="font-family: "Trebuchet MS",sans-serif;">Please feel free to provide constructive criticism as I journey down this path.</span>
</b><span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;">References:</span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><a href="http://forum.pjrc.com/threads/26803-Hardware-Quadrature-Code-for-Teensy-3-x" target="_blank">PJRC Forum: Hardware Quadrature Code for Teensy 3.x </a> </span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><a href="https://www.pjrc.com/teensy/td_libs_Encoder.html" target="_blank">PJRC: Teensy 3.1 Encoder Library</a></span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><a href="http://cache.freescale.com/files/32bit/doc/app_note/AN4381.pdf" target="_blank">Freescale: Configuring the FlexTimer for Position and Speed Measurement with an Encoder</a></span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><a href="http://cache.freescale.com/files/microcontrollers/doc/ref_manual/DRM128.pdf" target="_blank">Freescale: PMSM Vector Control with Quadrature Encoder on Kinetis</a></span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><a href="http://cache.freescale.com/files/32bit/doc/ref_manual/K20P64M50SF0RM.pdf" target="_blank">Kinetis: K20 Sub-Family Reference Manual</a> </span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><a href="https://www.pjrc.com/teensy/K20P64M72SF1.pdf" target="_blank">Data sheet: Supports: MK20DX64VLH7, MK20DX128VLH7, MK20DX256VLH7</a> </span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><a href="http://www.pjrc.com/teensy/td_pulse.html" target="_blank">Teensy 3.1: Pulse Width Modulation</a> </span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><a href="https://github.com/loglow/IntervalTimer" target="_blank">Loglow: Interval Timer Library for Teensy</a> </span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><a href="http://forum.pjrc.com/threads/21680-New-I2C-library-for-Teensy3" target="_blank">PJRC: New I2C library for Teensy3 </a> </span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: small;"><a href="http://forum.pjrc.com/threads/26071-Using-all-Teensy3-x-pins-with-a-socket" target="_blank">PJRC: Connecting headers to those pins on the bottom of the Teensy 3.1</a> </span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com3Bowmanville, ON L1C, Canada43.913042999999988 -78.68961718.391008499999987 -119.998211 69.435077499999991 -37.381023tag:blogger.com,1999:blog-676382518143071514.post-74038567454003849582014-12-04T08:58:00.000-08:002014-12-04T09:16:58.951-08:00Should I port SLAM to the Raspberry Pi's unused GPU on my Autonomous Rover?<div class="usertext-body may-blank-within">
<div class="md">
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtvufcEZTFXHiRG0J44oAbuu5gEKAgFk_EIxvCk4D-641wQqhXyMYFqvUJaFvUT-2PC0cmayDec_eGL0Dp8sM6x11vn1FoiNmXCDmkmPBdd1mxzG8BidlSc4RakC9xXsKluJjk9UUkognF/s1600/IMG_20140407_114740.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtvufcEZTFXHiRG0J44oAbuu5gEKAgFk_EIxvCk4D-641wQqhXyMYFqvUJaFvUT-2PC0cmayDec_eGL0Dp8sM6x11vn1FoiNmXCDmkmPBdd1mxzG8BidlSc4RakC9xXsKluJjk9UUkognF/s1600/IMG_20140407_114740.jpg" height="320" width="268" /></a></span></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Right
now</b>, I use <a href="http://arduino.cc/" target="_blank">Arduinos</a> for motor control (PID control for encoders and dc
motor) as well as aggregating sensor data and feeding the <a href="http://raspberrypi.org/" target="_blank">Raspberry Pi</a> on my <a href="http://arduino-pi.blogspot.ca/2014/01/bottoo-platform-to-test-ranging-sensors.html" target="_blank">Autonomous Rover.</a></span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">The Pi runs a live stream webcam for the rover, manages the webpage
control console, and maps the environment for dead reckoning navigation. This is a lot of work for one little CPU.</span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">I've recently seen a few articles on <a href="http://petewarden.com/2014/08/07/how-to-optimize-raspberry-pi-code-using-its-gpu/">using the dormant GPU on the Pi.</a>
and though that <a href="http://openslam.org/" target="_blank">Simultaneous Localization and Mapping (SLAM)</a> would be
perfectly suited for the GPU's capabilities. Real world mapping and
localization should be practically identical to Video Game based
algorithms...
It's been almost a year since Broadcom opened up the specs for this
chip.</span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">I would also use the GPU for calculating shortest path via <a href="http://arduino-pi.blogspot.ca/2014/03/a-path-finding-examples-in-python-and.html" target="_blank">A* routines. </a></span><br />
<br />
<div style="text-align: center;">
<span style="font-size: large;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>So... has anyone looked into this? </b></span></span></div>
<div style="text-align: center;">
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b> (And yes... I "Googled" it first...)</b></span></span></div>
<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;">References:</span></span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://www.raspberrypi.org/accelerating-fourier-transforms-using-the-gpu/" target="_blank">Andrew Holme: Accelerating Fourier transforms using the GPU</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://petewarden.com/2014/08/07/how-to-optimize-raspberry-pi-code-using-its-gpu/" target="_blank">Pete Warden: How to optimize Raspberry Pi code using its GPU</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://www.raspberrypi.org/gpgpu-hacking-on-the-pi/" target="_blank">GPGPU hacking on the Pi</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://rpiplayground.wordpress.com/tag/raspberry-pi-gpu/" target="_blank">Hacking The GPU For Fun And Profit (Pt. 1)</a> </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://www.raspberrypi.org/a-birthday-present-from-broadcom/" title="A birthday present from Broadcom">Broadcom released the specs for the VideoCore IV GPU</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://www.ece.rutgers.edu/~kdana/Capstone2013/capstone2013/OmerWayneEricFinalReport.pdf" target="_blank">SLAM: Remotely-Processed Visual SLAM Using Open-Source Software</a> </span><br />
<br />
<br />
<br /></div>
</div>
security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com14Bowmanville, ON L1C, Canada43.913042999999988 -78.68961718.391008499999987 -119.998211 69.435077499999991 -37.381023tag:blogger.com,1999:blog-676382518143071514.post-33564032275510132302014-08-21T07:42:00.003-07:002014-08-21T11:35:11.059-07:00Running Kinetis Design Studio (32bit Eclipse) on 64bit Ubuntu<a href="https://community.freescale.com/resources/statics/122265/31705-IND-KinetisDesignStudio-about-screen_v1.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://community.freescale.com/resources/statics/122265/31705-IND-KinetisDesignStudio-about-screen_v1.jpg" /></a><span style="font-family: Trebuchet MS, sans-serif;"><br /></span><br />
<div style="text-align: center;">
<span style="font-family: Trebuchet MS, sans-serif; font-size: large;">YAY!!!! I got it working! </span></div>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Back in the end of May, I enrolled in the beta for <span style="background-color: white; font-size: 15px; line-height: 21.299999237060547px;"><a href="https://community.freescale.com/community/kinetis/kinetis-design-studio" style="font-weight: bold;" target="_blank">Kinetis Design Studio installer for Linux</a> to allow me to develop on my <a href="https://www.pjrc.com/teensy/teensy31.html" target="_blank">Teensy 3.1</a> <a href="http://kevincuzner.com/2014/04/28/teensy-3-1-bare-metal/" target="_blank">bare-metal</a>,</span></span><br />
<span style="background-color: white; font-size: 15px; line-height: 21.299999237060547px;"><span style="font-family: Trebuchet MS, sans-serif;">only to find that it would not run on my <a href="http://releases.ubuntu.com/14.04/" target="_blank">Ubuntu 14.04</a> 64bit. I'm running <a href="http://ubuntuhandbook.org/index.php/2014/02/install-oracle-java-6-7-or-8-ubuntu-14-04/" target="_blank">Oracle Java 7</a>. </span></span><br />
<span style="background-color: white; font-size: 15px; line-height: 21.299999237060547px;"><span style="font-family: Trebuchet MS, sans-serif;"><br /></span></span>
<span style="font-family: Trebuchet MS, sans-serif;"><span style="background-color: white; font-size: 15px; line-height: 21.299999237060547px;"><br /></span></span>
<span style="font-family: Trebuchet MS, sans-serif;"><span style="background-color: white; font-size: 15px; line-height: 21.299999237060547px;">Kinetis Design Studio</span><span style="background-color: white; font-size: 15px; line-height: 21.299999237060547px;"> installed properly from DEB, but when I launched it, it immediately complained that it could not load the SWT library for Eclipse. It turns out that they built the Debian (Ubuntu) base on 32bit Eclipse. </span></span><br />
<span style="background-color: white; font-size: 15px; line-height: 21.299999237060547px;"><span style="font-family: Trebuchet MS, sans-serif;"><br /></span></span>
<span style="background-color: white; font-size: 15px; line-height: 21.299999237060547px;"><span style="font-family: Trebuchet MS, sans-serif;">After some futzing around, I opened a case with Freescale Support: (putting the details here for search engine assistance)</span></span><br />
<blockquote class="tr_bq" style="background-color: white; color: #444444; line-height: 21.299999237060547px; white-space: normal;">
<span style="font-size: x-small;">SR Number: 1-2152355207</span><span style="font-size: x-small;">Date Opened: 07/28/2014 05:28:35 PHX time</span><span style="font-size: x-small;">Subject: kinetis-design-studio will not load in Ubuntu 14.04</span><span style="font-size: x-small;">Description: Fresh install of Ubuntu 14.04</span><span style="font-size: x-small;">uname -a</span><span style="font-size: x-small;">Linux ballmik-Satellite-L305 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 </span><span style="font-size: x-small;">03:51:08 </span><span style="font-size: x-small;">UTC 2014 x86_64 x86_64 x86_64 GNU/Linux</span><span style="font-size: x-small;"><br /></span><span style="font-size: x-small;"><br /></span><span style="font-size: x-small;">Running Oracle Java </span><span style="font-size: x-small;">java version "1.7.0_65"</span><span style="font-size: x-small;">Java(TM) SE Runtime Environment (build 1.7.0_65-b17)</span><span style="font-size: x-small;">Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)</span><span style="font-size: x-small;"><br /></span><span style="font-size: x-small;"><br /></span><span style="font-size: x-small;">Eclipse appears to be built for 32bit platform. is the a 64bit version ?</span><span style="font-size: x-small;">attaching eclipse log.</span><span style="font-size: x-small;"><br /></span><span style="font-size: x-small;">Thank you.</span><span style="font-size: x-small;"><br /></span><span style="font-size: x-small;">!ENTRY org.eclipse.osgi 4 0 2014-07-28 08:06:23.472</span><span style="font-size: x-small;">!MESSAGE Application error</span><span style="font-size: x-small;">!STACK 1</span><span style="font-size: x-small;">java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: </span><span style="font-size: x-small;">/home/ballmik/.eclipse/org.eclipse.platform_4.3.2_870091379_linux_gtk_x86/</span><span style="font-size: x-small;">configuration/org.eclipse.osgi/bundles/430/1/.cp/libswt-pi-gtk-4335.so: libgtk-x11-</span><span style="font-size: x-small;">2.0.so.0: cannot open shared object file: No such file or directory</span><span style="font-size: x-small;">no swt-pi-gtk in java.library.path</span><span style="font-size: x-small;">/home/ballmik/.swt/lib/linux/x86/libswt-pi-gtk-4335.so: libgtk-x11-2.0.so.0: </span><span style="font-size: x-small;">cannot open shared object file: No such file or directory</span><span style="font-size: x-small;">Can't load library: /home/ballmik/.swt/lib/linux/x86/libswt-pi-gtk.so</span></blockquote>
<br />
<br />
<span style="font-family: Trebuchet MS, sans-serif;">Their quick response was that the DEB was built on/for <a href="http://releases.ubuntu.com/12.04/" target="_blank">Ubuntu 12.04LTS</a> 32bit.... </span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;"><span style="font-size: large;">Not helpful... </span> So... life got in the way, and I finally returned to this last night. With fresh eyes, I simply searched G00gle for <b>"running 32 bit eclipse on 64 bit Ubuntu 14.04" </b>and came up with a bunch of different solutions. </span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<br />
<div style="text-align: center;">
<span style="font-family: Trebuchet MS, sans-serif; font-size: large;">The issue is that in 64bit Ubuntu base install, the 32bit libraries are not installed. period.</span></div>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="background-color: white;"><span style="font-family: Trebuchet MS, sans-serif;">Prior to Ubuntu 14.04, you used to be able to <b>"sudu </b><span style="font-size: 14px; line-height: 17.804800033569336px; white-space: inherit;"><b>apt-get install ia32-libs"</b>, but they removed this ability recently because dpkg now has multi-arch enabled by default. <b>MEANING</b>, that if you actually knew what libraries were failing, you could reinstall them with a :i386 at the end of the package name. Seemed like a lot of work to find the specific libraries... </span></span></span><br />
<span style="background-color: #eeeeee; font-size: 14px; line-height: 17.804800033569336px; white-space: inherit;"><span style="font-family: Trebuchet MS, sans-serif;"><br /></span></span>
<span style="background-color: #eeeeee; font-size: 14px; line-height: 17.804800033569336px; white-space: inherit;"><span style="font-family: Trebuchet MS, sans-serif;"><br /></span></span>
<span style="font-family: Trebuchet MS, sans-serif;"><b style="font-size: x-large;">Here's what worked for me.</b></span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><b style="font-size: x-large;"></b><span style="font-size: x-small;">(from </span></span><span style="font-size: x-small;"><a href="http://stackoverflow.com/questions/23182765/how-to-install-ia32-libs-in-ubuntu-14-04-lts" target="_blank">Stackoverflow: How to install ia32-libs in ubuntu 14.04 LTS</a>)</span><br />
<br />
<pre style="background: rgb(238, 238, 238); border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;">sudo -i
cd /etc/apt/sources.list.d
echo "deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted universe multiverse" >ia32-libs-raring.list
apt-get update
apt-get install ia32-libs</code></pre>
<pre style="background: rgb(238, 238, 238); border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"></pre>
<br />
<br />
<span style="font-family: Trebuchet MS, sans-serif; font-size: large;"><b>Reboot, and voila! Kinetis Design Studio is now working!</b></span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3wOCVfq03qgd7e5aHDJ4RoURjpPjQOX6aSyA4dH6Pej5E5ddI6CS1ns7ps2rigALu8r18Bofi1teYu6NKw8gpj0j8x7oN_Yw3Fin8FUJZDHBcxLo5MMC8dRf6fFxF3NVVGGWj0ocS7xGy/s1600/Screenshot+from+2014-08-21+10:31:57.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3wOCVfq03qgd7e5aHDJ4RoURjpPjQOX6aSyA4dH6Pej5E5ddI6CS1ns7ps2rigALu8r18Bofi1teYu6NKw8gpj0j8x7oN_Yw3Fin8FUJZDHBcxLo5MMC8dRf6fFxF3NVVGGWj0ocS7xGy/s1600/Screenshot+from+2014-08-21+10:31:57.png" height="480" width="640" /></a></div>
<span style="font-family: Trebuchet MS, sans-serif; font-size: large;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif; font-size: large;">Now, on to figuring out how to code for the Teensy 3.1...</span><br />
<span style="font-family: Trebuchet MS, sans-serif; font-size: large;"><br /></span>
<br />
<br />
<span style="font-size: large;"><b>Resources:</b></span><br />
<br />
<a href="https://community.freescale.com/community/kinetis/kinetis-design-studio" target="_blank">Freescale: Kinetis Design Studio</a><br />
<a href="https://help.ubuntu.com/community/MultiArch" target="_blank">Ubuntu.com: Multiarch</a><br />
<a href="http://stackoverflow.com/questions/23182765/how-to-install-ia32-libs-in-ubuntu-14-04-lts" target="_blank">Stackoverflow: How to install ia32-libs in ubuntu 14.04 LTS</a><br />
<a href="http://kevincuzner.com/2014/04/28/teensy-3-1-bare-metal/" target="_blank">Teensy 3.1 Bare-Metal</a><br />
<br />
<br />
<br />security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com1tag:blogger.com,1999:blog-676382518143071514.post-15736706054850825222014-07-15T11:01:00.001-07:002014-07-15T11:01:11.930-07:00Developing a Robot Shield for Teensy 3.1: Looking for feedback<a href="http://arduino.cc/en/uploads/Main/ArduinoUno_R3_Front_450px.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://arduino.cc/en/uploads/Main/ArduinoUno_R3_Front_450px.jpg" height="209" width="320" /></a><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;">The <a href="http://www.instructables.com/id/Intro-to-Arduino/step2/Arduino-Uno-Features/" target="_blank">many features</a></span> and <a href="http://makerflux.com/the-importance-of-simplicity-key-to-arduino/" target="_blank">beautiful simplicity</a> of the venerable <a href="http://arduino.cc/" target="_blank">Arduino</a>, have captured the minds and imaginations millions of <a href="http://www.instructables.com/id/Arduino-Projects/" target="_blank">hobbyists</a>, <a href="http://arduino.cc/en/Tutorial/HomePage" target="_blank">programmers</a>, and <a href="http://en.wikipedia.org/wiki/Roboteer" target="_blank">Roboteers</a>. </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><b><span style="font-size: small;">Arduino, as a company</span></b>, has created a <a href="http://arduino.cc/en/Main/Products" target="_blank">diverse num<span id="goog_1294448596"></span><span id="goog_1294448597"></span>ber of boards</a> as <a href="http://arduino.cc/en/Main/FAQ" target="_blank">Open Source Hardware</a></span><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-family: "Trebuchet MS",sans-serif;"> . This diversity caters to various physical, electrical, and I/O requirements, allowing for a broad spectrum of applications. </span> That said, an <a href="http://arduino.cc/en/Products/Counterfeit" target="_blank">entire industry</a> has sprung up around reproducing <a href="http://playground.arduino.cc/main/similarBoards" target="_blank">variants of the Arduino</a>. </span><br />
<br />
<b><span style="font-family: "Trebuchet MS",sans-serif; font-size: small;">A</span></b><span style="font-family: "Trebuchet MS",sans-serif;"><b><span style="font-size: small;">ll
of these boards</span></b>, however, have two things in common. </span><br />
<ol>
<li><span style="font-family: "Trebuchet MS",sans-serif;">They use <a href="http://www.atmel.com/products/microcontrollers/avr/" target="_blank">Atmel AVR 8bit microcontrollers</a> <span style="font-size: x-small;">(Typically <a href="http://www.atmel.com/Images/doc8161.pdf" target="_blank">ATmega328</a> or in the case of the Mega -
<a href="https://www.sparkfun.com/datasheets/Components/ATMega1280.pdf" target="_blank">ATmega1280 or 2560</a>)</span></span></li>
<li><span style="font-family: "Trebuchet MS",sans-serif;">They have an <a href="http://arduino.cc/en/Hacking/Bootloader?from=Main.Bootloader" target="_blank">Arduino bootloader</a> installed to
allow <a href="http://www.ladyada.net/learn/arduino/lesson1.html" target="_blank">quick and convenient development/upload cycles</a> with the <a href="http://arduino.cc/en/main/software" target="_blank">Arduino IDE</a>.</span></li>
</ol>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;">One of the most recent trends</span>, has been to reproduce the <a href="https://learn.sparkfun.com/tutorials/arduino-comparison-guide/all" target="_blank">Arduino form factor</a>, complete with I/O, A/D and D/A for <a href="http://en.wikipedia.org/wiki/ARM_architecture" target="_blank">other microcontrollers</a>, to allow them to utilize the hundreds (thousands?) of "<a href="http://arduino.cc/en/Main/ArduinoShields" target="_blank">shields</a>" developed to support the Arduino family. </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">Many of these alternative boards have also provided plug-ins (cross compilers and compatible libraries) for the Arduino IDE, to allow a smooth transition from the comfort of developing for the Arduino's 8bit AVR chip to a more complex 16 or 32bit microcontroller.</span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://www.pjrc.com/teensy/teensy31_front_small_green.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://www.pjrc.com/teensy/teensy31_front_small_green.jpg" /></a><span style="font-size: large;">Today, I'm going to discuss the <a href="http://www.adafruit.com/products/1625" target="_blank">Teensy 3.1</a>.</span> </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://www.pjrc.com/teensy/teensy31.html" target="_blank">https://www.pjrc.com/teensy/teensy31.html</a> </span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;">Although not pin compatible with the Arduino family, it does leverage the Arduino IDE through <a href="https://www.pjrc.com/teensy/teensyduino.html" target="_blank">Teesyduino</a> for <a href="https://www.pjrc.com/teensy/td_libs.html" target="_blank">quick application development</a>, while hopefully grooming it's users to step into more robust <a href="http://www.seanet.com/~karllunt/bareteensy31.html" target="_blank">ARM development tools</a>. If UNO form factor compatibility is a requirement (for instance to use an existing shield) then the <a href="http://petitstudio.blogspot.ca/2014/04/teensy-3-development-board-arduino.html" target="_blank">Teensy Development board</a> from <a href="https://www.tindie.com/products/freto/teensy-3-breakout-board-and-shield/" target="_blank">PetitStudio</a> will do the trick.</span><br />
<br />
<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>The Teensy 3.1</b> is based on the <a href="http://cache.freescale.com/files/32bit/doc/ref_manual/K20P64M50SF0RM.pdf" target="_blank">Freescale K20P64M72SF1 ARM Cortex M4</a> processor. It runs at 96Mhz, has 256K flash, and 64k RAM, 43 digital I/O, 21 Analog inputs, 12</span> PWM outputs, 12 Timers, 2 I2C ports, and 4 Serial UARTS. Whew...<br />
<br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><b>In addition to that</b>, there are two TRUE</span></span><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"> Analog to Digital Converters that can be read simultaneously ie: no multiplexing inputs. Currently, <a href="http://forum.pjrc.com/threads/25532-ADC-library-update-now-with-support-for-Teensy-3-1">Pedvide's ADC library</a>
can be used to access both ADCs. Thanks to Freescale, there is also a <a href="http://www.ti.com/lit/an/sloa101a/sloa101a.pdf" target="_blank">CAN Bus</a>. </span></span><br /><span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: x-small;">(Controller Area Network - communication channel used in automobiles)</span> Libraries for this will be available shortly.</span></span><br />
<span style="font-size: small;"><span style="font-family: "Trebuchet MS",sans-serif;">
</span></span>
<br /><br />
<br />
<div style="text-align: center;">
<span style="font-size: large;">Comparison Of Arduino UNO R3, Mega2560, and Teensy 3.1 specifications</span></div>
<table border="1" cellpadding="0" cellspacing="0" style="width: 578px;"><colgroup><col style="mso-width-alt: 5522; mso-width-source: userset; width: 113pt;" width="151"></col>
<col style="mso-width-alt: 3401; mso-width-source: userset; width: 70pt;" width="93"></col>
<col style="mso-width-alt: 4059; mso-width-source: userset; width: 83pt;" width="111"></col>
<col style="mso-width-alt: 4534; mso-width-source: userset; width: 93pt;" width="124"></col>
<col style="mso-width-alt: 3620; mso-width-source: userset; width: 74pt;" width="99"></col>
</colgroup><tbody>
<tr height="31" style="height: 23.25pt;">
<td colspan="5"><b>Technical Specifications</b></td>
</tr>
<tr height="42" style="height: 31.5pt;">
<td class="xl74" height="42" style="border-top: none; height: 31.5pt; width: 113pt;" width="151"><b>Feature</b></td>
<td class="xl74" style="border-left: none; border-top: none; width: 70pt;" width="93"><b>Arduino</b>
<br />
<b>Uno R3</b></td>
<td class="xl74" style="border-left: none; border-top: none; width: 83pt;" width="111"><b>Arduino</b>
<b>Mega2560</b></td>
<td class="xl74" style="border-left: none; border-top: none; width: 93pt;" width="124"><b>Teensy
3.1</b></td>
<td class="xl74" style="border-left: none; border-top: none; width: 74pt;" width="99"><b>Units</b></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151">Price</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">25</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">54</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">19.8</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">US
Dollars</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151">Processor</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">Atmega328</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">ATMega2560</td>
<td class="xl70" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">MK20DX256VLH7</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151">Bits</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">8</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">8</td>
<td class="xl70" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">32</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Core</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">AVR</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">AVR</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">Cortex-M4</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Rated Speed</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">16</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">16</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">72</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">MHz</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Overclockable</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">24</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">24</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">96</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">MHz</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151">Flash Memory</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">32</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">256</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">256</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">kbytes</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Bandwidth</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">16</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">16</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">192</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">Mbytes/sec</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Cache</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">256</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">Bytes</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151">RAM</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">2</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">8</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">64</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">kbytes</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151">EEPROM</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">1</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">4</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">2</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">kbytes</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151">Direct Memory Access</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">N/A</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">N/A</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">16</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">Channels</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151">Digital I/O</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">14</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">54</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">34</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">Pins</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Voltage Output</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">5</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">5</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">3.3V</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">Volts</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Voltage Input</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">5</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">5</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">5V
Tolerant</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">Volts</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151">Analog Input</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">6</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">16</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">21</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">Pins</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Converters</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">1</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">1</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">2</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Resolution</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">10</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">10</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">16</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">Bits</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Usable</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">10</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">10</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">13</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">Bits</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Prog Gain Amp</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">2</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Touch Sensing</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">N/A</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">64</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">12</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">Pins</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Comparators</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">1</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">1</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">3</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151">Analog Output</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">1</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">Pins</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> DAC Resolution</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">-</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">-</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">12</td>
<td class="xl67" style="border-left: none; border-top: none; width: 74pt;" width="99">Bits</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151">Timers</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">3</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">6
Total</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">12
Total</td>
<td class="xl69" rowspan="9" style="border-top: none; width: 74pt;" width="99">Pins</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> FTM Type</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">3</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> PWM Outputs</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">6</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">12</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">12</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> PDB Type</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">1</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> CMT (infrared) Type</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">1</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> LPTMR Type</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">1</td>
</tr>
<tr height="40" style="height: 30.0pt;">
<td class="xl77" height="40" style="border-top: none; height: 30.0pt; width: 113pt;" width="151"> PIT (interval) Type</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">1x8bit
2x16bit</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">2x8bit<br />
4x16bit</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">4</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Systick</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">1</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> RTC (date/time) **</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">1</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">1</td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151">Communication</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93"></td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111"></td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124"></td>
<td class="xl66" style="border-left: none; border-top: none;"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> USB</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">1</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">1</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">1</td>
<td class="xl66" style="border-left: none; border-top: none;"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Serial</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">1</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">3</td>
<td class="xl66" style="border-left: none; border-top: none;"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> With FIFOs</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">2</td>
<td class="xl66" style="border-left: none; border-top: none;"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> High Res Baud</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">3</td>
<td class="xl66" style="border-left: none; border-top: none;"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> Fast Clock</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">2</td>
<td class="xl66" style="border-left: none; border-top: none;"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> SPI</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">1</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">1</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">1</td>
<td class="xl66" style="border-left: none; border-top: none;"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> With FIFOs</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">1</td>
<td class="xl66" style="border-left: none; border-top: none;"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> I2C</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">1</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">1</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">2</td>
<td class="xl66" style="border-left: none; border-top: none;"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> CAN Bus</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">1</td>
<td class="xl66" style="border-left: none; border-top: none;"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> I2S Audio</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">1</td>
<td class="xl66" style="border-left: none; border-top: none;"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl77" height="20" style="border-top: none; height: 15.0pt; width: 113pt;" width="151"> FIFO Size</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 70pt;" width="93">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 83pt;" width="111">0</td>
<td class="xl68" style="border-left: medium none; border-top: medium none; text-align: center; width: 93pt;" width="124">8</td>
<td class="xl66" style="border-left: none; border-top: none;"></td>
</tr>
<tr height="20" style="height: 15.0pt;">
<td class="xl78" height="20" style="height: 15.0pt;"><br /></td>
<td class="xl73"><br /></td>
<td class="xl73"><br /></td>
<td><br /></td>
<td><br /></td>
</tr>
</tbody></table>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.pjrc.com/teensy/teensy31_front_pinout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://www.pjrc.com/teensy/teensy31_front_pinout.png" width="343" /></a></div>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;"><b> </b></span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;"><b>Now, if you've happened to get this far, here is the meat of this article:</b></span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;"><span style="font-size: small;">There are few "<b>shields</b>" available for the Teensy as yet. There <b>are </b>a few adapters that provide UNO form factor, there is an audio shield, a TFT display shield, and a Smartmatrix shield, as well as a few other special use shields. </span></span></span><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;"><span style="font-size: small;"><b>What I am looking to develop</b>, is a multifunction shield that maintains the small size of the teensy as much as possible, but incorporates a 9dof like the <a href="https://www.tindie.com/products/onehorse/lsm9ds0-teensy-31-micro-shield/" target="_blank">LSM9DS0 Teensy 3.1 Micro Shield</a></span><span style="font-size: small;">, as well as an<a href="http://www.ti.com/lit/ds/symlink/l293d.pdf" target="_blank"> l293d</a> to drive two small DC motors. I2C, as well as Remaining I/O will be brought out to right angle headers on the edge of the shield. </span></span></span><br />
<br />
<b><span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;"><span style="font-size: small;">Before I complete the board design, I'm looking for feedback, motivation, and warnings (like "that l293 is going to get too hot!") ... </span></span></span></b><br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;"><span style="font-size: small;"> Cheers.</span></span></span><br />
<br />
<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-size: large;"><b>References:</b></span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://www.pjrc.com/teensy/K20P64M72SF1.pdf" target="_blank">https://www.pjrc.com/teensy/K20P64M72SF1.pdf</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://cache.freescale.com/files/32bit/doc/ref_manual/K20P64M50SF0RM.pdf" target="_blank">http://cache.freescale.com/files/32bit/doc/ref_manual/K20P64M50SF0RM.pdf </a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://cache.freescale.com/files/32bit/doc/quick_ref_guide/KQRUG.pdf">http://cache.freescale.com/files/32bit/doc/quick_ref_guide/KQRUG.pdf</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br /><span style="font-family: "Trebuchet MS",sans-serif;"> </span><br />
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/NJhivNjcYWE?feature=player_embedded' frameborder='0'></iframe><span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<b><span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://www.youtube.com/playlist?list=PLE_LY90VhqXXlzbqard257OrTVNe4e8Mn" target="_blank">My Teensy Playlist on Youtube </a></span></b><br />
<span style="font-family: "Trebuchet MS",sans-serif;"></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"> </span><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<a href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=K20_72"><span style="font-family: "Trebuchet MS",sans-serif;">http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=K20_72</span></a><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://www.pjrc.com/teensy/td_libs_USBHostShield.html" target="_blank">https://www.pjrc.com/teensy/td_libs_USBHostShield.html</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://oshpark.com/shared_projects/dNC6edrM" target="_blank">OSH Park: SmartMatrix Shield for Teensy 3.1 </a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://community.freescale.com/thread/320695" target="_blank">https://community.freescale.com/thread/320695 </a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://hackaday.com/2013/12/09/meet-the-teensy-3-1/" target="_blank">http://hackaday.com/2013/12/09/meet-the-teensy-3-1/</a> </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://trippylighting.com/category/uncategorized/" target="_blank">http://trippylighting.com/category/uncategorized/</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://www.adafruit.com/products/1902" target="_blank">SmartMatrix Shield for Teensy 3.1</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://forum.pjrc.com/threads/25718-Adafruit-2-8-quot-TFT-Touch-Shield-for-Arduino-for-Teensy-3-1" target="_blank">Adafruit 2.8" TFT Touch Shield for Arduino for Teensy 3.1 </a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://www.tindie.com/products/loglow/teensy-31-breakout/" target="_blank">https://www.tindie.com/products/loglow/teensy-31-breakout/</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://petitstudio.blogspot.ca/2014/04/teensy-3-development-board-arduino.html" target="_blank">http://petitstudio.blogspot.ca/2014/04/teensy-3-development-board-arduino.html</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://www.adafruit.com/blog/2014/04/03/new-products-audio-adapter-board-for-teensy-3-0-3-1-and-octows2811-adapter-for-teensy-3-1-control-tons-of-neopixels/" target="_blank">Audio Adapter Board for Teensy 3.0 & 3.1 and OctoWS2811 Adapter for Teensy 3.1 – Control tons of NeoPixels!</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://www.mccauslandcenter.sc.edu/CRNL/tools/oscilloscope" target="_blank">http://www.mccauslandcenter.sc.edu/CRNL/tools/oscilloscope</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://github.com/KurtE/BioloidSerial" target="_blank">Github: KurtE- Modified version of Trossen Bioloid library to user Serialx objects</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://github.com/KurtE/Teensy3.1-Breakout-Boards" target="_blank">https://github.com/KurtE/Teensy3.1-Breakout-Boards</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://zentasrobots.com/" target="_blank">http://zentasrobots.com/</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://www.circuitsathome.com/category/mcu/arduino/usb-shield" target="_blank">http://www.circuitsathome.com/category/mcu/arduino/usb-shield</a></span><br />
<br />
<a href="http://forum.pjrc.com/threads/26017-Teensy-3-1-and-9DOF-Stick-I2C"><span style="font-family: "Trebuchet MS",sans-serif;">http://forum.pjrc.com/threads/26017-Teensy-3-1-and-9DOF-Stick-I2C</span></a><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://github.com/ptrbrtz/razor-9dof-ahrs/pull/20" target="_blank">https://github.com/ptrbrtz/razor-9dof-ahrs/pull/20</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://www.tindie.com/products/onehorse/lsm9ds0-teensy-31-micro-shield/" target="_blank">https://www.tindie.com/products/onehorse/lsm9ds0-teensy-31-micro-shield/</a> </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://github.com/Poofjunior/RaspPi-Teensy-USB-ServoController" target="_blank">https://github.com/Poofjunior/RaspPi-Teensy-USB-ServoController</a> </span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><b>Development tools: </b></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://www.seanet.com/~karllunt/bareteensy31.html" target="_blank"><span style="font-family: "Trebuchet MS",sans-serif;"></span></a><span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://www.pjrc.com/teensy/teensyduino.html" target="_blank">PCJR.com : Teensyduino IDE extension</a></span></span><br />
<a href="http://www.seanet.com/~karllunt/bareteensy31.html" target="_blank"><span style="font-family: "Trebuchet MS",sans-serif;">http://www.seanet.com/~karllunt/bareteensy31.html </span></a><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://embedxcode.weebly.com/" target="_blank">http://embedxcode.weebly.com/ </a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"> <a href="http://www.utasker.com/freescale/Teensy_Simulator.zip" target="_blank">http://www.uTasker.com/freescale/Teensy_Simulator.zip</a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/overview/" target="_blank">http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/overview/ </a></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><span style="font-family: "Trebuchet MS",sans-serif;"><a href="http://www.circuitsathome.com/mcu/teensy-3-0-now-supported-by-the-usb-host-library" target="_blank">Teensy 3.0 now supported by the USB Host library</a></span></span><br />
<span style="font-family: "Trebuchet MS",sans-serif;"><a href="https://community.freescale.com/docs/DOC-99621" target="_blank">Freescale Hack It Together (H.I.T.) Project Initiative - Get Excited!</a></span><br />
<br />
<br />
<br />
<br />
<span style="font-family: "Trebuchet MS",sans-serif;"><br /></span>security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0tag:blogger.com,1999:blog-676382518143071514.post-90349764824289161842014-05-28T12:50:00.000-07:002014-05-28T12:52:30.495-07:00Getting AVRDUDE working on Ubuntu with Pololu AVR ISP programmer and 3.3v ATtiny<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Trebuchet MS, sans-serif; font-size: large;"><b>I am an <a href="http://www.ubuntu.com/download" target="_blank">UBUNTU</a> biggot... there, I said it!</b></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Trebuchet MS, sans-serif; font-size: large;"><b><br /></b></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Trebuchet MS, sans-serif; font-size: large;">I use <a href="http://releases.ubuntu.com/13.10/" target="_blank">Ubuntu 13.10</a> as my primary <a href="http://en.wikipedia.org/wiki/Operating_system" target="_blank">Operating System</a> day in and day out. If I *have* to use something else, I have access to MS <a href="http://en.wikipedia.org/wiki/Windows_XP" target="_blank">Windows XP</a>, <a href="http://en.wikipedia.org/wiki/Windows_7" target="_blank">Windows 7</a>, and <a href="http://en.wikipedia.org/wiki/OS_X_Mountain_Lion" target="_blank">OSX Mountain Lion</a> through the magic of <a href="https://www.virtualbox.org/" target="_blank">VirtualBox</a>. </span><span style="color: red; font-family: Trebuchet MS, sans-serif; font-size: x-small;"><---- you Really want to try this!!</span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Trebuchet MS, sans-serif;">As part of my <a href="http://arduino-pi.blogspot.ca/2014/05/dancing-brushbot-assembly.html" target="_blank">Dancing Brushbot project</a>, I had to move out of my comfort zone in programming <a href="http://www.atmel.com/products/microcontrollers/avr/" target="_blank">AVR chips</a>. I'm quite familiar with using the <a href="http://arduino.cc/en/main/software" target="_blank">Arduino IDE</a> to program *Arduino* boards, and have also used the IDE to program ATtiny8x chips by <a href="http://www.instructables.com/id/Using-the-Arduino-Uno-to-program-ATTINY84-20PU/" target="_blank">connecting them to an Arduino UNO</a> ... </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<div class="" style="clear: both; text-align: left;">
<a href="http://3.bp.blogspot.com/-oRmgm3Le1y8/U4Yper86U4I/AAAAAAAAAik/rHVqDIqMgRA/s1600/IMG_20140521_125840.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://3.bp.blogspot.com/-oRmgm3Le1y8/U4Yper86U4I/AAAAAAAAAik/rHVqDIqMgRA/s1600/IMG_20140521_125840.jpg" height="200" width="177" /></a><span style="font-family: Trebuchet MS, sans-serif;">For the current Brushbot project, I had made a small standalone ATtiny84 board with a builtin <a href="http://www.batsocks.co.uk/readme/isp_headers.htm" target="_blank">AVR ISP connector</a> for programming without having to remove it from the robot.</span></div>
<div class="" style="clear: both; text-align: left;">
<a href="http://4.bp.blogspot.com/-862fN1SHZqs/U387viOX2XI/AAAAAAAAAiE/zomEM4_WuDM/s1600/pololu-usb-avr.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-862fN1SHZqs/U387viOX2XI/AAAAAAAAAiE/zomEM4_WuDM/s1600/pololu-usb-avr.jpg" height="224" width="320" /></a><span style="font-family: 'Trebuchet MS', sans-serif;"></span></div>
<div style="text-align: left;">
<span style="font-family: Trebuchet MS, sans-serif;">I went to my local <a href="http://www.creatroninc.com/" target="_blank">Robots Supply Store</a> and purchased this Pololu AVR ISP programmer.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;">As I had previously programmed ATtiny chips with the UNO, I already had the <a href="http://highlowtech.org/?p=1695" target="_blank">proper Boards.txt configuration</a>. </span><br />
<br />
<b>This should be simple right? </b><br />
<br />
<br />
<center>
<span style="color: red; font-size: large;">Wrong!</span> </center>
</div>
<br />
<div class="" style="clear: both; text-align: left;">
</div>
<ol>
<li><span style="font-family: 'Trebuchet MS', sans-serif;">I plugged it in to my laptop USB port, </span></li>
<li><span style="font-family: 'Trebuchet MS', sans-serif;">plugged the AVR ISP plug into the robot board</span></li>
<li><span style="font-family: 'Trebuchet MS', sans-serif;">From the Arduino IDE, selected "Tools/Board/ATtiny84 (internal 8 mhz clock)"</span></li>
<li><span style="font-family: 'Trebuchet MS', sans-serif;">Also from the IDE Selected Tools/Programmer AVR ISP</span></li>
<li><span style="font-family: 'Trebuchet MS', sans-serif;">Selected the correct USB serial port (/dev/ttyACM0)</span></li>
<li><span style="font-family: 'Trebuchet MS', sans-serif;">attempted to upload the compiled <a href="http://arduino.cc/en/tutorial/blink" target="_blank">"Blink"</a> sketch.</span></li>
</ol>
<br />
<div class="" style="clear: both; text-align: left;">
<span style="font-family: 'Trebuchet MS', sans-serif;"><b><span style="font-size: large;">and it failed... </span></b> </span></div>
<div class="" style="clear: both; text-align: left;">
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span></div>
<div class="" style="clear: both; text-align: left;">
<span style="font-family: Trebuchet MS, sans-serif;"><a href="http://www.nongnu.org/avrdude/" target="_blank">AVRDUDE</a> (the application that actually communicates with the Atmel processors) could not sync, told me to check my serial ports, etc... </span></div>
<div class="" style="clear: both; text-align: left;">
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<div class="" style="clear: both; text-align: center;">
<span style="font-family: Trebuchet MS, sans-serif; font-size: large;">Now if you read <a href="http://arduino-pi.blogspot.ca/2014/05/arduino-user-error-ain0-is-not-a0.html" target="_blank">my previous posting</a>, you'll understand that I am <a href="http://en.wikipedia.org/wiki/RTFM" target="_blank">RTFM</a> challenged.</span></div>
<div class="" style="clear: both; text-align: left;">
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<div class="" style="clear: both; text-align: left;">
<span style="font-family: Trebuchet MS, sans-serif;">So I dug in, and did a little research, and quickly found <a href="http://openenergymonitor.org/emon/buildingblocks/avrisp" target="_blank">http://openenergymonitor.org/emon/buildingblocks/avrisp</a></span></div>
<br />
<blockquote class="tr_bq">
3. <strong>AVR ISP V2</strong> - Pololu USB AVR Programmer (<a href="http://www.pololu.com/catalog/product/1300">http://www.pololu.com/catalog/product/1300</a>).
This is quite a cheap programmer that works well on Linux Ubuntu, it
can only programmed at 5v (needs 4V on MOSI pin to initialize) and requires
the board to be externally powered. The following lines need to be
added to programmers.txt in the Arduino Hardware folder:<br />
<em>avrispv2.name=AVR ISP v2</em><em><br />
avrispv2.communication=serial</em><em><br />
avrispv2.protocol=avrispv2</em></blockquote>
<span style="font-family: Trebuchet MS, sans-serif;">Using sudo, I opened /usr/share/arduino/hardware/arduino/programmers.txt, and added the following 3 lines:</span><br />
<blockquote class="tr_bq">
<em style="background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 17.02400016784668px;">avrispv2.name=AVR ISP v2</em><em style="background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 17.02400016784668px;"><br />avrispv2.communication=serial</em><br />
<em style="background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 17.02400016784668px;">avrispv2.protocol=avrispv2</em></blockquote>
<span style="font-family: Trebuchet MS, sans-serif;">I closed and reopened the Arduino IDE, and the new programmer showed up. I selected it from the Tools/Programmer menu, and again attempted to upload. </span><br />
<br />
<b style="font-family: 'Trebuchet MS', sans-serif;"><span style="font-size: large;">and it failed... </span></b><br />
<b style="font-family: 'Trebuchet MS', sans-serif;"><span style="font-size: large;"><br /></span></b>
<span style="font-family: 'Trebuchet MS', sans-serif;"><span style="font-size: large;">Remember that RTFM issue? </span></span><br />
<span style="font-family: 'Trebuchet MS', sans-serif;"><span style="font-size: large;"><br /></span></span>
<span style="font-family: 'Trebuchet MS', sans-serif;">Looking at what I posted here from the Openenergy blog a paragraph up... </span><br />
<blockquote class="tr_bq">
<span style="font-family: Trebuchet MS, sans-serif;">This is quite a cheap programmer that works well on Linux Ubuntu,<b><span style="color: red;"> it can only programmed at 5v</span></b> (needs 4V on MOSI pin to initialize) and <span style="color: red;"><b>requires the board to be externally powered.</b></span></span></blockquote>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">This lead me to read the<a href="http://www.pololu.com/docs/pdf/0J36/pololu_usb_avr_programmer.pdf" target="_blank"> Pololu manual for the ARV ISP programmer</a> (gasp!)</span><br />
<br />
<b><span style="font-size: large;">And this comment on the <a href="http://forum.pololu.com/viewtopic.php?f=3&t=7368" target="_blank">pololu forum:</a> </span></b><br />
<blockquote class="tr_bq" style="background-color: #e1ebf2; color: #333333; font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; line-height: 1.4em; margin: 0px; min-height: 3em; overflow: hidden; padding: 0px;">
<a href="http://forum.pololu.com/viewtopic.php?f=3&t=7368#p35165" style="color: #105289; margin: 0px; padding: 0px; text-decoration: none;"><span style="font-size: x-small;">Re: Pololu USB AVR Programmer</span></a><span style="font-size: x-small;"><a href="http://forum.pololu.com/viewtopic.php?p=35165&sid=1ff398e955f8d0af964b791460857f52#p35165" style="color: #105289; margin: 0px; padding: 0px; text-decoration: none;"><img alt="Post" src="http://forum.pololu.com/styles/prosilver/imageset/icon_post_target.gif" height="9" style="border: 0px; margin: 0px; padding: 0px;" title="Post" width="11" /></a>by <strong style="margin: 0px; padding: 0px;"><a class="username-coloured" href="http://forum.pololu.com/memberlist.php?mode=viewprofile&u=10252&sid=1ff398e955f8d0af964b791460857f52" style="color: #aa0000; display: inline !important; margin: 0px; padding: 0px; text-decoration: none;">JeremyT</a></strong> » Fri Sep 13, 2013 3:34 pm</span><span style="font-size: x-small;">You can configure the Pololu USB AVR Programmer through Linux using PgmCmd from the <a class="postlink" href="http://www.pololu.com/docs/0J41" style="border-bottom-color: rgb(102, 102, 102); border-bottom-style: dotted; border-bottom-width: 1px; color: #5d8fbd; margin: 0px; padding: 0px; text-decoration: none;">Pololu USB Software Development Kit</a>. PgmCmd is a command-line status and configuration utility. More information, such as how to compile the code, can be found in the README.txt in the SDK. By the way, I still recommend configuring it via Windows, as it would probably be easier. </span><span style="font-size: x-small;"><br style="margin: 0px; padding: 0px;" /></span><span style="font-size: x-small;">I have programmed an Atmega8U2 running at 3.3V with the Pololu USB AVR Programmer in Windows, and I do not expect there be a difference in programming with Linux, as long as the programmer is configured correctly. </span><span style="font-size: x-small;"><br style="margin: 0px; padding: 0px;" /></span><span style="font-size: x-small;">Using a level shifter, like the one you linked, would probably work. A resistor voltage divider would also suffice. However, I did not have any voltage divider when I programmed the Atmega8U2. </span><span style="font-size: x-small;"><br style="margin: 0px; padding: 0px;" /></span><span style="font-size: x-small;">- Jeremy</span></blockquote>
<br />
<span style="color: red;">(<b>Note:</b> as the AVR chips can run at up to 5.5v they do not need a level shifter)</span><br />
<br />
<span style="font-family: Trebuchet MS, sans-serif;">I then downloaded the <span style="background-color: white;"><a class="postlink" href="http://www.pololu.com/docs/0J41" style="border-bottom-color: rgb(102, 102, 102); border-bottom-style: dotted; border-bottom-width: 1px; line-height: 22.399999618530273px; margin: 0px; padding: 0px; text-decoration: none;">Pololu USB Software Development Kit</a><span style="line-height: 22.399999618530273px;"> for Linux. and read the Readme.txt file (I know, eh?) </span></span></span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><span style="background-color: white;"><span style="line-height: 22.399999618530273px;"><br /></span></span></span>
<span style="background-color: white; font-family: 'Trebuchet MS', sans-serif; line-height: 22.399999618530273px;">To compile their C# applications, you need mono installed:</span><br />
<span style="background-color: white; font-family: 'Trebuchet MS', sans-serif; line-height: 22.399999618530273px;"> sudo apt-get install libusb-1.0-0-dev mono-gmcs mono-devel libmono-winforms2.0-cil</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><span style="background-color: white; line-height: 22.399999618530273px;"><br /></span></span>
<span style="font-family: Trebuchet MS, sans-serif;"><span style="background-color: white; line-height: 22.399999618530273px;"> In the top level directory of the downloaded SDK, type "make". </span></span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><span style="background-color: white; line-height: 22.399999618530273px;"><br /></span></span>
<span style="font-family: Trebuchet MS, sans-serif;"><span style="background-color: white; line-height: 22.399999618530273px;"><br /></span></span>
<span style="font-family: Trebuchet MS, sans-serif;"><span style="background-color: white; line-height: 22.399999618530273px;">From there, I was able to cd to the <b>pololu-usb-sdk/UsbAvrProgrammer/PgmCmd</b> folder, and execute the AVR ISP programmer's command line utility </span></span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><span style="background-color: white; line-height: 22.399999618530273px;"><b><span style="font-size: large;"><br /></span></b></span></span>
<span style="font-family: Trebuchet MS, sans-serif;"><span style="background-color: white; line-height: 22.399999618530273px;"><b><span style="font-size: large;">./pgmcmd --list </span></b> </span></span><br />
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">PgmCmd: Configuration and status utility for the Pololu USB AVR Programmer.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Version: 1.0.1.0</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Options:</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -l, --list list available devices</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -d, --device SERIALNUM (optional) select device with given serial number</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -s, --status display complete device status</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> --freq NUM sets the ISP frequency (in units of kHz)</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> --linea ID</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> or --lineb ID set serial control signal associated with line A or B.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Valid IDs are: none, cd, dsr, ri, dtr, rts.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Warning: dtr and rts are outputs: -f option is required</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> --swminor HEXNUM AVR ISP software version minor (in hex, e.g. A)</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> --swmajor HEXNUM AVR ISP software version major (in hex)</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> --hw HEXNUM AVR ISP software hardware version (in hex)</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> --vddmin NUM set minimum allowed target vdd (units of mV)</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> --vddmaxrange NUM set maximum allowed target vdd range (units of mV)</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> --restoredefaults restore factory settings</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> --bootloader put device in to bootloader (firmware upgrade) mode</span></div>
</div>
<div>
<br /></div>
<div>
<span style="font-size: large;"><span style="font-family: Trebuchet MS, sans-serif;">then </span><span style="background-color: white; font-family: 'Trebuchet MS', sans-serif; line-height: 22.399999618530273px;"> </span><b style="font-family: 'Trebuchet MS', sans-serif; line-height: 22.399999618530273px;">./pgmcmd --status </b><span style="font-family: 'Trebuchet MS', sans-serif; line-height: 22.399999618530273px;">revealed...</span><b style="font-family: 'Trebuchet MS', sans-serif; line-height: 22.399999618530273px;"> </b></span></div>
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Serial number: 00060244</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Firmware version: 1.07</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Settings:</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> ISP Frequency: 200 kHz</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Line A Identity: None</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Line B Identity: None</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> AVR ISP hardware version: F</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> AVR ISP software version: 2.A</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: red;"><b>Target VDD allowed minimum: 4384 mV</b></span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Target VDD allowed max range: 512 mV</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Last programming:</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Error: None</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Measured Target VDD Minimum: N/A</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Measured Target VDD Range: N/A</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">SLO-scope:</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> State: Off</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Line A output: Off</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Line B output: Off</span><br />
<div>
<br /></div>
<br />
So... I ran<span style="font-size: large;"> </span><span style="font-family: 'Trebuchet MS', sans-serif; line-height: 22.399999618530273px;"><b><span style="font-size: large;">./pgmcmd --vddmin 3200</span> </b></span><br />
<span style="font-family: 'Trebuchet MS', sans-serif; line-height: 22.399999618530273px;">to set a minimum VDD value of 3.2v</span><span style="font-family: 'Trebuchet MS', sans-serif; line-height: 22.399999618530273px;">.. resulting in...</span><br />
<span style="font-family: 'Trebuchet MS', sans-serif; line-height: 22.399999618530273px;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Serial number: 00060244</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Firmware version: 1.07</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Settings:</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> ISP Frequency: 200 kHz</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Line A Identity: None</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Line B Identity: None</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> AVR ISP hardware version: F</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> AVR ISP software version: 2.A</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: red;"><b>Target VDD allowed minimum: </b></span></span><b style="font-family: 'Courier New', Courier, monospace; font-size: small; line-height: 22.399999618530273px;"><span style="color: red;">3200 mV</span></b><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Target VDD allowed max range: 512 mV</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Last programming:</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Error: None</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Measured Target VDD Minimum: N/A</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Measured Target VDD Range: N/A</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">SLO-scope:</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> State: Off</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Line A output: Off</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Line B output: Off</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
I plugged the robots battery in (remember that <b style="color: red; font-family: 'Trebuchet MS', sans-serif;">requires the board to be externally powered </b><span style="font-family: 'Trebuchet MS', sans-serif;">comment</span><span style="font-family: 'Trebuchet MS', sans-serif;">?)</span><span style="font-family: 'Trebuchet MS', sans-serif;">, plugged in the AVR ISP cable, opened the blink sketch in the Arduino IDE, and clicked the upload icon......</span><br />
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span>
<span style="font-family: 'Trebuchet MS', sans-serif;"><b>(drum roll please!)</b></span><br />
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span>
<span style="font-family: 'Trebuchet MS', sans-serif;"><b><span style="font-size: large;">The leds under the <a href="http://www.sharpsma.com/webfm_send/1489" target="_blank">Sharp IR distance sensor </a>came to life!!! </span></b></span><br />
<span style="font-family: 'Trebuchet MS', sans-serif;"><br /></span>
<br />
<b>Stay tuned for Funky Robotic Vibratory Dancing!</b><br />
<b><br /></b>
<b><br /></b>
<br />
<span style="font-size: large;"><b>References:</b></span><br />
<br />
<a href="http://www.pololu.com/docs/pdf/0J36/pololu_usb_avr_programmer.pdf" target="_blank">Pololu USB AVR Programmer User's Guide</a><br />
<a href="http://openenergymonitor.org/emon/buildingblocks/avrisp" target="_blank">AVR ISP Programmers </a><br />
<a href="http://arduino.stackexchange.com/questions/702/how-to-use-a-pololu-5v-avr-isp-programmer-to-program-an-avr-at-3-3v?rq=1" target="_blank">Stackexchange: How to use a Pololu 5v AVR ISP Programmer to program an AVR at 3.3v</a><br />
<a href="http://forum.pololu.com/viewtopic.php?f=3&t=7368" target="_blank">forum.pololu.com: Pololu USB AVR Programmer - Ubuntu</a><br />
<a href="http://www.pololu.com/docs/0J41" target="_blank">Pololu: Pololu USB Software Development Kit</a><br />
<a href="http://forum.arduino.cc/index.php?topic=73027.0;wap2" target="_blank">http://forum.arduino.cc/index.php?topic=73027.0;wap2</a><br />
<a href="http://runawaybrainz.blogspot.ca/2013/05/arduino-pololu-usb-avr-programmer.html" target="_blank">http://runawaybrainz.blogspot.ca/2013/05/arduino-pololu-usb-avr-programmer.html</a><br />
<a href="http://provideyourown.com/2011/arduino-program-attiny/" target="_blank">http://provideyourown.com/2011/arduino-program-attiny/</a><br />
<a href="http://www.open-electronics.org/arduino-isp-in-system-programming-and-stand-alone-circuits/" target="_blank">http://www.open-electronics.org/arduino-isp-in-system-programming-and-stand-alone-circuits/</a><br />
<a href="http://www.instructables.com/id/How-to-program-attiny-using-arduino-uno/" target="_blank">http://www.instructables.com/id/How-to-program-attiny-using-arduino-uno/</a><br />
<a href="http://www.instructables.com/id/Using-the-Arduino-Uno-to-program-ATTINY84-20PU/" target="_blank">http://www.instructables.com/id/Using-the-Arduino-Uno-to-program-ATTINY84-20PU/</a><br />
<a href="http://42bots.com/tutorials/programming-attiny84-attiny44-with-arduino-uno/" target="_blank">http://42bots.com/tutorials/programming-attiny84-attiny44-with-arduino-uno/</a><br />
<a href="http://www.batsocks.co.uk/readme/isp_headers.htm" target="_blank">http://www.batsocks.co.uk/readme/isp_headers.htm</a><br />
<a href="http://highlowtech.org/?p=1695" target="_blank">http://highlowtech.org/?p=1695</a><br />
<br />
<br />
<br />
<br />security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com1tag:blogger.com,1999:blog-676382518143071514.post-58780176283679884612014-05-27T09:41:00.001-07:002014-05-27T10:09:50.305-07:00Arduino: User Error -- AIN0 *IS NOT* A0<div class="separator" style="clear: both;">
I am revisiting<a href="http://arduino-pi.blogspot.ca/2014/03/success-oslrf01-lidar-successfully.html" target="_blank"> my code for the OSLRF01</a> Open Source <a href="http://www.lightware.co.za/shop/en/laser-sensors/24-oslrf-01.html" target="_blank">Laser Range Finder</a>, as the thought occurred to me that I should be using the ATmega built-in Analog Comparator to determine the rise time of the return pulse. </div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
I will outline the new code in an upcoming post, however.....</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="color: blue; font-size: large;"><b>This post is about my failure to clearly <a href="http://en.wikipedia.org/wiki/RTFM" target="_blank">RTFM:</a></b></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
In this case, it would be the <a href="http://www.atmel.com/Images/doc8161.pdf" target="_blank">Atmel 8bit Microcontroller Datasheet</a> specifically Section 22 on the Analog Comparator (Page 246) and Table 13-9 on page 88:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-c2dFdRcDCkU/U4S-YSrIXsI/AAAAAAAAAiU/XbgFu2-8uH4/s1600/Screenshot+from+2014-05-27+12:32:19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-c2dFdRcDCkU/U4S-YSrIXsI/AAAAAAAAAiU/XbgFu2-8uH4/s1600/Screenshot+from+2014-05-27+12:32:19.png" height="141" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b><span style="font-size: large;">So let me state a simple fact that I ignored:</span></b></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<b><span style="color: red;"><span style="font-size: large;">AVR digital pins AIN0 (D6), and AIN1 (D7) are </span><span style="font-size: x-large;">NOT</span><span style="font-size: large;"> the same </span></span></b><b><span style="color: red; font-size: large;">as AVR Analog pins A0 and A1.</span></b></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://www.gammon.com.au/forum/bbshowbio.php?bbuser_id=1" target="_blank"><b>Nick Gammon</b></a> has this simple diagram <a href="http://www.gammon.com.au/forum/?id=11916" target="_blank">on his site </a>for using the <a href="http://www.avr-tutorials.com/comparator/utilizing-avr-analog-comparator-aco" target="_blank">AVR Analog Comparator,</a> that I've looked at a dozen times:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/proxy/AVvXsEguLv1K23NBuAOQ8ZddFCPwfg6Hb8_kzvawjnsVEXBROom9UXO0a9DyUGtM6J6KNBu0vDiOlxESDIgv3GGqU5S4EeBmrNjMPWH8gWqbR9IyqvUPd1z8hwFkk4e1s_O-2kJ2v-7XoLfN-BHaKQFda2v8LKDiNLbxQMoN9cbRqQ=" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://www.gammon.com.au/images/Arduino/Analog_Comparator.png" height="200" width="176" /></a>It <b>Clearly</b> shows AIN0 and AIN1 associated with Digital pin D6 and D7 respectively. Yet I continued to try using A0 as my reference voltage, and A1 as the incoming analog signal. </div>
<div class="" style="clear: both; text-align: left;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
I mean <b>*Why on god's green earth would I compare analog signals on digital pins, right?*</b></div>
<div class="" style="clear: both; text-align: left;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
It was only by chance that I was reading a <a href="http://forum.arduino.cc/index.php/topic,94534.0.html" target="_blank">similarly puzzled users question on the Arduino Forum:</a> </div>
<blockquote class="tr_bq">
<table border="0" cellpadding="3" cellspacing="0" style="width: 100%px;"><tbody>
<tr><td class="windowbg"><table cellpadding="5" cellspacing="0" style="table-layout: fixed; width: 100%px;"><tbody>
<tr><td height="100%" valign="top" width="85%"><table border="0" style="width: 100%px;"><tbody>
<tr><td valign="middle"><div class="postSubject" id="subject_709806">
<span style="font-size: x-small;"><a href="http://forum.arduino.cc/index.php?topic=94534.msg709806#msg709806">Re: comparator to compare between AIN0 and AIN1</a>
</span></div>
<div class="postDate">
<span style="font-size: x-small;">« <b>Reply #2 on:</b> March 01, 2012, 08:28:47 am »</span></div>
</td>
<td align="right" class="postIconMenu" height="20" valign="bottom"><br /></td>
</tr>
</tbody></table>
<hr class="hrcolor" size="1" width="100%" />
<div class="post">
<div class="quoteheader">
<span style="font-size: x-small;">Quote</span></div>
<div class="quote">
<span style="font-size: x-small;">It is possible to select any of the ADC7..0 pins to replace the negative input to the Analog Com-<br />parator. .....<br /> If ACME is cleared or ADEN is set, AIN1 is applied to the negative input to the Analog<br />Comparator.</span></div>
<span style="color: red;"><b>A0 and A1 are not the same as AIN0 and AIN1. </b></span><br />
<div class="quoteheader">
<span style="font-size: x-small;">Quote</span></div>
<div class="quote">
<span style="font-size: x-small;">PC1 (ADC1/PCINT9) pin and PC0 (ADC0/PCINT8)<br />PCINT23 /AIN1 - pin D7 and PCINT22/OC0A/AIN0 - pin D6)</span></div>
<span style="font-size: x-small;">There is "working" example:</span><br />
<div class="codeheader">
<span style="font-size: x-small;">Code:</span></div>
<div class="code">
<pre style="display: inline;"><span style="font-size: x-small;">//Configure Analog Comparator, Video Input Capture
ADCSRB &= ~(1<<ACME);
ACSR &= ~(1<<ACD) ; // Analog Comparator disable off
ACSR |= (1<<ACIC);
ACSR |= (1<<ACIS1); // comparator detection edge
ACSR |= (1<<ACIS0); //** 10 - falling, 11- rising: ACSR &= ~(1<<ACIS0)
DIDR1 |= (1<< AIN0D); // disable digital input buffer AIN0/1
DIDR1 |= (1<< AIN1D);</span></pre>
</div>
<span style="font-size: x-small;">Digital pins 6 and 7 as comparator inputs.<br />BTW, should you clear a flag after printing? </span></div>
</td>
</tr>
<tr>
<td valign="bottom" width="85%"><table border="0" style="table-layout: fixed; width: 100%px;"><tbody>
<tr>
<td colspan="2" width="100%"></td>
</tr>
<tr>
<td class="postLastModified" id="modified_709806" valign="bottom"></td>
<td align="right" class="postReportIp" valign="bottom"><br /></td></tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</td></tr>
<tr>
<td class="windowbg3" style="text-align: center;"><b><span style="color: blue; font-size: large;"><Insert the sound of a hard forehead smack here></span></b></td></tr>
</tbody></table>
</blockquote>
<div class="" style="clear: both; text-align: left;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://arduino.cc/en/uploads/Hacking/Atmega168PinMap2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://arduino.cc/en/uploads/Hacking/Atmega168PinMap2.png" height="426" width="640" /></a></div>
<br />
<br />
<br />
<br />
<span style="font-family: Trebuchet MS, sans-serif; font-size: large;">References:</span><br />
<span style="font-size: x-small;"><a href="http://www.arduino.cc/en/Reference/PortManipulation" target="_blank">http://www.arduino.cc/en/Reference/PortManipulation</a></span><br />
<a href="http://www.billporter.info/2010/08/18/ready-set-oscillate-the-fastest-way-to-change-arduino-pins/" target="_blank"><span style="font-size: x-small;">http://www.billporter.info/2010/08/18/ready-set-oscillate-the-fastest-way-to-change-arduino-pins/</span></a><br />
<a href="https://github.com/projectgus/digitalIOPerformance" target="_blank"><span style="font-size: x-small;">https://github.com/projectgus/digitalIOPerformance</span></a><br />
<span style="font-size: x-small;"><a href="http://forum.arduino.cc/index.php/topic,46896.0.html" target="_blank">digitalWriteFast, digitalReadFast, pinModeFast etc</a> </span> <span style="font-size: xx-small;"><--- needs to be updated for Arduino 1.0+</span><br />
<span style="font-size: x-small;"><a href="https://code.google.com/p/digitalwritefast/downloads/list" target="_blank">https://code.google.com/p/digitalwritefast/downloads/list</a> </span> <span style="font-size: xx-small;"><--- needs to be updated for Arduino 1.0+</span><br />
<a href="http://www.lightware.co.za/shop/en/laser-sensors/24-oslrf-01.html" target="_blank"><span style="font-size: x-small;">http://www.lightware.co.za/shop/en/laser-sensors/24-oslrf-01.html</span></a><br />
<a href="http://arduino.cc/en/Hacking/Atmega168Hardware" target="_blank"><span style="font-size: x-small;">http://arduino.cc/en/Hacking/Atmega168Hardware</span></a><br />
<span style="font-size: x-small;"><a href="https://github.com/TMuel1123/Arduino/blob/master/FastPins/FastPins.h" target="_blank">https://github.com/TMuel1123/Arduino/blob/master/FastPins/FastPins.h</a> </span><span style="font-size: xx-small;"><-- this one looks promising but needs the pins mapped...</span><br />
<span style="font-size: x-small;"><a href="http://tmuel1123.blogspot.ca/2014/01/fastpinsh-or-way-to-realize-really-fast.html" target="_blank">http://tmuel1123.blogspot.ca/2014/01/fastpinsh-or-way-to-realize-really-fast.html</a></span><br />
<span style="font-size: x-small;"><a href="http://forum.arduino.cc/index.php/topic,94534.0.html" target="_blank">http://forum.arduino.cc/index.php/topic,94534.0.html</a></span><br />
<span style="font-size: x-small;"><a href="http://www.avr-tutorials.com/comparator/utilizing-avr-analog-comparator-aco" target="_blank">http://www.avr-tutorials.com/comparator/utilizing-avr-analog-comparator-aco</a></span><br />
<a href="http://www.avr-tutorials.com/sites/default/files/ATMega8515%20Analog%20Comparator_1.pdf" target="_blank"><span style="font-size: x-small;">http://www.avr-tutorials.com/sites/default/files/ATMega8515%20Analog%20Comparator_1.pdf</span></a>
<!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fwww.gammon.com.au%2Fimages%2FArduino%2FAnalog_Comparator.png&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://blogger.googleusercontent.com/img/proxy/AVvXsEguLv1K23NBuAOQ8ZddFCPwfg6Hb8_kzvawjnsVEXBROom9UXO0a9DyUGtM6J6KNBu0vDiOlxESDIgv3GGqU5S4EeBmrNjMPWH8gWqbR9IyqvUPd1z8hwFkk4e1s_O-2kJ2v-7XoLfN-BHaKQFda2v8LKDiNLbxQMoN9cbRqQ=" -->security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0tag:blogger.com,1999:blog-676382518143071514.post-80845138488426897102014-05-21T19:31:00.002-07:002014-05-28T19:46:34.301-07:00Dancing Brushbot assembly...<span style="font-family: Trebuchet MS, sans-serif; font-size: large;"><b>Update on the Dancing Brushbot: </b></span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<br />
<div class="" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-ltlvNhU29hg/U30_5xb9UrI/AAAAAAAAAho/-vqU_kSOwck/s1600/IMG_20140516_142356.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://1.bp.blogspot.com/-ltlvNhU29hg/U30_5xb9UrI/AAAAAAAAAho/-vqU_kSOwck/s1600/IMG_20140516_142356.jpg" height="320" width="228" /></a></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;">In my last posting, I mused about the potential of making this cheap wind-up toy actually move about...</span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;">possibly avoid obstacles... </span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;"><br /></span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;">Well, I've had some time to think and plan, and dismember the cheerful little dude...</span></div>
<br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-vlXO1o_HF_0/U30cSGZWiMI/AAAAAAAAAfk/FokpoBlqW4g/s1600/IMG_20140520_142719.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-vlXO1o_HF_0/U30cSGZWiMI/AAAAAAAAAfk/FokpoBlqW4g/s1600/IMG_20140520_142719.jpg" height="212" width="320" /></a></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;">Here is the sum of his parts.</span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;"><br /></span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;">You'll notice the little white box lower middle of the picture. That is the spring wound mechanism that made him dance...</span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;"><br /></span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;"><br /></span></div>
<div style="text-align: left;">
<a href="http://1.bp.blogspot.com/-2t7bg3m1Mok/U30cSAcG_GI/AAAAAAAAAfg/D62y22wtanM/s1600/IMG_20140520_144232.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://1.bp.blogspot.com/-2t7bg3m1Mok/U30cSAcG_GI/AAAAAAAAAfg/D62y22wtanM/s1600/IMG_20140520_144232.jpg" height="177" width="320" /></a><span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;">It fit inside the body, in an area roughly 2.5cm high by 1.5cm wide by 1cm deep.</span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;"><br /></span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;">The is the space I have for electronics...</span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;"><br /></span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;"><br /></span></div>
<div style="text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;"><br /></span></div>
<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-4qPCkVhXyAo/U30cRFx-umI/AAAAAAAAAfY/31kYMpis10o/s1600/IMG_20140520_144443.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-4qPCkVhXyAo/U30cRFx-umI/AAAAAAAAAfY/31kYMpis10o/s1600/IMG_20140520_144443.jpg" height="156" width="320" /></a></div>
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;"> This is the underside of our friendly Hexbot Nano, with the battery removed. I'll be simply connecting to the positive and negative battery wires for this build.</span><br />
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;"><br /></span>
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-f_m0qsfws_s/U30cTsYP6DI/AAAAAAAAAf4/-zVy7bjyGnI/s1600/IMG_20140521_110530.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-f_m0qsfws_s/U30cTsYP6DI/AAAAAAAAAf4/-zVy7bjyGnI/s1600/IMG_20140521_110530.jpg" height="147" width="200" /></a><a href="http://3.bp.blogspot.com/-hWOiCOWnR6c/U30cS66-oAI/AAAAAAAAAfw/qVV2C4k8GGw/s1600/IMG_20140521_104220.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://3.bp.blogspot.com/-hWOiCOWnR6c/U30cS66-oAI/AAAAAAAAAfw/qVV2C4k8GGw/s1600/IMG_20140521_104220.jpg" height="165" width="200" /></a></div>
<span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large;">Opened up, you can see the miniature "pager" motor with the offset weight that vibrates the Hexbot Nano. </span><br />
<span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large;">I've also placed the protection diode inside the body of the Hexbots, as there was no room on the main circuit board. </span><br />
<span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large;"><br /></span>
<span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxDfNjPZKhvVNfVdSRz7ownM779JHH0l3j8kRac04XNPJQtBueITQNKKDkgHjUr5xl7GRPzo74I1ddARkcfrP7HB-BJK8kiKGs6Uh9kNM9OGDtHVvhRS65PoYY-yZ2Al1ilSSO4kVrIoNa/s1600/IMG_20140521_125458.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxDfNjPZKhvVNfVdSRz7ownM779JHH0l3j8kRac04XNPJQtBueITQNKKDkgHjUr5xl7GRPzo74I1ddARkcfrP7HB-BJK8kiKGs6Uh9kNM9OGDtHVvhRS65PoYY-yZ2Al1ilSSO4kVrIoNa/s1600/IMG_20140521_125458.jpg" height="400" width="270" /></a></div>
<span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large;"> </span> <span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large;">I then hotglued the Dancing bot's feet onto the tops of the Hexbot Nano's and drilled a hole to pass the motor wires through.</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-mZMjonUJ6os/U30cT6KIf0I/AAAAAAAAAf8/SAwqDpuz0fU/s1600/IMG_20140521_112402.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://4.bp.blogspot.com/-mZMjonUJ6os/U30cT6KIf0I/AAAAAAAAAf8/SAwqDpuz0fU/s1600/IMG_20140521_112402.jpg" height="268" width="320" /></a><span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large;"></span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Here is the blank board in it's body casing. That's it. That's all the room I have for electronics.</div>
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6g4MyvQHsbJ3Zva3ZAYtruOh97Xg5i21IE8IJswqYPyZpCwyIcOX0ooYq5o8974G6sChciR4L0eraqi5BZ4L2Sut2-GyXrIPbp_C8e_O-pVy1Jxmaqaz-PBtxwhT4eL8IZ8tr3I2fb7qp/s1600/IMG_20140521_125533.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6g4MyvQHsbJ3Zva3ZAYtruOh97Xg5i21IE8IJswqYPyZpCwyIcOX0ooYq5o8974G6sChciR4L0eraqi5BZ4L2Sut2-GyXrIPbp_C8e_O-pVy1Jxmaqaz-PBtxwhT4eL8IZ8tr3I2fb7qp/s1600/IMG_20140521_125533.jpg" height="320" width="263" /></a></div>
<span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large;">Luckily, an Attiny84 in socket, as well as a power connector and the ISP header all fit exactly on the board! I couldn't have asked for a better fit!</span><br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-hDes1pYbiA0/U30cW0jPqeI/AAAAAAAAAgo/mH_udSVW868/s1600/IMG_20140521_125721.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://1.bp.blogspot.com/-hDes1pYbiA0/U30cW0jPqeI/AAAAAAAAAgo/mH_udSVW868/s1600/IMG_20140521_125721.jpg" height="400" width="225" /></a></div>
<span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large;">The <a href="http://www.sharpsma.com/webfm_send/1208" target="_blank">Sharp </a></span><span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;"><a href="http://www.sharpsma.com/webfm_send/1208" target="_blank">GP2Y0A21YK Infrared Distance Sensor</a> is hotglued onto the stub that held the original Dancing bot's head, and the LiPo battery is velcroed onto the front of the body.</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-3HPUCQk-NUk/U30cXfqyT7I/AAAAAAAAAgs/nmdcDInvEh0/s1600/IMG_20140521_125840.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-3HPUCQk-NUk/U30cXfqyT7I/AAAAAAAAAgs/nmdcDInvEh0/s1600/IMG_20140521_125840.jpg" height="320" width="284" /></a></div>
<span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large;">Here, the ATtiny84 control board is placed into the body for sizing. </span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-LPyxjSDKT0w/U31dcMMbLZI/AAAAAAAAAh0/LaS0FfBEMEQ/s1600/dancing_brushbot.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://1.bp.blogspot.com/-LPyxjSDKT0w/U31dcMMbLZI/AAAAAAAAAh0/LaS0FfBEMEQ/s1600/dancing_brushbot.jpg" height="400" width="316" /></a><span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large; text-align: start;">Assembled, and ready to code. </span><span style="clear: right; color: #666666; display: inline !important; font-family: 'Trebuchet MS', sans-serif; font-size: large; margin-bottom: 1em; margin-left: 1em;">I've placed the AA battery in the picture to demonstrate the size of this guy.</span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<a href="http://2.bp.blogspot.com/--LQBqj7gEIE/U30cYRjuuaI/AAAAAAAAAhA/ikVwhJLAZlk/s1600/IMG_20140521_170237.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/--LQBqj7gEIE/U30cYRjuuaI/AAAAAAAAAhA/ikVwhJLAZlk/s1600/IMG_20140521_170237.jpg" height="400" width="252" /></a><a href="http://2.bp.blogspot.com/-WUgNYS6F9XA/U30cZqh-liI/AAAAAAAAAhI/ROu7_goEczQ/s1600/IMG_20140521_170245.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://2.bp.blogspot.com/-WUgNYS6F9XA/U30cZqh-liI/AAAAAAAAAhI/ROu7_goEczQ/s1600/IMG_20140521_170245.jpg" height="400" width="232" /></a><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large; text-align: center;">Watch this space over the next few days, as I get this guy up and dancing... </span><br />
<span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large; text-align: center;"><br /></span>
<span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large; text-align: center;">(currently having problems with balance/center of gravity... this too will be conquered)</span><br />
<span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large; text-align: center;"><br /></span>
<span style="color: #666666; font-family: 'Trebuchet MS', sans-serif; font-size: large; text-align: center;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-EYmEL4Iqkcc/U4afbyvCmOI/AAAAAAAAAi0/WKRJRqEi_FE/s1600/brushbot_bb2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-EYmEL4Iqkcc/U4afbyvCmOI/AAAAAAAAAi0/WKRJRqEi_FE/s1600/brushbot_bb2.jpg" height="496" width="640" /></a></div>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-size: large;"><b><br /></b></span>
<span style="font-size: large;"><b>References:</b></span><br />
<br />
<a href="http://highlowtech.org/?p=1695" target="_blank"> Programming an ATtiny w/ Arduino 1.0</a><br />
<a href="http://letsmakerobots.com/node/31379" target="_blank">LetsMakeRobots: Mogul - Program standalone ATtiny / ATmega chips through an Arduino </a><br />
<a href="http://letsmakerobots.com/node/39996" target="_blank">LetsMakeRobots: Ladvien - Robot Metallurgy 101 -- AVR Lesson Journal </a><br />
<a href="http://letsmakerobots.com/content/attiny85-h-bridge-ldr-robot" target="_blank">LetsMakeRobots: attiny85 h-bridge ldr robot</a><br />
<a href="http://letsmakerobots.com/blog/lumi/tinyspider" target="_blank">LetsMakeRobots: Lumi - TinySpider</a><br />
<a href="http://www.iheartrobotics.com/2009/12/upgrade-led-hexbug-hack.html" target="_blank">http://www.iheartrobotics.com/2009/12/upgrade-led-hexbug-hack.html</a><br />
<br />
<br />
<!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F1.bp.blogspot.com%2F-LPyxjSDKT0w%2FU31dcMMbLZI%2FAAAAAAAAAh0%2FLaS0FfBEMEQ%2Fs1600%2Fdancing_brushbot.jpg&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://1.bp.blogspot.com/-LPyxjSDKT0w/U31dcMMbLZI/AAAAAAAAAh0/LaS0FfBEMEQ/s1600/dancing_brushbot.jpg" -->security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0tag:blogger.com,1999:blog-676382518143071514.post-25820719360779896922014-05-16T13:21:00.000-07:002014-05-28T19:45:19.842-07:00Upcoming fun project with dual Brushbot and ATtiny84...<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;">While I'm waiting on parts (extruder, beated bed, and hotend) for my <a href="http://arduino-pi.blogspot.ca/2014/05/arduino-pid-library-for-position.html" target="_blank">RepScrap 3D printer</a>, I thought I would have a bit more fun...</span><br />
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;"><br /></span>
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;">Someone sent me this hilarious video, and it started me thinking...</span><br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/UCJ5jzsXzYQ?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;">I frequently attend various vendor trade shows, and invariably, the vendors hand out useless trinkets as advertising... I usually do one of three things with these... </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"> 1) anything electronic gets tossed into the parts bin, </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"> 2) anything of a "toy" nature goes to my children </span><span style="color: #666666; font-family: Trebuchet MS, sans-serif;">(yes, I got that order straight)</span><span style="color: #666666; font-family: Trebuchet MS, sans-serif;"> </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"> 3) everything else gets tossed them into the garbage.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-l7VHYcU5WUE/U3ZcPB_6CGI/AAAAAAAAAec/UTS6v_vW5cw/s1600/IMG_20140516_121618.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-l7VHYcU5WUE/U3ZcPB_6CGI/AAAAAAAAAec/UTS6v_vW5cw/s1600/IMG_20140516_121618.jpg" height="111" width="200" /></a></div>
<a href="http://3.bp.blogspot.com/-Vnga00hdnpc/U3ZcP_7ylRI/AAAAAAAAAeg/rKfTLAathgM/s1600/IMG_20140516_140653.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-Vnga00hdnpc/U3ZcP_7ylRI/AAAAAAAAAeg/rKfTLAathgM/s1600/IMG_20140516_140653.jpg" height="200" width="147" /></a><br />
<br />
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"> So I happen to have a pair of these "electronic devices" in my parts bin. I think they are commercially known as "<a href="http://www.hexbug.com/nano/" target="_blank">Hexbot Nanos</a>" </span><br />
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;">They would effectively replace the toothbrush head and pager motor in the above video....</span><br />
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;">But I also received one of these little wind up distractions to the left here... </span><br />
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;">Mechanical spring wound clockworks makes him do a little dance... </span><br />
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;">For some strange reason, he hadn't quite made it to the kids yet... hmmm....</span><br />
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="https://ytimg.googleusercontent.com/vi/v_CcBEZcUGg/0.jpg" height="266" width="320"><param name="movie" value="https://youtube.googleapis.com/v/v_CcBEZcUGg&source=uds" /><param name="bgcolor" value="#FFFFFF" /><param name="allowFullScreen" value="true" /><embed width="320" height="266" src="https://youtube.googleapis.com/v/v_CcBEZcUGg&source=uds" type="application/x-shockwave-flash" allowfullscreen="true"></embed></object></div>
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;">It looks like those Hexbots might just fit the bottom of his feet..... </span><br />
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;">Maybe I could run them directly from an ATtiny84 as in <a href="http://www.hizook.com/blog/2011/09/08/infrared-remote-controlled-rc-steerable-vibrobot-created-naghi-sotoudeh" target="_blank">THIS blog</a>... </span><br />
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;">yes, I know I should add a transistor to drive each motor, but when I looked up the current draw on a free running pager motor, low and behold they are around 20-40ma... well within the range of the ATtiny84 pins capability.</span><br />
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"><br /></span>
<br />
<div style="text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"> </span><strong>Current and RPM specs:</strong></div>
<div style="text-align: center;">
<br /></div>
<table border="1" cellpadding="1" cellspacing="1" style="text-align: center; width: 200px;">
<tbody>
<tr>
<td>Voltage</td>
<td>RPM</td>
<td>Current (free)</td>
<td>Current (stall)</td>
</tr>
<tr>
<td>1.5V</td>
<td>9700</td>
<td>17.5mA</td>
<td>120mA</td>
</tr>
<tr>
<td>3.0V</td>
<td>18420</td>
<td>22mA</td>
<td>260mA</td>
</tr>
<tr>
<td>5.0V</td>
<td>31900</td>
<td>32.1mA</td>
<td>420mA</td>
</tr>
</tbody>
</table>
<strong><br /></strong>
<strong></strong><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-hKlO81PoZ9E/U3ZcQ7G0R8I/AAAAAAAAAes/zXBZB5Of_TA/s1600/IMG_20140516_140808.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://1.bp.blogspot.com/-hKlO81PoZ9E/U3ZcQ7G0R8I/AAAAAAAAAes/zXBZB5Of_TA/s1600/IMG_20140516_140808.jpg" height="320" width="213" /></a><a href="http://3.bp.blogspot.com/-ovtpoZF5r80/U3Zsgw-qTGI/AAAAAAAAAfI/rPGA2uBo4s4/s1600/brushbot_bb.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-ovtpoZF5r80/U3Zsgw-qTGI/AAAAAAAAAfI/rPGA2uBo4s4/s1600/brushbot_bb.jpg" height="358" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;">Add a <a href="https://www.sparkfun.com/products/242" target="_blank">Sharp IR proximity sensor</a> onto his chest, a small LiPo battery on his back for balance, the gratuitous leds on the head, and I think we just may have ourselves the next project.... It doesn't get much simpler...</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;">(ok, ok... yes, I'll likely wire in a connector for the AVR programmer... but that's it... well... and maybe find another pager motor to replace the spring wound mechanism that makes him dance... but THATs it... really...</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif;">maybe...)</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #666666; font-family: Trebuchet MS, sans-serif; font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
I thought I would put this picture in, just to show the scale... <a href="http://4.bp.blogspot.com/-_a8O5pQOKhU/U3ZcRD24qzI/AAAAAAAAAe0/KrvWFGBOm1E/s1600/IMG_20140516_142356.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-_a8O5pQOKhU/U3ZcRD24qzI/AAAAAAAAAe0/KrvWFGBOm1E/s1600/IMG_20140516_142356.jpg" height="320" width="229" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://42bots.com/wp-content/uploads/2014/01/ATTiny84-ATTiny44-pinout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://42bots.com/wp-content/uploads/2014/01/ATTiny84-ATTiny44-pinout.png" height="143" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b><span style="font-family: Trebuchet MS, sans-serif; font-size: large;">References and prior art:</span></b></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://www.youtube.com/watch?v=4_4POEtLd_4" target="_blank">https://www.youtube.com/watch?v=4_4POEtLd_4</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://www.hizook.com/blog/2011/09/08/infrared-remote-controlled-rc-steerable-vibrobot-created-naghi-sotoudeh" target="_blank">http://www.hizook.com/blog/2011/09/08/infrared-remote-controlled-rc-steerable-vibrobot-created-naghi-sotoudeh</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://solarbotics.com/product/rpm2/" target="_blank">https://solarbotics.com/product/rpm2/</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://forum.arduino.cc/index.php/topic,6528.0.html" target="_blank">http://forum.arduino.cc/index.php/topic,6528.0.html</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://www.rcgroups.com/forums/showthread.php?t=322209" target="_blank">http://www.rcgroups.com/forums/showthread.php?t=322209</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://www.makershed.com/BrushBots_p/msbb.htm" target="_blank">http://www.makershed.com/BrushBots_p/msbb.htm</a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://lycomingrobotics.wikispaces.com/BrushBots" target="_blank">http://lycomingrobotics.wikispaces.com/BrushBots</a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />security-musingshttp://www.blogger.com/profile/08314220993941772374noreply@blogger.com0