tag:blogger.com,1999:blog-72702369557669922122024-02-08T02:07:31.769-08:00Error in Code HW & SWThis is what happens in life... then we get over itubunduhttp://www.blogger.com/profile/08429546711487262106noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-7270236955766992212.post-85627531195038352962013-03-13T17:30:00.002-07:002013-03-13T17:30:43.133-07:00Free Touchscreen in cheap car back-up monitor for Raspberry PiI have a great find to share with everyone, I found a resistive touchscreen sensor embeded in a cheap car back-up monitor that i was using for the Raspberry Pi.<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://4l3ekw.dm1.livefilestore.com/y1plwXFb20eYZ10b85Xmee6ZUnNQZI-OJItHWIKWEcWKEqmOnjKVY6vv9pp5IKxNNLoWX187m9sQzU4qAMUTSLkRyyLZyBP-XX6/P1060667.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://4l3ekw.dm1.livefilestore.com/y1plwXFb20eYZ10b85Xmee6ZUnNQZI-OJItHWIKWEcWKEqmOnjKVY6vv9pp5IKxNNLoWX187m9sQzU4qAMUTSLkRyyLZyBP-XX6/P1060667.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Cheap car back-up monitor for Raspberry Pi without the stand</td></tr>
</tbody></table>
As you can see, I have removed the stand/leg thing because it was standing in my way. I bought this from <a href="http://www.bestbuy.com/site/AGPtek+-+3.5%22+Active+Matrix+TFT+LCD+Car+Display/4921514.p?id=1218577554381&skuId=4921514">BestBuy </a>because I wanted it then and didn't want to wait for a week for one to ship from eBay (I overpaid by double I think).<br />
<br />
<a name='more'></a>The story goes like this. I received my Raspberry Pi almost a year ago and I wanted it to be stand-alone so I gathered a keyboard a mouse a power adapter and a screen for it. I wanted everything to be cheap so I went for this small screen thinking it will suffice for what I was doing.<br />
I haven't done much with the setup but recently I came across <a href="http://www.geeky-gadgets.com/portable-raspberry-pi-24-01-2013/">this portable Pi</a> and noticed the same screen as mine and all looked nice. The thing I wanted to do is to modify my screen as well to work off of 5V. I followed that guide and the hack was done.<br />
<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://4l3ekw.dm1.livefilestore.com/y1plwXFb20eYZ0IhQEqnsyATympBz9fZjL2-7xQOB8XW0SRrULoDN0YtlcB-zpB3sceS0eGQ0uAx04QBNdSkuhMC-EwWKYRfT49/P1060670.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://4l3ekw.dm1.livefilestore.com/y1plwXFb20eYZ0IhQEqnsyATympBz9fZjL2-7xQOB8XW0SRrULoDN0YtlcB-zpB3sceS0eGQ0uAx04QBNdSkuhMC-EwWKYRfT49/P1060670.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Cheap car back-up monitor modified to work on 5V </td></tr>
</tbody></table>
As you can see all you need is a red wire to the small cap and a black wire (it is the one crossing over the red one) soldered to the plug's original black wire. I didn't want to cut the original power source or use the cable since I might accidentally put 12V instead of 5V.<br />
I wanted to test it before putting it back together to make sure everything works. Results were good and was ready to put it together.<br />
<br />
<b>Now the interesting part</b><br />
I don't know why I looked, but I unscrewed the PCB and looked at the screen and saw 2 things standing out:<br />
1.This is pretty normal, a set of thicker wires connected to the ribbon cable to provide power to the back-lite of the screen (on the back of the ribbon cable facing the display) <br />
<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://4l3ekw.dm1.livefilestore.com/y1pN4r8Fmd01UgyZi_y1hbQkUlXwcco1O4NZSYOxrUJ99DPar3WY5Zgca0e5FZORc39gnatdV4FC-r0cCLVAuqKfcE-adE0pp9w/P1060671.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://4l3ekw.dm1.livefilestore.com/y1pN4r8Fmd01UgyZi_y1hbQkUlXwcco1O4NZSYOxrUJ99DPar3WY5Zgca0e5FZORc39gnatdV4FC-r0cCLVAuqKfcE-adE0pp9w/P1060671.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The back-light connector for the display</td></tr>
</tbody></table>
2. Another set of thick wires that at first appear to do the same thing (I attached wires to this later one to test my hunch).<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://4l3ekw.dm1.livefilestore.com/y1p7QpbvSNHqYdIrfiYbGoJbxHKwO3ogeh5d8ZlWXT5qJu7Jec-ErbVtKrPhAeg99fqYa-7Nk1eO-5-Ar5ZZOFYgDMvFeFZi_y8/P1060678.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://4l3ekw.dm1.livefilestore.com/y1p7QpbvSNHqYdIrfiYbGoJbxHKwO3ogeh5d8ZlWXT5qJu7Jec-ErbVtKrPhAeg99fqYa-7Nk1eO-5-Ar5ZZOFYgDMvFeFZi_y8/P1060678.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Another back-light connector for the display?</td></tr>
</tbody></table>
I might not seam like much, but having 2 thick connectors on a display usually says it has a touchscreen film on it. To be sure I separated the display from the cases. It is not hard but the front protective transparent plastic has glue on the black parts of it that keeps it together to the cases and the screen in place.<br />
If you look closely in my first image you will see that I cut off the whole transparent part of the outer layer to be able to reach the touch sensor.<br />
<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://4l3ekw.dm1.livefilestore.com/y1pN4r8Fmd01UjIiNewyGzTcVFchRp6CarG4l7C0MmbpHD6rxzqiSMFPcRahQZAxQvm9HRDCz7zJw7GqQ4cbi9XHH6hd1Z5YqdO/P1060673.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://4l3ekw.dm1.livefilestore.com/y1pN4r8Fmd01UjIiNewyGzTcVFchRp6CarG4l7C0MmbpHD6rxzqiSMFPcRahQZAxQvm9HRDCz7zJw7GqQ4cbi9XHH6hd1Z5YqdO/P1060673.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Touchscreen connector for the film attached to the display</td></tr>
</tbody></table>
As you can see, the previously mentioned connector goes on the outside of the display, now it is clear, this is a resistive touchscreen film because there is no way the back-light would be over the display, it needs to be under the polarized films and all of that.<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://4l3ekw.dm1.livefilestore.com/y1pN4r8Fmd01UgGk3VlVBauHU1HB989Mrou6LlQQjmRSWn0emgpwCpHWB706Z54Kjnqw0g_kJAeIUeG5nKT_C37pZpAm7CIbQm_/P1060674.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://4l3ekw.dm1.livefilestore.com/y1pN4r8Fmd01UgGk3VlVBauHU1HB989Mrou6LlQQjmRSWn0emgpwCpHWB706Z54Kjnqw0g_kJAeIUeG5nKT_C37pZpAm7CIbQm_/P1060674.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Touchscreen film over the cheap car back-up monitor</td></tr>
</tbody></table>
Here you can see better that there are some patterns on the edges of the screen.<br />
Now this makes perfect sense for anyone that has looked at this screen when turned on. The text is not quite clear and a bit hard to read, I suspect that the minuscule traces that are needed on this touchscreen film are the cause of some of the blurry details.<br />
Anyway this is a great find and I wanted to see if it works, so I researched what I needed to do and started build it. As you can see I soldered 4 wires to the connector (removing it from the ribbon connector all together) and then found a way to close everything up beautifully. Still I had to first cut the front casing to allow me to reach the display. This is what came out:<br />
<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://4l3ekw.dm1.livefilestore.com/y1p7QpbvSNHqYecG5yQIBSziglvFzo1Pmn9UrTcygCJ72vx4aLbbmU5oY6YO1kx7PqGprjqwYxqTV9Wb8lz5_rwv4PXY96Hxqxn/P1060675.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://4l3ekw.dm1.livefilestore.com/y1p7QpbvSNHqYecG5yQIBSziglvFzo1Pmn9UrTcygCJ72vx4aLbbmU5oY6YO1kx7PqGprjqwYxqTV9Wb8lz5_rwv4PXY96Hxqxn/P1060675.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Front casing cut off from the cheap car back-up monitor</td></tr>
</tbody></table>
<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://4l3ekw.dm1.livefilestore.com/y1pqzIkSKrSOjaZFzLZP5Aynh-osrQhuhBWl5w7jNCsl_ovmJtskxJ8rxcsdnbbGasqoqw048cPZH83q3lOsFeFi1jzxzWXDNji/P1060680.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://4l3ekw.dm1.livefilestore.com/y1pqzIkSKrSOjaZFzLZP5Aynh-osrQhuhBWl5w7jNCsl_ovmJtskxJ8rxcsdnbbGasqoqw048cPZH83q3lOsFeFi1jzxzWXDNji/P1060680.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Support leg removed from cheap car back-up monitor</td></tr>
</tbody></table>
<br />
<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://4l3ekw.dm1.livefilestore.com/y1puMXPwzbWHLMccobGX5nJTKrmjk9ZDT1tsOP5nFP1lIE7StLFn9nPOA-zNgopUljPYlEJvob4tincdfN2AL9WW3c07qQObLgb/P1060668.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://4l3ekw.dm1.livefilestore.com/y1puMXPwzbWHLMccobGX5nJTKrmjk9ZDT1tsOP5nFP1lIE7StLFn9nPOA-zNgopUljPYlEJvob4tincdfN2AL9WW3c07qQObLgb/P1060668.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Cheap car back-up monitor put back together</td></tr>
</tbody></table>
Removing the stand was easy, just peel way the tape and unscrew the 2 screws and pull on the leg. After that everything was put back and that is the final result.<br />
Now, to be able to use the touchscreen I needed a way to read the numbers. I found this great little stuff called the <a href="http://authenticinvention.com/ExtraCore/">ExtraCore</a>, just what I wanted small and powerful Arduino. I also needed a FTDI cable to be able to talk to it.<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://4l3ekw.dm1.livefilestore.com/y1phA0n-Mqwofq3elXUgNbYtR-_F57p7pdLkDYr8BzgesVt0CDVSXaw0asi2tfYPYdxCfQwze3Vb55JEaRXFuaXXI6P5_ETTUYf/P1060653.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://4l3ekw.dm1.livefilestore.com/y1phA0n-Mqwofq3elXUgNbYtR-_F57p7pdLkDYr8BzgesVt0CDVSXaw0asi2tfYPYdxCfQwze3Vb55JEaRXFuaXXI6P5_ETTUYf/P1060653.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">FTDI cable for ExtraCore side</td></tr>
</tbody></table>
<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://4l3ekw.dm1.livefilestore.com/y1phA0n-MqwofomXxW-IWzMhsGjwoq2yQFOfu04jEJV5n6jF5UBrXQvQQuznO1BB2FNONuZGHmbpC6bnAgg0R_fbd-4IPT1pAji/P1060657.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://4l3ekw.dm1.livefilestore.com/y1phA0n-MqwofomXxW-IWzMhsGjwoq2yQFOfu04jEJV5n6jF5UBrXQvQQuznO1BB2FNONuZGHmbpC6bnAgg0R_fbd-4IPT1pAji/P1060657.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">FTDI cable for ExtraCore front</td></tr>
</tbody></table>
<br />
I soldered up the headers to the ExtraCore and had everything ready to go. On the left is the FTDI connector (as it is clearly marked on the minuscule board).<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://4l3ekw.dm1.livefilestore.com/y1phA0n-Mqwofq-qRhamW_soyhJmnvZGGvt3jYElmmONps5zMdxGp4-s-4OSGKV_X1xhaDbLnqEm0QJT_HUJYs6ygCfqi8SGApE/P1060662.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://4l3ekw.dm1.livefilestore.com/y1phA0n-Mqwofq-qRhamW_soyhJmnvZGGvt3jYElmmONps5zMdxGp4-s-4OSGKV_X1xhaDbLnqEm0QJT_HUJYs6ygCfqi8SGApE/P1060662.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">My ExtraCore ready for work</td></tr>
</tbody></table>
<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://4l3ekw.dm1.livefilestore.com/y1puMXPwzbWHLOFV2lXwIi5h2cWn28m3BYJy6Ic5LnYGs9fngeNS59ppxzzSPu2_lVy5C0aG51RaUYZTTaTquf4HH_NRqn7SsS2/P1060663.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://4l3ekw.dm1.livefilestore.com/y1puMXPwzbWHLOFV2lXwIi5h2cWn28m3BYJy6Ic5LnYGs9fngeNS59ppxzzSPu2_lVy5C0aG51RaUYZTTaTquf4HH_NRqn7SsS2/P1060663.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">My ExtraCore back side</td></tr>
</tbody></table>
<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://4l3ekw.dm1.livefilestore.com/y1puMXPwzbWHLN8nSKUwaudYhJPfamJRG6iaAYXMmx3dzs4PCcqPiCF4Dr5qthPD4YXcJnr2668STnymbWYrgiDDREHSkAcGN1v/P1060665.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://4l3ekw.dm1.livefilestore.com/y1puMXPwzbWHLN8nSKUwaudYhJPfamJRG6iaAYXMmx3dzs4PCcqPiCF4Dr5qthPD4YXcJnr2668STnymbWYrgiDDREHSkAcGN1v/P1060665.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">My ExtraCore profile view</td></tr>
</tbody></table>
<br />
I didn't search a lot for code to make the touchscreen work but it is fairly confusing. All I can say that I used my favorite method of trying each combination until I got something that looked like it was usable. Seeing as all that the wires are connected to are just resistors, it won't hurt trying combination as there is nothing to burn or anything like that. I uploaded<a href="https://sourceforge.net/projects/arduinotouchscr/files/touchscreen.ino/download"> my code to SourceForge</a> to use it if you find it easier. I just modified it to work with my setup. Also to mention that those added wires to not simply connect to analog pins on the ExtraCore, they are also connected by resistors to GND. Doing this will ensure that you get a 0,0 when there is nothing touching the screen and a non-zero value when you are touching it.<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://4l3ekw.dm1.livefilestore.com/y1pqzIkSKrSOjb9KEspAG_sfl_7vwJ2_W-ZaCdFJlQ3_wGVDQBFQ_uIbTHwxe94wI4Eud8xxDAxZ2IexElEzNp5ZvikFeShdTaw/P1060682.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://4l3ekw.dm1.livefilestore.com/y1pqzIkSKrSOjb9KEspAG_sfl_7vwJ2_W-ZaCdFJlQ3_wGVDQBFQ_uIbTHwxe94wI4Eud8xxDAxZ2IexElEzNp5ZvikFeShdTaw/P1060682.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Connected touchscreen sensor to ExtraCore and sending data with the FTDI cable to PC</td></tr>
</tbody></table>
<br />
Having all this sorted out, now all that is needed is to make the RaspberryPi interpret these numbers as clicks and drags and everything else. This will be a fun thing to do, but I do hope there something out there that already does this.<br />
<br />
I know this is not such a huge find as finding a diamond or something, the resistive film would cost somewhere about $5 or so, but the advantage I see with this is the fact that it is pretty well integrated with the display and no added fussing around with films that are larger ore not the same aspect ratio, it is just there waiting to be used.<br />
<br />
I hope other people will find this useful and please leave a comment so I can see what this was used for and maybe someone will do the rest of the work? :)<br />
<br />
<br />
Enjoy!<br />
ubunduhttp://www.blogger.com/profile/08429546711487262106noreply@blogger.com29tag:blogger.com,1999:blog-7270236955766992212.post-71987959995432351642013-02-27T16:27:00.000-08:002013-02-27T16:27:57.519-08:00Arduino autonomous tracked robot build Part 3So I finally got to this step, my bodged together piece of code that makes my robot move. This is the last one in the series.<br />
<br />
I uploaded the code to SourceForge so anyone can take it and do whatever they want with it and maybe in the process someone will learn something. <a href="https://sourceforge.net/projects/trackedrobot/files/robot_tracks.ino/download">Here it is</a>.<br />
<br />
<a href="http://errincode.blogspot.com/2013/02/arduino-autonomous-tracked-robot-build.html">Arduino autonomous tracked robot build Part 1</a><br /><a href="http://errincode.blogspot.com/2013/02/arduino-autonomous-tracked-robot-build_25.html">Arduino autonomous tracked robot build Part 2</a><br />
Arduino autonomous tracked robot build Part 3 <br />
<a href="http://errincode.blogspot.com/2013/02/arduino-autonomous-tracked-robot-visual.html">Arduino autonomous tracked robot (visual post)</a><br />
<br />
I will start with the easy bits, the small functions and the bits that hold everything together. <br />
<br />
<a name='more'></a><br />
<b>First off, the # statements</b>.<br />
<i>#include <SoftwareServo.h><br />#include <IRremote.h><br />#include <IRremoteInt.h><br />#include <Ultrasonic.h><br /><br />#define PIN_IR 3<br />#define PIN_DETECT 2<br />#define PIN_TEMP A2 </i><br />
<br />
Because I had trouble with my DIY IR sensor I couldn't use the standard Servo library so I had to use the <a href="http://playground.arduino.cc/ComponentLib/servo">SoftwareServo </a>library. For my sensor I used the <a href="http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html">IRRemote</a> library and for the eyes I used the <a href="http://letsmakerobots.com/node/30209">Ultrasonic</a> library, I see now that there is a <a href="http://code.google.com/p/arduino-new-ping/">new library</a> that could perform better but I am not sure it will work on my setup because of the whole IR thing going on.<br />
Also I set the Infrared LED pins to digital 3, the infrared sensor to digital 2 and a temperature sensor to analog 2 just because I had one around. Using this actually helped me see if the motor shield is working with my butchered plugs.<br />
<br />
<b>Global variables.</b><br />
<i>Ultrasonic ultra(4,5);<br />IRsend irsend;<br />//servo sweep variables<br />SoftwareServo myservo; //the Servo pin 6<br />int CenterPos = 95; //forward centered position<br />int val[3]; //the 3 values in the 3 directions<br />int Pas=40; // used to change direction</i><br />
<br />
Next I define some variables that will be used. So starting from the first, the <i>ultra</i> variable will be the ultrasonic sensor that is on digital pins 4 and 5. Then I declare my servo (that will be assigned the pin later) and some helper variables. The <i>CenterPos</i> variable holds the approximate value that will be sent to the servo for forward looking direction (a bit offset from 90 because I was not precise enough when gluing things together, but it's ok, it is easier to fix things in software than hardware). A vector to keep the values read by the ultrasonic sensor: <i>v[0]</i> holds what it saw to the left, <i>v[1]</i> what it saw in front and <i>v[2] </i>to the right. <i>Pas </i>is used for the offset from center looking position. Left position for the ultrasonic sensor is at a value of <i>CenterPos+Pas</i>, right is <i>CenterPos-Pas</i>.<br />
<br />
<i>//for motor shield<br />int dirA1 = 8;<br />int dirA2 = 11;<br />int dirB1 = 12;<br />int dirB2 = 13;<br /><br />int speedA = 9;<br />int speedB = 10;</i><br />
<br />
From the <a href="http://www.seeedstudio.com/wiki/Motor_Shield_V1.0">shield wiki page</a> these are the variables that need to be used in order for the motors to work. The first 4 give the direction of each motor so if A1 and A2 are the same that the left motor will receive a stop command; if they are different it will receive a go clockwise or anticlockwise depending on the values (same goes for B1 and B2). The PWM signal that will be sent to the two motors is from pins 9 and 10 and using the <i>sppedA</i> and <i>speedB</i> variables.<br />
<br />
<i>//constants<br />int velocity = 70; //max speed<br />int turnTime = 5;// how much to turn or goBackwards <br />int stopDistance = 20; // safe distance<br />int turnOffsetVel = 25;//extract from velocity some speed when turning or going back</i><br />
<br />
I defined some "constants" as a reference, a top value for the PWM cycle, <i>velocity</i>, when to stop if an object is too close, <i>stopDistance</i>, and offset velocity to subtract from top speed when turning or going back.<br />
<br />
<i>//variables<br />int spd = 0; //speed to go at<br />int forb = 0; //forward (1) or backward (-1)<br />int time = 0; // how much time is left on move<br /><br />int standing = 1; //if not moving search for direction<br />int wentBack = 0; //previous move is backwards<br /><br />//my track is not good set an offset speed for right track<br />int brokenTrack = 7;</i><br />
<br />
And this is the end of the setup, a current speed <i>spd</i>, something to tell me if it is going forward or back <i>forb</i>, and the <i>time</i> left on the current move. I mentioned before that I use time (as in delay) to tell the distance it should travel and stuff like that.<br />
Now the weird part is that my robot would turn even when going forward, the right track kept moving a bit slower than the left one. I tried to switch the 2 channels but then the left one was slower, so it is not a hardware issue. My conclusion was that either the chip in the motor shield or the motor shield itself has a small defect. My solution was, again, to fix it in software, so I always take care to put something extra when giving commands to the right track. <br />
<br />
<b>The functions</b>.<br />
First is the <i>init</i> function that is self explanatory. I setup some pins for output and some for input, attach the servo to pin 6, setup the <i>irsend</i> object and finally issue a stop command to both motors.<br />
Now skipping to the end of the file and working my way back, there is a function there that converts the reading from the temperature sensor into degrees Celsius (because that is what makes sense to me) called <i>GetTemp</i>.<br />
Then the <i>CanBackup </i>function that returns <i>1</i> if there aren't any obstacles in back and <i>0</i> if there are.<br />
The <i>GetDistance</i> function returns the values of the ultrasonic reading and because there are some occasional problems it my return a <i>0</i> I made it return <i>100</i> in those cases since the actual value of <i>0</i> is very unlikely to happen. <br />
So I broke down the whole code in small pieces because it is easier to maintain and understand. Following are the simple functions that allow movement.<br />
<br />
<i>void StopSpeed()<br />{<br /> spd = 0;<br /> forb = 0;<br /> time = 0;<br /> digitalWrite(speedA,LOW);<br /> <br /> digitalWrite(speedB,LOW);<br /> standing = 1;<br />}</i><br />
And the first one is the one that does the opposite of what I said, this is how I stop the robot. Set everything to <i>0</i> and write a digital <i>LOW</i> as the speed.<br />
<br />
<i>void TurnLeft()<br />{<br /> time = turnTime;<br /> spd = velocity-turnOffsetVel;<br /> digitalWrite (dirA1, LOW);<br /> digitalWrite (dirA2, HIGH);<br /> <br /> digitalWrite (dirB1, HIGH);<br /> digitalWrite (dirB2, LOW);<br /> <br /> analogWrite(speedA,spd);<br /> analogWrite(speedB,spd+brokenTrack);<br /> standing = 0;<br />}</i><br />
<br />
and <i>TurnRight()</i> functions are the same except for the direction of each track (marked by the opposite values that each corresponding variables receives A1-B1 A2-B2). Apart from that, all that is needed is to set the <i>time</i> for the turn and speed of the tracks (not full speed). Also note that my right track needs a bit more power then the left one.<br />
<br />
<i>void GoForward(int fast)<br />{<br /> int offset = brokenTrack;<br /> if (fast == 1) offset =brokenTrack * 3.7;<br /> digitalWrite (dirA1, HIGH);<br /> digitalWrite (dirA2, LOW);<br /> <br /> digitalWrite (dirB1, HIGH);<br /> digitalWrite (dirB2, LOW);<br /> <br /> analogWrite(speedA,spd);<br /> analogWrite(speedB,spd+offset);<br /> standing = 0;<br /> forb = 1;<br /> time = -1;//continous<br />}</i><br />
This is what it is all about. Going straight ahead(-ish). This function has a parameter, it indicates if the robot is at full speed or not. Full speed is used when there are no obstacles for miles (in this case more than 4 time the <i>StopDistance</i>) or at normal speed when there is something close ahead. <i>spd</i>, or the speed of the robot, is not set in the function, it is set outside before it was called. Now because the acceleration is not linear, the offset for my slow track needs to be adjusted, I used a factor I found close enough when testing. Also note the same values for dir*1 variables and dir*2 variables and the value given for <i>time</i>. -1 is used to denote continuous operation, because you always want to go forward unless you have to navigate an obstacle.<br />
<br />
<i>void GoBackword()<br />{<br /> digitalWrite (dirA1, LOW);<br /> digitalWrite (dirA2, HIGH);<br /> <br /> digitalWrite (dirB1, LOW);<br /> digitalWrite (dirB2, HIGH);<br /> <br /> analogWrite(speedA,spd);<br /> analogWrite(speedB,spd+brokenTrack);<br /> standing = 0;<br /> wentBack = 1;<br /> time = 2*turnTime;<br /> forb = -1;<br />}</i><br />
This one is similar to the previous one as the <i>spd</i> is not given in the function, the dir*1 and dir*2 variable have same values and the <i>time</i> variable is given double the time of the turn mechanics.<br />
<br />
In keeping with the idea of showing the simple stuff, there are 2 more functions that are around there.<br />
<br />
<i>void WaitForServo()<br />{<br /> int t = 10;<br /> while(t)<br /> {<br /> delay(50);<br /> t--;<br /> SoftwareServo::refresh();<br /> }<br />}</i><br />
This function is basically just a delay. Because I am using the software servo I have to give it some time for the servo to get in the desired position. While normally a simple delay would do, the fact that you can't have a large delay without affecting the position of the servo, a call to <i>refresh()</i> is needed every so often.<br />
<i> </i><br />
void LookAhead()<br />{<br /> //look left<br /> myservo.write(CenterPos + Pas);<br /> //delay(500);<br /> WaitForServo();<br /> val[0] = GetDistance();<br /> Serial.print(val[0]);<br /> Serial.println(" stanga");<br /> <br /> myservo.write(CenterPos);<br /> //delay(500);<br /> WaitForServo();<br /> val[1] = GetDistance();<br /> Serial.print(val[1]);<br /> Serial.println(" center");<br /> <br /> myservo.write(CenterPos - Pas);<br /> //delay(500);<br /> WaitForServo();<br /> val[2] = GetDistance();<br /> Serial.print(val[2]);<br /> Serial.println(" dreapta");<br /> //delay(500);<br /> WaitForServo();<br /> <br /> myservo.write(CenterPos);<br /> WaitForServo();<br /> <br /> time = -1;<br />}<i><br /></i><br />
<i> </i>This is used to check what is in front and to the sides. It has 3 steps that do the same thing only in different direction:<br />
<ul>
<li>set the desired position of the servo</li>
<li>wait for it to get there</li>
<li>read the distance in the appropriate variable</li>
</ul>
Also note that at the end, the servo is returned to the center position. There are some commented out <i>delay</i> calls that make it clear that I found out the hard way that you need to wait for the hardware to get in position, it might seem simple but it took me some time to figure out.<br />
<br />
<b>Now the hard functions</b>.<br />
I am in no way implying that this is the best approach but this is how I've done it.<br />
<br />
<i>void loop() <br />{ <br /> //return; //TODO<br /> if(standing == 1)<br /> {<br /> LookAhead();<br /> MovingForward();<br /> }<br /><br /> if ( time != 0)<br /> {<br /> if(forb == 1)<br /> {<br /> MovingForward();<br /> }<br /> else if (forb == -1)<br /> {<br /> if(!CanBackup())<br /> { <br /> StopSpeed(); <br /> }<br /> }<br /> time --;<br /> }<br /> else<br /> {<br /> StopSpeed();<br /> }<br /> //Serial.print(GetTemp());<br /> //Serial.println(" grade C");<br /> delay(200); <br /> SoftwareServo::refresh();<br />}</i><br />
My <i>loop</i> function is concise and easy to understand. If you are standing look ahead and go forward. If there is a move action currently being executed (denoted by the <i>if time!=0</i> statement) then if we are moving forward continue to do so if not then we must be going back; in that case check if we can continue to go back, if not we need to stop. If <i>time</i> has ran out we need to stop.<i> </i> <br />
<br />
<i>void MovingForward()<br />{<br /> //if comming from a reverse something is blocking left right and center ahead<br /> if(wentBack == 2)<br /> {<br /> ChooseLorR(); <br /> return;<br /> }<br /> <br /> <br /> if(val[0] > stopDistance) //left clear<br /> {<br /> if(val[2] > stopDistance) // right clear<br /> {<br /> if(val[1] >= 4*stopDistance)<br /> {<br /> Serial.print(spd);<br /> Serial.println(" far ahead");<br /> spd = velocity;<br /> GoForward(1);<br /> }<br /> else if(val[1] < 4*stopDistance && val[1] > stopDistance)<br /> {<br /> Serial.println("near ahead");<br /> spd = velocity /2;<br /> GoForward(0);<br /> }<br /> else <br /> {<br /> Serial.println("stopped");<br /> StopSpeed();<br /> LookAhead();<br /> ChooseLorR();<br /> }<br /> }<br /> else<br /> {<br /> TurnLeft();<br /> Serial.println("turning left");<br /> }<br /> }<br /> else if(val[2] > stopDistance) // right clear<br /> {<br /> TurnRight();<br /> Serial.println("turning right");<br /> } <br /> else<br /> {<br /> spd = velocity-turnOffsetVel;<br /> GoBackword();<br /> }<br /> <br /> val[1] = GetDistance();<br />}</i><br />
<i></i><br />
This is what you can call the heart of the brain (if that makes any sense), the main decision maker.<br />
We start with a look to see if we just went back, that means that all ahead is blocked and we need to choose to go left or right.<br />
If that is not the case then<br />
<ul>
<li>if both left and right are clear and there is nothing ahead, maximum warp;</li>
<li>if left and right are clear but there is something ahead, be cautious and slowly go ahead;</li>
<li>if left and right are clear than stop the collision course and look to the left or right to set a new course;</li>
<li>if left is clear but right is not clear then you should go left to be sure;</li>
<li>if left is not clear but right is, then right is the right path to take;</li>
<li>and if all fails go back and try again (I mean the robot needs to go back, not you).</li>
</ul>
Always remember to take a new reading of what is ahead at the end.<br />
<br />
And the last function (oh god this was long)<br />
<i>void ChooseLorR()<br />{<br /> if(val[0] > stopDistance) // left clear<br /> {<br /> if(val[2] > stopDistance) //right clear<br /> {<br /> if(val[0] > val[2])// left is more clear<br /> {<br /> TurnLeft();<br /> Serial.println("turning left both clear");<br /> }<br /> else<br /> {<br /> TurnRight();<br /> Serial.println("turning right both clear");<br /> }<br /> }<br /> else<br /> {<br /> TurnLeft();<br /> Serial.println("turning left no f");<br /> }<br /> }<br /> else<br /> {<br /> if(val[2] > stopDistance) //right clear<br /> {<br /> TurnRight();<br /> Serial.println("turning right no f");<br /> }<br /> else<br /> {<br /> spd = velocity-turnOffsetVel;<br /> GoBackword();<br /> }<br /> }<br />}</i><br />
As it's name implies this will try and choose a path in the right direction, even if it is the left one.<br />
<ul>
<li>if left and right are clear than if left is "more" clear go that way else go to the right</li>
<li>if only left is clear go left</li>
<li>if only right is clear go right</li>
<li>and finally go back and try again if none of the above are clear</li>
</ul>
I think this is it for the whole code. Once again you can <a href="https://sourceforge.net/projects/trackedrobot/files/robot_tracks.ino/download">download the sketch</a> from SourceForge.<br />
After writing everything in words I think I finally understand how my code works. I hope someone gets at least a laugh out of my attempt at an autonomous arduino tracked robot and maybe can show me the errors of my way, because this can't be the easiest way to go about this.<br />
It's still the middle of the week but I see a Saturday on the horizon. Enjoy!<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />ubunduhttp://www.blogger.com/profile/08429546711487262106noreply@blogger.com0tag:blogger.com,1999:blog-7270236955766992212.post-90740951719415043592013-02-25T22:39:00.001-08:002013-02-27T16:31:18.506-08:00Arduino autonomous tracked robot (visual post)This is a post with the video of my robot in action along with all the photos I have of it. Enjoy!<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/ljCktmOshAY?feature=player_embedded' frameborder='0'></iframe></div>
And the photo gallery below. (and links to the build).<br />
<br />
<a href="http://errincode.blogspot.com/2013/02/arduino-autonomous-tracked-robot-build.html">Arduino autonomous tracked robot build Part 1</a><br />
<a href="http://errincode.blogspot.com/2013/02/arduino-autonomous-tracked-robot-build_25.html">Arduino autonomous tracked robot build Part 2</a><br />
<a href="http://errincode.blogspot.com/2013/02/arduino-autonomous-tracked-robot-build_27.html">Arduino autonomous tracked robot build Part 3</a> <br />
Arduino autonomous tracked robot (visual post)<br />
<br />
<a name='more'></a><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://n7vifw.dm1.livefilestore.com/y1pofj6wXQFHssQAPlt34t1qKFTrzYkphoF2yrFw9Bppc8r_cbVZGouNcJrTWC2vePavLpiHi-p5o0957-cfrbz4qsjsWPbCWO7/P1060060.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pofj6wXQFHssQAPlt34t1qKFTrzYkphoF2yrFw9Bppc8r_cbVZGouNcJrTWC2vePavLpiHi-p5o0957-cfrbz4qsjsWPbCWO7/P1060060.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot</td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pofj6wXQFHsvSo4aiV66H7JKKabF8ec1jjKZ3dwcFZiJywoIY1XFG2EhXAIazxWtdv9xKSojjYd11QuOfPT0pEsqVQC05KISI/P1060058.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pofj6wXQFHsvSo4aiV66H7JKKabF8ec1jjKZ3dwcFZiJywoIY1XFG2EhXAIazxWtdv9xKSojjYd11QuOfPT0pEsqVQC05KISI/P1060058.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot</td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pofj6wXQFHsug8_-3x-11t_nTK2C1RfZRgyUqR_19tdwyAGZ3GtyAq0vRmA_GBHXLBz_8OUV1-0FZ_r61svykNfodC5e04wiF/P1060059.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pofj6wXQFHsug8_-3x-11t_nTK2C1RfZRgyUqR_19tdwyAGZ3GtyAq0vRmA_GBHXLBz_8OUV1-0FZ_r61svykNfodC5e04wiF/P1060059.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot</td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pYvXWryVPkD2QIQXDKvOlchHs-QZRQ23Jy8Ukdcnqqmd08oHCRGW5lXIy5nOB2rpPq9Vletk1vOZvdNOsKsCZEXW0dFPlPkme/P1060061.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pYvXWryVPkD2QIQXDKvOlchHs-QZRQ23Jy8Ukdcnqqmd08oHCRGW5lXIy5nOB2rpPq9Vletk1vOZvdNOsKsCZEXW0dFPlPkme/P1060061.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot</td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pYvXWryVPkD3etREJ1HUzywLDrqejZEp_MzqdKqNDnxcXfZo6iYF-80mQe443oDOm8aOGsJdnO0rfIFSB2gbkbjMIbIJRbdbI/P1060063.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pYvXWryVPkD3etREJ1HUzywLDrqejZEp_MzqdKqNDnxcXfZo6iYF-80mQe443oDOm8aOGsJdnO0rfIFSB2gbkbjMIbIJRbdbI/P1060063.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pYvXWryVPkD0PNdB2vJqyoLb03ofFTnd_LYCVlJPz2AC4djS-J7yK2HmKywYN1_IRUUMvoPqEv5QHWco2944-XIVIS9TQLHVS/P1060062.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pYvXWryVPkD0PNdB2vJqyoLb03ofFTnd_LYCVlJPz2AC4djS-J7yK2HmKywYN1_IRUUMvoPqEv5QHWco2944-XIVIS9TQLHVS/P1060062.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1p7ToTwV6aKHOSFQ9_zQAlQxmUrAp1KLTacSv0ECxzywxk9gS5ppWXGeeBk2MAnbBNftUVDLTl6stM2EPnpvMmW_NsVNp5ltO0/P1060064.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1p7ToTwV6aKHOSFQ9_zQAlQxmUrAp1KLTacSv0ECxzywxk9gS5ppWXGeeBk2MAnbBNftUVDLTl6stM2EPnpvMmW_NsVNp5ltO0/P1060064.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pYvXWryVPkD0uOiRnTZCihj9-juNna-THwrk4WTeHRGlILh_Kbkf5AOpVGofHQh_KGtF1pgrehtvNcN-m5zCris9oQIZi7Pb4/P1060066.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pYvXWryVPkD0uOiRnTZCihj9-juNna-THwrk4WTeHRGlILh_Kbkf5AOpVGofHQh_KGtF1pgrehtvNcN-m5zCris9oQIZi7Pb4/P1060066.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1p7ToTwV6aKHNhSt0JEDDYxja44ErN-98rHSfjPKJ1urx2BdNLLglFhJjdEvYLQUHgBzSSizd-FI--J32WkUDx7yWUdbg8dLut/P1060065.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1p7ToTwV6aKHNhSt0JEDDYxja44ErN-98rHSfjPKJ1urx2BdNLLglFhJjdEvYLQUHgBzSSizd-FI--J32WkUDx7yWUdbg8dLut/P1060065.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pnkHtyfiEEo7-d-xCRr7BjEZOhPL88VJRTJWc2TfDgIkbxeUFXLz-LD6e3evyJA4XbkiEq8s6-820qSqQRoagJusTY8hp3uf4/P1060067.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pnkHtyfiEEo7-d-xCRr7BjEZOhPL88VJRTJWc2TfDgIkbxeUFXLz-LD6e3evyJA4XbkiEq8s6-820qSqQRoagJusTY8hp3uf4/P1060067.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<br />
<table align="center" 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://n7vifw.dm1.livefilestore.com/y1p7ToTwV6aKHOBzsNlRfyxso83JBychPzi6WvSa3z3isF8RqPoAO5dm3nvjpwEljUFob-1g21nstRm9FEQoBJL-Nf9PDPPwt6K/P1060068.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1p7ToTwV6aKHOBzsNlRfyxso83JBychPzi6WvSa3z3isF8RqPoAO5dm3nvjpwEljUFob-1g21nstRm9FEQoBJL-Nf9PDPPwt6K/P1060068.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pnkHtyfiEEo7_rv886aUty70ighDGiQc2_p2fS6Wro49-rxDXsNv7fW8z3getTUyEcAE-iT3jIjKxP4iNC2YaDszvHlc2hVJD/P1060069.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pnkHtyfiEEo7_rv886aUty70ighDGiQc2_p2fS6Wro49-rxDXsNv7fW8z3getTUyEcAE-iT3jIjKxP4iNC2YaDszvHlc2hVJD/P1060069.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pnkHtyfiEEo5gh6ahoTdUs9w3g0u4CXeGqIugC7kq-V8njLK_9BRUf_g98aVrAfZ02faw7w-za-Q1DZWyLlnfsWUEp1E_nZfI/P1060071.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pnkHtyfiEEo5gh6ahoTdUs9w3g0u4CXeGqIugC7kq-V8njLK_9BRUf_g98aVrAfZ02faw7w-za-Q1DZWyLlnfsWUEp1E_nZfI/P1060071.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pzXzb3U6CANGUkS63GczMzIyQkW_B5L_4dYE2rnxOS9BJUIQMUBQoU5v4G_l2Wq3v0hIZCeI_zKUiZYvJ7gQ6XnVJXzmpQ9bn/P1060070.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pzXzb3U6CANGUkS63GczMzIyQkW_B5L_4dYE2rnxOS9BJUIQMUBQoU5v4G_l2Wq3v0hIZCeI_zKUiZYvJ7gQ6XnVJXzmpQ9bn/P1060070.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pzXzb3U6CANHGBdFOMn7oNolEf7jy_w1ipzRqrgoLZ4dQd_oh0GorIauO8_Cci-Xs4vTLrophXaCmNlAjoOrmOz7gNarSw8WJ/P1060072.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pzXzb3U6CANHGBdFOMn7oNolEf7jy_w1ipzRqrgoLZ4dQd_oh0GorIauO8_Cci-Xs4vTLrophXaCmNlAjoOrmOz7gNarSw8WJ/P1060072.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pzXzb3U6CANFa21DQCEvWcwfg5490gridagDyh6FbFQ7ZBc9cf7q2GJW4ElHuRDgKmg2u7vqJih7-uyCygNoP9YMWfWREqLdL/P1060073.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pzXzb3U6CANFa21DQCEvWcwfg5490gridagDyh6FbFQ7ZBc9cf7q2GJW4ElHuRDgKmg2u7vqJih7-uyCygNoP9YMWfWREqLdL/P1060073.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pO7mWsjIIuY50uUzgHd6w4TLWFZqFRz27LQw7gWpwgF_NosJDkPmLImbuMjTksRTNNK3k9BGrhOwEk8xHLyTA2V3BqryEAd5O/P1060074.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pO7mWsjIIuY50uUzgHd6w4TLWFZqFRz27LQw7gWpwgF_NosJDkPmLImbuMjTksRTNNK3k9BGrhOwEk8xHLyTA2V3BqryEAd5O/P1060074.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pO7mWsjIIuY4EdhNKUBLq9FHzwZO_wsyjnWMMnfMmWS5vLCMvUIFyPt9F2lWynUyf_OWGCyDy95n1XB5foIJ3FhNggFGLF5IK/P1060075.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pO7mWsjIIuY4EdhNKUBLq9FHzwZO_wsyjnWMMnfMmWS5vLCMvUIFyPt9F2lWynUyf_OWGCyDy95n1XB5foIJ3FhNggFGLF5IK/P1060075.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pO7mWsjIIuY6LS64QsYdRy003sVBHQ4-XVl1MG4_0fYoBiFu8fnlkqD_zilm75J3Lja6QPP5SFAc1IpQckrxTREG0mMEqG932/P1060076.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pO7mWsjIIuY6LS64QsYdRy003sVBHQ4-XVl1MG4_0fYoBiFu8fnlkqD_zilm75J3Lja6QPP5SFAc1IpQckrxTREG0mMEqG932/P1060076.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pO7mWsjIIuY78mLvRQyouHx_wIyxHBYib4RoIVARQDRsxfXKnwtOG1sSlZUWYNYBdMqkm8sXNjgED4MvH2MotI1Xnd71NEgs_/P1060078.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pO7mWsjIIuY78mLvRQyouHx_wIyxHBYib4RoIVARQDRsxfXKnwtOG1sSlZUWYNYBdMqkm8sXNjgED4MvH2MotI1Xnd71NEgs_/P1060078.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pUwcUfzkncdAi7yDbbED4xWXltT4Cc200eBAS7PmCJuWM8kZXtvdGxO2SYgiwtoGsy3PqLmjNdmE4yRdPA4F27AitCrAwbYa-/P1060077.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pUwcUfzkncdAi7yDbbED4xWXltT4Cc200eBAS7PmCJuWM8kZXtvdGxO2SYgiwtoGsy3PqLmjNdmE4yRdPA4F27AitCrAwbYa-/P1060077.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pUwcUfzkncdCG5r3WhGPyV5KpB-KT1dg_Cy4-zoxPfJVBwjK7EdvWUClX3egeuRXcWEAfC26H3f5mDHYQzACAK0yl5kNqUUeM/P1060079.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pUwcUfzkncdCG5r3WhGPyV5KpB-KT1dg_Cy4-zoxPfJVBwjK7EdvWUClX3egeuRXcWEAfC26H3f5mDHYQzACAK0yl5kNqUUeM/P1060079.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pUwcUfzkncdAWkCoaDnKqqi0CBoywVLkPij3CDbcEyi2l7GmJnMeOW2NhAavkUn-lGzrmPk6_BWONO1D98s_GwuWWzPbsQrxp/P1060080.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pUwcUfzkncdAWkCoaDnKqqi0CBoywVLkPij3CDbcEyi2l7GmJnMeOW2NhAavkUn-lGzrmPk6_BWONO1D98s_GwuWWzPbsQrxp/P1060080.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVl-SfWxzIT7PJfLl1OVJwsCQ9O8oSWbzpyRgx0bCwkANwGH2TZbVfkl3LJx0D818jo4GtX7tvK0vnM0QX2Pivv0/P1060081.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVl-SfWxzIT7PJfLl1OVJwsCQ9O8oSWbzpyRgx0bCwkANwGH2TZbVfkl3LJx0D818jo4GtX7tvK0vnM0QX2Pivv0/P1060081.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVkbO1uqxzDZqCbodCrOS7p7tL_9TxBwRv25UiTHMuU1pTzRs2Dzt_hdgS-WUjl0r8lMQBvMX6xc0_713IWcHw27/P1060082.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVkbO1uqxzDZqCbodCrOS7p7tL_9TxBwRv25UiTHMuU1pTzRs2Dzt_hdgS-WUjl0r8lMQBvMX6xc0_713IWcHw27/P1060082.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVkzIod4RyHLjh7g0ph71yOvEUIYVghtA_rVZ81vRtxbfM_v63wOxNd7R1mqyexuxhcA0ubbDAruYKoEPzyXudOz/P1060131.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVkzIod4RyHLjh7g0ph71yOvEUIYVghtA_rVZ81vRtxbfM_v63wOxNd7R1mqyexuxhcA0ubbDAruYKoEPzyXudOz/P1060131.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVmUBELEMuDjdDrOMp72SWd10Wiig5Ms3veoMUjml09ZVwP4jVz0JZfrHLNqlq_Ht4mJMDQ8PO2dYw3UYdGZfbvq/P1060083.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVmUBELEMuDjdDrOMp72SWd10Wiig5Ms3veoMUjml09ZVwP4jVz0JZfrHLNqlq_Ht4mJMDQ8PO2dYw3UYdGZfbvq/P1060083.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVmGRX0f5sJaBN-HTuqPciukuYDkdT2_rwDOLmfswe0LAHLi5GageY7TcDhvmGnC4FM551DXi50KX1eoR0-e42nO/P1060132.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVmGRX0f5sJaBN-HTuqPciukuYDkdT2_rwDOLmfswe0LAHLi5GageY7TcDhvmGnC4FM551DXi50KX1eoR0-e42nO/P1060132.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot</td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pep-GvzT2x91a1fbJXLsfeao-4UBO72rXsFpTs3zQZ96_jhdgazSkdmGGk5FmYcEngcxRr5CR_nkD3o84KbXcY7wldlfqhU-O/P1060133.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pep-GvzT2x91a1fbJXLsfeao-4UBO72rXsFpTs3zQZ96_jhdgazSkdmGGk5FmYcEngcxRr5CR_nkD3o84KbXcY7wldlfqhU-O/P1060133.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pep-GvzT2x937NubMhTlM6gojHPZD2Kk81keANGG-UXJ0kV_o5FO5UL9P_Ty8vFud6TeSDX5jWxGdG-rsRnf2kxuwTjTFg8d8/P1060134.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pep-GvzT2x937NubMhTlM6gojHPZD2Kk81keANGG-UXJ0kV_o5FO5UL9P_Ty8vFud6TeSDX5jWxGdG-rsRnf2kxuwTjTFg8d8/P1060134.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pep-GvzT2x93E91bqtO1vSq5qqCvXJIBaVi1ezit2teWqJdwSauz3h2jDjAE42bCMFX9q9iLcG2J0uhYx8pK9Rd_OuEJaiGXn/P1060135.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pep-GvzT2x93E91bqtO1vSq5qqCvXJIBaVi1ezit2teWqJdwSauz3h2jDjAE42bCMFX9q9iLcG2J0uhYx8pK9Rd_OuEJaiGXn/P1060135.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino tracked autonomous robot </td></tr>
</tbody></table>
<br />
<br />
<br />
<br />
<br />ubunduhttp://www.blogger.com/profile/08429546711487262106noreply@blogger.com0tag:blogger.com,1999:blog-7270236955766992212.post-69798548851822811712013-02-25T19:48:00.005-08:002013-02-27T16:31:28.992-08:00Arduino autonomous tracked robot build Part 2<br />
<b>On to the actual construction of the tank.</b><br />
Basically it is made from Tamiya kits, the tracks and gearbox one kit and the platform and diverse small parts in another. I bought them from a local hobby shop and that cost me a lot more than expected but that is my problem. It should be fairly cheap if you source the parts from the source and not third party vendors like I did.<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://n7vifw.dm1.livefilestore.com/y1pYvXWryVPkD0uOiRnTZCihj9-juNna-THwrk4WTeHRGlILh_Kbkf5AOpVGofHQh_KGtF1pgrehtvNcN-m5zCris9oQIZi7Pb4/P1060066.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://n7vifw.dm1.livefilestore.com/y1pYvXWryVPkD0uOiRnTZCihj9-juNna-THwrk4WTeHRGlILh_Kbkf5AOpVGofHQh_KGtF1pgrehtvNcN-m5zCris9oQIZi7Pb4/P1060066.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino autonomous tracked rebot</td></tr>
</tbody></table>
This is the final version of the robot but there were several iterations until I got to this and unfortunately I don't have photos of those but I can still share my experience.<br />
<br />
<a href="http://errincode.blogspot.com/2013/02/arduino-autonomous-tracked-robot-build.html">Arduino autonomous tracked robot build Part 1</a><br />
Arduino autonomous tracked robot build Part 2<br />
<a href="http://errincode.blogspot.com/2013/02/arduino-autonomous-tracked-robot-build_27.html">Arduino autonomous tracked robot build Part 3</a> <br />
<a href="http://errincode.blogspot.com/2013/02/arduino-autonomous-tracked-robot-visual.html">Arduino autonomous tracked robot (visual post)</a><br />
<a name='more'></a><br />
My first build of the platform was way too long, it was spanning double supporting boards (the white/transparent base you see in the picture) and was very high. I also had two dual gearboxes, I bought that separately and one was not a perfect fit on the board (strange since that is from the same company) but has the same gear ratio. I managed to make everything work (and they did work in harmony I might add). It had a lot of power and could actually climb a vertical surface (like that coffee table the picture is taken on) and it would flip over without problems. The thing was that it did not corner (sounds like an american car); on my carpet, it would loose the treads and stop moving.<br />
<br />
After more modifications I got to this form factor. It still has it faults but it is stable. Because of the way the Ultrasonic sensor hangs out, the whole tank is tipping a bit towards the front but it still works (I try to counter this with the position of the battery). The only problem is when it decelerates, the Ping sensor will be aimed downwards and it will register an obstacle, sometimes.<br />
<br />
<b>Next up is the basic components.</b><br />
As you can see the platform has a dual gearbox with two 3V motors in them. As they came from the kit there are naked, meaning just wires connected to them. The motors, in my opinion need to have some capacitors to ease the problem of back currents and spikes. So<b> I added a 0.5 uF</b> to each motor.<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://n7vifw.dm1.livefilestore.com/y1pO7mWsjIIuY6LS64QsYdRy003sVBHQ4-XVl1MG4_0fYoBiFu8fnlkqD_zilm75J3Lja6QPP5SFAc1IpQckrxTREG0mMEqG932/P1060076.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://n7vifw.dm1.livefilestore.com/y1pO7mWsjIIuY6LS64QsYdRy003sVBHQ4-XVl1MG4_0fYoBiFu8fnlkqD_zilm75J3Lja6QPP5SFAc1IpQckrxTREG0mMEqG932/P1060076.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Capacitors added to the gearbox of the Arduino tracked robot</td></tr>
</tbody></table>
I know this helps, even if you don't notice it, and even if it does not help, for a few cents they are worth it.<br />
<br />
Since I'm on the subject of locomotion I will tell you what is actually providing power to the motors.<br />
Let me start with the bad first. I bought an Arduino motor from RadioShack (a bit expensive) but I hoped it worked.<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://n7vifw.dm1.livefilestore.com/y1pep-GvzT2x937NubMhTlM6gojHPZD2Kk81keANGG-UXJ0kV_o5FO5UL9P_Ty8vFud6TeSDX5jWxGdG-rsRnf2kxuwTjTFg8d8/P1060134.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pep-GvzT2x937NubMhTlM6gojHPZD2Kk81keANGG-UXJ0kV_o5FO5UL9P_Ty8vFud6TeSDX5jWxGdG-rsRnf2kxuwTjTFg8d8/P1060134.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino motor shield</td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pep-GvzT2x93E91bqtO1vSq5qqCvXJIBaVi1ezit2teWqJdwSauz3h2jDjAE42bCMFX9q9iLcG2J0uhYx8pK9Rd_OuEJaiGXn/P1060135.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pep-GvzT2x93E91bqtO1vSq5qqCvXJIBaVi1ezit2teWqJdwSauz3h2jDjAE42bCMFX9q9iLcG2J0uhYx8pK9Rd_OuEJaiGXn/P1060135.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arduino motor shield back</td></tr>
</tbody></table>
<br />
When testing this bit everything seems to work fine; my test were a couple of seconds long, just to figure how to write the sketch to move the robot. In my first major test I had the whole platform together and let it move forward, back ,left, right for a minute or so. I then noticed that the chip on the shield was getting very hot. By the way, I am powering this with a 11.7V 3 cell lipo battery from my RC helicopter. The shield takes from 12 to 5 V as input and also powers the Arduino. I do need to mention that the first tests were ran with two dual gearboxes in parallel meaning that there were a total of 6 volts going to each track and that it was not even set to half throttle.<br />
I tried to see if using only one dual gearbox will make a difference but it didn't, the chip (this version of it, the L298<b>P</b>) requires a heatsink addon and I didn't want to mess with the shield so I looked for a different one.<br />
In comes the SeeedStudio motor shield. <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://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVmGRX0f5sJaBN-HTuqPciukuYDkdT2_rwDOLmfswe0LAHLi5GageY7TcDhvmGnC4FM551DXi50KX1eoR0-e42nO/P1060132.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVmGRX0f5sJaBN-HTuqPciukuYDkdT2_rwDOLmfswe0LAHLi5GageY7TcDhvmGnC4FM551DXi50KX1eoR0-e42nO/P1060132.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SeeedStudio Arduino Motor Shield</td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pep-GvzT2x91a1fbJXLsfeao-4UBO72rXsFpTs3zQZ96_jhdgazSkdmGGk5FmYcEngcxRr5CR_nkD3o84KbXcY7wldlfqhU-O/P1060133.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pep-GvzT2x91a1fbJXLsfeao-4UBO72rXsFpTs3zQZ96_jhdgazSkdmGGk5FmYcEngcxRr5CR_nkD3o84KbXcY7wldlfqhU-O/P1060133.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Back of SeeedStudio Arduino Motor Shield</td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVkzIod4RyHLjh7g0ph71yOvEUIYVghtA_rVZ81vRtxbfM_v63wOxNd7R1mqyexuxhcA0ubbDAruYKoEPzyXudOz/P1060131.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVkzIod4RyHLjh7g0ph71yOvEUIYVghtA_rVZ81vRtxbfM_v63wOxNd7R1mqyexuxhcA0ubbDAruYKoEPzyXudOz/P1060131.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SeeedStudio Arduino Motor Shield</td></tr>
</tbody></table>
As you ca see from these photos this shield uses the L298<b>N</b> chip with a huge heatsink attached. Ironically it says "hot surface" but in my tests you could only say it got warm to the touch. This shield came in with a problem of it's own: the connectors on it are non-standard, non-commercially available plugs or adapters, not even in a huge $200 case kit (in which I looked in details at RadioShack) with different parts from the same Seeedstudio company. Not to mention that the code I written until then had to be redone.<br />
<br />
The software problem is not that bad, as an SDE I am faced with rewriting and redesigning programs a lot so that was just a setback but the hardware problem got me for a while. I wanted to solder wires directly and bypass the whole stupid connectors but is would have been a pain to do so, I kept looking for solutions.<br />
<br />
I found something similar but not enough so at <a href="http://shop.vetcosurplus.com/catalog/product_info.php?cPath=72_480&products_id=14013">Vetco</a>. I bought those and started to shave them off bit by bit to make them work. In the end that did the trick, shaving the latch mechanism and a bit from the front part of the connector made them thin enough to fit in there. So I started making wires and connectors to things. Also to note that the way the shield provides these connectors are in 4 wires pair. All of them have a +5V a GND and 2 pins directly related to the Arduino (be it analog or digital pins and are clearly marked on the shield).<br />
<br />
<b>That's about it for the traction of the platform, on to the sensors.</b><br />
Since <a href="http://errincode.blogspot.com/2013/02/arduino-autonomous-tracked-robot-build.html">my DIY sensor</a> didn't go as expected, I needed a way for the robot to see and navigate and since I didn't want to pay for a Paralax Ping sensor from Radio Shack I ended up with a HC-SR04 Ultrasonic sensor for a third of the price. Now this was my first time using one so I don't know if it's my setup or me not knowing how to use it properly but the sensor does give some false readings sometimes (I don't know if the Paralax one would not give me false readings) and I ended up taking care of this in the code.<br />
<br />
Now that I sorted out the readings and had myself some eyes I mounted them to a servo so that they can look around. My IR sensor bites me in the ass again: using the IR library still screws with the IOs and makes it impossible to use the Servo library. After more reading and frustrations I stumbled upon the <a href="http://playground.arduino.cc/ComponentLib/servo">Software Servo</a> library that fixes my problem. Good thing I am using only one servo. To note that for this library to actually work, some rewriting of the code was needed again because of the necessity of fast loops (I was using fairly big delays in the loop as measurements of how much it should travel).<br />
So this is sorted out and the eyes are ready.<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://n7vifw.dm1.livefilestore.com/y1pzXzb3U6CANFa21DQCEvWcwfg5490gridagDyh6FbFQ7ZBc9cf7q2GJW4ElHuRDgKmg2u7vqJih7-uyCygNoP9YMWfWREqLdL/P1060073.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pzXzb3U6CANFa21DQCEvWcwfg5490gridagDyh6FbFQ7ZBc9cf7q2GJW4ElHuRDgKmg2u7vqJih7-uyCygNoP9YMWfWREqLdL/P1060073.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Left side of the HC-SR04 ultrasonic sensor</td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pO7mWsjIIuY4EdhNKUBLq9FHzwZO_wsyjnWMMnfMmWS5vLCMvUIFyPt9F2lWynUyf_OWGCyDy95n1XB5foIJ3FhNggFGLF5IK/P1060075.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pO7mWsjIIuY4EdhNKUBLq9FHzwZO_wsyjnWMMnfMmWS5vLCMvUIFyPt9F2lWynUyf_OWGCyDy95n1XB5foIJ3FhNggFGLF5IK/P1060075.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Right side of the HC-SR04 ultrasonic sensor</td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pO7mWsjIIuY50uUzgHd6w4TLWFZqFRz27LQw7gWpwgF_NosJDkPmLImbuMjTksRTNNK3k9BGrhOwEk8xHLyTA2V3BqryEAd5O/P1060074.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pO7mWsjIIuY50uUzgHd6w4TLWFZqFRz27LQw7gWpwgF_NosJDkPmLImbuMjTksRTNNK3k9BGrhOwEk8xHLyTA2V3BqryEAd5O/P1060074.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Front of the HC-SR04 ultrasonic sensor</td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVmUBELEMuDjdDrOMp72SWd10Wiig5Ms3veoMUjml09ZVwP4jVz0JZfrHLNqlq_Ht4mJMDQ8PO2dYw3UYdGZfbvq/P1060083.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1plfDQyqX0tVmUBELEMuDjdDrOMp72SWd10Wiig5Ms3veoMUjml09ZVwP4jVz0JZfrHLNqlq_Ht4mJMDQ8PO2dYw3UYdGZfbvq/P1060083.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Underside of the HC-SR04 ultrasonic sensor</td></tr>
</tbody></table>
<br />
As you can see, everything is kept together with hot glue and it actually feels quite sturdy. If you look closely you will see that I also glued the wires after I soldered them on to the ultrasonic sensor. I did this because after just a few minutes of looking around two of the wires came loose. I <b>do recommend</b> putting a dab of glue on that to alleviate the stress from the solder joint to the upper portion of the wires.<br />
<br />
So this concludes the build of my autonomous tracked robot platform. Next up is the easy part of the monster, the brains. <br />
Continue to Part 3ubunduhttp://www.blogger.com/profile/08429546711487262106noreply@blogger.com1tag:blogger.com,1999:blog-7270236955766992212.post-58194978523935307282013-02-23T13:31:00.001-08:002013-02-27T16:31:40.467-08:00Arduino autonomous tracked robot build Part 1So I am finally taking time to write about this one. I created the monster some time ago but I haven't have the chance to talk about it. This is a simple (yet it took me a bloody long time to complete) Arduino Uno, motor shield, Ping sensor, infrared sensor, autonomous robot.<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://n7vifw.dm1.livefilestore.com/y1pofj6wXQFHsvSo4aiV66H7JKKabF8ec1jjKZ3dwcFZiJywoIY1XFG2EhXAIazxWtdv9xKSojjYd11QuOfPT0pEsqVQC05KISI/P1060058.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://n7vifw.dm1.livefilestore.com/y1pofj6wXQFHsvSo4aiV66H7JKKabF8ec1jjKZ3dwcFZiJywoIY1XFG2EhXAIazxWtdv9xKSojjYd11QuOfPT0pEsqVQC05KISI/P1060058.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">My arduino autonomous tracked robot</td></tr>
</tbody></table>
So there it is, that picture explains everything, my job is done here :)<br />
<br />
Arduino autonomous tracked robot build Part 1<br />
<a href="http://errincode.blogspot.com/2013/02/arduino-autonomous-tracked-robot-build_25.html">Arduino autonomous tracked robot build Part 2</a><br />
<a href="http://errincode.blogspot.com/2013/02/arduino-autonomous-tracked-robot-build_27.html">Arduino autonomous tracked robot build Part 3</a><br />
<a href="http://errincode.blogspot.com/2013/02/arduino-autonomous-tracked-robot-visual.html">Arduino autonomous tracked robot (visual post)</a> <br />
<br />
<a name='more'></a>Let me start from the beginning.<br />
First think I tried to make and somewhat succeeded is the infrared distance sensor. Starting with<a href="http://www.instructables.com/id/DIY-Infrared-Proximity-Sensor-Arduino-Compatible/?ALLSTEPS"> this instructable</a> I built a small perfboard with 3 infrared LEDs and 1 38KHz infrared remote receiver; small simple cheap parts.<br />
<br />
Looking at the setup in the instructable I got the impression that you can actually have each LED controled separately, meaning that I didn't have to buy one of those expensive Ping sensors. That's the point I understood that this is a lot more difficult than expected. So the way that this sensor works is by pulsing the LED at close to as possible to 38KHz so that the remote sensor will see it. Following the instructions, I managed to use the center LED with the sensor just fine (when adding the straw piece over the diode). I then figured it would be equally easy to make use of the other 2 diodes independently so that I can have vision directly in front, to the left and to the right.<br />
<br />
'It doesn't work' is the short version. The long version... I don't really understand it but it goes something like this: the IR library, in order to pulse the LED that fast modifies one of the timers of the Arduino and thus makes certain pins unusable in the normal fashion. The timer are directly related to the PWM functions as in pin 3 can be used to drive the LED that way and that's it, that is a single timer/function.<br />
Now the Arduino<a href="http://playground.arduino.cc/Main/TimerPWMCheatsheet"> has 3 timers</a>, I assumed I can use these and all will be good. Again, it doesn't work. After failing horribly I found out that I can use one of the other 2 timers to drive another LED <b>but</b> I wouldn't be able to use the Arduino to also drive a motor shield because Timer1 controls the pins used by all motor shields, pins 9 and 10, and Timer0 is a general purpose timer that is used by all of the pins and internal workings (it will screw with analog to digital conversion and other stuff).<br />
<br />
<br />
I abandoned this idea and linked all the LEDs together and decided to use this just as a reverse sensor.<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://n7vifw.dm1.livefilestore.com/y1pnkHtyfiEEo7_rv886aUty70ighDGiQc2_p2fS6Wro49-rxDXsNv7fW8z3getTUyEcAE-iT3jIjKxP4iNC2YaDszvHlc2hVJD/P1060069.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pnkHtyfiEEo7_rv886aUty70ighDGiQc2_p2fS6Wro49-rxDXsNv7fW8z3getTUyEcAE-iT3jIjKxP4iNC2YaDszvHlc2hVJD/P1060069.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Front of the 38KHz IR sensor bar</td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pnkHtyfiEEo5gh6ahoTdUs9w3g0u4CXeGqIugC7kq-V8njLK_9BRUf_g98aVrAfZ02faw7w-za-Q1DZWyLlnfsWUEp1E_nZfI/P1060071.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pnkHtyfiEEo5gh6ahoTdUs9w3g0u4CXeGqIugC7kq-V8njLK_9BRUf_g98aVrAfZ02faw7w-za-Q1DZWyLlnfsWUEp1E_nZfI/P1060071.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Back of the 38KHz IR sensor bar</td></tr>
</tbody></table>
<br />
As you can see on the back there are only 4 wires, a common ground, +V for the sensor, another +V for the LEDs and a SIGNAL wire that reads the values of the sensor.<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://n7vifw.dm1.livefilestore.com/y1p7ToTwV6aKHOBzsNlRfyxso83JBychPzi6WvSa3z3isF8RqPoAO5dm3nvjpwEljUFob-1g21nstRm9FEQoBJL-Nf9PDPPwt6K/P1060068.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1p7ToTwV6aKHOBzsNlRfyxso83JBychPzi6WvSa3z3isF8RqPoAO5dm3nvjpwEljUFob-1g21nstRm9FEQoBJL-Nf9PDPPwt6K/P1060068.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Left side of 38KHz IR sensor bar</td></tr>
</tbody></table>
<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://n7vifw.dm1.livefilestore.com/y1pzXzb3U6CANGUkS63GczMzIyQkW_B5L_4dYE2rnxOS9BJUIQMUBQoU5v4G_l2Wq3v0hIZCeI_zKUiZYvJ7gQ6XnVJXzmpQ9bn/P1060070.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://n7vifw.dm1.livefilestore.com/y1pzXzb3U6CANGUkS63GczMzIyQkW_B5L_4dYE2rnxOS9BJUIQMUBQoU5v4G_l2Wq3v0hIZCeI_zKUiZYvJ7gQ6XnVJXzmpQ9bn/P1060070.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Right side of the 38KHz IR sensor bar</td></tr>
</tbody></table>
<br />
This was just the beginning.<br />
<br />
Continue to Part 2 ubunduhttp://www.blogger.com/profile/08429546711487262106noreply@blogger.com0tag:blogger.com,1999:blog-7270236955766992212.post-31443337370694728732013-02-22T13:32:00.001-08:002013-02-22T13:34:31.820-08:00Fast Image resizeing for space saving uploadsSince I started writing this blog there has been one thing that I have been doing manually that I feel like a burden. I take pictures (8MP) of things I build, then I have to download them to my computer and then sort them. After that I want to upload them to my SkyDrive but I have limited space so I have to shrink them. I use Gimp for this, but the manual way. I have read that you can script everything but it seems too hard.<br />
I decided to write my own application that does exactly what I need and not one thing more.<br />
<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://n7uz3q.dm1.livefilestore.com/y1pXQRJFzvtXlGPVJseaG_nouV24X55Mmbp67l2m6lrR-9jBgjuSK1id3t9UTMYGR6DS796nga4zoSiE0iRR2wkJounBTyyFRah/imageresizer.jpg?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://n7uz3q.dm1.livefilestore.com/y1pXQRJFzvtXlGPVJseaG_nouV24X55Mmbp67l2m6lrR-9jBgjuSK1id3t9UTMYGR6DS796nga4zoSiE0iRR2wkJounBTyyFRah/imageresizer.jpg?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">ImageResizer main window</td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<a name='more'></a><br />
My setup is simple but very peculiar to everyone else's. I put the images in my blog image folder, I create a folder to put the rejects (the ones I will not be uploading) and then create a backup of the files in a subfolder. And finally, after all this, I shrink the images to have a maximum of 1000px on any of the dimensions. Anyone can point out that this is not the right way (had arguments regarding my choices of organizing stuff) but it's the way I like it.<br />
<br />
So in comes my small app that has a small window with a text box in which you can drag and drop folders. For each folder it creates the backup folders and stores the files there and then shrinks the files in the given folder to a set maximum dimension.<br />
<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://n7uz3q.dm1.livefilestore.com/y1pXQRJFzvtXlF0fZ0cJitqvrKdKZOTrbu0HzM8hZ_erz_2ITv_tKdZcDBtz8GvrHwDuj9yShSkHNqN86Hs9OGnHmfn3kHYT7cx/imageresizersettings.jpg?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="198" src="https://n7uz3q.dm1.livefilestore.com/y1pXQRJFzvtXlF0fZ0cJitqvrKdKZOTrbu0HzM8hZ_erz_2ITv_tKdZcDBtz8GvrHwDuj9yShSkHNqN86Hs9OGnHmfn3kHYT7cx/imageresizersettings.jpg?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">ImageResizer settings window</td></tr>
</tbody></table>
I also used 2 persistent settings to ease the use of the app, one will save the maximum dimension you want and the other let's you skip over files that are actually smaller than what the desired size is. If you uncheck the last option, files will be enlarged to fit the requested dimensions.<br />
You can get the source over on <a href="http://sourceforge.net/p/imageresizer1/code/ci/b1df49e7b246e0b473f919a6d270ecdc745a4da0/tree/">SourceForge using git</a> or you can directly download the exe from here: <a href="http://sourceforge.net/projects/imageresizer1/files/Release.7z/download">Release.7z</a><br />
There is no explicit license attached to this so you can do whatever you want with it, I am happy if it helped someone else as well.<br />
<br />
As for the actual code itself, it is very straightforward. First of all you need to implement the DragEnter and DragDrop events so that the TextBox can handle you passing it some folders. I found <a href="http://stackoverflow.com/questions/1370538/drag-files-or-folders-in-textbox-c-sharp">this question</a> over on StackOverflow very helpful.<br />
<br />
You use the DragEnter event so that you get a visual cue that you are allowed to drag-drop over there and do the processing you need in the DragDrop event handler. This is all done sequentially so that means the UI will block when you give it folders that have some files in them. It can be improved if for example a ThreadPool was used to start threads for each folder that has been dropped. But since this has only one job to do, after the drag-drop you leave it alone to finish (also there is no cue that it has finished, apart from the fact that it starts responding to clicks).<br />
<br />
<a href="http://stackoverflow.com/questions/6501797/resize-image-proportionally-with-maxheight-and-maxwidth-constraints">Another question</a> on SO solved the problem of how to actually resize proportional the dimensions of the image. The top answer has a great way of determining the largest dimension only needing one Math.Min call.<br />
<br />
The only caveat of that code is that it does not know (or use) the original image format and thus uses the default. When testing that solution it was clear that I needed to give the actual ImageFormat parameter when saving the new image. The test: a 3MB image (8MP) saved without an ImageFormat came out as a 1.3MB image (1000px max dimension) as opposed to when I explicitly set the ImageFormat.Jpeg when it came out at ~100Kb (same max dimension).<br />
The way that I give the format is to look at the image extension. So the code used to save the image is like this:<br />
<br />
Image mare = Image.FromFile(file);<br />
string ext = Path.GetFileName(file);<br />
ext = ext.Replace(Path.GetFileNameWithoutExtension(file), "");<br />
Image mica = ScaleImage(mare, maxDimension, maxDimension); <br />
mare.Dispose();<br />
System.Drawing.Imaging.ImageFormat format = System.Drawing.Imaging.ImageFormat.Jpeg;<br />
switch (ext)<br />
{<br />
case ".BMP":<br />
case ".bmp": format = System.Drawing.Imaging.ImageFormat.Bmp;<br />
break;<br />
case ".PNG":<br />
case ".png": format = System.Drawing.Imaging.ImageFormat.Png;<br />
break;<br />
case ".JPG":<br />
case ".jpg": format = System.Drawing.Imaging.ImageFormat.Jpeg;<br />
break;<br />
default:<br />
format = System.Drawing.Imaging.ImageFormat.Jpeg;<br />
break;<br />
}<br />
mica.Save(file,format);<br />
<br />
<b>file </b>is a string that has the full path to a file;<br />
<b>ScaleImage</b> is the function stolen from SO question;<br />
This was developed in VisualStudio 2010 using .Net 4, you need to have the .Net 4 redistributable components for this app to run.<br />
<br />
I hope now that I will write more post because I got rid of one annoyance and it will be faster to do things in the future. Isn't it ironic that I didn't have to use the resizer for this post?<br />
<br />
Enjoy the last days of winter!<br />
<br />ubunduhttp://www.blogger.com/profile/08429546711487262106noreply@blogger.com2tag:blogger.com,1999:blog-7270236955766992212.post-74626218657567272982013-02-15T14:45:00.001-08:002013-04-01T17:30:41.346-07:00Adjustable LiPo battery charging circuitSo I found myself having a lot of small 1 cell lipo batteries from various devices and gadgets I took apart (broken before or after I disassembled them) and no way to charge them. Recently I found a small boost converter to power small 5V devices. It has a USB female jack on one end and 2 solder pads on the other. It uses anything from 1.5 to 4.5V to output the needed 5V at a maximum of 450mA. The batteries I have would be great but I have no way to use them multiple times. This is the result:<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://nebwuq.dm1.livefilestore.com/y1p2DUG2XjkAPXjuih2jVXZuBBG-3P2XnA81gRhCU-quBxIqCspk9f6sS7l4qNNABDxKYSIkUbe9ggubACeR9jEOHH7Awsanoo_/P1060139.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://nebwuq.dm1.livefilestore.com/y1p2DUG2XjkAPXjuih2jVXZuBBG-3P2XnA81gRhCU-quBxIqCspk9f6sS7l4qNNABDxKYSIkUbe9ggubACeR9jEOHH7Awsanoo_/P1060139.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">DIY lipo charger</td></tr>
</tbody></table>
It looks ugly but it does the job great.<br />
<br />
<a name='more'></a>Of course the idea is not mine and the only thing I did is to layout the components in a way that is easier to solder them together without an actual PCB. The instructions and component list you can find in <a href="http://shdesigns.dyndns.org/lionchg.html">this web site</a> and all credit goes to the author. This is the version 3 schematic with LED and variable charging current.<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://nebwuq.dm1.livefilestore.com/y1pR7xpCqL6R8ugCbGGDoxkF4pgQDlJ4E6iWWO3uJOkijXlmVsbiOGrfflbLivISuIXfPi6CwSXbwiGkIkxuwYV0IfY1memWLY6/diagram.png?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="307" src="https://nebwuq.dm1.livefilestore.com/y1pR7xpCqL6R8ugCbGGDoxkF4pgQDlJ4E6iWWO3uJOkijXlmVsbiOGrfflbLivISuIXfPi6CwSXbwiGkIkxuwYV0IfY1memWLY6/diagram.png?psid=1" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Circuit Diagram</td></tr>
</tbody></table>
<br />
<br />
At first I had no idea how big this will be and ended up wasting some space on the perfboard but this is ok as I do need space for the heatsink. One thing that I did is to separate the charging current selector from the main board with the help of some header pins. This allows me to either insert just the right resistor in the female pins and make this more compact or use the add-on board for different batteries.<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://nebwuq.dm1.livefilestore.com/y1p2DUG2XjkAPWHHF4NvAzOWBghP4JBp62rCBa-jfnpR8YjdJ8AOhBekyoQvqhU1KSOpdjBACoI0Wi4ieos_CMrIeaOlZYicsSP/P1060140.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://nebwuq.dm1.livefilestore.com/y1p2DUG2XjkAPWHHF4NvAzOWBghP4JBp62rCBa-jfnpR8YjdJ8AOhBekyoQvqhU1KSOpdjBACoI0Wi4ieos_CMrIeaOlZYicsSP/P1060140.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Close up of the lipo charger</td></tr>
</tbody></table>
<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://nebwuq.dm1.livefilestore.com/y1p2DUG2XjkAPU_aIHDUDtYOp46zFCARiusLWIg-buwTI7UXKvXTfEufY7s09Pep13dCy1p0j1Yv2cyniMeEP1PpUMSOBeZLsNe/P1060141.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://nebwuq.dm1.livefilestore.com/y1p2DUG2XjkAPU_aIHDUDtYOp46zFCARiusLWIg-buwTI7UXKvXTfEufY7s09Pep13dCy1p0j1Yv2cyniMeEP1PpUMSOBeZLsNe/P1060141.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The 2 boards of the lipo charger separated</td></tr>
</tbody></table>
<br />
As you can see the circuit is simple and every component is cheap. The most difficult part was sourcing the right trim potentiometer as I ended up buying 3 or 4 until I found the right one. I ended up doing 2 additional trips to the parts store because in the bin where all the 500 ohm pots were most of them where actually 50 ohm. When I went there the third time I grabbed my multimeter to make sure I will get the right one. Now that I have leftover parts (is there a case when you won't have leftovers?) I need to find another project to use them.<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://nebwuq.dm1.livefilestore.com/y1pWTnNx6YuOaHbyQLuJua4dXLergEkd5A9sm1ogmVPSDuoeHMOWfgkUIdVrK7uOCVeCT1dJ7QJahDYjdcNJh9OvpCX3qN5u0Oi/P1060142.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://nebwuq.dm1.livefilestore.com/y1pWTnNx6YuOaHbyQLuJua4dXLergEkd5A9sm1ogmVPSDuoeHMOWfgkUIdVrK7uOCVeCT1dJ7QJahDYjdcNJh9OvpCX3qN5u0Oi/P1060142.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">"main" board of the lipo charger</td></tr>
</tbody></table>
<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://nebwuq.dm1.livefilestore.com/y1pWTnNx6YuOaHb0YQ0IcN9ckK6-2wQ8TtKFvjb9FtZC3wO4SGbLJnew-p8JnfhzWD2vtMLJogw6-a7qnDLVOzk7CLPDMULZ1gP/P1060143.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://nebwuq.dm1.livefilestore.com/y1pWTnNx6YuOaHb0YQ0IcN9ckK6-2wQ8TtKFvjb9FtZC3wO4SGbLJnew-p8JnfhzWD2vtMLJogw6-a7qnDLVOzk7CLPDMULZ1gP/P1060143.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">back of the "main" board of hte lipo charger</td></tr>
</tbody></table>
<br />
Don't mind the crooked heatsink it has a notch that prevents it from sitting flush with the LM317. I will replace it soon because I feel it is too small, the LM317 really gets a bit hot to the touch when charging a small 3.7V 200mA lipo battery. It works but to be on the safe side it needs to be bigger (this is 'merica bigger is better). If I use 9V as input then it does not get hot at all, that is a solution as well, just use a closer to the output current.<br />
I am quite happy how this turned out as there are very few overlaps and this could actually be used for a PCB schematic.<br />
<br />
<table align="center" 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://nebwuq.dm1.livefilestore.com/y1pWTnNx6YuOaECxWdBDgszJITkwoN4hNVaLreDjnYh5Sj8SlE1HOF224jciGFrP8sKkcJCbXxhZM--TMLeCNYw2NTGEyTzFKwH/P1060144.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://nebwuq.dm1.livefilestore.com/y1pWTnNx6YuOaECxWdBDgszJITkwoN4hNVaLreDjnYh5Sj8SlE1HOF224jciGFrP8sKkcJCbXxhZM--TMLeCNYw2NTGEyTzFKwH/P1060144.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">current selection board of lipo charger</td></tr>
</tbody></table>
<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://nebwuq.dm1.livefilestore.com/y1p2bMrZgbbI51B6eBJ3p2XEMmaBb4_n4Z4PGE-qsYbHagzWjB31ODI0BchqWeDiifq_VARIJQ8l45Gx6IjbFWg8rIF9FxlCHJX/P1060145.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://nebwuq.dm1.livefilestore.com/y1p2bMrZgbbI51B6eBJ3p2XEMmaBb4_n4Z4PGE-qsYbHagzWjB31ODI0BchqWeDiifq_VARIJQ8l45Gx6IjbFWg8rIF9FxlCHJX/P1060145.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">back side of current selection board of lipo charger</td></tr>
</tbody></table>
This is very simple, just a board with switches and resistors. I did not have any 1W resistors at hand at first so the 1ohm resistor on switch 6 is 1/4W witch is not good for the current going through it and might burn out. I later added the 1ohm 1W resistor (guess which one) to be on the safe side. I don't have any batteries that need that many miliamps for charging but maybe I will have some in the future.<br />
This is about it for this project, I found it very useful and hope it helps.<br />
<br />
Good day to you sir!ubunduhttp://www.blogger.com/profile/08429546711487262106noreply@blogger.com0tag:blogger.com,1999:blog-7270236955766992212.post-33614876741902825022013-01-28T17:22:00.000-08:002013-01-28T17:38:31.043-08:00Testing the Sound Switcher board with an Arduino<div class="separator" style="clear: both; text-align: center;">
<a href="https://baqxxq.dm1.livefilestore.com/y1pdS1fl77tFM09qL4U_mS53-oYXS356S2m5KKFfP-ZejEQdoftgfy_klSJvQ5yoDHQFmQ_Rm_5gXLwEkN57b-xPInzP9r3KyKF/P1060088.JPG?psid=1" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a></div>
So after completing my <a href="http://errincode.blogspot.com/2013/01/soft-switch-sound-switcher-using-few.html">Sound Switcher</a> board (and updating it) I wanted to use it with a microcontroller. I have a couple of aux cables lying around and some headphones to hear what is coming out of the board. Using headphones though is not ideal as it will hurt my ears after some time, as writing and testing the Arduino sketch is going to take some time. Last night I found a self powered speaker so I will use that instead (it was only $5 so worth it, and even some decent sound coming from it). Here it is:<br />
<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://baqxxq.dm1.livefilestore.com/y1pdS1fl77tFM09qL4U_mS53-oYXS356S2m5KKFfP-ZejEQdoftgfy_klSJvQ5yoDHQFmQ_Rm_5gXLwEkN57b-xPInzP9r3KyKF/P1060088.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://baqxxq.dm1.livefilestore.com/y1pdS1fl77tFM09qL4U_mS53-oYXS356S2m5KKFfP-ZejEQdoftgfy_klSJvQ5yoDHQFmQ_Rm_5gXLwEkN57b-xPInzP9r3KyKF/P1060088.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Self Powered mini speaker</td></tr>
</tbody></table>
Yes, it does look like a microphone but it is actually a small speaker. It's quite ingenious, I took it apart and looked at it (forgot to take pictures) and the cool part is that it charges using the same 3.5mm input. Not<br />
ideal if you want to listen to it and charge it at the same time but still, quite portable.<br />
<br />
<br />
<a name='more'></a>So back to the testing. Well the most important part is to have everything ready. I am using a cheap mp4 player as one of the input and my phone as the other. Because I am short of a some male-to-female header jumper cables I am using a breadboard and some tricky use of header pins ( I do have some male-male and female-female header jumper cables). Here is the full setup:<br />
<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://baqxxq.dm1.livefilestore.com/y1pdS1fl77tFM1IYAtvreWGXP7SNZxj-9c-V8DP5VMsCY9Dq3fGWEoL4ZDiUT58FH9Lezta1bwg4DryBbMkg_PLP6CduZHdh4dC/P1060085.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://baqxxq.dm1.livefilestore.com/y1pdS1fl77tFM1IYAtvreWGXP7SNZxj-9c-V8DP5VMsCY9Dq3fGWEoL4ZDiUT58FH9Lezta1bwg4DryBbMkg_PLP6CduZHdh4dC/P1060085.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The full testing setup </td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
</div>
And a close up of the interesting parts. Ignore the Attiny85 in the picture, I will be using that at a later time.<br />
<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://baqxxq.dm1.livefilestore.com/y1pdS1fl77tFM35a7XFQhwMTAt90l_E7W5qglPnGT94YBNUE-VlT1o64BQ6fMNjM71X_Y3ucUa6OxeboCujTa5KzPOSnumC-11-/P1060090.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://baqxxq.dm1.livefilestore.com/y1pdS1fl77tFM35a7XFQhwMTAt90l_E7W5qglPnGT94YBNUE-VlT1o64BQ6fMNjM71X_Y3ucUa6OxeboCujTa5KzPOSnumC-11-/P1060090.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Test setup closeup</td></tr>
</tbody></table>
After fiddling around and having some problems with the setup I managed to make a sketch that works. It works for me at least, this is not guaranteed to work for everyone unless the resistors values are exactly the same. That being said the code should be easy to understand and modifications should only be needed for the global variables that define my observed reading of the nominal values coming from the monitor pin.<br />
<br />
<a href="https://sourceforge.net/projects/soundswitcer/files/">Here is the sketch</a>.<br />
<br />
The code is rather simple but I will go over the major parts of it.<br />
<br />
The 2 functions at the end are just for switching between the 2 sources;<span style="color: #444444;"><b> ListenToPhone()</b></span> and <span style="color: #444444;"><b>ListenToSound()</b></span>. That being said, you should notice that at no time will there be no input selected. This is to ensure that the value being read fluctuates as little as possible. If there is no input selected than the <span style="color: #444444;"><b>sensorValue</b></span> would be <b>0</b> (or below 2 taking into account stray currents).<br />
<br />
<b><span style="color: #444444;">//selectable source<br />int phonePin = 6;<br />//always on source<br />int soundPin = 7;</span></b><br />
<br />
These are my control pins for each channel, 6 left side and 7 right side.<br />
<br />
<b><span style="color: #444444;">int sensorPin = A1;</span></b><br />
<br />
I am only monitoring the left side so I only have one input pin setup, analog pin 1.<br />
<br />
<span style="color: #444444;"><b>int qvalue = 45;</b></span><br />
<br />
This variable holds the nominal value of the reading. So the sensing value will be something like this:<br />
<ul>
<li>0 (less than 2 to be exact) when there is not input <b>or </b>the monitored input is not selected</li>
<li>around 52 when there is only the selectable input and there is no sound coming through it</li>
<li>around 45 when there are 2 sources and there is no sound coming through the selectable input</li>
</ul>
This is a value that needs to change according to the sources and to the specific board that has been built. For example if I set my phone to less than have the maximum volume than the value would be somewhere around 48. The best combination of this and the <span style="color: #444444;"><b>delta </b></span>value needs to be found.<br />
<br />
<span style="color: #444444;"><b>int delta = 2;</b></span><br />
<br />
This variable is very important, this will give you false positives if it is too low and will dismiss some sounds from the input if it is too high and you will end up not hearing the beginning of the selectable input. <b>2</b> is a value that works for me; from what I saw the variance is somewhere around 1,2 and rarely 3. I want to make sure I don't miss anything that is why I set it to 2.<br />
<br />
<b><span style="color: #444444;">int IncomingSound = 0;</span></b><br />
<b><span style="color: #444444;">int LastHigh = 99;</span></b><br />
<b><span style="color: #444444;">int MaxSilence = 20;</span></b><br />
<br />
<b>IncomingSound </b>is used to signal that there should be sound comming from the selectable input. It is used as a boolean values so only 0 and 1 for this variable. <b>LastHigh </b>is counting the number of ticks (the number of time the <b>loop()</b> function has been called) since the last sensor reading was considered as positive (sound was coming from that input). <b>MaxSilance</b> keeps the number of ticks to keep the selectable input selected before going back to the default sound source when there has been no more positives sensor readings. The <b>loop()</b> function has a delay of 100 milliseconds so a value of 20 for the MaxSilence would give you approximately 2 seconds of silence before going back to the default source.<br />
<br />
Looking at the <b>loop()</b> function, it basically does the following:<br />
<ul>
<li>checks to see if the acceptable period of silence has passed so that it may mark it as no sound coming from the selectable input;</li>
<li>keeps the LastHigh variable to a maximum value of 100;</li>
<li>reads the monitoring pin;</li>
<li>mark as a high value if the sensor read more than 2 (meaning there is some input) and the reading deviates from the normal reading (qvalue) by more than the delta: the modulus of (qvalue - sensorValue) >= delta;</li>
<li>and last, based on the boolean value of <b>IncomingSound</b> set the correct input source.</li>
</ul>
The monitoring of the input only works because of the way sound is transmitted through the wires. Sound is transmitted as a variation of values. No sound means a constant value (in our case qvalue). When sound is emitted the value fluctuates creating a wave like pattern. This should help with the <a href="http://www.math.umn.edu/~rogness/math1155/soundwaves/">visualization part</a>. Because nothing is perfect (not the wires and not the connectors, not to mention that IRL there are losses at every level) we need to have a minimum variation before we call it a sound, this is what <b>delta</b> is used for.<br />
<br />
I left in the debug code that outputs to the serial port the values read so that it will be easier to note down the values you get when you have no sources, one source, 2 sources and different volume levels.<br />
<br />
Have fun with this and try to improve my sloppy work!<br />
<br />ubunduhttp://www.blogger.com/profile/08429546711487262106noreply@blogger.com0tag:blogger.com,1999:blog-7270236955766992212.post-83018870771609477142013-01-22T13:19:00.002-08:002013-01-28T17:23:29.508-08:00Soft switch sound switcher using a few 2N3904 and resistorsHaving two sound sources connected to the same output may be good for a while but sometimes you don't want to have both sources outputting sound at the same time and may want to switch between them. I wanted to be able to control this with a micro controller and not use a servo, so a mechanical switch is out of the question.<br />
<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://o41raa.dm1.livefilestore.com/y1pce9w2Bquc2yzCTxYhL6m_yne1TRTjBdW59L4IL-hEa_QH_H-yYLz9fvY-0choh1AlUcqGtxsr3S1YpupHzu4vU3ZBAV1lEF3/transistorswitch.jpg?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://o41raa.dm1.livefilestore.com/y1pce9w2Bquc2yzCTxYhL6m_yne1TRTjBdW59L4IL-hEa_QH_H-yYLz9fvY-0choh1AlUcqGtxsr3S1YpupHzu4vU3ZBAV1lEF3/transistorswitch.jpg?psid=1" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Transistor as switch</td></tr>
</tbody></table>
I know that you can use transistor as soft switches so I started researching how to build this.<br />
<br />
<a name='more'></a><br />
It seems that this is not something original as it has been done before. I actually found <a href="http://www.instructables.com/id/Sound-Switcher/?ALLSTEPS">this instructable</a> that does just that (and a lot more).<br />
Using that schematic and the same components I set out to build my own.<br />
My result is quite good but it is nothing you want to look at.<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://o41raa.dm1.livefilestore.com/y1pcCUJhWc8Gwi5Tgcw-KxrB-P0i7uNVcRW0Fd4NrU0XPdlQTiDCFChsRp0D9Uo1PVSxKL5jCKq4TLgt49hU1zdOYl__nm3W5gQ/P1060042.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://o41raa.dm1.livefilestore.com/y1pcCUJhWc8Gwi5Tgcw-KxrB-P0i7uNVcRW0Fd4NrU0XPdlQTiDCFChsRp0D9Uo1PVSxKL5jCKq4TLgt49hU1zdOYl__nm3W5gQ/P1060042.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Soft Switch audio switcher</td></tr>
</tbody></table>
<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://o41raa.dm1.livefilestore.com/y1pl7EszO9R8kWYw-MCC2z9vlnqc-PcHTe3sypmt0sPOaoYG3oMfDP9GKHPirYfmwmpOEAK-nso9Ao0sh10-2OOtMXk3q7ZlNRZ/P1060043.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://o41raa.dm1.livefilestore.com/y1pl7EszO9R8kWYw-MCC2z9vlnqc-PcHTe3sypmt0sPOaoYG3oMfDP9GKHPirYfmwmpOEAK-nso9Ao0sh10-2OOtMXk3q7ZlNRZ/P1060043.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Soft Switch audio Switcher back side</td></tr>
</tbody></table>
<br />
For the control I used standard header pins. I also clearly marked the output so there would be no confusion. The lonely pin near the output is the ground (haven't market it too well) and the other two correspond to the respective inputs.<br />
As I write this I am trying to figure out why the output has to be the output. The way I see it you can also have a continuous input and a selectable input while also having a mute function for the output if you would use as output one of the inputs.<br />
<br />
To test this, again I am using my <a href="http://errincode.blogspot.com/2013/01/small-ups-for-raspberrypi.html">battery </a>and <a href="http://errincode.blogspot.com/2013/01/power-small-finished-projects-from-usb.html">usb to header cable</a> although I think putting 5V for control is a bit much, using something like a 3V power supply for the control should be better as to not damage the transistors.<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://o41raa.dm1.livefilestore.com/y1p262fJhizWSqyd9kO6n5I9foMH1Z04GGAed7W1tBoyKTeJBGbfzXexRvcboyglC7VAq6YIFD9y5zZUuwqTa7DecFGDNN-y599/P1060057.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://o41raa.dm1.livefilestore.com/y1p262fJhizWSqyd9kO6n5I9foMH1Z04GGAed7W1tBoyKTeJBGbfzXexRvcboyglC7VAq6YIFD9y5zZUuwqTa7DecFGDNN-y599/P1060057.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Testing the Soft Switch audio switcher</td></tr>
</tbody></table>
This setup works well but you should know that powering both inputs at the same time will give you a lower volume to the output compared to only selecting one input. I think there are some crossing currents as both input devices can operate at different voltages and that might damage the one using lower voltage so I would recommend not to have both inputs selected for output. This is not a problem for me as I wanted just to switch from one to the other.<br />
<br />
Good luck and enjoy!<br />
<b><br /></b>
<b>Update</b><br />
<br />
I realized that I needed to add some pins for monitoring the inputs. I need this because i want to be able to select an input only if there is something playing on it. To do this I soldered on pin on each input plug to one of the legs. Make sure not to solder it to the middle pin as that is usually the ground.<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://baqxxq.dm1.livefilestore.com/y1pZmuBikljJsE7uc0Vp97-EXNqanyUU_-VqfPO-WDyNnp7kF_yyApil3SFoPx0pm9-tjqPoAgBL6EqVpfhIYN0l4N49juj-NCV/P1060095.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://baqxxq.dm1.livefilestore.com/y1pZmuBikljJsE7uc0Vp97-EXNqanyUU_-VqfPO-WDyNnp7kF_yyApil3SFoPx0pm9-tjqPoAgBL6EqVpfhIYN0l4N49juj-NCV/P1060095.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Monitoring pins to the Soft Switcher</td></tr>
</tbody></table>
<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://baqxxq.dm1.livefilestore.com/y1pZmuBikljJsHWK6aoMT7VJuAr4rIyNpwvsnHr83wm6XFe0f6QrIw58boXeovwhE9sZVo8Xi5kP8FfsaDxD7EsW35H9TntVgdJ/P1060096.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://baqxxq.dm1.livefilestore.com/y1pZmuBikljJsHWK6aoMT7VJuAr4rIyNpwvsnHr83wm6XFe0f6QrIw58boXeovwhE9sZVo8Xi5kP8FfsaDxD7EsW35H9TntVgdJ/P1060096.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Monitoring pins on the back side</td></tr>
</tbody></table>
<br />
Check out my testing of the board <a href="http://errincode.blogspot.com/2013/01/testing-sound-switcher-board-with.html">here</a>.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />ubunduhttp://www.blogger.com/profile/08429546711487262106noreply@blogger.com0tag:blogger.com,1999:blog-7270236955766992212.post-3690934010596302962013-01-18T13:03:00.001-08:002013-01-22T13:26:41.573-08:00Using LM317T to simulate LIPO batteryI have a few battery operated devices (rechargeable) that I wouldn't mind using only connected to a power source. So I started to find a way to replace a LIPO cell with a power supply. The first (and easiest) answer to this problem is using a LM317 as a power source.<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://o41raa.dm1.livefilestore.com/y1p29Yx4YRIZiNBJoiuR6z_6A0nerl4cEnQmkqImC_j12_MqGYj514ohDOCbhsZmPJvQ9FXfl4i-QwmaXpKoPOW7CrHugX4lhNd/LM317-typical-adjustable-regulator-ckt.png?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="202" src="https://o41raa.dm1.livefilestore.com/y1p29Yx4YRIZiNBJoiuR6z_6A0nerl4cEnQmkqImC_j12_MqGYj514ohDOCbhsZmPJvQ9FXfl4i-QwmaXpKoPOW7CrHugX4lhNd/LM317-typical-adjustable-regulator-ckt.png?psid=1" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Typical LM317T usage circuit</td></tr>
</tbody></table>
So I started looking around for how I might build a circuit. I found a lot of information online and started building it. Before this, I still needed to know what the needed voltage is. A standard LIPO cell is rated at 3.7V.<br />
<br />
<a name='more'></a>Thinking that this is the max voltage I wanted to target 3.5V to be on the safe side. Creating the needed circuit is simple, I found a lot of resources like <a href="http://www.circuit-innovations.co.uk/LM317.html">this one</a>. I set out to build this and going for a safe build (meaning that a 10ma minimum current draw is needed) I used a value for R1 of 220 ohms (216 measured with meter).<b> You will only get output from the LM317 if there is at least a 10ma load on the output</b>.<br />
<br />
<br />
Using the formula I ended up using a 330 ohms resistor for R2. The one I have is about 323 ohms that made my voltage be somewhere around 3.43. This is a bit low but I figured it would work.<br />
So this is my finished 3.5ish V power source.<br />
<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://o41raa.dm1.livefilestore.com/y1p83wRPI6B7Hpk6xGWayCt5l4DoET1EkwzqBxHLyJD_cP-T_6j4R1Gw_h8-b0vdQ8ljVoJlkNY4bpr2VFdeA-EK837kGk9fLJQ/P1060036.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://o41raa.dm1.livefilestore.com/y1p83wRPI6B7Hpk6xGWayCt5l4DoET1EkwzqBxHLyJD_cP-T_6j4R1Gw_h8-b0vdQ8ljVoJlkNY4bpr2VFdeA-EK837kGk9fLJQ/P1060036.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">LM317T 3.5Vish volts output</td></tr>
</tbody></table>
<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://o41raa.dm1.livefilestore.com/y1pcCUJhWc8GwgRgexHEGTdZxQioBICi4lu-g59Lwl2mYkXF8bmdM17f7mkgMC_J9MuFr2ncZix4Gcr7oKs_YGVEb-exrj4M_5g/P1060041.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://o41raa.dm1.livefilestore.com/y1pcCUJhWc8GwgRgexHEGTdZxQioBICi4lu-g59Lwl2mYkXF8bmdM17f7mkgMC_J9MuFr2ncZix4Gcr7oKs_YGVEb-exrj4M_5g/P1060041.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">LM317 3.5V regulator</td></tr>
</tbody></table>
<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://o41raa.dm1.livefilestore.com/y1p83wRPI6B7Hpg4BkRFtoLlQhGF9t-FfWsuKJdxdF1oVmxjYwkmOni_lP70YttspzW6hNvVARZIxSrFnWJJFrzhnF9uqtmXAMB/P1060040.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://o41raa.dm1.livefilestore.com/y1p83wRPI6B7Hpg4BkRFtoLlQhGF9t-FfWsuKJdxdF1oVmxjYwkmOni_lP70YttspzW6hNvVARZIxSrFnWJJFrzhnF9uqtmXAMB/P1060040.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">LM317 3.5V regulator back view</td></tr>
</tbody></table>
<br />
<b>Testing the device</b>, the safe way. I need a 5V power supply that won't damage anything and a way to connect the header pins to power. It's a good thing that I have a <a href="http://errincode.blogspot.com/2013/01/small-ups-for-raspberrypi.html">5V rechargeable battery</a> and a <a href="http://errincode.blogspot.com/2013/01/power-small-finished-projects-from-usb.html">USB to header pins cable</a>. This is how I test my device with the help of a voltmeter.<br />
<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://o41raa.dm1.livefilestore.com/y1pa8Z4kgQcytO5QBKKyW01OiKKafQPRozdrmFzUN5-WnpMDaMitfTP4wCE8WjvoVvh77a6wduTNSp1rDZRxoStinOG6grOYRwf/P1060052.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://o41raa.dm1.livefilestore.com/y1pa8Z4kgQcytO5QBKKyW01OiKKafQPRozdrmFzUN5-WnpMDaMitfTP4wCE8WjvoVvh77a6wduTNSp1rDZRxoStinOG6grOYRwf/P1060052.JPG?psid=1" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Testing of LM317T 3.5V regulator</td></tr>
</tbody></table>
The voltmeter says that the output is about 3.43V which is where I expected it to be. Powering up a device with this reveals that there is a problem, the device signals a low battery alert (some devices may have features disabled or not perform well when there is not enough power). This is the point (late, I know) when I search for information on the actual voltage of the LIPO cells. <b>Shockingly</b> I was wrong.<br />
<br />
The voltages for a LIPO cell should be around these values:<br />
<ul>
<li>4.2V for a fully charged battery</li>
<li>3.7 for a battery around 80% charge left</li>
<li>others I don't need</li>
</ul>
Since a LIPO battery should not be drained more than 80% to avoid damage it is now obvious that I need to aim for a higher voltage.<br />
<br />
And now the fun begins! I replaced my R2 with a 370 ohms. I got a voltage of 3.52. That is strange since a 330 ohms one should have gave me that voltage. Maybe my resistor is bad, anyway I go for a 390 ohms one that should fix the problem. Voltage is up to 3.63. This is not good. I again change my resistor to a 410 ohms one. Still the same voltage.<br />
<br />
Then it hit me. The <b>voltage drop</b> might be causing this! And indeed after again changing R2 to 390 ohms and using a variable transformer set to 12V I get the needed 3.87V.<br />
<br />
So getting somewhere around 4V from the LM317T using a 5V input is not doable. You can do this however using simple components like resistors and other stuff but I wanted to have a fixed output voltage that does not depend on the input voltage.<br />
<br />
When I started this I knew that the differences between the input and output would be small and the LM317 would not generate too much heat (it didn't even heat up to the touch). But now I would be probably powering the circuit from 12V so I <b>heatsink is definitely</b> needed.<br />
<br />
The regulator works (with 12V input) and the device does not show a low battery signal anymore.<br />
<br />
Since I started using a lot of these header pins to connect different components, I started using a black marker to mark the base of one of the pins to easily know in the future which is the GND pin. You can almost not see it here:<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://o41raa.dm1.livefilestore.com/y1pB1r4W9v8CaYlWS9At0f-mWZ1-gv8hPT_o_d6XVNd1tm6NTqotBsEmbvDUgWNa-tP6eIEniWbfoeZ3PBC3n6Ibh0JCyl4bpDo/P1060053.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://o41raa.dm1.livefilestore.com/y1pB1r4W9v8CaYlWS9At0f-mWZ1-gv8hPT_o_d6XVNd1tm6NTqotBsEmbvDUgWNa-tP6eIEniWbfoeZ3PBC3n6Ibh0JCyl4bpDo/P1060053.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Marked GND pin on the LM217T voltage regulator circuit</td></tr>
</tbody></table>
I had a few interesting finds along the way, maybe it will help others.<br />
Enjoy!ubunduhttp://www.blogger.com/profile/08429546711487262106noreply@blogger.com0tag:blogger.com,1999:blog-7270236955766992212.post-8656742654352767882013-01-18T11:46:00.000-08:002013-01-22T13:22:35.688-08:00Power Small FINISHED projects from USBOften I create a small... thing, not really anything to write home about but something that blinks a LED for example and I use and Arduino to power it. This is good for the building stages but using and Arduino just for the 5V output is not efficient.<br />
So I wanted a way to power the devices from USB 5V. this is bad for the laptop health if the project is not finished and there are still problems with the wiring but when all is finished, you can safely source the needed voltage from a PC (<b>remember no more than 500 ma</b>).<br />
My solution is a power cable with a USB male on one end and standard header pins on the other. <br />
<br />
<a name='more'></a>I have some USB B cables, the kind used to power the Arduino and printers. I started by cutting the USB B connector off and used electrical tape on the data lines as I won't be using them.<br />
I cut small piece of perfboard and soldered header pins to it in parallel. joining them in 2 rows. soldered the red +5V to one rail and the Black GND wire to the other.<br />
<br />
So now I have a few rails to power my projects directly from the computer or from a <a href="http://errincode.blogspot.com/2013/01/small-ups-for-raspberrypi.html">rechargeable battery</a>. I would recommend using one of these batteries just to have a layer of protection for the PC.<br />
<br />
I don't know if I am that good at explaining so here are some pictures of the final product.<br />
<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://o41raa.dm1.livefilestore.com/y1pJt1mOQhDwDWXyrd5Vo5fwatLpC6CVtSD9tLmVzAQb_bXpg2GwRDmoiWu3rakgWFgvT-E0710p6olQV1uqexWKb1EJGKuQ8US/P1060049.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://o41raa.dm1.livefilestore.com/y1pJt1mOQhDwDWXyrd5Vo5fwatLpC6CVtSD9tLmVzAQb_bXpg2GwRDmoiWu3rakgWFgvT-E0710p6olQV1uqexWKb1EJGKuQ8US/P1060049.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">USB powered header pins cable</td></tr>
</tbody></table>
<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://o41raa.dm1.livefilestore.com/y1p7OrhhyVhfShXF8yGQ28zbWrAnkjRpR3kyF8pqPppaYM3eIZdG4WHFg5rjMVqrgTeBrBzSpaiUDdyNvDErVVIGS5aqAKic0AN/P1060050.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://o41raa.dm1.livefilestore.com/y1p7OrhhyVhfShXF8yGQ28zbWrAnkjRpR3kyF8pqPppaYM3eIZdG4WHFg5rjMVqrgTeBrBzSpaiUDdyNvDErVVIGS5aqAKic0AN/P1060050.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">close up of the header pins</td></tr>
</tbody></table>
<table 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://o41raa.dm1.livefilestore.com/y1p7OrhhyVhfSgGtepAIpVPQAcQZKZzO8aJLJNFl42Z0kSNSJmLazYqwes-brxrgI7MFnKXKGZ3aU37t8ca1yb-dihs-xxMQnDm/P1060051.JPG?psid=1" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://o41raa.dm1.livefilestore.com/y1p7OrhhyVhfSgGtepAIpVPQAcQZKZzO8aJLJNFl42Z0kSNSJmLazYqwes-brxrgI7MFnKXKGZ3aU37t8ca1yb-dihs-xxMQnDm/P1060051.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">close up of my bad soldering job</td></tr>
</tbody></table>
<br />
I know it doesn't look that nice because I know only how to make things work not look good (good thing I am not into web design, although I would like it if other people would realize that they don't have this skill as well). At least it suits my purposes well.<br />
I would like to reiterate that plugging this cable into a PC and connecting something the wrong way or something that might overload or short-circuit will destroy <b>at least</b> the USB port if not more!<br />
<br />
Hope this was useful for someone. Have fun!ubunduhttp://www.blogger.com/profile/08429546711487262106noreply@blogger.com0tag:blogger.com,1999:blog-7270236955766992212.post-60912844015606492052013-01-18T11:21:00.001-08:002013-01-22T13:23:14.897-08:00Small UPS for RaspberryPiSome time ago I went into Radio Shack and found a small USB rechargeable battery that has a retractable USB connector on one end and a microUSB on the other. It looks something like <a href="http://www.radioshack.com/product/index.jsp?productId=10999779&filterName=Brand&filterValue=Enercell">this</a> but it is only 800 mah and was on sale for $8.<br />
<br />
I wanted to use it as a power source for my RaspberryPi but wanted it to use the battery only when mains where off. I looked around for circuits that allowed for instant swithcing between 2 power sources and actually found something I could make but it was pretty complicated.<br />
<br />
<a name='more'></a><br />
<br />
First thing I did is opened it up so that I would have access to the wires, I didn't want to use the microUSB connector it came with. When doing this I managed to damage all the small tabs that kept it together. No matter, I cut the microUSB and soldered the wires to a a USB extender wire. I didn't cut the wire all the way because I wanted to leave the data wires intact and just give power to the cable.<br />
<br />
I had a rather small 10cm extender and used that and luckily the battery had color coded wires as well so just soldered red to red and black to black. And to put it back together I used some electric tape.<br />
<br />
I still had the problem of switching from mains to the battery. In the instructions that came with it (yes, I read the manual because I take my own advice and I always tell people to RTFM), there was a warning to always turn the battery off before plugging it in to charge. I do read the manual but I don't really listen to warnings so I tried to power something off of USB with the battery ON and plugged in to a power source. I used a USB wall wart to charge the battery and an old Bluetooth handsfree (that I didn't mind blowing up if something would have gone wrong). I did this because damaging the apartment power lines was more OK for me than damaging a USB port on my laptop (I pay rent, they can fix it).<br />
<br />
What happened was that everything went better than expected. The handsfree would charge bath when the battery was plugged in to the wall and when it wasn't. So it seems that it acted like a UPS on it's own.<br />
I still needed to make sure that nothing bad happens over time so I left it there, watching it with the corner of my eye for a half a day. All was good, nothing got hot and the battery was always full.<br />
<br />
The down side to this small battery is that when I used it with the Pi it lasted for about 30-40 minutes. That is enough time to find another power source or to shutdown the device and save the work. Maybe I will try upgrading the cells inside as they resemble standard AAA rechargeable batteries.<br />
<br />
I don't have pictures of the inside or of the build, but this should be pretty simple. Here is the finished project.<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://o41raa.dm1.livefilestore.com/y1pid_iuPF6Xc6akLZBcoXKjDcFycaDn2tgyc6JokADcjuMbCLEKUgH8EoCIqudaDCeVPKifCG7bFfFsUJ_pgJLdUdASDiJgczc/P1060035.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://o41raa.dm1.livefilestore.com/y1pid_iuPF6Xc6akLZBcoXKjDcFycaDn2tgyc6JokADcjuMbCLEKUgH8EoCIqudaDCeVPKifCG7bFfFsUJ_pgJLdUdASDiJgczc/P1060035.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Enercell 800 mah battery top view</td></tr>
</tbody></table>
<table 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://o41raa.dm1.livefilestore.com/y1pid_iuPF6Xc6W-FWDKBsu9rhfljQ60PTPgmlgt-XtO6JqEx-nj53btidUUB2qJL85Bf4usnuU1oHkBV4jcwQAu9uxSMvH2myR/P1060034.JPG?psid=1" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://o41raa.dm1.livefilestore.com/y1pid_iuPF6Xc6W-FWDKBsu9rhfljQ60PTPgmlgt-XtO6JqEx-nj53btidUUB2qJL85Bf4usnuU1oHkBV4jcwQAu9uxSMvH2myR/P1060034.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Enercell 800 mah battery side view</td></tr>
</tbody></table>
<br />
<br />
Small things add up so take it one step at a time. Enjoy!<br />
<br />
<br />
<br />ubunduhttp://www.blogger.com/profile/08429546711487262106noreply@blogger.com0tag:blogger.com,1999:blog-7270236955766992212.post-24586123186516854502013-01-07T12:57:00.000-08:002013-01-30T22:12:25.795-08:00Upgrading HP Compaq 6715s with a Motorola Surfboard SBG6580 wireless card So after pulling apart the dead <a href="http://errincode.blogspot.com/2013/01/motorola-surfboard-sgb6580-to-pieces.html">modem/router</a> I wanted to use the only working part scavenged.<br />
<br />
I opened my wife's laptop to access the wi-fi card. This is the easy part as it is just one screw for the panel and 2 screws that hold the wi-fi card in place. <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://cbngrg.dm1.livefilestore.com/y1pwXv-b4h4sWycwSOl38B9L5VJ1AAZEULRXRGoQUG2IpEAt6d6F0w3QnzevuvPqko6pF1jK2C5wSQB68qjhXlQxgSvHmkIZGbs/P1050940.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://cbngrg.dm1.livefilestore.com/y1pwXv-b4h4sWycwSOl38B9L5VJ1AAZEULRXRGoQUG2IpEAt6d6F0w3QnzevuvPqko6pF1jK2C5wSQB68qjhXlQxgSvHmkIZGbs/P1050940.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">HP Compaq 6715s back</td></tr>
</tbody></table>
<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://cbngrg.dm1.livefilestore.com/y1piOzSodw_zpsE2EuctFftajjNFHsHXQ9d16fPs-1p1Cb3WK8Nw7usNde8_nPKsXtkFaNi6BwD3Q07ZbDUWPCzxG6VywS_DRFE/P1050939.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://cbngrg.dm1.livefilestore.com/y1piOzSodw_zpsE2EuctFftajjNFHsHXQ9d16fPs-1p1Cb3WK8Nw7usNde8_nPKsXtkFaNi6BwD3Q07ZbDUWPCzxG6VywS_DRFE/P1050939.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">HP Compaq 6715s panel that contains the Wi-Fi</td></tr>
</tbody></table>
<br />
<table align="center" 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://cbngrg.dm1.livefilestore.com/y1pD0WCJwbs_R69xcn_UWuDsEhxDFhq0E9MFlT-W7oGP4cZkTgbp2--3sqdaNFCN-PDnQpdBfyuCwh1dFJgjgVHcQKCshI5ERJ0/P1050938.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://cbngrg.dm1.livefilestore.com/y1pD0WCJwbs_R69xcn_UWuDsEhxDFhq0E9MFlT-W7oGP4cZkTgbp2--3sqdaNFCN-PDnQpdBfyuCwh1dFJgjgVHcQKCshI5ERJ0/P1050938.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A close up of the old WLAN card</td></tr>
</tbody></table>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
The first problem appeared:<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://cbngrg.dm1.livefilestore.com/y1pC1xJixA2RsZc1VK3Gd0YejHb0uNMwMfyJSkU3aSR__8fUWXIHAdMAysyXmkhW6z83BcPP3JUIcZ2s8-wOckljBXT6kKCA8jO/P1050943.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://cbngrg.dm1.livefilestore.com/y1pC1xJixA2RsZc1VK3Gd0YejHb0uNMwMfyJSkU3aSR__8fUWXIHAdMAysyXmkhW6z83BcPP3JUIcZ2s8-wOckljBXT6kKCA8jO/P1050943.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">HP Compaq 6715s new WLAN installed</td></tr>
</tbody></table>
<br />
<a name='more'></a><br />
<br />
As you can see the new and improved Wi-Fi card is actually half the size of the old one. And the problem is that the mini PCI Express slot pushes the card upwards so it will be easier to handle. That's fine and dandy when you can put in the 2 screws to keep it there but with this small one there is no way to secure it.<br />
<br />
Actually it's not that bad as when you push it down the slot actually holds it in place, so it can only be pulled out if it's at an angle. So what I did is to set it in the desired position and put the cover on so that it will be pushed down and secure itself. I am not saying that this is perfect or that it will stay in there if you move your laptop around a lot, but for the use this thing gets it will be ok, as it will only be sitting at the desk.<br />
<br />
That's it for the hardware part now let's see if it isn't actually broken too as the rest of the Motorola Surfboard SBG6580.<br />
<br />
Well, when booting up the laptop it seems that it does see quite well the new Wi-Fi, so well in fact that it complains that it is not a supported card.<br />
The actual message is:<br />
<blockquote class="tr_bq">
104-unsupported wireless network device detected<br />
System Halted. Remove device and restart</blockquote>
This seems bad and searching for solutions revealed that the laptop would need a bios upgrade with a edited bios binary so that it will have this card on the whitelist. You can look <a href="http://www.richud.com/HP-Pavilion-104-Bios-Fix/">here</a> for more information as this is the best explanation I found. It seems that he first tried to hot-swap the wi-fi cards, I am not going to try that as it may end up frying the slot. Luckily this model comes with a button to enable/disable the Wi-Fi. Sadly it doesn't work before the error message appears, so no matter how I try to synchronize with the different stages of booting the button does nothing.<br />
<br />
I wanted to give up at this point. I tried one last thing, entering the bios to look for settings. To say that this bios has a limited set of options would be exaggerating. You can only do a few enable/disable actions but no real settings. You can of course disable the WLAN completely but that will help no one. What I ended up trying is the buttons instead. It worked. So now I can boot the laptop and access Windows. This step (F10 bios, Disable Wi-Fi button, Exit ignoring changes) needs to be done each time the laptop is powered off with the Wi-Fi enabled.<br />
<br />
I connected the laptop with a Ethernet cable and let Windows do it's thing:<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://cbngrg.dm1.livefilestore.com/y1phD--nRy7unfyerYTjQ0z6m4I9rUSyfr5Yw9W4TJCXW3JKq2Q4Rf7K2Lqu52WqrlGwSWr7B0lTU9DYhSDy9hAk0wQunObM-YI/surfboardwireless1.png?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="235" src="https://cbngrg.dm1.livefilestore.com/y1phD--nRy7unfyerYTjQ0z6m4I9rUSyfr5Yw9W4TJCXW3JKq2Q4Rf7K2Lqu52WqrlGwSWr7B0lTU9DYhSDy9hAk0wQunObM-YI/surfboardwireless1.png?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">WI-FI card from Motorola Surfboard SBG6580</td></tr>
</tbody></table>
It worked, I can connect to my network and access the Internet.<br />
Device Manager sees it and has a lot of options to configure:<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://cbngrg.dm1.livefilestore.com/y1pgqNbwc-_2fGIzWfH7VjVYHt6GB1zZ7oITS4Tgc49Yw0aJ6LsTyiqIZ4wx2F5VjkcRf6hN5IEVNbrVCob8t74TowIbtq7vsuS/surfboardwireless2.png?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="190" src="https://cbngrg.dm1.livefilestore.com/y1pgqNbwc-_2fGIzWfH7VjVYHt6GB1zZ7oITS4Tgc49Yw0aJ6LsTyiqIZ4wx2F5VjkcRf6hN5IEVNbrVCob8t74TowIbtq7vsuS/surfboardwireless2.png?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Compaq 6715s with scavenged Motorola Surfboard SBG6580 Wi-Fi card</td></tr>
</tbody></table>
<br />
The problem of booting the machine with the WLAN enabled is still there but maybe I will get around to try and fix that, preferably after a new laptop joins the family and bricking this one won't be that much of a loss.<br />
<br />
<br />
<br />
<br />
'Till next time, enjoy!ubunduhttp://www.blogger.com/profile/08429546711487262106noreply@blogger.com2tag:blogger.com,1999:blog-7270236955766992212.post-92129764001354656212013-01-04T16:18:00.000-08:002013-01-30T22:11:34.310-08:00Motorola Surfboard SBG6580... to pieces and beyondSo this year did not start well for me. When I finally woke up on the 2nd of January my internet kept going down on me. After numerous restarts and resets of my wonderful modem/router combo it died. The top 3 lights would flash for a sec and then nothing. That is the last time I buy one of these all-in-ones (on a side note, don't get the Belkin wireless router it restarts every time you change any settings).<br />
<br />
Anyway here is what I found inside it:<br />
<br />
A main board with a mini PCI Express slot.<br />
<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://4l2btw.dm1.livefilestore.com/y1pMOm10U5vc_2khqB5p3Trzj1Q6Q6ruDUZoNSj1aUG8lKhcj2T0lAaSMqVUOaCZUeniNUrxXMV4ZWpwSXWe5YphACWieuHiEzn/P1050912.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://4l2btw.dm1.livefilestore.com/y1pMOm10U5vc_2khqB5p3Trzj1Q6Q6ruDUZoNSj1aUG8lKhcj2T0lAaSMqVUOaCZUeniNUrxXMV4ZWpwSXWe5YphACWieuHiEzn/P1050912.JPG?psid=1" width="239" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Front of main board</td></tr>
</tbody></table>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
and the other side<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</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="https://4l2btw.dm1.livefilestore.com/y1pIhM9_SwAVsI8Peen7N8dvmoWzu6OiEW0xw6TmMotJpl3ZgqMNrJxaVEnfWl3NKgghs7-5MfnXZtzSKKCbg8rflpkMIPZwt5u/P1050923.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://4l2btw.dm1.livefilestore.com/y1pIhM9_SwAVsI8Peen7N8dvmoWzu6OiEW0xw6TmMotJpl3ZgqMNrJxaVEnfWl3NKgghs7-5MfnXZtzSKKCbg8rflpkMIPZwt5u/P1050923.JPG?psid=1" width="239" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Back of main board</td></tr>
</tbody></table>
<br />
<a name='more'></a><br />
There were 2 heat sinks on the Broadcom chips but I removed them. Actually the small one is a perfect fit for my RaspberryPi.<br />
<br />
The most important piece from this is the wi-fi card. I might use it to upgrade my wife's 4 year old laptop to a wireless n but I need to find out more about the board.<br />
<br />
Here is a close up:<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://4l2btw.dm1.livefilestore.com/y1pfUVMOjwTc5l1-IT8bLe-WGHpxhA5FzdGOts1_MnRhYMMTvm-BoH_fsN-K3UViWjkWdd8Y3d2HC3SD2rnoY-CpwD2e_dXBxdY/P1050930.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="239" src="https://4l2btw.dm1.livefilestore.com/y1pfUVMOjwTc5l1-IT8bLe-WGHpxhA5FzdGOts1_MnRhYMMTvm-BoH_fsN-K3UViWjkWdd8Y3d2HC3SD2rnoY-CpwD2e_dXBxdY/P1050930.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Back of wi-fi board</td></tr>
</tbody></table>
<br />
The strange part was that those 2 eyelets were actually soldered to the frame. They wanted to be sure that the card will not fall out of it's slot.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<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://4l2btw.dm1.livefilestore.com/y1ppp0B4DZo7-JgOWhzvDs3Zi0SF8EngOZx0tqYbUvcbIT_A_OAB0kChld_-YXmEN8HLxe1YeqnJwlakqaXQWBceTnXZ3Ylltdn/P1050932.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="239" src="https://4l2btw.dm1.livefilestore.com/y1ppp0B4DZo7-JgOWhzvDs3Zi0SF8EngOZx0tqYbUvcbIT_A_OAB0kChld_-YXmEN8HLxe1YeqnJwlakqaXQWBceTnXZ3Ylltdn/P1050932.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Front of wi-fi board</td></tr>
</tbody></table>
<br />
<br />
<br />
<br />
A lot of serial numbers and some notations of pin numbers are visible.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
There are also 2 antennas. I am not sure how good they are since I didn't have that good of a signal 3 meters away from the router (behind a wall) <br />
<br />
<table align="center" 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://4l2btw.dm1.livefilestore.com/y1pIhM9_SwAVsJq6hA-mF4tscD2UdDRdCZIsCl4ZuPJI-maybGr_vVlqAJdGSD43g3uQ1HrNk7FdHd3uoRA6kqGrtzjos3tSxLI/P1050925.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="149" src="https://4l2btw.dm1.livefilestore.com/y1pIhM9_SwAVsJq6hA-mF4tscD2UdDRdCZIsCl4ZuPJI-maybGr_vVlqAJdGSD43g3uQ1HrNk7FdHd3uoRA6kqGrtzjos3tSxLI/P1050925.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Front of antenna 1</td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://4l2btw.dm1.livefilestore.com/y1pkE2-WJMexl1sfVXJ59Cpf3tDtQ2dPCn_AOm64kAt44vYfCC2NX0o2Juh4iV0Co5Vq4Z2jgtkHuDpNthiOUlencEVEhnXTfHk/P1050924.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="149" src="https://4l2btw.dm1.livefilestore.com/y1pkE2-WJMexl1sfVXJ59Cpf3tDtQ2dPCn_AOm64kAt44vYfCC2NX0o2Juh4iV0Co5Vq4Z2jgtkHuDpNthiOUlencEVEhnXTfHk/P1050924.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Back of antenna 1</td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<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://4l2btw.dm1.livefilestore.com/y1pxw-vhmxMWZ7hh7J3zEnUlrnNgIuNxoXXVaSnM2eGf3cjA-NulFfbeNzBkgBmYgwFSk9sZhgm6cFP9nlZ-LDXyCzg8-Vp1uUg/P1050927.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="149" src="https://4l2btw.dm1.livefilestore.com/y1pxw-vhmxMWZ7hh7J3zEnUlrnNgIuNxoXXVaSnM2eGf3cjA-NulFfbeNzBkgBmYgwFSk9sZhgm6cFP9nlZ-LDXyCzg8-Vp1uUg/P1050927.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Front of antenna 2</td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://4l2btw.dm1.livefilestore.com/y1pxw-vhmxMWZ5OlzNPEfEC2n2RpDk3iGSB6_hxDrcDHa-5wp0KHYc5n1pVD-cXvIajsuauRC82pCgRvw2zSb3b420vg2unvx4G/P1050928.JPG?psid=1" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="149" src="https://4l2btw.dm1.livefilestore.com/y1pxw-vhmxMWZ5OlzNPEfEC2n2RpDk3iGSB6_hxDrcDHa-5wp0KHYc5n1pVD-cXvIajsuauRC82pCgRvw2zSb3b420vg2unvx4G/P1050928.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Back of antenna 2</td></tr>
</tbody></table>
<br />
And some pictures of the markings on the chips.<br />
<br />
<br />
The heart is the BCM3380 chip I think it is a common one in these kind of devices<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://4l2btw.dm1.livefilestore.com/y1pw72Aau8VERhJ2P3TAYze5rLJLZDNa3HcCIN5JgqE5qUoicspPKFu0YUna3sid2oB1IqwA9aSQFaUpiO2mbQIFf-XLOazVz57/P1050917.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="239" src="https://4l2btw.dm1.livefilestore.com/y1pw72Aau8VERhJ2P3TAYze5rLJLZDNa3HcCIN5JgqE5qUoicspPKFu0YUna3sid2oB1IqwA9aSQFaUpiO2mbQIFf-XLOazVz57/P1050917.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">BCM3380GKFSBG</td></tr>
</tbody></table>
The BCM33115 chip might be the Ethernet chip since it is placed so close to the ports but I couldn't find any info on this one<br />
<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://4l2btw.dm1.livefilestore.com/y1pw72Aau8VERhKVrKCuV662Q5Q4JRWGDYg1rRRV1OHTB_KBzy0NJV3IJkFTOaXm3-lnHMg9XKJFqm4O6M-hY70Cd5n58BWPJCj/P1050919.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="239" src="https://4l2btw.dm1.livefilestore.com/y1pw72Aau8VERhKVrKCuV662Q5Q4JRWGDYg1rRRV1OHTB_KBzy0NJV3IJkFTOaXm3-lnHMg9XKJFqm4O6M-hY70Cd5n58BWPJCj/P1050919.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">BCM33115SKFBG</td></tr>
</tbody></table>
<br />
A Hynix ram chip next to the main processor<br />
<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://4l2btw.dm1.livefilestore.com/y1pkE2-WJMexl0WtiD3fXfT0DlCGR66Jo6muc7cBDuN8U617rC2W7_mj6raty0yg0xaTuuCEC9W8rX0VGWddnlO3EIkEQmbhUL4/P1050921.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="239" src="https://4l2btw.dm1.livefilestore.com/y1pkE2-WJMexl0WtiD3fXfT0DlCGR66Jo6muc7cBDuN8U617rC2W7_mj6raty0yg0xaTuuCEC9W8rX0VGWddnlO3EIkEQmbhUL4/P1050921.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">H5PS5162FFA</td><td class="tr-caption" style="text-align: center;"></td></tr>
</tbody></table>
<br />
I will post updates when I try to use that mini wi-fi card.<br />
<br />
<span style="font-size: large;"><b>Update </b></span><br />
<span style="font-size: large;"><br /></span>
Check out the <a href="http://errincode.blogspot.com/2013/01/upgrading-hp-compaq-6715s-with-motorola.html">Wi-Fi install on a HP Compaq 6715s</a><br />
<br />
And here are some pics with the removed heat sinks from the main board:<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://cbngrg.dm1.livefilestore.com/y1p-ClRTegrTYq7iZPrZ4nnwVw25OamC2bct6aWfpMS2WXLQ6ea44_7XX5bPtAgycKUyyKtr3WK7UptfIQcxWtQQ-j2xhBelqH8/P1050948.JPG?psid=1" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://cbngrg.dm1.livefilestore.com/y1p-ClRTegrTYq7iZPrZ4nnwVw25OamC2bct6aWfpMS2WXLQ6ea44_7XX5bPtAgycKUyyKtr3WK7UptfIQcxWtQQ-j2xhBelqH8/P1050948.JPG?psid=1" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The 2 heat sinks from the Motorola Surfboard SGB6580</td></tr>
</tbody></table>
<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://cbngrg.dm1.livefilestore.com/y1p4Nl_aY4aWC_65YfXmtDj7SfbK9rTMXP71_efKvF5yALUKJ-pv-c7IQRclanOOFutA-Y7gKxBKvLpDG4CWzTaHqNbtBBvDknJ/P1050949.JPG?psid=1" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://cbngrg.dm1.livefilestore.com/y1p4Nl_aY4aWC_65YfXmtDj7SfbK9rTMXP71_efKvF5yALUKJ-pv-c7IQRclanOOFutA-Y7gKxBKvLpDG4CWzTaHqNbtBBvDknJ/P1050949.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Small heat sink installed on RaspberryPi</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://cbngrg.dm1.livefilestore.com/y1p79NiVN0tsAG0M9kFckZHEc7U5p28qGap9p8W5i61pMUb1cPi8thd9W05QT-5D_a1_qAnSTgwuTRxAND5LO9ii7e5fH7uX74T/P1050950.JPG?psid=1" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://cbngrg.dm1.livefilestore.com/y1p79NiVN0tsAG0M9kFckZHEc7U5p28qGap9p8W5i61pMUb1cPi8thd9W05QT-5D_a1_qAnSTgwuTRxAND5LO9ii7e5fH7uX74T/P1050950.JPG?psid=1" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Small heat sink installed on RaspberryPi</td></tr>
</tbody></table>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
That's all for now, enjoy life!ubunduhttp://www.blogger.com/profile/08429546711487262106noreply@blogger.com8