tag:blogger.com,1999:blog-73724980418880394472024-03-18T05:47:05.090-04:00SiliconfishHobby blog about tech tips I've picked up, projects I'm working on, or links to useful information and cool stuff. I'm an Electrical Engineer and professional Analog IC designer for 25 years playing in my spare time. Arduino, hacking consumer electronics, video game hardware, satellite TV, PC building, Android apps, appliance repairs and whatever else that interests me.Unknownnoreply@blogger.comBlogger137125tag:blogger.com,1999:blog-7372498041888039447.post-86177598167605998712018-02-10T14:12:00.002-05:002018-02-10T14:12:43.548-05:00Trying my hand at mining<br />
Just to learn what's up I decided to try crypto coin mining<br />
<br />
Already have a system with two moderate graphics cards, that are getting old by gamer standards. But lets see what happens<br />
AMD Radeon R7 200 series 2GB<br />
<br />
Decided after some googling to mine Ethereum on Nanopool.<br />
This was a somewhat random decision based on googling what is the best pool and what is the best coin to mine. Ethereum is at least a more well known coin that my coinbase account wallet holds so I thought that might help me not have to sign up for another wallet somewhere. Signing up for coinbase was a long involved process of verification that i don't want to repeat for fear of identity theft. Bitcoin mining seems over subscribed at the moment.<br />
<br />
Downloading Claymore seemed pretty dodgy. Followed instructions on<br />
https://nanopool.org/ Ethereum quickstart. Made up the the long addresses i needed. I guess they are just your own invented string. Who knows.<br />
<br />
Readme in claymore says<br />
<br />
For AMD cards, set the following environment variables, especially if you have 2GB cards:<br />
<br />
GPU_FORCE_64BIT_PTR 0<br />
GPU_MAX_HEAP_SIZE 100<br />
GPU_USE_SYNC_OBJECTS 1<br />
GPU_MAX_ALLOC_PERCENT 100<br />
GPU_SINGLE_ALLOC_PERCENT 100<br />
<br />
<span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-size: 13px;">In Windows 10 is easy to set it permanently in Control Panel\System and Security\System\Advanced\Environment Variables.</span><br />
<span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-size: 13px;"><br /></span>
<span style="background-color: white; color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-size: 13px;">and it says</span><br />
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;">For multi-GPU systems, set Virtual Memory size in Windows at least 16 GB:</span></span><br />
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="background-color: white; font-size: 13px;"></span></span><br />
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;">"Computer Properties / Advanced System Settings / Performance / Advanced / Virtual Memory".</span></span><br />
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;">My SSD is fairly full so i set it to 16-20Gb</span></span><br />
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;">copied in start.bat from the config. Windows complained about running it. Wince</span></span><br />
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;">Start .bat says failed, you cannot mine with this GPU. </span></span><br />
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;">Bonaire, 14 compute units</span></span><br />
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-L0C7Tiwfx0w/Wn8-hEZCPTI/AAAAAAAAeIE/TFx4crmzn8YfQPMnmz4XxpLnWg0DBcVmACLcBGAs/s1600/mining.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="461" data-original-width="802" height="228" src="https://4.bp.blogspot.com/-L0C7Tiwfx0w/Wn8-hEZCPTI/AAAAAAAAeIE/TFx4crmzn8YfQPMnmz4XxpLnWg0DBcVmACLcBGAs/s400/mining.PNG" width="400" /></a></div>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-size: 13px;">Install Catalyst v15.12 for old AMD cards; for Fury, Polaris and Vega cards use latest blockchain drivers.</span></span><br />
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-size: 13px;">https://support.amd.com/en-us/download doesn't show catalyst </span></span><br />
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-size: 13px;">Updated drivers to 18.12</span></span><br />
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-size: 13px;">Still no dice. Searched on the DAG error and I find:</span></span><br />
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="color: #333333; font-family: helvetica neue, helvetica, arial, sans-serif; font-size: 13px;">https://ethereum.stackexchange.com/questions/17694/cannot-allocate-big-buffer-not-enough-graphics-memory</span></span><br />
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="color: #333333; font-family: helvetica neue, helvetica, arial, sans-serif; font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="color: #333333; font-family: helvetica neue, helvetica, arial, sans-serif; font-size: 13px;">It says a 2GB card is now worthless for mining. Need 6GB or more. Oh well fail. I'm not in a hurry to rush out and buy an overpriced graphics card and run up my electricty bill. This was just to learn more about what goes on in mining.</span></span><br />
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="color: #333333; font-family: helvetica neue, helvetica, arial, sans-serif; font-size: 13px;"><br /></span></span>
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="color: #333333; font-family: helvetica neue, helvetica, arial, sans-serif; font-size: 13px;">I may try a different coin/pool to see if I get the same result.</span></span><br />
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="color: #333333; font-family: helvetica neue, helvetica, arial, sans-serif; font-size: 13px;"><br /></span></span><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com26tag:blogger.com,1999:blog-7372498041888039447.post-76472900337381499322017-12-22T21:02:00.002-05:002017-12-22T21:02:31.406-05:00P0141 Replacing the oxygen sensor in 2007 Honda Accord EX 2.4L<br />
There is lots of videos and help around the net for this one, but maybe details of my experience will help someone because there are a couple twists. This job is something that an average person with a good sense of humor can do. It is an exercise in inconvenience but not mechanically complex. It doesn't take any more tools than a socket wrench and a jack stand. You do need a cheap tool to remove the sensor that you can buy when you buy the sensor.<br />
<br />
Check engine light comes on. Within a day I get the notice for my bi-yearly emissions inspection. Life is like this sometimes. Need to fix it today. You can see i also need an oil change.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-eMvkUYD1gCY/Wj2wTclmWAI/AAAAAAAAdY0/fYJBehx2vf8DfIBCg8O4AbjB9Bg9bI73ACKgBGAs/s1600/20171222_131327.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://3.bp.blogspot.com/-eMvkUYD1gCY/Wj2wTclmWAI/AAAAAAAAdY0/fYJBehx2vf8DfIBCg8O4AbjB9Bg9bI73ACKgBGAs/s320/20171222_131327.jpg" width="320" /></a></div>
<br />
<br />
My 20 year old OBD reader (can get the auto parts store to do this for you also) says P0141 Faulty Heated Oxygen Sensor (H2OS) Bank 1 Sensor 2. Number 2 means the sensor on the catalytic converter under the car, not the one on the exhaust manifold under the hood. My car is a 2007 Honda Accord EX 2.4L 4 Cylinder.<br />
<br />
This could be due to bad wires, but most likely the O2 sensor is just bad, this car is 10 years old now.<br />
You can look under the car and see this thing on the side of the catalytic converter. I didn't do any diagnosis, i just replaced the sensor.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-BarDDPqGIYw/Wj2wNkXxsOI/AAAAAAAAdYw/m0sjKZnshrIr98R8dpmcn8JuEsnryt1yACKgBGAs/s1600/20171222_122529.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://1.bp.blogspot.com/-BarDDPqGIYw/Wj2wNkXxsOI/AAAAAAAAdYw/m0sjKZnshrIr98R8dpmcn8JuEsnryt1yACKgBGAs/s320/20171222_122529.jpg" width="320" /></a></div>
<br />
<br />
These are not too expensive, used to be a lot more. I bought this one for $26.<br />
<br />
You also need a special socket wrench. I understand that auto parts stores may lend you one for a deposit, but they are only a couple bucks if you buy a cheap one, and this was the cheapest and worked just fine.<br />
<br />
<br />
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ss&ref=as_ss_li_til&ad_type=product_link&tracking_id=workingsilico-20&marketplace=amazon&region=US&placement=B000CF5XVY&asins=B000CF5XVY&linkId=ba43c0f6764dbe9311360931194b07cc&show_border=true&link_opens_in_new_window=true" style="height: 240px; width: 120px;"></iframe>
<br />
<br />
<br />
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ss&ref=as_ss_li_til&ad_type=product_link&tracking_id=workingsilico-20&marketplace=amazon&region=US&placement=B01C4OB3XC&asins=B01C4OB3XC&linkId=5b1d4faa28f6178535109d248218f4a4&show_border=true&link_opens_in_new_window=true" style="height: 240px; width: 120px;"></iframe>
<br />
Parts came quickly. The sensor has a long wire that runs through some clips and eventually has a grommet in the floor of the car under the passenger's seat. Nuts! It is under a flap of carpet that you could possibly access by pushing the seat all the way up and reaching under but removing the seat is actually very easy and makes this job less of pain. The wire plugs in to a connector under the seat.<br />
<br />
Do your self a favor and remove the seat as the first step. Just take out the four bolts, two in front and two in rear under some plastic covers that snap off and back on. Bolts come out easily with a socket wrench and the seat lifts up and you can reach the connector.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-_rXwZwxUeU8/Wj2yqpEJkcI/AAAAAAAAdZA/PyXAsyXI7HwMLu1jgKJ4MZMSzYh3fw3vgCKgBGAs/s1600/20171222_121350.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://1.bp.blogspot.com/-_rXwZwxUeU8/Wj2yqpEJkcI/AAAAAAAAdZA/PyXAsyXI7HwMLu1jgKJ4MZMSzYh3fw3vgCKgBGAs/s320/20171222_121350.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-tR6ItSQup4k/Wj2ywIirlKI/AAAAAAAAdZE/G1MPmM73PoEmEQDl96c2B5TzUK_TJbosQCKgBGAs/s1600/20171222_125939.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://2.bp.blogspot.com/-tR6ItSQup4k/Wj2ywIirlKI/AAAAAAAAdZE/G1MPmM73PoEmEQDl96c2B5TzUK_TJbosQCKgBGAs/s320/20171222_125939.jpg" width="320" /></a></div>
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-8U7cMGSD9K0/Wj2zCty1rLI/AAAAAAAAdZQ/tR8jvlGjj-85cP4s_PVQuHhRWF9zHQV0ACKgBGAs/s1600/20171222_121403.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://2.bp.blogspot.com/-8U7cMGSD9K0/Wj2zCty1rLI/AAAAAAAAdZQ/tR8jvlGjj-85cP4s_PVQuHhRWF9zHQV0ACKgBGAs/s320/20171222_121403.jpg" width="240" /></a><a href="https://2.bp.blogspot.com/-VbsBOxSaSwY/Wj2y7XPIliI/AAAAAAAAdZM/_YIP87K9cS4TWXvxyeuRtqY5xJhfmMvVACKgBGAs/s1600/20171222_125351.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://2.bp.blogspot.com/-VbsBOxSaSwY/Wj2y7XPIliI/AAAAAAAAdZM/_YIP87K9cS4TWXvxyeuRtqY5xJhfmMvVACKgBGAs/s320/20171222_125351.jpg" width="240" /></a></div>
<br />
<br />
Unplug it and push the grommet and wire through the hole in the floor. Here it is hanging out the bottom of the car now.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-JKp8qi2ZM9M/Wj2zSmGBLVI/AAAAAAAAdZY/fLYuTy8xCmwyEATozSTt6bHZ3IBE9fqaACKgBGAs/s1600/20171222_122522.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://3.bp.blogspot.com/-JKp8qi2ZM9M/Wj2zSmGBLVI/AAAAAAAAdZY/fLYuTy8xCmwyEATozSTt6bHZ3IBE9fqaACKgBGAs/s320/20171222_122522.jpg" width="320" /></a></div>
<br />
I'm not a fan of being crushed under my car, so i jacked up the front right wheel and put a jack stand under it, next to the jack. I chocked the two rear wheels and pulled the emergency brake. That created just enough room to get under and do the deed. Still very awkward.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-E8z8SeLNIhE/Wj2zrUmr1wI/AAAAAAAAdZg/T3mL3VRJMOsRlQHtTOCUhPH9JRzr8YjhgCKgBGAs/s1600/20171222_122514.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://1.bp.blogspot.com/-E8z8SeLNIhE/Wj2zrUmr1wI/AAAAAAAAdZg/T3mL3VRJMOsRlQHtTOCUhPH9JRzr8YjhgCKgBGAs/s320/20171222_122514.jpg" width="320" /></a></div>
<br />
Reached under, put on the socket tool ,attached a socket wrench, wiggled and pushed and sensor was stuck tight. I took a small sledge hammer and hit the socket wrench a few times. Not an easy task while reaching under the car. Eventually it budged and I could use the socket and wrench to remove the sensor. Touch and go there for a while. I knocked a lot of rust off the cat in the process. My heat shields were already attached by some big hose clamps from home depot because they had come loose years ago.<br />
<br />
The white plastic clips come off with a little pry from a screwdriver. I removed the old cable from the clips.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-NDr2L9-xQOE/Wj20chSOAcI/AAAAAAAAdZs/5NF5UP5izrsgMcQ8G26odgRf_cx_xaXFgCKgBGAs/s1600/20171222_122536.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://1.bp.blogspot.com/-NDr2L9-xQOE/Wj20chSOAcI/AAAAAAAAdZs/5NF5UP5izrsgMcQ8G26odgRf_cx_xaXFgCKgBGAs/s320/20171222_122536.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-HO4GY9zJ2Ds/Wj20cvhiXDI/AAAAAAAAdZs/yhfc_xb4PK8b4l9IdvdFBECSwrPrOSCyACKgBGAs/s1600/20171222_125121.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://4.bp.blogspot.com/-HO4GY9zJ2Ds/Wj20cvhiXDI/AAAAAAAAdZs/yhfc_xb4PK8b4l9IdvdFBECSwrPrOSCyACKgBGAs/s320/20171222_125121.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-nmENsPmzyg8/Wj20cj_rg9I/AAAAAAAAdZs/EFFYdqlo_e0uNAxuR1dDj5Iuw3EADCQwQCKgBGAs/s1600/20171222_125116.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://1.bp.blogspot.com/-nmENsPmzyg8/Wj20cj_rg9I/AAAAAAAAdZs/EFFYdqlo_e0uNAxuR1dDj5Iuw3EADCQwQCKgBGAs/s320/20171222_125116.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Installed the new sensor with the wrench. Routed the cable through the clips and pushed it and the grommet up through the hole in the floor.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-dRNo_FrF7Z0/Wj20coKZzRI/AAAAAAAAdZs/vBK0365laDwaPx2LoiNYQqvNjcHvyiRkQCKgBGAs/s1600/20171222_125107.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://4.bp.blogspot.com/-dRNo_FrF7Z0/Wj20coKZzRI/AAAAAAAAdZs/vBK0365laDwaPx2LoiNYQqvNjcHvyiRkQCKgBGAs/s320/20171222_125107.jpg" width="320" /></a></div>
<br />
<br />
From inside the car i connected the cable and pushed the grommet into place.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-aw9vE01-l-c/Wj21J9VGEPI/AAAAAAAAdZ0/2FmiluIyONoxhXKQEqGrSlU_FWa4aZG9gCKgBGAs/s1600/20171222_121403.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://1.bp.blogspot.com/-aw9vE01-l-c/Wj21J9VGEPI/AAAAAAAAdZ0/2FmiluIyONoxhXKQEqGrSlU_FWa4aZG9gCKgBGAs/s320/20171222_121403.jpg" width="240" /></a></div>
<br />
Reattached the seat without any issue, lowered the car. Here is where the fun part begins!<br />
<br />
Started up the car just fine, and the check engine light is still on. Read the codes and it still says P0141. Played around a bit starting the car and reading it. Check engine light is still on and code persists. Looks like I need to reset the code. My old reader won't erase the code, it just says Err when i press and hold erase. Dang. Tried many times. Can't reset the code.<br />
<br />
I decide to take it to the local auto supply store and get them to reset it. They tell me they aren't allowed to do a reset. Some posts say you can ask them to push the button yourself, but i didn't try that. I get frustrated and go buy myself lunch.<br />
<br />
I need to get the car emission tested and I have to clear that light TODAY. While eating lunch and reading on the web I see I can disconnect the battery and press the horn to drain all the charge as an alternative to erasing the code with an OBD reader. However I'm out to lunch with no tools. But when i get back in the car WooT! The code has disappeared by itself. Problem solved. It just needed some driving and a few more starts to clear the fault code.<br />
<br />
I drive immediately to the emissions inspection station and get it tested. It passed! Hooray. A big win.<br />
<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com66tag:blogger.com,1999:blog-7372498041888039447.post-87111028689511780942017-09-05T21:00:00.002-04:002017-09-11T22:09:03.500-04:00Heat pump inside air handler coils frozen<br />
Didn't expect my blog to become an HVAC repair guide, but life brings what it wants to.<br />
<br />
My rental house full of young "adults" and I get the call the AC isn't working on a warm day.<br />
<br />
They say the inside unit is running, air is blowing, and the fan outside on the heat pump condenser is also running normally. But it is still warm. Is it low freon or a blown compressor? I hope not, that will blow months of rent money earned.<br />
<br />
I go check it out and there is moisture on the unit and floor, it is sweaty and the insulated freon pipe to the outside is all sweaty and dripping, even icy in spots.<br />
<br />
The air filter is sopping wet and wont come out, it seems stuck in the unit and too soggy to pull out.<br />
<br />
I take off the cover of the air handler inside (the lower one) and instantly see the issue. The whole coil is a humongous block of ice. Wish i took a picture. A little quizzing of the occupants and I get an admission that somebody turned the AC down to 60 because they were hot.<br />
<br />
It's possible that there is low freon, but i'm betting this is user error. I left them with the fan running and the AC unit off, telling them it will be 2 days to melt that mess. Luckily it is only 80 today and supposed to be cooler tomorrow. <br />
<br />
Went back after three days, luckily the weather was cool so the lack of A/C didn't get any complaints. I replaced the filter and checked the coil. All back to normal. Turned on the A/C and it worked fine and cooled normally. No harm done. Whew.<br />
<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-7372498041888039447.post-68566952890212074922017-04-20T21:15:00.002-04:002017-04-30T17:51:23.075-04:00Heat pump won't cool, condenser outside clicking and won't run<br />
Not a lot of pictures here because i didn't think this fix would be the epic that it was.<br />
The system is a generic International Comfort Products. Inside the box I found that Trane, Tempstar, Heil and ICP units use a lot of the same parts. So pretty much ignore the brand name on the unit.<br />
<br />
First hot day in a while and the wife switches the heat pump to cooling mode and when I get home she complains it is not cooling.<br />
<br />
Quick inspection reveals warm air blowing and the outside unit - condenser - is not running when the thermostat says it is cooling. The strangest thing is the <b>condenser outside is quiet except for a fairly loud clicking</b> about once every 2-3 seconds.<br />
<br />
The solution was that the solenoid for the reversing valve (inside the outside condenser) was bad. It was shorted out. Replacing it is easy and can be done by opening the unit and removing one nut and plugging in the wires. Cost was less than $15 and can be done with only a socket wrench.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.ebayimg.com/images/g/VM0AAOSw4A5YrvTq/s-l1600.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://i.ebayimg.com/images/g/VM0AAOSw4A5YrvTq/s-l1600.jpg" height="320" width="240" /></a></div>
<br />
<br />
Here is how i figured it out... I bit of a comedy of errors but I got there in the end.<br />
<br />
Google searching doesn't help. So i decide to start swapping parts.<br />
<br />
I open the access panel on the outside of the condenser. With my finger feeling i discover that one of the relays on the control board is doing the clicking. My voltmeter shows the unit is getting both 240V and 24V power. The contactor (big relay) coil is not powered, so something is not telling the unit to start.<br />
<br />
I decided the control board might be broken and ordered one on ebay for $20.<br />
<span style="background-color: #f8f8f8; color: #333333; font-family: "helvetica neue" , "helvetica" , "verdana" , sans-serif; font-size: 18px; font-weight: bold;">Heil Tempstar Defrost Control Board 1087952 CEPL130547-01 CEBD430547-02A</span><br />
<span style="background-color: #f8f8f8; font-size: 18px;"><span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "verdana" , sans-serif;"><b><a href="http://www.ebay.com/itm/232274455696?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT">http://www.ebay.com/itm/232274455696?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT</a></b></span></span><br />
<span style="background-color: #f8f8f8; font-size: 18px;"><span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "verdana" , sans-serif;"><b><br /></b></span></span>
<span style="background-color: #f8f8f8; color: #333333; font-family: "helvetica neue" , "helvetica" , "verdana" , sans-serif; font-size: 18px; font-weight: bold;"><br /></span>
<br />
Picture of the contactor on the left, and the control board on the right.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/--Q_rdF8bKwE/WPlXagkOLOI/AAAAAAAAbbk/xtp0AN3kwtUhDNefBStLKvFwldjEN-qFACPcB/s1600/20170410_183024.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://4.bp.blogspot.com/--Q_rdF8bKwE/WPlXagkOLOI/AAAAAAAAbbk/xtp0AN3kwtUhDNefBStLKvFwldjEN-qFACPcB/s320/20170410_183024.jpg" width="180" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
When the control board came a few days later i swapped it in. all the connections are pull off and plug back in. just transfer the wires one by one.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
All done, i go to turn it on and I find the thermostat is BLANK. Measuring the voltage at the green/red thermostat wires after pulling off the thermostat from the wall, i find i have no 24V anymore. At the condenser no 24V either. Whaaa? It was there before. I either blew the transformer or something else did in the 4 days since I tested before. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Upstairs in the attic I open the panel on the air handler. The transformer is in the back in the lower right. No 24V on it's output. Remove it and find that the primary coil measures open. </div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-10JR3UmcpJA/WPlXavCg1LI/AAAAAAAAbbk/FM_kyXv_1kMV6u5VQFvmXx-9W5qMKAmrgCPcB/s1600/20170413_214147.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="https://4.bp.blogspot.com/-10JR3UmcpJA/WPlXavCg1LI/AAAAAAAAbbk/FM_kyXv_1kMV6u5VQFvmXx-9W5qMKAmrgCPcB/s320/20170413_214147.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I buy one on ebay for $11.99</div>
<div class="" style="background-color: #f8f8f8; border: 0px; color: #333333; font-family: "Helvetica neue", Helvetica, Verdana, sans-serif; font-size: 13px; margin: 0px; padding: 0px;">
<h1 class="it-ttl" id="itemTitle" itemprop="name" style="border: 0px; display: inline; font-size: 18px; line-height: normal; margin: 0px; padding: 0px;">
<span class="g-hdn" style="border: 0px; font-size: 0px; font-weight: normal; height: 0px; line-height: 0; margin: 0px; outline: none; overflow: hidden; padding: 0px; position: absolute; width: 0px; z-index: -1;"></span><br /><br />Comfortmaker Heil Tempstar 24v Repacement Relay Contactor 1050699 HQ1050699HW</h1>
</div>
<div class="" style="background-color: #f8f8f8; border: 0px; color: #333333; font-family: "Helvetica neue", Helvetica, Verdana, sans-serif; font-size: 13px; margin: 0px; padding: 0px;">
<h1 class="it-ttl" itemprop="name" style="border: 0px; display: inline; font-size: 18px; line-height: normal; margin: 0px; padding: 0px;">
<div class="" style="border: 0px; font-size: 13px; font-weight: normal; margin: 0px; padding: 0px;">
</div>
</h1>
<h1 class="it-ttl" id="itemTitle" itemprop="name" style="border: 0px; color: #333333; display: inline; font-family: "Helvetica neue", Helvetica, Verdana, sans-serif; font-size: 18px; font-weight: bold; line-height: normal; margin: 0px; padding: 0px;">
<span class="g-hdn" style="border: 0px; font-family: "helvetica neue" , "helvetica" , "verdana" , sans-serif; font-size: 0px; font-weight: normal; height: 0px; line-height: 0; margin: 0px; outline: none; overflow: hidden; padding: 0px; position: absolute; width: 0px; z-index: -1;"></span></h1>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.ebayimg.com/images/g/u-MAAOSwNSxU3SHa/s-l1600.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://i.ebayimg.com/images/g/u-MAAOSwNSxU3SHa/s-l1600.jpg" height="239" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="http://www.ebay.com/itm/222179588108?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT">http://www.ebay.com/itm/222179588108?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT</a><br />
<br />
<br />
When transformer comes I swap it in. Now I have 24V power. Thermostat is working again. <b>Outside the condenser is clicking again. </b> A week with out cooling and a total fail. I'm right where I started. It was not the control board.<br />
<br />
At this point I got lucky. I played with the thermostat and I find that the unit will heat, but not cool. In heat mode the condenser starts right up and heat pours out. That is the big clue. Googling heat and no cool problem I find quickly that the reversing valve is likely the issue. The reversing valve switches the direction of flow of coolant.<br />
<br />
Reversing valve is inside the the outside unit. I have to take the top off with the fan and reach down. The reversing valve looks like this. I didn't take a real picture, this is generic picture. On top is the solenoid. When I disconnected the wires from it, the clicking stopped. <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.bestbuyheatingandairconditioning.com/Merchant2/graphics/00000001/Reversing%20Valve%202.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://www.bestbuyheatingandairconditioning.com/Merchant2/graphics/00000001/Reversing%20Valve%202.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
I measured the voltage at the solenoid and it was getting 24V. There was no magnetic field from the soldenoid (put a screwdriver near it and it should be attracted) and resistance was about 1.5 ohms. It should be 10-60 ohms. The solenoid part (blue in this picture, but red in my unit) comes right out by removing the nut you see on the side.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I ordered a new one for $12.75. </div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: #f8f8f8; color: #333333; font-family: "helvetica neue" , "helvetica" , "verdana" , sans-serif; font-size: 18px; font-weight: bold;">Trane American Standard Heat Pump Reversing Valve Solenoid Coil COL05901</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: #f8f8f8; font-size: 18px;"><span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "verdana" , sans-serif;"><b><a href="http://www.ebay.com/itm/252834011055?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT">http://www.ebay.com/itm/252834011055?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AI</a></b></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: #f8f8f8; font-size: 18px;"><span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "verdana" , sans-serif;"><br /></span></span></div>
When new solenoid came I swapped it in and everything worked! It took nearly two weeks waiting for three parts in a row but at least i saved a lot of money despite my bumbling.<br />
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: #f8f8f8; font-size: 18px;"><span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "verdana" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: #f8f8f8; font-size: 18px;"><span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "verdana" , sans-serif;"><span style="color: black; font-family: "times new roman"; font-size: small;">After thinking about this repair I think the 24V transformer was the root cause of blowing the reversing valve solenoid. The PRIMARY of the transformer was open when it was blown, which makes no sense that I blew it swapping parts. Perhaps the 24V over voltaged the solenoid and blew it. So that makes me feel better, i replaced the bad transformer in the process.</span></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: #f8f8f8; font-size: 18px;"><span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "verdana" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: #f8f8f8; font-size: 18px;"><span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "verdana" , sans-serif;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: #f8f8f8; font-size: 18px;"><span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "verdana" , sans-serif;"><br /></span></span></div>
<div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com11tag:blogger.com,1999:blog-7372498041888039447.post-71958128409742420812016-12-22T17:42:00.000-05:002017-02-11T17:42:40.394-05:00Fixing broken USB power port on Samsung Galaxy 6S Edge <br />
Suddenly one day the USB cord won't stay in and the phone won't charge. Closer inspection i can see the tab in the middle seems missing. Must have broken off when i was carrying it around with the external battery plugged in. Dang. I can charge it wirelessly for a while but that is going to get really inconvenient in the car. I didn't buy the damage warranty, and the phone isn't paid for yet, so I can't just get a new phone. So I dive into make the repair.<br />
<br />
The repair was a success after all, but yuck this is a terrible phone to repair. Count on destroying the back if you ever want to open the phone. It is made of glass and stuck to the back with adhesive. The upside is the USB port is easy to swap once the phone is open, only one ribbon cable needs to be unplugged and a minimum of disassembly.<br />
<div>
<br /></div>
Watched this:<br />
<a href="https://youtu.be/4qjcbBdpeTY">https://youtu.be/4qjcbBdpeTY</a> that I found here:<br />
<a href="http://recomhub.com/blog/samsung-galaxy-s6-and-galaxy-s6-edge-charging-port-repair-guide/">http://recomhub.com/blog/samsung-galaxy-s6-and-galaxy-s6-edge-charging-port-repair-guide/</a><br />
<br />
<br />
Then I bought this:<br />
<span style="background-color: #f8f8f8; color: #333333; font-family: "helvetica neue" , "helvetica" , "verdana" , sans-serif; font-size: 18px; font-weight: bold;">Charging Port: Samsung Galaxy S6 EDGE USB Dock Flex Cable + Mic VERIZON SM-G925V</span><br />
http://www.ebay.com/itm/301833434493<br />
<br />
It looks like this phone requires heating up to break the glue. The video doesn't mention how to re-glue it.<br />
<a href="https://www.ifixit.com/Guide/Samsung+Galaxy+S6+Rear+Glass+Adhesive+Replacement/44897">https://www.ifixit.com/Guide/Samsung+Galaxy+S6+Rear+Glass+Adhesive+Replacement/44897</a><br />
<br />
and you end up buying a new back with adhesive <a _sp="p2060353.m2749.l2649" class="vip item-title" href="http://www.ebay.com/itm/111924107555?_trksid=p2060353.m2749.l2649&var=410876658593&ssPageName=STRK%3AMEBIDX%3AIT" itemprop="name" style="background-color: white; color: #6a29b9; font-family: "Helvetica Neue", Helvetica, Verdana, sans-serif; font-size: 15px; line-height: 17px; max-height: 1e+06px; position: relative;">Back Housing Glass Cover For Samsung Galaxy S6 Edge G925</a><br />
<br />
<a href="http://www.ebay.com/itm/Back-Housing-Glass-Cover-For-Samsung-Galaxy-S6-Edge-G925-/111924107555?var=&hash=item1a0f325923:m:myU_u3n0hGTJ_8FSJwAxeWw">http://www.ebay.com/itm/Back-Housing-Glass-Cover-For-Samsung-Galaxy-S6-Edge-G925-/111924107555?var=&hash=item1a0f325923:m:myU_u3n0hGTJ_8FSJwAxeWw</a><br />
<br />
I will update the blog when the part comes... parts here. Started repair. No photos because my phone is the patient in this repair.<br />
<br />
Heated the phone back with my heat gun and used the temperature probe, this has the problem of the phone getting hot and hard to handle. The clean opening in the youtube video was impossible to duplicate, the glass back cracked immediately when i began to pry on it with an opening tool. I also left some small scratches on the frame, no biggie but i'm glad it is my phone not someone else's. The phone back was completely shattered by the time I worked around it and loosened it from the frame.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-aWbfUZJyiBQ/WGQ9aDeG38I/AAAAAAAAaU4/6j3jWKwKcrEYd9VZ8t66hAfq19jnvwISwCKgB/s1600/20161228_170914.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="https://1.bp.blogspot.com/-aWbfUZJyiBQ/WGQ9aDeG38I/AAAAAAAAaU4/6j3jWKwKcrEYd9VZ8t66hAfq19jnvwISwCKgB/s320/20161228_170914.jpg" width="320" /></a></div>
<br />
Very glad I bought a replacement back before I started. I bought because i thought i would need it for the adhesive. Turns out I need it because the old one is shattered by removing it.<br />
<br />
Here is what the back looked like after i pried it off. Wow. The USB board that was replaced is also shown.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-HtfzMHKSL28/WGQ9aKv6LCI/AAAAAAAAaU4/GzEPvXSv9d8-VRpomvZ4slqgcpaoy2HRwCKgB/s1600/20161228_171509.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="https://4.bp.blogspot.com/-HtfzMHKSL28/WGQ9aKv6LCI/AAAAAAAAaU4/GzEPvXSv9d8-VRpomvZ4slqgcpaoy2HRwCKgB/s320/20161228_171509.jpg" width="320" /></a></div>
<br />
This is the new back I bought<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-y5_fIsL7jbo/WGQ9aIJ0zFI/AAAAAAAAaU4/ep0m5RITizsi15_tLxdrIAEDJfYsgbLzwCKgB/s1600/20161228_170927.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="https://2.bp.blogspot.com/-y5_fIsL7jbo/WGQ9aIJ0zFI/AAAAAAAAaU4/ep0m5RITizsi15_tLxdrIAEDJfYsgbLzwCKgB/s320/20161228_170927.jpg" width="320" /></a></div>
<br />
<br />
<br />
Pressed on the back of the battery and wiggled a bit and was able to remove the circuit board from the frame. The big surprise was that the sim card needs to be pulled out of the top of the phone. I never noticed there is a small cover on the top of the phone where the sim is inserted. Duh didn't occur to me that this phone doesn't have the sim card inside. Until the sim is out you can't take the circuit board all the way out of the frame.<br />
<br />
Replaced the USB board without further dissembling the phone. I could snap the ribbon onto the underside of the main board by just lifting it slightly.<br />
<br />
The bad news is i can see i scratched the inductor on the back of the frame and broke a trace at the edge of the black square in the process of removing the back. Arrgh. Either wireless charging or NFC may not work now and i'll need to see if i can get that part. Looks like it is readily available:<br />
<br />
<h4 style="background-color: white; border: 0px; box-sizing: border-box; color: #333333; font-family: HelveticaNeue-Light, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif !important; line-height: 20px; margin: 0px 0px 0px 5px; padding: 0px 0px 4px; word-wrap: break-word;">
<a class="ng-binding" data-ng-href="http://www.ebay.com/itm/351695135940" data-test-id="351695135940_ItemTitle" href="http://www.ebay.com/itm/351695135940" style="background: transparent; box-sizing: border-box; color: #0654ba; outline-offset: -2px; outline: -webkit-focus-ring-color auto 5px;" target="_blank" title="opens in new window or tab"><span style="font-size: x-small;">Middle Frame Bezel camera Repair Parts W/NFC Chip Qi For Samsung Galaxy S6 Edge</span></a></h4>
<a href="http://www.ebay.com/itm/Middle-Frame-Bezel-camera-Repair-Parts-W-NFC-Chip-Qi-For-Samsung-Galaxy-S6-Edge-/351695135940?var=&hash=item51e2a9e4c4:m:movc9a-jeqXJ8dzLxTho_4Q">http://www.ebay.com/itm/Middle-Frame-Bezel-camera-Repair-Parts-W-NFC-Chip-Qi-For-Samsung-Galaxy-S6-Edge-/351695135940?var=&hash=item51e2a9e4c4:m:movc9a-jeqXJ8dzLxTho_4Q</a><br />
<br />
<a href="http://www.ebay.com/itm/351695135940?var=620659645388">http://www.ebay.com/itm/351695135940?var=620659645388</a><br />
<br />
Meanwhile i will reassemble and test the phone...<br />
<br />
Bingo, wireless charging is still working... i'm somewhat surprised because a trace was clearly broken on the very edge of the black patch containing the inductor.<br />
<br />
Plugging in the USB i get the battery and it shows charging... so the new part worked.<br />
<br />
Made a call, charged the phone, took pictures, everything seems to check out ok. Hooray.<br />
<br />
OK so we have a winner. The phone is fixed. I will have to see if the NFC works next time I'm at a store, it is possible it won't and i will have to open it again and replace the middle frame part with the NFC inductor in it. When I do I will order another back because I'm sure this one will get broken opening it again.<br />
<br />
<br />
<br />
<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-7372498041888039447.post-91656336891729253992016-08-06T09:38:00.002-04:002016-08-06T09:39:36.668-04:00Replacing upper screen on Nintendo 3DS XL<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-EWStlHW72d8/V6XjX2M0q3I/AAAAAAAAZZM/YKMoFYGfYBoVqbZsfE57kjTWhhmmlmWhgCLcB/s1600/20160705_211123.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="https://3.bp.blogspot.com/-EWStlHW72d8/V6XjX2M0q3I/AAAAAAAAZZM/YKMoFYGfYBoVqbZsfE57kjTWhhmmlmWhgCLcB/s400/20160705_211123.jpg" width="400" /></a></div>
<br />
<br />
<br />
Quick blog post to journal my experience replacing the upper screen on a Nintendo 3DS XL.<br />
The 3DS worked fine but the top 1/3 of the screen was black. The owner said it hadn't been dropped so I had no idea if it was damaged, defective or what. There is some chance the connector was loose but usually the screen just needs to be replaced.<br />
<br />
I won't write step by step instructions, because I found this page that does an excellent (not perfect) job with pictures and steps.<br />
<br />
<a href="https://www.ifixit.com/Guide/Nintendo+3DS+XL+Upper+LED+Display+Replacement/25070">https://www.ifixit.com/Guide/Nintendo+3DS+XL+Upper+LED+Display+Replacement/25070</a><br />
<br />
Generally I think this is the most difficult 3DS repair that there is. You need a magnifier, strong light, tweezers and patience. You have to completely dissasemble the 3DS. You have to open the top section to replace the screen, but you also have to totally take apart the bottom section and remove the motherboard to get to the connector. The hardest thing is to thread the new ribbon cable through the hinge. I did this by rolling it up and pushing it through and then unrolling it, using tweezers. The guide doesn't give you any help in how to do this. There are lots of tiny ribbon cables that have to be removed from there clamp connectors and re-attached later. The plastic case and covers has some tricky clip and snap nibs, as well as the top section parts fall all over the place when you open it. <br />
<br />
All that said, I did it! You probably can too, but this is not for first time amateurs unless your DS is headed for the trash bin anyway, then what the heck, do it! The replacement screen was not too expensive... I bought this one from Amazon. It came quickly and fit. So if you fail, you only lost $20.<br />
<br />
Note that the screen has a silver edge, not the black bezel that the original did, so it looks different when you are done. Check by before and after pictures to see what I mean. Also the glass looks a bit different than the original.<br />
<br />
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ss&ref=as_ss_li_til&ad_type=product_link&tracking_id=workingsilico-20&marketplace=amazon&region=US&placement=B00HK7DFOY&asins=B00HK7DFOY&linkId=2bbdbe0f2ee314d8adcd18b9f49ed38a&show_border=true&link_opens_in_new_window=true" style="height: 240px; width: 120px;"></iframe>
<br />
<br />
There were cheaper ones, but this one was shipped from US and didn't look like too sketchy a source.<br />
<br />
Dissasembly and re-assembly took me a couple hours. As I said the hardest part was the large ribbon cable that has to go through the hinge, there is another cable also going through already so it ain't easy. <br />
<br />
The first pass through I had some trouble with the top shell, getting the 3D slider in right and getting all the clips back on the cover. I had squashed them a bit a first and it wouldn't close right. I replaced the screw covers with squares of black electrical tape, prying them out damaged them and they didn't look right afterwards.<br />
<br />
When it was all together, I turned it on and FAIL. Screens flickered but stayed black. Power light came on but no display. Aaargh. Opened the bottom and reseated the ribbons I could reach without removing the mobo, and then found the issue by accident. I had installed the snap in IR module upside down. Check the pictures, it will go on either way. Once it was turned around, the system booted and the displays came on. Win... almost.<br />
<br />
The system froze every time i entered an application. Opened it again, and reseated the WiFi module. This is a common reason that 3DS freeze. Looks like in the last round of fiddling and removing the cover, it was not seated properly. Once it was snapped down tight everything started working. Win... Woot....! Here is the system working. Note the sliver bezel around the upper display, the only sign that this has been repaired.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-nH4kJxzeHbc/V6Xjet1ktAI/AAAAAAAAZZU/VL-F1nKPaqgYOPRZ8oX8kUl_Aaj7Wc2UQCLcB/s1600/20160804_221234.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="https://1.bp.blogspot.com/-nH4kJxzeHbc/V6Xjet1ktAI/AAAAAAAAZZU/VL-F1nKPaqgYOPRZ8oX8kUl_Aaj7Wc2UQCLcB/s400/20160804_221234.jpg" width="400" /></a></div>
<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com14tag:blogger.com,1999:blog-7372498041888039447.post-43355087149639232472015-12-06T10:43:00.001-05:002015-12-24T13:55:35.743-05:00GE GSS25TGPEWW refrigerator hot, freezer OK.My GE GSS25TGPEWW side by side refrigerator has a problem. Today's issue is the refrigerator side is warm. I mean really warm, even hot. But the freezer is just fine and cold as ever. One strange thing is that the top interior light is very hot to the touch. Weird.<br />
<br />
I fixed an icemaker issue on this thing - wow it was 5 years ago.<br />
<a href="http://blog.workingsi.com/2010/10/ge-gss25tgpeww-refrigerator-broke.html">http://blog.workingsi.com/2010/10/ge-gss25tgpeww-refrigerator-broke.html</a><br />
<br />
<span style="color: red;">Note from future self - read the end of the blog first if you are going down this road, the fix turned out to be really simple and free.</span><br />
<br />
First random google searches show I'm not the only one who this ever happened to:<br />
This website is pretty good, you put in your model and it ranks possible issues.<br />
<br />
<a href="http://www.repairclinic.com/RepairHelp/How-To-Fix-A-Refrigerator/58--852901-/Refrigerator-freezer-is-cold-but-refrigerator-is-warm-GSS25TGPEWW">http://www.repairclinic.com/RepairHelp/How-To-Fix-A-Refrigerator/58--852901-/Refrigerator-freezer-is-cold-but-refrigerator-is-warm-GSS25TGPEWW</a><br />
<br />
Evaporator Fan<br />
Damper<br />
Thermistor<br />
Main Board<br />
<br />
Since the fridge is downright HOT, the defroster sounds like it could be the issue. I also need to figure out where the evaporator fan is. The only reason i don't like the evaporator diagnosis is that the freezer is nice and cold.<br />
<br />
I need a picture to find where these parts are, and to see what is at the top under the light assembly that could be getting hot.<br />
<br />
Gotta love google, Image search leads me here:<br />
<a href="http://www.appliancepartspros.com/parts-for-ge-gss25tgpeww.html">http://www.appliancepartspros.com/parts-for-ge-gss25tgpeww.html</a><br />
<br />
<a href="http://www.appliancepartspros.com/fresh-food-section-parts-for-ge-gss25tgpeww.html">http://www.appliancepartspros.com/fresh-food-section-parts-for-ge-gss25tgpeww.html</a><br />
Looking at this page the part#460, refrigerator Damper assembly <span style="background-color: white; color: rgba(0 , 0 , 0 , 0.729412); font-family: "helvetica neue" , "arial" , sans-serif; font-size: 12.6px; line-height: 15.75px;">Part Number </span><span class="numerals" style="background: rgb(255, 255, 255); border: 0px; color: rgba(0 , 0 , 0 , 0.729412); font-family: "helvetica neue" , "arial" , sans-serif; font-size: 12.6px; font-weight: 700; letter-spacing: 0.05em; line-height: 15.75px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">AP3775595 </span>is right where this thing is getting hot. The damper is the little door that lets in cold air from the freezer. We have a suspect!<br />
<br />
Another likely suspect in the same neighborhood is the thermostat <span style="background-color: white; color: rgba(0 , 0 , 0 , 0.729412); font-family: "helvetica neue" , "arial" , sans-serif; font-size: 12.6px; line-height: 15.75px;">Part Number </span><span class="numerals" style="background: rgb(255, 255, 255); border: 0px; color: rgba(0 , 0 , 0 , 0.729412); font-family: "helvetica neue" , "arial" , sans-serif; font-size: 12.6px; font-weight: 700; letter-spacing: 0.05em; line-height: 15.75px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">AP3192951. </span>It might be wise to order that at the same time.<br />
<br />
Just to cover my bases I need to find the evaporator fan and see if it is working.<br />
<a href="http://www.appliancepartspros.com/freezer-section-parts-for-ge-gss25tgpeww.html">http://www.appliancepartspros.com/freezer-section-parts-for-ge-gss25tgpeww.html</a><br />
This picture is totally not clear. The evaporator and far are shown floating in front of the freezer section. A cover is shown near some lights. ugh makes no sense. This is somewhere in the freezer compartment that I will have to dig out.<br />
<br />
Some price research before I head over to look at the thing again<br />
<table class="prts-dts" style="background: rgb(255, 255, 255); border-collapse: collapse; border-spacing: 0px; border: 0px; color: rgba(0, 0, 0, 0.729412); font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 0.75em; line-height: 1.33333; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; width: 245.6px;"><tbody style="background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">
<tr style="background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><th style="background: transparent; border: 0px; color: rgba(0, 0, 0, 0.6); margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; width: 120px;">Part Number:</th><td itemprop="productID" style="background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">AP3775595</td></tr>
<tr style="background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><th style="background: transparent; border: 0px; color: rgba(0, 0, 0, 0.6); margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; width: 120px;">Made by:</th><td itemprop="brand" itemscope="" itemtype="http://schema.org/Organization" style="background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><span itemprop="name" style="background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">GE</span></td></tr>
</tbody></table>
<a href="http://www.appliancepartspros.com/ge-refrigerator-damper-assembly-wr49x10091-ap3775595.html">http://www.appliancepartspros.com/ge-refrigerator-damper-assembly-wr49x10091-ap3775595.html</a><br />
they want $165<br />
<br />
Amazon has this for $97, but it is not clear if it is the same part, or even compatible.<br />
<br />
GE WR49X10091. My model is not listed, but search takes me here.<br />
<br />
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ss&ref=ss_til&ad_type=product_link&tracking_id=workingsilico-20&marketplace=amazon&region=US&placement=B004H3XWB0&asins=B004H3XWB0&linkId=4DWFUHQ3P34RYHA2&show_border=true&link_opens_in_new_window=true" style="height: 240px; width: 120px;">
</iframe>
<br />
ebay gets me NOTHING when searching <span style="background-color: white; color: rgba(0 , 0 , 0 , 0.729412); font-family: "helvetica neue" , "arial" , sans-serif; font-size: 12px; line-height: 16px;">AP3775595. Aha, i see that the AP number is a bogus appliance parts website number the </span><span style="background-color: white; color: rgba(0 , 0 , 0 , 0.729412); font-family: "helvetica neue" , "arial" , sans-serif; font-size: 13px; line-height: 17.9999px;">WR49X10091</span><span style="background-color: white; color: rgba(0 , 0 , 0 , 0.729412); font-family: "helvetica neue" , "arial" , sans-serif; font-size: 13px; line-height: 17.9999px;"> is correct</span><br />
<span class="h4" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #286099; font-family: "helvetica neue" , "arial" , sans-serif; font-size: 16px; font-weight: bold; line-height: 1.3125em; margin: 0px 0px 0.65625em; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></span>
<span class="h4" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: #286099; font-family: "helvetica neue" , "arial" , sans-serif; font-size: 16px; font-weight: bold; line-height: 1.3125em; margin: 0px 0px 0.65625em; outline: 0px; padding: 0px; vertical-align: baseline;">Cross Reference Information</span><br />
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 0.8125em; line-height: 1.38461em; margin-bottom: 0.6923em; margin-top: 0.6923em; outline: 0px; padding: 0px; vertical-align: baseline;">
Part Number WR49X10091 (AP3775595) replaces 1055112, AH966602, EA966602, PS966602, WR02X11254, WR02X11255, WR14X10070, WR14X10071, WR14X10166, WR17X10869, WR17X10870, WR17X10871, WR17X10896, WR17X11508, WR2X11254, WR49X10101, WR49X10149, WR49X10150, WR49X10155, WR60X10051, WR60X10052, WR60X10070, WR60X10132, WR60X10174, WR60X10226.</div>
<span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: "helvetica neue" , "arial" , sans-serif; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Prices on ebay range from 85 to 120.</span><br />
<span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: "helvetica neue" , "arial" , sans-serif; font-size: 16px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">A few outliers cheaper. Maybe worth doing the Amazon to get it fast.</span><br />
<br /><br />I'm going to pull the unit from the fridge and see if I can jimmy it before I pull the trigger.<br />stay tuned..<br /><br /><br /> Some quality time looking at the fridge. Cold air blows nicely out of the hole if i remove the damper assembly in the top of the fresh food section. So the evaporator and fan are working. The flapper door was shut, i poked it open with a screwdriver and put it back in. The fridge started getting cold. But after a time i went back and the door was shut again and it was warm again.<br /><br /><br /> The hotness i felt before i think was just the lamp getting hot. There is nothing else in that area that could be overheating. So that was a red herring.<br /><br /><br /> Alright, either the damper assembly is bad, the thermistor, or the main control board. I will start with the cheap components first. Ordering a damper unit....<br /><br /><br /> The new damper came. Swapped it in. Waited. FAIL. The fridge did not get cold. $97.34 wasted. OK i also bought a $9.80 thermistor. I will swap that in next and see if that works. If not we are going to have to also get a main board. I'll still save money over a service call, but not as much as I'd hope. I can think about selling back the damper unit on ebay.<br /><br /><br />I panicked and order a new main board, figuring the thermistor can't possibly be the problem. It came and i swapped the new main board in. FAIL. The fridge runs just fine but nothing is different. The food side stays hot and the freezer is cold.
<span style="background-color: white; color: rgba(0 , 0 , 0 , 0.729412); font-family: "helvetica neue" , "arial" , sans-serif; font-size: 12px; line-height: 16px;"><br /></span>
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ss&ref=ss_til&ad_type=product_link&tracking_id=workingsilico-20&marketplace=amazon&region=US&placement=B003BIGDLI&asins=B003BIGDLI&linkId=42SJBBAM7FLYKFJK&show_border=true&link_opens_in_new_window=true" style="height: 240px; width: 120px;">
</iframe>
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ss&ref=ss_til&ad_type=product_link&tracking_id=workingsilico-20&marketplace=amazon&region=US&placement=B00OMQZU6M&asins=B00OMQZU6M&linkId=YPJPROBBXQUGSEZ5&show_border=true&link_opens_in_new_window=true" style="height: 240px; width: 120px;">
</iframe>
<br />
<br />
Looks like i will be selling the main board on ebay to get my money back, and I'll try replacing the thermistors. I finally figured out where they are, the pictures on the web are useless. There are two small oval grilles on the left side of the food compartment. they snap out, and under the cover is the thermistor. Was that so hard?<br />
<a href="http://www.appliance-repair-it.com/refrigerator-thermistor.html">http://www.appliance-repair-it.com/refrigerator-thermistor.html</a><br />
<br />
The misery continues. I installed two new thermistors in the food compartment. Snap out the oval grill, cut the wires, and use wire nuts to connect the new one. Strangely the refrigerator is no slightly cooler but definitely still not working. I feel only a wisp of cool air coming out of the damper. Back to the drawing board. My technique of part swapping is having one of it's worst runs ever.<br />
<br />
I need to reevaluate how much cold air is coming from the freezer. Maybe my original conclusion that the evaporator fan was working was wrong. I will also look at the damper and see if it is open, since the fridge brain must be telling it to open up when it is so hot inside.<br />
<br />
The only part left I haven't bought is the evaporator motor<br />
<br />
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ss&ref=ss_til&ad_type=product_link&tracking_id=workingsilico-20&marketplace=amazon&region=US&placement=B004H3XWVK&asins=B004H3XWVK&linkId=LQ6PSX52GMDJUL63&show_border=true&link_opens_in_new_window=true" style="height: 240px; width: 120px;">
</iframe>
<br />
<br />
The evaporator fan came. Wow it is a pain to replace this thing. You have to take the back panel off the refrigerator, take out the ice maker, the unit under the icemaker that turns the ice. Several screws and jockeying around. A youtube video makes it look easier than it was.<br />
<a href="http://www.appliancepartspros.com/ge-evaporator-fan-motor-wr60x10185-ap3875639.html#autoplay">http://www.appliancepartspros.com/ge-evaporator-fan-motor-wr60x10185-ap3875639.html#autoplay</a><br />
<br />
Finally I get the whole assembly open, and before I replaced the fan I plugged the unit back in to see if the fan motor was working. Whirrrrr it was spinning like a champ. So the evaporator fan motor was perfectly fine, no need to put in the new unit. <br />
<br />
Aaaaaaaarrrrgggggh! Total frustration. I've now replaced the damper unit, the thermistors, the main board, and stopped short of replacing the evaporator fan. Everything is working but the fridge is still warm inside.<br />
<br />
In debugging you arrive at this point for a couple reasons. Either you replaced a bad part with another bad part. Two things are wrong and you only swapped out one thing. Or something incredibly stupid and simple is wrong that you are too blind to see.<br />
<br />
OK it is not two things wrong, since all the parts are new at once. It could be a bad replacement part but that is pretty unlikely and expensive and time consuming to check. So lets look for something else stupid that is wrong.<br />
<br />
I connected the old damper and looked at the flapper door. Shut. The new damper does seem to behave differently, the fan whirrs and the flapper door opens. I ran the fridge for a while and checked it again. Flapper door had shut! Why would it shut when the fridge is obviously warm? Unplugged and tried again. Same thing. Flap opens on restart, but shortly closes again. Repeat with old damper. Now i see it is doing the same thing. Is the main board confused?<br />
<br />
Lightening finally strikes me, small at first but then it builds. While I'm checking the damper, the door is open. Maybe the fridge shuts the damper when you open the fresh food door to keep the freezer from getting warm air in it. So I decide to find the door switch and trick the fridge into thinking the door is shut so I can see what the damper does.<br />
<br />
I look at the door switch and it looks weird. I see a small microswitch that is too small to ever touch the door. At this point all the pieces fall into place and I understand completely everything that has been happening. Like the drawing room scene at the end of a mystery novel.<br />
<br />
The little plastic lever on the door open switch had been knocked off. I failed to mention that I had cleaned out the fridge the day before this happened and likely knocked it off then. It just took a while to manifest. The fridge thought the door was open all the time. Thus the light was on solid, and heated up the fridge like an easy bake oven, making it hot, and making the light fixture burning hot. The fridge thought the door was open and shut the damper to save the freezer and so none of the cool air made it to the fresh food section. I looked around the floor and found the plastic wedge shaped piece under the edge of the cabinet. I popped it back on and suddenly everything was right again.<br />
<br />
There was nothing wrong with the damper, main board, thermistors or evaporator fan. Why didn't I see the obvious before I began this process? I was in a panic to fix this thing and parts take time to come, so I pulled the trigger without doing a thorough investigation.<br />
<br />
Oh My God. Bleepity bleep. This was an epic fail of a repair job. I bought $250 worth of parts and it took nearly two weeks with a broken fridge right at Christmas time. All because of a stupid little piece of plastic knocked loose. I will sell back the parts I pulled on ebay and try to get some of the money back.<br />
<br />
Geez.. At least it is fixed now!<br />
<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-7372498041888039447.post-71379741574456608362015-06-30T17:18:00.000-04:002015-06-30T17:18:35.972-04:00Logic Friday<br />
Logic Friday<br />
<br />
This is a tool for creating logic from a truth table you enter. Very cool. Free. Wish I wrote it.<br />
<br />
http://www.sontrak.com/index.html<br />
<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com7tag:blogger.com,1999:blog-7372498041888039447.post-9557258141068347332014-08-30T09:08:00.001-04:002014-08-31T18:21:46.032-04:00Epic Fail - Samsung Galaxy S4 swimming in salt water<a href="http://4.bp.blogspot.com/-rpqEus6WCbg/VAHHWYQidsI/AAAAAAAAUfk/9ZhIOKD9MLo/s1600/samsungs4-4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="http://4.bp.blogspot.com/-rpqEus6WCbg/VAHHWYQidsI/AAAAAAAAUfk/9ZhIOKD9MLo/s1600/samsungs4-4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="http://4.bp.blogspot.com/-rpqEus6WCbg/VAHHWYQidsI/AAAAAAAAUfk/9ZhIOKD9MLo/s1600/samsungs4-4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="http://4.bp.blogspot.com/-rpqEus6WCbg/VAHHWYQidsI/AAAAAAAAUfk/9ZhIOKD9MLo/s1600/samsungs4-4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><br />
<br />
This summer I went swimming at the beach. Played in the waves about half and hour. At one point I realized my Samsung Galaxy S4, less than a year old, was in my pocket. Nooooooooooo! I didn't think I had it with me, but I'm so used to carrying it that it has become invisible. It was inside a huge rubbery Otterbox Defender case. Thank goodness I didn't lose it, I would have gone nuts combing the beach for it.<br />
<br />
On the outside the phone looked fine. I immediately popped off the back and took out the battery. I had no tools with me on vacation so I couldn't do much more. I dried it out with a paper towel and put it in a bag of rice and left it. It had a few drops of water inside around the battery but didn't look too bad. Between the case and the phone, it seems pretty tight. Maybe it will be OK? Some people suggested I should rinse it with fresh water to get the salt water out, but that seemed like I'd be destroying it more, when it didn't seem terribly wet inside.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-rpqEus6WCbg/VAHHWYQidsI/AAAAAAAAUfk/9ZhIOKD9MLo/s1600/samsungs4-4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-rpqEus6WCbg/VAHHWYQidsI/AAAAAAAAUfk/9ZhIOKD9MLo/s1600/samsungs4-4.png" height="225" width="400" /></a></div>
<br />
<br />
I left it in for 24 hours and tried to power it up. Nothing. Totally dead. I left it to charge a while. Still dead. I took the battery out and tried to power it up, thinking maybe the battery was shorted. Nothing. Dead.<br />
<br />
A voltmeter on the terminals circled in the picture yields 1.8V when the phone is plugged in, and goes away when it is unplugged. This is the input for the wireless charging. This gives me some hope that the phone is not a brick. But it still doesn't power up.<br />
<br />
I'm out of state with no phone and no tools. I need a phone to live, so I sucked it up and went to the local Best Buy and used an upgrade to replace it with a slight newer Samsung Galaxy S5. Ended up costing $100 and two more years. But at least the pain of stupidity faded a bit with a shiny new phone. Now I was free to try some more extreme measures to fix the phone.<br />
<br />
When I get home two days later, and have my tools I open it up. The phone has been in rice the whole time.<br />
<br />
Standard youtube video shows you how to open it. It is surprisingly easy for a phone to get apart. Once the screws are out, I used my fingernail.<br />
<br />
<a href="https://www.youtube.com/watch?v=zm4f2XjQLAM">https://www.youtube.com/watch?v=zm4f2XjQLAM</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-6arQZWsQghc/VAHHV8fEZ8I/AAAAAAAAUfc/AO6YSJ_beHs/s1600/samsungs4-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-6arQZWsQghc/VAHHV8fEZ8I/AAAAAAAAUfc/AO6YSJ_beHs/s1600/samsungs4-3.png" height="225" width="400" /></a></div>
<br />
Things look OK at first glance, but close inspection and YUCK! Maybe you can't see from the pictures but it looks like a friggin salt mine. Salt is conductive and if it is not corroded, it is probably shorted in all kinds of places.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-3_TrydxsEKU/VAHHV6CwPjI/AAAAAAAAUfo/qidUznr8qzs/s1600/samsungs4-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-3_TrydxsEKU/VAHHV6CwPjI/AAAAAAAAUfo/qidUznr8qzs/s1600/samsungs4-1.png" height="225" width="400" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-rozvYL0mo8w/VAHHVQ9ZsAI/AAAAAAAAUfY/1rL7F3MvNvY/s1600/samsungs4-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-rozvYL0mo8w/VAHHVQ9ZsAI/AAAAAAAAUfY/1rL7F3MvNvY/s1600/samsungs4-2.png" height="360" width="640" /></a></div>
<br />
There is salt everywhere, caked on the components. I popped out the motherboard by lifting the connectors and rinsed it in alcohol. I poured alcohol all over the exposed boards. Wiped what I could and let it evaporate. Once it dries it looks better, but there is still salt caked everywhere. Can't figure out how to make it better. <br />
<br />
I re-assmbled and plugged it in. Still nothing. Totally dead. This phone may be a lost cause.<br />
I'll add more if I think of a way to clean it better. Maybe a fresh water bath will dissolve it better than water. <br />
<br />
At this point a week has passed since it got submerged in salt water. In hindsight I should have done this immediately. The damage may have already been done. I just didn't have the nerve.<br />
<br />
I can't believe I did this, it felt so wrong! I disassembled the phone and gave it a bath in fresh water. I took off the cover and removed the connectors to the motherboard so that water could get underneath. I did not totally take it apart. I rinsed the boards each a couple times and changed the water a couple times to get the salt off. Never have I treated electronics this way!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-WUBZJL7kfUQ/VAMmisGLqgI/AAAAAAAAUhc/ibV9AXZNC_Y/s1600/20140831_093326%2B(1).jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-WUBZJL7kfUQ/VAMmisGLqgI/AAAAAAAAUhc/ibV9AXZNC_Y/s1600/20140831_093326%2B(1).jpg" height="225" width="400" /></a></div>
<br />
Back in the rice while still disassembled. I will let it sit for a day and dry out.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-_Dy4kJW4v44/VAMmisp0vWI/AAAAAAAAUhY/cgvM5-lqmgM/s1600/20140831_093552%2B(1).jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-_Dy4kJW4v44/VAMmisp0vWI/AAAAAAAAUhY/cgvM5-lqmgM/s1600/20140831_093552%2B(1).jpg" height="225" width="400" /></a></div>
<br />
After it dried out I looked at it, and it is still full of salt. This photo is bad but you can see salt caked around between the components.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-hRzvXPhm71U/VANSqunKmEI/AAAAAAAAUiQ/rtvKXlq7dsg/s1600/20140831_124203.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-hRzvXPhm71U/VANSqunKmEI/AAAAAAAAUiQ/rtvKXlq7dsg/s1600/20140831_124203.jpg" height="180" width="320" /></a></div>
<br />
I put the phone under running warm water for 10 minutes, and back into the rice. Not looking good.<br />
<br />
After the phone dryed, the boards don't look much better. There is still salt caked in between the components. Dang. This needs some aggressive cleaning.<br />
<br />
Strangely there is some minor improvement. The terminals on the back of the phone circled above, now read 5V instead of 1.8V!! So I have removed some of the shorting material. However the phone is still totally DOA and won't turn on and no LEDs light. I'll try charging for a bit but I should see a charging screen even with a dead battery.<br />
<br />
Stay tuned.. but if this happens to you, don't expect to ever use your phone again :).<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com14tag:blogger.com,1999:blog-7372498041888039447.post-84100608781344982502014-07-23T22:36:00.003-04:002014-07-26T11:34:22.553-04:00Fixing Acer Aspire One AO756 Laptop w/Intermittent Screen<a href="http://1.bp.blogspot.com/-BopujbCDxIw/U9BuGay0rcI/AAAAAAAATb0/YcePsBjq3d0/s1600/Capture.PNG" imageanchor="1"><img border="0" src="http://1.bp.blogspot.com/-BopujbCDxIw/U9BuGay0rcI/AAAAAAAATb0/YcePsBjq3d0/s320/Capture.PNG" /></a><br />
<br />
Quick post on a successful laptop fix. I was in a hurry and didn't take pictures, so this post may be less helpful than average. However this was an easy fix that anyone with a small screwdriver can do.<br />
<br />
This laptop had an intermittent screen. As the user manipulated the laptop the video would flicker, tear, invert, lose colors, etc. Problem happened enough that it was really irritating. Wiggling and re positioning made it work again briefly. This was not just the backlight turning on and off, the video was being corrupted. Backlight stayed on the whole time. There were no obvious cracks or sections of the screen acting differently, so it didn't look like LCD trauma.<br />
<br />
I thought the LCD panel was probably cracked internally or the video cable was broken at the hinge, as the video cables usually go through the hinges and this machine had a rough life. My first thought was I'd being buying a replacement LCD but I was wrong.<br />
<br />
To rule out the possibility that the video chip is coming loose/desoldered from the motherboard, I plugged in an external monitor. Video was fine. So the motherboard and graphics are working.<br />
<br />
First I pried around the screen bezel and it pops right off. No screws at all. Four screws hold down the panel. Flip it over and the video connector is on the back. Removed and reseated it. Wiggled and flexed the panel, cable and connector. There really seemed to be no correlation to wiggling something around the screen, hinges, connector and the screen flickering. More manipulation and I decided that the loose wire must be the other end of the video cable. Snapped the screen and bezel back together.<br />
<br />
Flipped it over and began removing screws. Removed the battery. Several screws on the back surface, remove the hard drive cover and there are about 10 more sprinkled around. You must remove them ALL. None are hidden, thank goodness. (actually one is next to the wifi module and was partially under a sticker) They are little black Philips head. Once they are all out you can pry around the perimeter and the keyboard and top cover pops off without much resistance. If you miss one screw, the keyboard and top cover won't come off. Pry it a bit and you will quickly find the one you missed. Left the keyboard cable connected and folded top cover out of the way. Underneath is another video connector like the one on the back of the LCD. Follow the black wire bundle from the screen to find it. Unseated and reseated and the problem went away! W00t!<br />
<br />
A bit of finagling and popping to put the cover back on and putting in all the screws. Good as new.<div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com27tag:blogger.com,1999:blog-7372498041888039447.post-39584707405927708662014-05-23T22:12:00.000-04:002014-05-25T10:48:22.481-04:00Installed custom taillights on the 2007 Honda Accord.Backed into another car that backed up the same time as me. Ended up with a scuffed bumper and a busted taillight. Boo! Wiped off the bumper, i'm gonna live with the scratches. Need to fix the taillight.<br />
<br />
My car is a 4 cylinder 4DR EX sedan.<br />
<br />
<img src="https://lh5.googleusercontent.com/-qodF0uZ_hYM/U3JO0crFBaI/AAAAAAAASn0/GmvmOEMuUcY/w510-h287-no/20140513_125631.jpg" /><br />
<br />
Looked around on the web and found some custom tail lights for not a lot more than an OEM replacement. Perfect excuse for some low key bling. I like the look of clear taillights on a silver car. Smoke ones won't look good on a light colored car. I never liked the monocrome plain tail lights this car came with anyway.<br />
<br />
Bought these. They don't come with the LEDs, luckily the old ones were still working, only the cover got broken. I was concerned these were cheaper by $50 than others I found on the web. They came and they look very nice, the picture doesn't do justice.<br />
<br />
<img src="http://www.autolightsbulbs.com/images/l/317-1978P-USVC.jpg" /><br />
<br />
<a href="http://www.autolightsbulbs.com/2006-2008-Honda-Accord-Tail-Light/K1107282.aspx">http://www.autolightsbulbs.com/2006-2008-Honda-Accord-Tail-Light/K1107282.aspx</a><br />
<h1 style="background-color: white; clear: both; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 17px; margin: 30px 0px 5px;">
2006-2008 Honda Accord Tail Light - Pair (Both Driver and Passenger Sides)</h1>
<h3 style="background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin: 2px 0px 10px;">
(LED Chrome) - Sedan</h3>
<div>
<ul style="background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; list-style: none; margin: 10px 0px; padding: 0px;">
<li class="pi_l" style="color: navy; margin: 0px; padding: 0px; width: 595.125px;"><div class="pi50l" style="float: left; padding: 2px 5.9375px 2px 2px; text-align: right; width: 208.28125px;">
Reference #</div>
<div class="pi50r" style="float: left; padding: 2px 2px 2px 5.9375px; width: 363.015625px;">
K1107282</div>
</li>
<li class="pi_l" style="color: navy; margin: 0px; padding: 0px; width: 595.125px;"><div class="pi50l" style="float: left; padding: 2px 5.9375px 2px 2px; text-align: right; width: 208.28125px;">
Partslink #</div>
<div class="pi50r" style="float: left; padding: 2px 2px 2px 5.9375px; width: 363.015625px;">
HO2811261</div>
</li>
<li class="pi_l" style="color: navy; margin: 0px; padding: 0px; width: 595.125px;"><div class="pi50l" style="float: left; padding: 2px 5.9375px 2px 2px; text-align: right; width: 208.28125px;">
Position (Side)</div>
<div class="pi50r" style="float: left; padding: 2px 2px 2px 5.9375px; width: 363.015625px;">
Both Driver (Left) and Passenger (Right)</div>
</li>
</ul>
</div>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="CartTable" style="clear: both; color: rgb(102, 102, 102) !important; font-family: arial, helvetica, sans-serif; font-size: 11px; margin-top: 20px; width: 100%px;"><tbody>
<tr><td align="left" style="border-bottom-color: rgb(204, 204, 204); border-bottom-width: 1px; border-style: solid none; border-top-color: rgb(204, 204, 204); border-top-width: 1px; color: rgb(51, 51, 51) !important; font-size: 12px; padding: 5px 10px !important;" width="350">Description</td><td align="right" style="border-bottom-color: rgb(204, 204, 204); border-bottom-width: 1px; border-style: solid none; border-top-color: rgb(204, 204, 204); border-top-width: 1px; color: rgb(51, 51, 51) !important; font-size: 12px; padding: 5px 10px !important;" width="100">Unit price</td><td align="right" style="border-bottom-color: rgb(204, 204, 204); border-bottom-width: 1px; border-style: solid none; border-top-color: rgb(204, 204, 204); border-top-width: 1px; color: rgb(51, 51, 51) !important; font-size: 12px; padding: 5px 10px !important;" width="50">Qty</td><td align="right" style="border-bottom-color: rgb(204, 204, 204); border-bottom-width: 1px; border-style: solid none; border-top-color: rgb(204, 204, 204); border-top-width: 1px; color: rgb(51, 51, 51) !important; font-size: 12px; padding: 5px 10px !important;" width="80">Amount</td></tr>
<tr style="padding: 10px;"><td align="left" style="border-bottom-style: none; font-size: 12px; padding: 10px;">Tail Light (Pair (One Set Packing))<br />
Item# K1107282</td><td align="right" style="border-bottom-style: none; font-size: 12px; padding: 10px;">$105.95 USD</td><td align="right" style="border-bottom-style: none; font-size: 12px; padding: 10px;">1</td><td align="right" style="border-bottom-style: none; font-size: 12px; padding: 10px;">$105.95 USD</td></tr>
</tbody></table>
<table align="left" border="0" cellpadding="0" cellspacing="0" style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; clear: both; color: rgb(102, 102, 102) !important; font-family: arial, helvetica, sans-serif; font-size: 11px; width: 595px;"><tbody>
<tr><td style="font-size: 12px;"><br class="Apple-interchange-newline" />
<table align="right" border="0" cellpadding="0" cellspacing="0" style="clear: both; color: rgb(102, 102, 102) !important; font-size: 11px; margin-top: 20px; width: 595px;"><tbody>
<tr><td style="font-size: 12px; padding: 0px 10px 0px 0px; text-align: right; width: 390px;"><strong>Subtotal</strong></td><td style="font-size: 12px; padding: 0px 5px 0px 0px; text-align: right; width: 90px;">$105.95 USD</td></tr>
<tr><td style="font-size: 12px; padding: 0px 10px 0px 0px; text-align: right; width: 390px;"><span style="color: rgb(51, 51, 51) !important; font-weight: bold;">Total</span></td><td style="font-size: 12px; padding: 0px 5px 0px 0px; text-align: right; width: 90px;">$105.95 USD</td></tr>
<tr><td style="font-size: 12px; padding: 20px 10px 0px 0px; text-align: right; width: 390px;"><span style="color: rgb(51, 51, 51) !important; font-weight: bold;">Payment</span></td><td style="font-size: 12px; padding: 20px 5px 0px 0px; text-align: right; width: 90px;">$105.95 USD</td></tr>
<tr><td style="background-color: white; font-size: 12px; padding: 10px 10px 10px 0px; text-align: right; width: 390px;">Payment sent to <a href="mailto:customerservice@autolightsbulbs.com" style="color: blue;" target="_blank">customerservice@autolightsbulbs.com</a></td></tr>
</tbody></table>
</td></tr>
</tbody></table>
<br />
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Here is what they look like. Sweet.</div>
<div>
<img src="https://lh5.googleusercontent.com/-l04CwXo1ubM/U3_Oo-ryKAI/AAAAAAAAS3Y/GoFAXYzoufg/w510-h287-no/20140523_184122.jpg" /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Also bought some yellow LED turn signal bulbs. When I go clear I don't want the turn signals to be white. Plus I like yellow turn signals better. Paid $9.99 for two.</div>
<div>
<a href="http://www.ebay.com/itm/390822792322?item=390822792322&viewitem=&vxp=mtr">http://www.ebay.com/itm/390822792322?item=390822792322&viewitem=&vxp=mtr</a></div>
<div>
<span style="background-color: #f8f8f8; color: #333333; font-family: 'Helvetica neue', Helvetica, Verdana, sans-serif; font-size: 18px; font-weight: bold;">2x Amber Yellow 24-SMD 7440 7443 LED Bulbs For Turn Signal Lights 7440 7441 #S1A</span></div>
<br />
<br />
I did decide after the fact that I need load resistors to slow down the flashing with the LED bulbs. Should have bought bulbs that came with them.<br />
<iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ss&ref=ss_til&ad_type=product_link&tracking_id=workingsilico-20&marketplace=amazon®ion=US&placement=B00GQ3D4N0&asins=B00GQ3D4N0&linkId=DDPTCB55L7E5Q6VW&show_border=true&link_opens_in_new_window=true">
</iframe>
<br />
<div>
<span style="background-color: #f8f8f8; color: #333333; font-family: 'Helvetica neue', Helvetica, Verdana, sans-serif; font-size: 18px; font-weight: bold;"><br /></span></div>
Watched this youtube video, which gave me the confidence to take off the bumper cover.<br />
<div>
<span style="background-color: #f8f8f8;"><span style="color: #333333; font-family: Helvetica neue, Helvetica, Verdana, sans-serif; font-size: medium;"><b><a href="https://www.youtube.com/watch?v=K8kfqND7TBg">https://www.youtube.com/watch?v=K8kfqND7TBg</a></b></span></span></div>
<div>
<span style="background-color: #f8f8f8; color: #333333; font-family: 'Helvetica neue', Helvetica, Verdana, sans-serif; font-size: 18px; font-weight: bold;"><br /></span></div>
I won't attempt to go through the procedure, because the video does that just fine. This post is just to document that what I did worked, and was no trouble at all. Anybody could do this. The whole thing took about 2 hours and required screwdrivers and a socket wrench. Some of the screws and bolts are a little tricky to get your tools on, but not too bad as auto repairs go.<br />
<div>
<br /></div>
<div>
The key lesson I learned when the lights came, is that you have to take the bumper cover off to remove the tail lights. It is probably possible to get them off without doing so, if you reach up into the bumper really far and loosen the bolts. However taking the bumper cover off is ridiculously easy. Two bolts, six screws (3 per wheel well) and two pins under the bumper and it just pops off. Putting it back on is easy, just line it up and pop it back into place. </div>
<div>
<br /></div>
<div>
I transferred the LED light bars from the old lights to the new and didn't need to buy new ones, that saved a lot of money.</div>
<div>
<br /></div>
<div>
The yellow LED turn signal bulbs took some tinkering. Had to bend the wires out a bit and wiggle them a lot to get them to fit in the socket. It took two or three tries to get them to light up. The wires have to be just right, and I think the bulbs only work in one way, and they can be inserted in either polarity. Keep tinkering and trying and they will work.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<img src="https://lh3.googleusercontent.com/-hKCN-Sla4qE/U3_NGGj7bCI/AAAAAAAAS2o/bYjLsO3ctZ8/w510-h287-no/20140523_183316.jpg" /></div>
<div>
The bumper cover is off. Easy as pie. Don't let the wife see the car like this! She'd freak.</div>
<div>
<br />
<div>
<img src="https://lh4.googleusercontent.com/-ANpZbGhwQvs/U3_NdUuRG-I/AAAAAAAAS3A/IcT5TBq58uw/w510-h287-no/20140523_183457.jpg" /></div>
<div>
Tail light come off. Two bolts under the bumper and 4 nuts inside to remove.</div>
<div>
<br /></div>
<div>
<img src="https://lh6.googleusercontent.com/-ndU6MZU1fJc/U3_OV3tLHwI/AAAAAAAAS3M/NQAmWgol11U/w510-h287-no/20140523_183859.jpg" /></div>
<div>
Transferred the LED array. Four screws and it comes right out. Had to pop it open and unplug the one marker light lead and plug in the one built into the new taillight assembly.</div>
<div>
<br /></div>
<div>
<img src="https://lh4.googleusercontent.com/-tIkPW3FppPI/U3_Pap_2VeI/AAAAAAAAS4A/vDehWenXgzU/w510-h287-no/20140523_184251.jpg" /></div>
<div>
Plugging in the new wire inside the LED cover.</div>
<div>
<br /></div>
<div>
<br /></div>
</div>
<div>
<img src="https://lh6.googleusercontent.com/-2r3cJguJtzA/U3_dW6LPpII/AAAAAAAAS4o/RRd6RlKZ0As/w510-h287-no/20140523_194356.jpg" /></div>
<div>
Back together with the bumper cover back on. Took me just under two hours to do the whole job.</div>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-PyPaEehRhm4/U3_9wZyZdTI/AAAAAAAAS50/YtE5jnSb68Y/s1600/Capture.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-PyPaEehRhm4/U3_9wZyZdTI/AAAAAAAAS50/YtE5jnSb68Y/s1600/Capture.PNG" height="400" width="366" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-F5vms0Qp2_o/U3_8ckL7qnI/AAAAAAAAS5g/VhtJ0Op36TQ/s1600/Capture.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-F5vms0Qp2_o/U3_8ckL7qnI/AAAAAAAAS5g/VhtJ0Op36TQ/s1600/Capture.PNG" height="296" width="400" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Together and looking good just as the sun was going down.</div><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com18tag:blogger.com,1999:blog-7372498041888039447.post-63466673458062676102014-04-27T10:10:00.001-04:002014-04-27T10:15:10.429-04:00"Err 3" - Clearing Honda radio error code 3This is for a 1997 Honda Accord, but I'd guess that it holds true for a wide variety of Honda's of comparable vintages. It involves the stock combo radio and CD player that came with the car.<br />
<br />
This information is out there already, but I had to search several blogs and the information was not clear, and the posters were "like you oughta try this dude, might work". Here is what actually happened and the simple fix.<br />
<br />
<u><b>What happened</b></u><br />
My son left his lights on and killed his battery. I charged the battery but neglected to check the radio and it had gone into theft protection mode and was displaying "Code". <br />
<br />
When it displays "Code" you are supposed to pull out the paperwork you got when you bought the car, and there is a white card like a credit card with a 5 digit number (each digit below 3) that you type into the preset buttons to unlock it. This is to discourage theft of radios. (Must have worked because nobody does this lame crime anymore). Many owners write this number on the user manual, which I had done.<br />
<br />
However, I wasn't around and he and his teenage friend tried entering random numbers, not knowing what was going on. The radio went into lockdown mode after several repeated failed tries. Now the radio displays "Err 3" and wont accept a code. It is a doorstop.<br />
<br />
<u><b>What didn't work</b></u><br />
Several posts suggested going to the dealer, or pulling the radio and getting the serial number off the back and calling Honda, and all kinds of other garbage that involved hours of work and dealing with customer service people. All for a teenagers 15 year old car. Ugh. <br />
<br />
One post suggested turning off the car, pressing 1 and 6 simultaneously and holding, and turning the car back on. This sounded like the sort of automobile trick that would work, but it did not. You could try it but it didn't work for me.<br />
<br />
<b><u>The easy fix</u></b><br />
Fix was easier than I imagined.<br />
<br />
Simply open the hood, with the car off, and disconnect the negative (black) terminal of the battery. Takes a wrench and the nut was pretty rusted on this old car. Leave it off for a few minutes. I got in the car and turned the ignition on and back off as an extra step to be sure I drained any residual charge that might be keeping the radio alive.<br />
<br />
Reconnect the battery, tighten the nut and turn the car on. The radio is back to saying "Code". Hooray! Err 3 message is gone and it accepts input. Entered the code from the radio card and all is good now. Teenagers can listen to the radio again instead of trying to play music from their phones while driving.<br />
<br />
Now, later I thought, I could probably have just pulled the fuse for the radio from the fuse panel under the dash instead of disconnecting the battery. I did not try that. Sometimes it is hard to know which fuse to pull and if that fuse will remove the standby power as well. But I recommend trying this if you don't have tools or don't want to mess with the battery. It will probably work if you pull the right fuse. <br />
<br />
<br />
<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com35tag:blogger.com,1999:blog-7372498041888039447.post-6322826733311334862014-03-15T18:01:00.000-04:002014-03-17T10:24:41.488-04:00Hex to Decimal to Binary to Gray Code Converter Tool<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-jk7aVVcrMh4/UycFlVaSt7I/AAAAAAAASR0/sEUgkOmquzY/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-jk7aVVcrMh4/UycFlVaSt7I/AAAAAAAASR0/sEUgkOmquzY/s1600/Capture.PNG" height="216" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
I expanded the little windows/linux PC Java widget I made to decode bits while programming JTAG registers. It was proving very useful. Now it also includes Gray code. This is a live tool that as soon as you enter a number in one format, it instantly updates the value in the others. This saves a ton of time when you read a register and the individual bits are used set switches or report values and it is all glommed together into a big word. A minimal amount of button clicking and typing decodes a hex value into it's bits, allows you to click one on or off, and tells you the new hex value.<br />
<br />
I also added a big display of the hex and binary at the top. Now this wastes a bit of screen space so it might get canned. The tool is getting a bit big.<br />
<br />
I used the rules here:<br />
<a href="http://www.electrical4u.com/gray-code-binary-to-gray-code-and-that-to-binary-conversion/">http://www.electrical4u.com/gray-code-binary-to-gray-code-and-that-to-binary-conversion/</a><br />
<br />
I checked it against this gray code converter (which only goes one way)<br />
<a href="http://www.miniwebtool.com/gray-code-to-binary-converter/?graycode=0001001010011000">http://www.miniwebtool.com/gray-code-to-binary-converter/?graycode=0001001010011000</a><br />
<br />
I've tested it pretty thoroughly and it seems to be totally solid.<br />
<br />
Download the executable java here:<br />
<a href="https://drive.google.com/file/d/0B2Qrk8yU95oCTTNPd2RTWnB5UjA/edit?usp=sharing">https://drive.google.com/file/d/0B2Qrk8yU95oCTTNPd2RTWnB5UjA/edit?usp=sharing</a><br />
<br />
All you have to do is doubleclick on the .jar file and it will run on your computer if you have <b>java jre installed! </b>Most everybody does, but in case you don't you have to download from here: <a href="https://www.java.com/en/download/">https://www.java.com/en/download/</a><br />
<br />
Complete source files in netbeans are also here:<br />
<a href="https://drive.google.com/file/d/0B2Qrk8yU95oCbF9TTlMtV21oYnM/edit?usp=sharing">https://drive.google.com/file/d/0B2Qrk8yU95oCbF9TTlMtV21oYnM/edit?usp=sharing</a><br />
<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com7tag:blogger.com,1999:blog-7372498041888039447.post-5870301192733975452014-02-25T20:37:00.003-05:002014-02-25T20:43:39.789-05:00Hex to Binary JTAG Register Decoder tool<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-tFpDmUZjWNw/Uw1DBqGYjJI/AAAAAAAASM4/DCU7omw0B8w/s1600/Captureee.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-tFpDmUZjWNw/Uw1DBqGYjJI/AAAAAAAASM4/DCU7omw0B8w/s1600/Captureee.PNG" height="115" width="320" /></a></div>
<br />
<br />
While programming JTAG registers I frequently have to fill out binary bit maps to select settings, and then convert the pattern into a hex number to enter in the JTAG programming tool, or decode a register I read into the component bit pattern to see what mode is set. There are certainly a lot of ways to get this job done, including the windows calculator and excel. However most of them clip leading zeros and require counting and grouping the bits.. <br />
<br />
I wrote a quickie Java program to do the conversions in a clear way that I can just click the 16 bits, all numbered, and view the hex code and vice versa. I threw in the decimal value readout because that often comes up too. For example, read a register value and flip bit 10 from 0 to 1 and write the result back in. This is the tool for that job!<br />
<br />
I'm posting the tool on google drive, now that code.google.com is dead. This is trial mostly to see if it will work:<br />
<br />
<a href="https://drive.google.com/file/d/0B2Qrk8yU95oCbS10cngwazdBbTg/edit?usp=sharing">https://drive.google.com/file/d/0B2Qrk8yU95oCbS10cngwazdBbTg/edit?usp=sharing</a><br />
<br />
Just download and click on it and it should run without any setup, assuming you have basic java JRE installed on your computer, which I think everybody does.<br />
<br />
Enjoy!<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-7372498041888039447.post-56224418096084501552014-02-08T17:16:00.002-05:002014-02-08T17:17:14.182-05:00Ubuntu computer on a USB 3 drive<h3>
</h3>
<h3>
With the advent of USB3.0 5Gbps thumb drives, it now makes sense to install Ubuntu onto a USB stick and carry it with you. This is different from putting a live CD install onto a stick, this is actually installing the OS to the stick as if it were a hard drive, and expecting the computer to not be slow as a pig. Files and settings are all preserved from boot to boot and you can plug it into most computers you encounter and have your stuff with you.</h3>
<h3>
This is valuable to me on business travel. My company locks down our PCs hard and fills them with corporate spyware. If I want to do personal business, side business or coding in my spare time I don't want to do it on my work laptop.</h3>
<h3>
However to make this work, there are a couple requirements</h3>
<ul>
<li><h3>
Need a windows FAT32 partition that is readable by both windows and linux boot. This is so I can transfer files back and forth when the host machine is booted in windows. Windows can't read linux file systems.</h3>
</li>
</ul>
<ul>
<li><h3>
Linux files should be encrypted so that if I lose the stick, all my personal information is not at risk</h3>
<h3>
This is the USB3.0 stick that I bought. 32Gb is more than enough to have a 16G FAT32 partition for general use and 16G for Ubuntu apps and OS.</h3>
<h3>
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm-na.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=workingsilico-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=B008R6OPJQ" style="height: 240px; width: 120px;"></iframe>
</h3>
<h3>
</h3>
<h3>
</h3>
</li>
</ul>
<br />
<br />
Downloaded the Ubuntu Live CD install .iso<br />
<br />
<br />
Burned it on a regular 4GB USB2.0 stick, since my computer doesn't have a CD drive using http://www.isotousb.com/<br />
<br />
Booted the computer from the install USB. This requires pressing F11 on my Sony VAIO laptop<br />
<br />
Inserted the USB stick and used gpart to partition as follows<br />
First 16GB as FAT32 for windows<br />
Next 2GB as linux-swap <br />
Final 14GB as /ext2 <br />
<br />
When installing Ubuntu 12 pick "something else" when it asks where to install it. Chose the USB drive, in my machine it was /sdc. Name the /ext2 partition / and the linux-swap partition swap<br />
<br />
Install.<br />
<br />
Shut down and remove the USB stick with the install .iso on it, and put in only the new USB3.0 stick. Boot and press F11.<br />
<br />
Ba da bing. Comes up in Ubuntu with a handy USB stick drive to put files on that a windows machine will be able to see.<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7372498041888039447.post-11350970031864054072014-02-02T11:19:00.003-05:002014-02-02T11:20:35.511-05:00Upgraded PC for video streamingUpgraded another teen machine in the house. It is used for web, video streaming and some video game play. I'm currently using Intel instead of AMD. They are a little more $$, but they run a lot cooler and I can use the stock fans with no issues. I've been happy with the performance of the last couple Intel builds.<br />
<br />
A decent processor from New Egg or Amazon now, I bought it in December and just now got around to using it...<br />
<br />
<br />
<img src="https://ssl-images.newegg.com/ProductImageCompressAll/19-116-896-03.jpg" style="-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 20px; background-color: white; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-top-left-radius: 0px; border-top-right-radius: 0px; border: 1px solid rgb(204, 204, 204); box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 20px; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.545454025268555px; padding: 8px;" /><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.545454025268555px;"> </span><br />
<a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16819116896" style="background-color: white; color: #015782; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.545454025268555px; text-decoration: none;">Intel Core i5-4570 Haswell 3.2GHz LGA 1150 84W Quad-Core Desktop Processor Intel HD Graphics BX80646I54570</a><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.545454025268555px;"> </span><br />
<span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.545454025268555px;">$189 from NewEgg after promo code. $30 cheaper than the i5-4670. 3.2G vs 3.4G. Nobody will notice the difference. </span><br />
<span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.545454025268555px;"><br /></span>
Upgraded the memory to 8Gb with a fairly low end module. I'm no longer buying Gskill, I've spent too many long hours debugging systems that turned out to have bad memory.<br />
<table align="center" border="0" cellpadding="0" cellspacing="0" style="border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-top-left-radius: 6px; border-top-right-radius: 6px; border: 1px solid rgb(220, 220, 220); padding: 10px; width: 100%px;"><tbody>
<tr><td style="font-family: Arial, sans-serif; font-size: medium;"><table align="center" border="0" cellpadding="0" cellspacing="0" style="padding: 5px; width: 100%px;"><tbody>
<tr><td style="font-family: Arial, sans-serif; font-size: medium;"><table align="center" border="0" cellpadding="0" cellspacing="3" style="width: 100%px;"><tbody>
<tr><td align="right" bgcolor="#ffffff" style="font-family: Arial, sans-serif; font-size: medium;" valign="top" width="100%"><table border="0" cellpadding="0" cellspacing="2" style="border-bottom-color: rgb(220, 220, 220); border-bottom-style: dotted; border-bottom-width: 1px; padding: 10px; width: 100%px;"><tbody>
<tr><td cellpadding="0" colspan="2" style="font-family: Arial, sans-serif; font-size: medium;" valign="top"><div style="float: left; height: 100px; text-align: center; width: 100px;">
<img alt="Kingston HyperX Blu 8GB (1x8 GB Module) 1600MHz 240-pin DDR3 Non-ECC CL10 Desktop Memory KHX1600C10D3B1/8G" border="0" height="62" src="https://images-na.ssl-images-amazon.com/images/I/41qLdOS84PL._SX100_.jpg" title="Kingston HyperX Blu 8GB (1x8 GB Module) 1600MHz 240-pin DDR3 Non-ECC CL10 Desktop Memory KHX1600C10D3B1/8G" width="100" /></div>
<div style="float: left; margin: 0px 10px; max-width: 500px;">
1 of: <b><a href="http://www.amazon.com/gp/product/B007TTEHUY/ref=ox_ya_os_product" style="color: #004b91; font-family: Arial, sans-serif; text-decoration: none;">Kingston HyperX Blu 8GB (1x8 GB Module) 1600MHz 240-pin DDR3 Non-ECC CL10 Desktop Memory KHX1600C10D3B1/8G</a></b>[Personal Computers]<br />
<span class="tiny" style="font-family: Arial, sans-serif; font-size: x-small;">Condition: New<br />Sold by: Amazon.com LLC</span><br />
<span class="tiny" style="font-family: Arial, sans-serif; font-size: x-small;"><br /></span>
<span class="tiny" style="font-family: Arial, sans-serif; font-size: x-small;"><br /></span></div>
<div style="float: right; text-align: right;">
$69.99</div>
</td></tr>
<tr><td cellpadding="0" colspan="2" style="font-family: Arial, sans-serif; font-size: medium;" valign="top"><div style="float: left; height: 100px; text-align: center; width: 100px;">
<span id="goog_816309947"></span><img alt="Gigabyte Z87 LGA 1150 CrossFireX HDMI DVI ATX Motherboard (GA-Z87-D3HP)" border="0" height="75" src="https://images-na.ssl-images-amazon.com/images/I/61zUgIhr4sL._SX100_.jpg" title="Gigabyte Z87 LGA 1150 CrossFireX HDMI DVI ATX Motherboard (GA-Z87-D3HP)" width="100" /><span id="goog_816309948"></span></div>
<div style="float: left; margin: 0px 10px; max-width: 500px;">
1 of: <b><a href="http://www.amazon.com/gp/product/B00CU4L4M2/ref=ox_ya_os_product" style="color: #004b91; font-family: Arial, sans-serif; text-decoration: none;">Gigabyte Z87 LGA 1150 CrossFireX HDMI DVI ATX Motherboard (GA-Z87-D3HP)</a> </b>[Personal Computers]<br />
<span class="tiny" style="font-family: Arial, sans-serif; font-size: x-small;">Condition: New<br />Sold by: Amazon.com LLC</span></div>
<div style="float: right; text-align: right;">
$126.49</div>
</td></tr>
</tbody></table>
</td></tr>
</tbody></table>
</td></tr>
</tbody></table>
</td></tr>
</tbody></table>
<br />
<br />
Transferred over the video cards. This machine has two. One for the dual PC screens, and another for the HDMI TV monitor. The new mobo will allow two full length PCIe video cards. One of these is a PCIe 1X card. I'll keep it anyway for now, there are 1x slots on the mobo.<span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.545454025268555px;"><br /></span>
<br />
<table cellpadding="0" cellspacing="0" class="search-result-table" style="background-color: white; border-top-color: rgb(162, 200, 216); border-top-style: solid; border-top-width: 1px; color: #333333; font-family: Arial, Verdana, 'Helvetica Neue', Helvetica, sans-serif; font-size: 12px; line-height: 16.992000579833984px; margin: 0px; padding: 0px; vertical-align: top; width: 100%px;"><tbody>
<tr class="result-item"><td class="image-block" style="border-bottom-color: rgb(162, 200, 216); border-bottom-style: solid; border-bottom-width: 1px; padding: 10px 0px; text-align: center; vertical-align: top; width: 100px;"><a href="http://www.amazon.com/gp/product/B008XY3890/ref=wms_ohs_product_img?ie=UTF8&psc=1" style="color: #004b91; text-decoration: none;"><span class="item-title" style="font-size: 14px;"><img alt="XFX AMD Radeon HD 6770 1GB GDDR3 2DVI/HDMI/DisplayPort PCI-Express Video Card HD677XZAF4;HD-677X-ZAF4" border="0" height="60" src="https://images-na.ssl-images-amazon.com/images/I/415I8ayJvwL._SX80_.jpg" style="border: 0px; outline: 0px;" title="XFX AMD Radeon HD 6770 1GB GDDR3 2DVI/HDMI/DisplayPort PCI-Express Video Card HD677XZAF4;HD-677X-ZAF4" width="80" /></span></a></td><td class="item-info" style="border-bottom-color: rgb(162, 200, 216); border-bottom-style: solid; border-bottom-width: 1px; padding: 10px 15px 5px 0px; vertical-align: top;"><div class="orderid-primary" style="font-weight: bold;">
<span class="info-title" style="color: #666666; font-size: 10px; text-transform: uppercase;">PLACED </span><span style="font-size: 12px;">March 17, 2013</span></div>
<div class="item-title item-margin" style="font-size: 14px; margin-top: 7px;">
<a href="http://www.amazon.com/gp/product/B008XY3890/ref=wms_ohs_product?ie=UTF8&psc=1" style="color: #004b91; font-size: 12px; text-decoration: none;"><span class="item-title" style="font-size: 14px;">XFX AMD <span class="matches" style="color: #e47911; font-weight: bold;">Radeon</span> HD 6770 1GB GDDR3 2DVI/HDMI/DisplayPort PCI-Express Video Card HD677XZAF4;HD-677X-ZAF4</span></a></div>
<div class="author" style="color: #666666; font-size: 12px;">
XFX</div>
</td><td class="other-items" style="border-bottom-color: rgb(162, 200, 216); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(162, 200, 216); border-left-style: dashed; border-left-width: 1px; font-size: 12px; padding: 4px 0px 0px 15px; width: 220px;"></td></tr>
<tr class="result-item"></tr>
<tr class="result-item"><td class="image-block" style="border-bottom-color: rgb(162, 200, 216); border-bottom-style: solid; border-bottom-width: 1px; padding: 10px 0px; text-align: center; vertical-align: top; width: 100px;"><a href="http://www.amazon.com/gp/product/B004GL72K0/ref=wms_ohs_product_img?ie=UTF8&psc=1" style="color: #004b91; text-decoration: none;"><span class="item-title" style="font-size: 14px;"><img alt="HIS ATI Radeon HD5450 Silence 1 GB DDR3 VGA/ DVI/ DisplayPort Low Profile PCI-Express Video Card H545H1GD1" border="0" height="65" src="https://images-na.ssl-images-amazon.com/images/I/412g5ojpRqL._SX80_.jpg" style="border: 0px; outline: 0px;" title="HIS ATI Radeon HD5450 Silence 1 GB DDR3 VGA/ DVI/ DisplayPort Low Profile PCI-Express Video Card H545H1GD1" width="80" /></span></a></td><td class="item-info" style="border-bottom-color: rgb(162, 200, 216); border-bottom-style: solid; border-bottom-width: 1px; padding: 10px 15px 5px 0px; vertical-align: top;"><div class="orderid-primary" style="font-weight: bold;">
<span class="info-title" style="color: #666666; font-size: 10px; text-transform: uppercase;">PLACED </span><span style="font-size: 12px;">March 11, 2013</span></div>
<div class="item-title item-margin" style="font-size: 14px; margin-top: 7px;">
<a href="http://www.amazon.com/gp/product/B004GL72K0/ref=wms_ohs_product?ie=UTF8&psc=1" style="color: #004b91; font-size: 12px; text-decoration: none;"><span class="item-title" style="font-size: 14px;">HIS ATI <span class="matches" style="color: #e47911; font-weight: bold;">Radeon</span> HD5450 Silence 1 GB DDR3 VGA/ DVI/ DisplayPort Low Profile PCI-Express Video Card H545H1GD1</span></a></div>
<div class="author" style="color: #666666; font-size: 12px;">
HIS</div>
</td></tr>
</tbody></table>
<span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.545454025268555px;"><br /></span>
<span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.545454025268555px;"><br /></span>On first boot I got a fail. The machine lit up, spun the fans for two seconds, stopped for two seconds and repeated in an endless power cycle. Sometimes this is the processor finding the right speed and it will recover, but this did not. Next usual cause is the 12V CPU power plug is not installed. Nope it was plugged in. Next thing is the memory modules. I had started with the new 8GB and the 2x2GB gskill modules that were in the old mobo. Reseated them, no improvement. Removed the old modules and left just the new one. Bingo! Machine boots. There is no speaker on this mobo so there were never any beeps. I was hoping to leave 12GB in the machine but I decided to throw out the old 4Gb, it was 1333 instead of 1600 anyway. I'm not sure what the issue was, didn't debug it. 8Gb of memory it is. Still a 2X upgrade from the previous rig.<br />
<br />
Kept the old 500G hard drive. I did NOT re-install windows now that I know the magic. The machine runs windows 7. <span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="background-color: white;"><span style="font-size: 12.727272033691406px; line-height: 16.545454025268555px;"> </span></span></span><br />
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="background-color: white;"><span style="font-size: 12.727272033691406px; line-height: 16.545454025268555px;"><br /></span></span></span>
Links to how to make windows accept the new mother board:<br />
<a href="http://www.tomshardware.com/forum/304001-30-bsod-motherboard">http://www.tomshardware.com/forum/304001-30-bsod-motherboard</a><br />
<span id="goog_816309956"></span><span id="goog_816309957"></span><a href="http://www.dowdandassociates.com/blog/content/howto-repair-windows-7-install-after-replacing-motherboard/">http://www.dowdandassociates.com/blog/content/howto-repair-windows-7-install-after-replacing-motherboard/</a><br />
<br />
Copy the mobo driver CD to a USB on a working machine, and plug in the USB drive. I've stopped using optical drives in most machines, since mine were all IDE and now mobos only support SATA. Otherwise you can just put the CD into the new machine directly.<br />
<br />
The gist is, boot the machine, let it try to do a startup repair and fail. When it fails, click the link on the bottom of the form for advanced options. The last is command line, pick that. <br />
<br />
Type C: and dir, D: and dir, etc to find which drive is the windows install and which is the USB. They won't be in the usual places. On my machines the windows install is always on D: and the drivers on USB are on E:<br />
<br />
Type this command, and watch the spaces. Leave one out at it won't work.<br />
<span style="background-color: #002b36; color: #93a1a1; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; white-space: pre;">dism </span><span class="n" style="background-color: #002b36; border: 0px; color: rgb(38, 139, 210) !important; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">/image:d:\</span><span style="background-color: #002b36; color: #93a1a1; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; white-space: pre;"> </span><span class="n" style="background-color: #002b36; border: 0px; color: rgb(38, 139, 210) !important; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">/add-driver</span><span style="background-color: #002b36; color: #93a1a1; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; white-space: pre;"> </span><span class="n" style="background-color: #002b36; border: 0px; color: rgb(38, 139, 210) !important; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">/Driver:e:\</span><span style="background-color: #002b36; color: #93a1a1; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; white-space: pre;"> </span><span class="n" style="background-color: #002b36; border: 0px; color: rgb(38, 139, 210) !important; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">/recurse</span><br />
<br />
Get a cup of coffee as it copies in all the drivers. The machine should boot fine after that, and the motherboard drivers will all be installed an happy.<br />
<br />
Machine came up and everything worked. Sound, video, etc. Windows experience for the processor moved from 6.5 to 7.6.<br />
<br />
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm-na.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=workingsilico-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=B007TTEHUY" style="height: 240px; width: 120px;"></iframe>
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm-na.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=workingsilico-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=B00CU4L4M2" style="height: 240px; width: 120px;"></iframe><span id="goog_816309954"></span><span id="goog_816309955"></span><a href="https://draft.blogger.com/"></a>
<div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7372498041888039447.post-77827019433961454972014-01-18T12:31:00.001-05:002014-01-18T12:40:09.114-05:00Auto keyless remote fob - fail and repairI suppose everyone knows this but I didn't. And google supplied the answer quickly. But maybe somebody doesn't know and this post will amuse and help them. First the funny story of life happens, then my notes on the fix...<br />
<br />
We had a record cold day in the midatlantic and my beater car, a 1997 Honda Accord SE was last in the driveway. The drivers side lock was frozen from the cold. De-icer and WD40 got the key in, but it wouldn't turn. Forcing would just have broken the key. The beauty part is my other cars were blocked in the driveway by this one.<br />
<br />
So I used the drivers side door. The door unlocks and opens but the theft protection beep beep beep goes off. The only two ways to silence it are to open the door with the drivers key, or use the keyless remote entry fob. I no longer have the fob. After several painful minutes honking and waking up my neighbors at the crack of dawn it stops. However I can't start the car, it is in lockout mode. A couple more cycles of honking, and trying and I realize I'm screwed. The car is not going anywhere. A simple frozen drivers lock failure takes down the whole car. Eventually I have to use the transmission emergency unlock keyhole in the console to put the car in neutral, and push it out of the way so I can drive another car to work. A few days later it warms up and the lock works fine again. <br />
<br />
Why didn't I have the fob? The plastic hole to put it on a key chain had worn out<br />
and broken. I had rebuilt it with JB weld and it lasted another year, but broke again. When<br />
I stopped driving the car on a daily basis, I was tired of having the big ol thing in my pocket anyway so I stuffed it in a drawer and haven't been able to find it since. Using just the key was fine.<br />
<br />
But how to prevent this from happening again? Replace the keyless entry fob and program it. It is so easy grandma could do it. The reason every engineer should drive old Hondas is that used and aftermarket parts are available everywhere for dirt cheap.<br />
<br />
Searching ebay there are several options to buy a used remote. Prices vary, I chose a cosmetically worn one from a highly rated business seller that was only one state away. It came in a few days. The batteries are expensive and I didn't want to buy one with a dead battery.<br />
<br />
<a href="http://www.ebay.com/itm/141078914530">http://www.ebay.com/itm/141078914530</a><br />
Used and worn for $29, had ebay bucks for $21. Total cash outlay $8.<br />
<img src="http://i.ebayimg.com/00/s/MTUwNFgxNjAw/z/GfsAAOxyEilSVWo7/$(KGrHqNHJEIFJ!nS49UwBSVWo6v6Dw~~60_57.JPG" height="188" width="200" /><br />
<br />
Found this link to the programming instructions. Turns out you really are programming the CAR, NOT the remote. So if you had two cars of similar make, you could easily program both of them to open with one remote. That would be awesome.<br />
<br />
<a href="http://programyourremote.com/classified/DisplayAd.asp?id=2051">http://programyourremote.com/classified/DisplayAd.asp?id=2051</a><br />
<blockquote class="tr_bq">
<span style="font-size: xx-small;"><strong style="font-family: Arial, Helvetica, Verdana, sans-serif;">Note:</strong><strong style="font-family: Arial, Helvetica, Verdana, sans-serif;"> Entering the programming mode cancels all learned keyless remotes, so none </strong><strong style="font-family: Arial, Helvetica, Verdana, sans-serif;"> of the previously programmed remotes will work. You must reprogram all of the </strong><strong style="font-family: Arial, Helvetica, Verdana, sans-serif;"> keyless remotes once you are in the programming mode.</strong><strong> You must complete each step within 5 seconds of the previous step to keep the </strong><strong> system from exiting the programming mode.</strong><strong> 1. Turn ignition switch to ON (II)</strong><strong> 2. Press the LOCK or UNOCK button on one of the remotes. (An unprogrammed </strong><strong> remote can be used for this step.)</strong><strong> 3. Turn ignition switch to LOCK (0)</strong><strong> 4. Repeat steps 1, 2 and 3 two more times using the same keyless remote used </strong><strong> in step 2</strong><strong> 5. Turn the ignition switch to ON (II)</strong><strong> 6. Press the LOCK or UNLOCK button the same remote. Make sure the power door </strong><strong> locks cycle to confirm you are in programming mode.</strong><strong> 7. Press the LOCK or UNLOCK button on each remote you want to program. Make </strong><strong> sure door locks cycle after you push each remote button to confirm system has</strong><strong> accepted the remote.</strong><strong> 8. Turn the igniton switch to LOCK (0) to exit programming mode.</strong><strong> 9. Test remote(s)</strong></span></blockquote>
<span style="background-color: #fef8d8; font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12px; font-weight: bold;"></span><br />
<div style="font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12px; font-weight: bold;">
<strong><br /></strong></div>
<br />
It worked the first time. On this car it is particularly easy. I followed the instructions which boil down to turn the car on, press the remote and turn it off three times. On the fourth cycle any remote you press will be learned by the car and open the car from then on. If I ever find my old remote, I will have to do this again because old remotes are forgotten in this process. Hence the reason for writing this post so I still have the instructions.<br />
<br />
In the process I learned a better solution I wish I knew before I discarded the old remote. Clearly I'm not the only person who wore out the plastic remote shell. You can buy a replacement shell for $5 and not even have to reprogram the car. Some more motivation to find the old fob.<br />
<div style="font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12px; font-weight: bold;">
<strong><br /></strong></div>
<div style="font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12px; font-weight: bold;">
<strong><br /></strong></div>
<a href="http://www.ebay.com/itm/New-Replacement-keyless-Remote-Shell-Pad-Case-Fix-Repair-Key-Fob-Clicker-/111195546706?pt=Motors_Car_Truck_Parts_Accessories&fits=Make%3AHonda%7CModel%3AAccord&hash=item19e3c56452&vxp=mtr">http://www.ebay.com/itm/New-Replacement-keyless-Remote-Shell-Pad-Case-Fix-Repair-Key-Fob-Clicker-/111195546706?pt=Motors_Car_Truck_Parts_Accessories&fits=Make%3AHonda%7CModel%3AAccord&hash=item19e3c56452&vxp=mtr</a><br />
<img src="http://i.ebayimg.com/00/s/ODc1WDg3NQ==/$T2eC16J,!zcE9s4g0ufFBQv7wge7cQ~~60_57.JPG" height="200" width="200" /><br />
<br />
<br />
Also found another website with lots of maker/hacker stuff and a detour into keyless remotes, so a shout out to a like minded guy...<br />
<a href="http://www.electronhacks.com/category/program-keyless-entry-2/">http://www.electronhacks.com/category/program-keyless-entry-2/</a><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com14tag:blogger.com,1999:blog-7372498041888039447.post-7672403292598477832013-12-21T10:45:00.000-05:002013-12-22T10:36:29.096-05:00Updated the Tuning Fork Android App<br />
After about a year and a half I finally updated the tuning fork android app.<br />
<br />
<img alt="Cover art" height="200" src="https://lh3.ggpht.com/hAWmhEA7vHiRt-KsCsNho3MU400qua8XDsJY9zpEaP3K-uOKiR7ut1P53n0N45oQx3s=w300-rw" width="200" /><br />
<br />
This app started as a high quality signal generator for electronics. I learned how to create precise high quality sine waves from the audio player. In order to make something out of my efforts, I published it as a musical instrument tuning program.<br />
<br />
Users had been complaining that the sliders I used to set pitch and note were finicky, and they were right. Also my Java skills are 10X what they were when I wrote it, so I wanted to fix some things.<br />
<br />
Since I have a new PC since I did the original Android work, I had to resurrect my Android/Eclipse setup, my keystore, and get adb usb connection working with my current Samsung phone (a whole post unto itself) as well get the drivers working with my old droids.<br />
<br />
I converted the sliders to buttons to increment and decrement the tone and pitch. I'm pretty happy with that. If you want to change the pitch by a lot, it gets a little tedious pushing the button. But for reasonable changes it is good and you can easily change it to whatever value you want.<br />
<br />
<img alt="Note Calculator & Tuning Fork - screenshot" height="320" src="https://lh6.ggpht.com/EGlmBOd8E4G5Mru6usytk8tinqRXpaI8d9KDJxGR6z-J2OlSiV-FY6NWTJ3g2YUZNlk=h900-rw" width="203" /><br />
<br />
I added some common pitch and tone combos that musicians use as presets on a drop down menu.<br />
<br />
<img alt="Note Calculator & Tuning Fork - screenshot" height="320" src="https://lh6.ggpht.com/_dC8Q5Q1AtF-4jxfKTci1AlhKxTC51Eh-OF6meNbUPHViWUYDRx1mpWxwJk-JMy1y6FX=h900-rw" width="203" /><br />
<br />
Finally I added a save favorite button that allows you to remember a setting and recall it. Android has the ability through SharedPreferences to save a small amount of data without requiring any user permissions. I didn't want to make this simple app ask for any permissions from the user.<br />
<br />
I also added a real help screen, not just a toast and fixed the menus to navigate back and forth logically. onBackPressed() takes you back to the main screen, pressing it again stops the app.<br />
<br />
I published the app at that point, version 1.3, just to make sure my keystore and google acount process still worked. I didn't want to spend forever on this and find I couldn't update the app.<br />
<br />
After that I tackled an annoying issue that was even more obvious when the app was changing notes via the buttons. Each note change often resulted in a click, then a warble, and then the new tone would play perfectly. <br />
<br />
I first thought the audio player wasn't starting and stopping smoothly, but I ruled that out. Then I realized I was doing non thread safe updating of the tone array. When the app is going to play a tone, it calculates the sine waveform and sets the length of the buffer to exactly the correct repeat so there is no glitch. That was fundamental to the original design, to play a continuous frequency accurate tone without glitches. The audio player runs in a child thread (activity) so that it doesn't block the UI. However when the tone changed, the sound array had to be recalculated by the main thread. Often the audio thread, while looping, would pick up the array half way through that process. The result was a click and warble.<br />
<br />
First I tried synchronizing the tone array variable, and various methods of synchronizing a function wrapped around updating this variable to prevent it being read by the player thread while it was being written. This was a disaster. Problem is, the way synchronization works, is it blocks a thread until the desired variable is not busy. The end result was the user UI thread was being blocked by the looping audio thread, which never gave the UI a chance to update the array. While this seems solvable it led to a lot of bad behavior by the app.<br />
<br />
Finally I realized I should move the array updating functions into the audio thread. The block of code that calculates the sine wave array is in the audio loop, but only conditionally runs when the desired note is changed. Only the desired note and pitch is passed from the main to the audio thread. This is much better because all the calculating and array filling which took time is not on the thread boundary. Only a simple variable pass is needed.<br />
<br />
The result is version 1.4, which smoothly changes notes when the buttons are pressed. Hooray! Enjoy.<br />
<br />
<br />
<br />
<br />
<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-7372498041888039447.post-46009014636834206692013-12-10T23:14:00.000-05:002014-02-01T19:58:21.578-05:00Upgrade to teen gaming machineThis is the components I chose for XMAS present system upgrade for teens gaming machine. It won't rock the world like my other recent Haswell machine with the 4770K, but I think it will do pretty well.<br />
<br />
I plan to replace the motherboard, cpu and graphics card and reuse the HDD, case and DDR3 memory from the 2009 AMD Phenom II build. I'll start out using the stock coolers.<br />
<h1 class="a-size-large a-spacing-none" id="title" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Arial, sans-serif; font-weight: normal; line-height: 1.3; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding: 0px; text-rendering: optimizelegibility;">
<span style="font-size: x-small;"><br /></span></h1>
<div>
<a href="http://www.amazon.com/gp/product/B00BZCXZ0E/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B00BZCXZ0E&linkCode=as2&tag=workingsilico-20">ASUS HD7790-DC2OC-1GD5 Radeon HD7790 1GB GDDR5 128-bit, DVI-I/DVI-D/ HDMI/DP PCI-Express 3.0 CrossFire ready Graphic Card OC-selected 1075MHz core</a><img alt="" border="0" src="http://ir-na.amazon-adsystem.com/e/ir?t=workingsilico-20&l=as2&o=1&a=B00BZCXZ0E" height="1" style="border: none !important; margin: 0px !important;" width="1" /></div>
$119.99 with $20 rebate (if I ever get it) from Amazon<br />
<br />
<img src="https://ssl-images.newegg.com/ProductImageCompressAll/19-116-896-03.jpg" /> <br />
<a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16819116896">Intel Core i5-4570 Haswell 3.2GHz LGA 1150 84W Quad-Core Desktop Processor Intel HD Graphics BX80646I54570</a> <br />
$189 from NewEgg after promo code. $30 cheaper than the i5-4670. 3.2G vs 3.4G. Nobody will notice the difference. <br />
<br />
<img src="https://ssl-images.newegg.com/ProductImageCompressAll/13-131-981-09.jpg" /> <br />
<a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16813131981">ASUS Z87-A LGA 1150 Intel Z87 HDMI SATA 6Gb/s USB 3.0 ATX Intel Motherboard</a> <br />
$119 from NewEgg after promo code. Best price for a Z87 mobo from a solid manufacturer <br />
<br />
<br />
Hardware went together fairly painlessly. No major surprises. Dropped in the CPU and closed the clamp. I like the Intel CPU install way better than the old pin and socket mess. Applied heatsink compound. Used the stock Intel cooler and it snapped right in.<br />
<br />
The new 7790 video card didn't need the two extra power connectors like the old 4890 did. (WRONG - note from future self) I ended up with extra power supply connectors. First time that ever happened. <br />
<br />
Transferred the memory, 4 sticks of 2GB Gskill DDR 1333. Pretty low end for this machine but I'll save upgrading that for later. DDR sockets were a bit weird, only had a lever on one end. You have to tilt them in and snap it down. Didn't like that.<br />
<br />
Keep the WD SATA hard drive with windows installed.<br />
<br />
The DVD drive was IDE and there is no IDE connector on the mobo. So I have to dump the DVD drive. That is a bit of an issue because I'm going to need to load drivers. Hopefully I can download them or transfer them via USB stick from another machine. I copied all the mobo drivers over to a USB stick in preparation.<br />
<br />
On the first pass the fans come up but no beep. No video. I realized I left off the CPU power connector. It has an 8 pin connector and my supply only has 4 pins. I learned before you can plug a 4 pin into half the connector and that is totally legal. <span style="background-color: #93c47d;">Plugged in the CPU power connector. Duh.</span><br />
<br />
Pushed the power button and it booted, beeped and the mobo lights came up OK. First issue was their was no graphics output. I had both monitors plugged into DVI-D cables in the new video card. After a lot of fumbling around with the monitors I still got no signal on any settings. Swapped to a VGA cable because sometimes all DVI systems miss the boot messages. Nothing. No signal.<br />
<br />
Finally I realized that the mobo/cpu has integrated graphics and it is probably still using that and doesn't recognized the video card. I moved the VGA cable to the onboard VGA port and now I see the boot, BIOS, etc. Whew.<br />
<br />
Now the issue is, windows won't start. It wants to do system repair or start normally. Start normally doesn't work and bounces me back to system repair. System repair runs, takes 1/2 hour or so to tell me that it can't do anything. Roadblock, trying google.<br />
<br />
<a href="http://www.tomshardware.com/forum/42670-63-windows-boot-motherboard-bios">http://www.tomshardware.com/forum/42670-63-windows-boot-motherboard-bios</a><br />
conclusion says I have to re-install windows. Ugg. Must be a better way, and I don't have a DVD drive working on this machine. I would have to pull a sata dvd from another machine to reinstall windows, and my son doesn't want all his files and settings wiped out. Still looking.<br />
<br />
<a href="http://www.tomshardware.com/forum/304001-30-bsod-motherboard">http://www.tomshardware.com/forum/304001-30-bsod-motherboard</a><br />
This post describes some options. Maybe I can do it with f8 safe mode. Don't see the safe mode option, but I can go to command line mode through the advanced options.<br />
<br />
The post above says to do to use command line:<br />
<span style="background-color: #002b36; color: #93a1a1; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; white-space: pre;">dism </span><span class="n" style="background-color: #002b36; border: 0px; color: rgb(38, 139, 210) !important; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">/image:c:\</span><span style="background-color: #002b36; color: #93a1a1; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; white-space: pre;"> </span><span class="n" style="background-color: #002b36; border: 0px; color: rgb(38, 139, 210) !important; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">/add-driver</span><span style="background-color: #002b36; color: #93a1a1; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; white-space: pre;"> </span><span class="n" style="background-color: #002b36; border: 0px; color: rgb(38, 139, 210) !important; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">/Driver:d:\</span><span style="background-color: #002b36; color: #93a1a1; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; white-space: pre;"> </span><span class="n" style="background-color: #002b36; border: 0px; color: rgb(38, 139, 210) !important; font-family: Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace; font-size: 13px; line-height: 18.850000381469727px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre;">/recurse</span><br />
<br />
Plugged in the USB stick with the mobo DVD copied onto it. I had to change the C: to D: and the D: to E: to match where it thought my hdd and usb stick were and it started doing stuff. It installed a lot of drivers, a few complaints about things it couldn't install. Waiting... Took 15 minutes or so.<br />
<br />
Closed and hit reboot.... It worked!! Took longer than normal but finally brought me to the windows login without complaining.<br />
<br />
Windows 7 wants the product key again. Doesn't work, will have to use phone activation. I'll do that later.<br />
<br />
Loaded the ATI catalyst from the USB stick copy of the install CD. It installed but still not seeing the graphics card. Device manager doesn't see it. Something is wrong.<br />
<br />
Opened the box. <span style="background-color: #93c47d;">Looked at the graphics card again. It DOES have a power connector,</span> it is not at the end of the card, which is all plastic and heat sink. It is on the bottom at the top corner about two thirds of the way down the card. Plugged in the 12V power and rebooted. Now the main DVI monitor comes up on the first try. You gotta be kidding me. Missed two power connectors and wasted at least an hour getting this up and running.<br />
<br />
Re-installed the AMD graphics from the USB stick and now everything comes up cleanly and both monitors are working in DVI-D mode.<br />
<br />
Ran a windows performance information recheck. Here are the numbers in windows 7.<br />
Processor was 6.5 --> 7.6 cool<br />
Memory 7.7<br />
Graphics 7.7<br />
Gaming 7.7<br />
Disk 5.9 (no change of course)<br />
Total is 5.9 because of the disk.<br />
<br />
Last issue was sound didn't work. I'm using external speakers with the standard green plug, not the HDMI speakers since I have DVI-D cables attached. I was getting a red x on the speaker and the troubleshooter said speakers were not plugged in, but they are.<br />
<br />
Went back and ran the asus mobo driver tool from the USB stick and re-installed the Audiotek drivers. That was successful. <br />
<br />
Let the gaming begin!<br />
<br />
<br />
<br />
<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-7372498041888039447.post-44288851101944519522013-11-30T17:12:00.004-05:002014-07-26T14:47:09.497-04:00Samsung Galaxy S4 - USB debugging mode in Android 4.2 and higherBack to writing android applications. <br />
<br />
With my new Samsung Galaxy 4, there is no longer a button for USB Debug Mode!<br />
<br />
This setting allowed aps you develop in eclipse with the android sdk to be run directly on your phone when plugged into the USB cable. Otherwise you have to post the apk file to the web, and turn on the "allow aps from unknown sources" every time you want to test your app on a real device. Now it's gone.<br />
<br />
This is a long trail of notes on what I did. For the impatient, skip to the bottom, I summed it up at the end<br />
<br />
A little googling found this: Google hid the feature to protect the random user.<br />
<br />
<h3 style="color: #333333; font-family: BebasNeueRegular; font-size: 12px; font-weight: normal; margin: 0px; padding: 0px;">
<strong style="margin: 0px; padding: 0px;">How to find and turn on USB debugging mode in Android 4.2 and higher</strong></h3>
<div style="font-family: 'Helvetica Neue', Helvetica, Arial; font-size: 12px; padding: 0px;">
<span style="background-color: #d9ead3;">To see the option for USB debugging mode in Android 4.2 or higher, do the following:</span></div>
<ul style="font-family: 'Helvetica Neue', Helvetica, Arial; font-size: 12px; list-style: none; margin: 0px; padding: 0px;">
<li style="list-style: none; margin: 0px; padding: 0px;"><span style="background-color: #d9ead3;">Open up your device’s “Settings”. This can be done by pressing the <em style="margin: 0px; padding: 0px;">Menu</em> button while on your home screen and tapping “System settings”</span></li>
<li style="list-style: none; margin: 0px; padding: 0px;"><span style="background-color: #d9ead3;">Now scroll to the bottom and tap “About phone”</span></li>
<li style="list-style: none; margin: 0px; padding: 0px;"><span style="background-color: #d9ead3;">At the “About” screen, scroll to the bottom and tap on “Build number” seven times.</span><ul style="list-style: none; margin: 0px; padding: 0px;">
<li style="list-style: none; margin: 0px; padding: 0px;">Make sure you tap seven times. If you see a “You are now a developer!” message pop up, then you know you have done it correctly.</li>
</ul>
</li>
</ul>
<div style="font-family: 'Helvetica Neue', Helvetica, Arial; font-size: 12px; padding: 0px;">
Done! By tapping on “Build number” seven times, you have unlocked USB debugging mode on Android 4.2 and higher. You can now enable/disable it whenever you desire by going to “Settings” -> “Developer Options” -> “Debugging” ->” USB debugging”.</div>
<br style="font-family: 'Helvetica Neue', Helvetica, Arial; font-size: 12px; margin: 0px; padding: 0px;" />
<span style="font-family: 'Helvetica Neue', Helvetica, Arial; font-size: 12px; margin: 0px; padding: 0px;">Read more at <a href="http://dottech.org/87439/how-to-unlock-usb-debugging-mode-on-android-4-2-jelly-bean-and-higher-guide/#fAVhAE2oVbDEJwQe.99" style="-webkit-transition: all 0.2s linear; color: #003399; margin: 0px; padding: 0px; text-decoration: none; transition: all 0.2s linear;">http://dottech.org/87439/how-to-unlock-usb-debugging-mode-on-android-4-2-jelly-bean-and-higher-guide/#fAVhAE2oVbDEJwQe.99</a></span><br />
<br />
Hmmm... <br />
<br />
The phone says "You are now a developer". So it clearly worked. But still not seeing the phone in Eclipse adb run chooser....<br />
Phone says "Connected as an installer"<br />
<br />
<a href="http://stackoverflow.com/questions/16256048/eclipse-android-sdk-cannot-see-new-samsung-galaxy-s4-device-via-a-usb-connection">http://stackoverflow.com/questions/16256048/eclipse-android-sdk-cannot-see-new-samsung-galaxy-s4-device-via-a-usb-connection</a><br />
<br />
same answers. I have the drivers installed and i did the 7x. Still nothing.<br />
<br />
from \Local\Android\android-sdk\platform-tools<br />
Tried<br />
adb kill-server<br />
adb start server<br />
Didn't work. Still can't see the device.<br />
<br />
Tried these drivers...<br />
<br />
<a href="http://www.samsung.com/us/support/owners/product/SCH-I545ZWAVZW">http://www.samsung.com/us/support/owners/product/SCH-I545ZWAVZW</a><br />
<br />
Nothing.<br />
<br />
<a href="http://stackoverflow.com/questions/3908301/why-doesnt-eclipse-see-my-samsung-galaxy-phone-even-though-i-can-transfer-files">http://stackoverflow.com/questions/3908301/why-doesnt-eclipse-see-my-samsung-galaxy-phone-even-though-i-can-transfer-files</a><br />
<br />
Tried installing KIES. <br />
<table style="background-color: white; border-collapse: collapse; border-spacing: 0px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-width: 1px 0px 0px; color: #666666; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;"><tbody style="border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
<tr style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-width: 0px 0px 1px; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><td style="border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 17px 50px 17px 8px; vertical-align: middle;"><span style="border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">Kies 3</span></td><td style="border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 17px 50px 17px 8px; vertical-align: middle;">Supported models : Note 3 and devices with Android 4.3.</td></tr>
</tbody></table>
<a href="http://www.samsung.com/us/kies/#downloadWindows">http://www.samsung.com/us/kies/#downloadWindows</a><br />
<div>
<br />
Still not showing up in adb. Arrggh<br />
<br />
I doesn't even show up under Unknown Devices<br />
Although it does show up as a portable device and i can see the sd card, etc.<br />
<br />
Tried installing the drivers in KIES manually. No dice.<br />
<br />
This website shows where to get drivers<br />
<a href="http://developer.android.com/tools/extras/oem-usb.html">http://developer.android.com/tools/extras/oem-usb.html</a><br />
<br />
Tried the Moto drivers to get my old Droid 2 working again just to prove it is not eclipse.<br />
Back to visit previous self...<br />
<a href="http://blog.workingsi.com/2011/12/getting-started-developing-apps-on.html">http://blog.workingsi.com/2011/12/getting-started-developing-apps-on.html</a><br />
<blockquote class="tr_bq">
<b style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px;">2) Install the development USB driver on your Windows computer</b><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px;">More surfing...</span><a href="http://developer.android.com/guide/developing/device.html" style="background-color: white; color: #015782; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px; text-decoration: none;">http://developer.android.com/guide/developing/device.html</a><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px;"> </span><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px;">I think need to install the windows adb driver for my phone on my computer. You need a special USB driver for developers.</span><a href="http://developer.motorola.com/docstools/USB_Drivers/" style="background-color: white; color: #015782; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px; text-decoration: none;">http://developer.motorola.com/docstools/USB_Drivers/</a><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px;"> </span><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px;">Clicked on Handset USB Driver for Windows 64 bit, had to register and all that junk</span><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px;">Downloaded, installed Motorola Mobile Drivers Installation 5.2.0</span><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px;">Rebooted</span><br />
<b style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px;">3) Verify that you can see the phone from the computer</b><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px;">Reading the </span><a href="http://developer.android.com/guide/developing/device.html" style="background-color: white; color: #015782; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px; text-decoration: none;">http://developer.android.com/guide/developing/device.html</a><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px;"> site again, I got some more info on how to run "adb devices". </span><br />
<span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px;">Turns out you run this in a command window on the windows box, after you cd over to the directory where the android sdk is installed. Ran it there. Duh. Here you see the command running for me. </span></blockquote>
<blockquote class="tr_bq" style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12.727272033691406px; line-height: 16.363636016845703px;">
<span style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px;">You can verify that your device is connected by executing </span><code style="color: #007000; font-size: 13px; line-height: 1em; margin: 0px; padding: 0px;">adb devices</code><span style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px;"> from your SDK </span><code style="color: #007000; font-size: 13px; line-height: 1em; margin: 0px; padding: 0px;">platform-tools/</code><span style="font-family: arial, sans-serif; font-size: 13px; line-height: 16px;"> directory. If connected, you'll see the device name listed as a "device."</span></blockquote>
<br />
<br />
<br />
<br />
<div style="background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 15px;">
Or, to <em>upgrade</em> an existing Android USB driver on Windows 7 with the new driver:</div>
<ol style="background-color: #f9f9f9; color: #222222; font-family: Roboto, sans-serif; font-size: 14px; line-height: 19px; margin: 0px 0px 15px 18px; padding: 0px;">
<li style="margin: 0px 0px 5px;">Connect your Android-powered device to your computer's USB port.</li>
<li style="margin: 0px 0px 5px;">Right-click on <em>Computer</em> from your desktop or Windows Explorer, and select <strong>Manage</strong>.</li>
<li style="margin: 0px 0px 5px;">Select <strong>Device Manager</strong> in the left pane of the Computer Management window.</li>
<li style="margin: 0px 0px 5px;">Locate and expand <em>Android Phone</em> in the right pane.</li>
<li style="margin: 0px 0px 5px;">Right-click <em>Android Composite ADB Interface</em> and select <strong>Update Driver</strong>. This will launch the Hardware Update Wizard.</li>
<li style="margin: 0px 0px 5px;">Select <strong>Install from a list or specific location</strong> and click <strong>Next</strong>.</li>
<li style="margin: 0px 0px 5px;">Select <strong>Search for the best driver in these locations</strong>; un-check <strong>Search removable media</strong>; and check <strong>Include this location in the search</strong>.</li>
<li style="margin: 0px 0px 5px;">Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB Driver is located in<code style="color: #006600; font-size: 13px; line-height: 14px;"><sdk>\extras\google\usb_driver\</code>.)</li>
<li style="margin: 0px 0px 5px;">Click <strong>Next</strong> to upgrade the driver.</li>
</ol>
The old developer.motorola page is gone now. Why is this so hard now? I got this done in no time years ago.<br />
<br />
Tried these drivers. The unkown device goes away and I see a USB drive.<br />
<a href="https://motorola-global-portal.custhelp.com/app/answers/detail/a_id/88481/action/auth">https://motorola-global-portal.custhelp.com/app/answers/detail/a_id/88481/action/auth</a><br />
<div>
<br /></div>
I go to the moto phone and it is now saying USB is in storage mode. Change it to "PC mode" on the phone menu.<br />
Drivers spin and it re-installs on the PC. Motorola ADB Interface is listed in the things windows says is ready to use. USB drive is gone and under network adapters in the device manager is "Motorola USB Networking Driver".<br />
<br />
"adb devices" returns a number for the moto phone now. But in eclipse I still don't see it.<br />
<br />
I tried the samsung changing usb mode to "media device" and "camera" neither helped adb see it.<br />
It is hung up in USB stick mode. I don't see a listing under "Network adapters"<br />
<br />
<span style="background-color: #b6d7a8;">I scoured the settings on the samsung again. I find under Settings->More->Developer options, there is now a button that says USB Debugging Mode. It is unclicked.</span><br />
<span style="background-color: #b6d7a8;">Whaaa Daaa Faaaa??? How could I have missed that. The secret unlock just reveals the button, I sitll have to click it.</span><br />
<span style="background-color: #b6d7a8;">Things start happening on the device manager, installing, etc.</span><br />
<span style="background-color: #b6d7a8;">Now I see SAMSUNG_Android in the Other devices for a sec until it blips out.</span><br />
<span style="background-color: #b6d7a8;">It doesn't like the installed samsung driver and after a few seconds, blips and goes back to being a usb stick. </span><br />
<br />
<br />
<a href="http://forum.xda-developers.com/showthread.php?t=1601739">http://forum.xda-developers.com/showthread.php?t=1601739</a><br />
says uninstall kies and just do the samsung drivers<br />
<blockquote>
<span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">Have it working - and did remember I have Kies installed.</span><span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">Maybe I downloaded both the separate driver and Kies?</span><br />
<span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">USB Driver Link:</span><a href="http://org.downloadcenter.samsung.com/downloadfile/ContentsFile.aspx?CDSite=US&CttFileID=4507874&CDCttType=SW&ModelType=null&ModelName=null&VPath=SW/201109/20110916042342248/Sprint_d710_USB_Driver_v1_3_2360_0.exe" rel="nofollow" style="background-color: white; color: #d38339; font-family: Arial, Helvetica, sans-serif; font-size: 13px; text-decoration: none;" target="_blank">http://org.downloadcenter.samsung.co...1_3_2360_0.exe</a><br />
<span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">Kies Link:</span><a href="http://org.downloadcenter.samsung.com/downloadfile/ContentsFile.aspx?CDSite=US&CttFileID=4572423&CDCttType=SW&ModelType=null&ModelName=null&VPath=SW/201110/20111012045653670/KiesPC_2.0.3.11082_152_4.exe" rel="nofollow" style="background-color: white; color: #d38339; font-family: Arial, Helvetica, sans-serif; font-size: 13px; text-decoration: none;" target="_blank">http://org.downloadcenter.samsung.co...1082_152_4.exe</a><br />
<span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">Know I have problem still with Kies... but I can use ODIN without issues.</span><span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">I can't really explain how I did it, as there was a lot of trial and error and I wasn't keeping notes. But the basic trick was to right click in device manager on the unknown SAMSUNG_Android device, choose Update Driver, choose "Let me pick", choose "Have disk", point to the "SAMSUNG\USB Drivers\25_escape" folder from the KIES installation, and then choose "Samsung Mobile USB Composite Device".</span><br />
<span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">You may then get another unknown device, which using the same method you set to ADB. I did a bunch of stuff in different ways, trying to match different drivers from the 25_escape folder to different devices, until it finally worked.</span></blockquote>
<a href="http://forum.xda-developers.com/showthread.php?t=1624166">http://forum.xda-developers.com/showthread.php?t=1624166</a><br />
<span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">Pull up a commandline, go to Documents and Settings\username\.android directory, and do</span><br />
<div style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 5px 20px 20px; padding: 3px 0px;">
<div class="smallfont" style="font-size: 12px; margin-bottom: 2px; padding: 3px 0px;">
Code:</div>
</div>
<pre class="alt2" dir="ltr" style="background-color: white; border: 1px inset; color: #222225; font-size: 13px; height: 34px; overflow: auto; padding: 6px; width: 640px;">echo 0x04e8 >> adb_usb.ini</pre>
<br />
this is the code for samsung<br />
<br />
Folllowed those instructions, but the usb driver folder <span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">C:\Program Files (x86)\Samsung\USB Drivers\25_escape didn't exist in my install.</span><br />
<span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"><br /></span>
<span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">Went back to the kies site and downloaded the older version of kies and installed</span><br />
<span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"><br /></span>
<span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">Not in there either. Fail</span><br />
<span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"><br /></span>
<a href="http://www.samsung.com/us/function/search/espsearchResult.do?input_keyword=adb&keywords=adb">http://www.samsung.com/us/function/search/espsearchResult.do?input_keyword=adb&keywords=adb</a><br />
There is a link in the posts to the lastest adb driver. it's broken<br />
<br />
<a href="http://www.samsung.com/us/support/downloads/SPH-P100ZKASPR">http://www.samsung.com/us/support/downloads/SPH-P100ZKASPR</a><br />
selected the carrier and model number<br />
<table cellspacing="0" class="datatable sixcol" style="background-color: white; border-spacing: 0px; border: 0px; color: #010101; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 16px; margin: 0px; padding: 0px; vertical-align: baseline; width: 960px;"><tbody style="border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">
<tr class="odd" style="border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; position: relative; vertical-align: baseline;"><td class="desc-col sorting_1" style="border-top-color: rgb(204, 204, 204); border-top-style: solid; border-width: 1px 0px 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 15px 0px 5px 10px; vertical-align: top; width: 330px;"><div class="desc" style="border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; position: relative; vertical-align: baseline;">
<a class="collapsed desc-link" href="http://www.samsung.com/us/support/owners/product/SCH-I545ZNAVZW" style="background-image: url(http://www.samsung.com/us/images/support/icon-collapsed.png); background-position: initial initial; background-repeat: no-repeat no-repeat; border: 0px; color: #00a9e0; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; font-weight: bold; line-height: inherit; margin: 0px; padding: 0px 0px 0px 25px; text-decoration: none; vertical-align: baseline;">Device(Install),USB Driver (Software) (ver.v1.5.14.0)</a></div>
</td><td class="os" style="border-top-color: rgb(204, 204, 204); border-top-style: solid; border-width: 1px 0px 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 15px 0px 5px; vertical-align: top; width: 145px;">Win XP/Vista/Win 7/Win 8</td><td class="date" style="border-top-color: rgb(204, 204, 204); border-top-style: solid; border-width: 1px 0px 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 15px 0px 5px; vertical-align: top; width: 125px;">Nov 9, 2012</td><td class="language" style="border-top-color: rgb(204, 204, 204); border-top-style: solid; border-width: 1px 0px 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 15px 0px 5px; text-transform: uppercase; vertical-align: top; width: 140px;">ENGLISH</td><td class="size" style="border-top-color: rgb(204, 204, 204); border-top-style: solid; border-width: 1px 0px 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 15px 40px 5px 0px; text-align: right; vertical-align: top; width: 100px;"><span class="size-amount" style="border: 0px; display: block; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 20px; padding: 0px 15px 0px 0px; vertical-align: baseline;">23.06</span><span class="size-amount" style="border: 0px; display: block; font-family: inherit; font-size: 12px; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 20px; padding: 0px 15px 0px 0px; vertical-align: baseline;"><br /></span></td></tr>
</tbody></table>
Doesn't work.<br />
<br />
<span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">Putting the USB in "Camera" mode left the SAMSUNG_Android in the device manager. MTP mode</span><br />
<span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">makes it dissapear. Windows tries to install a driver for it in this mode and fails.</span><br />
<span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"><br /></span>
<span style="background-color: white; color: #222225; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"><br /></span>
A day of complete frustration.<br />
<br />
<a href="http://www.mediafire.com/download/5kcxc1yovvl6740/SAMSUNG_USB_Driver_for_Mobile_Phones%282%29.exe">http://www.mediafire.com/download/5kcxc1yovvl6740/SAMSUNG_USB_Driver_for_Mobile_Phones%282%29.exe</a><br />
<br />
back to google<br />
<br />
<a href="http://www.droidforums.net/forum/samsung-galaxy-s4/249648-issues-adb.html">http://www.droidforums.net/forum/samsung-galaxy-s4/249648-issues-adb.html</a><br />
<br />
Read a bunch of pages about rooting. I'm doing everything they say. Fail.<br />
<br />
regroup.<br />
<br />
<span style="background-color: #d9ead3;">Finally tried device manager one more time, right clicked on the unknown device and picked choose from compatible drivers. Let me pick from a list. Strangely I got a list of moto and generic adb drivers. I picked adb composite device. it installed with a warning.</span><br />
<br />
Now adb devices gives me a response! Device manager other device dissapeared . So it might not be healthy yet. ADB Interface device showed up on top of the device manager.<br />
<br />
I run ecllipse and I suddenly have a device! it looks a little broken but finally something is happening.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-i74NAsydAWo/UpulvG9LHAI/AAAAAAAANYE/3SfskxlZNaw/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-i74NAsydAWo/UpulvG9LHAI/AAAAAAAANYE/3SfskxlZNaw/s1600/Capture.PNG" height="219" width="320" /></a></div>
<br />
I find I can't select it. OK is greyed out .<br />
<br />
Try switching to one of the moto composite drivers. Requires rebooting. Fail. Now it has dissapeared again.<br />
<br />
Went back to the single composite ADB sooner driver on the list.<br />
<br />
Tried to figure out why it was unauthorized<br />
<br />
<a href="http://stackoverflow.com/questions/19485467/adb-wireless-device-unauthorized">http://stackoverflow.com/questions/19485467/adb-wireless-device-unauthorized</a><br />
<br />
The phone had never asked me to authorize. <span style="background-color: #d9ead3;">I went to the developer settings menu on the phone.</span><br />
<span style="background-color: #d9ead3;">Uncliked usb debug. Pressed the button that says revoke permissions. Unplugged the phone.</span><br />
<span style="background-color: #d9ead3;">Plugged it back in, re-enabled usb debug and tadah! It asked me to give the computer permission.</span><br />
<span style="background-color: #d9ead3;">I did so and and adb devices now says the device is there!</span><br />
<br />
It works!!! OMG. This was the biggest pain in the arse. Eclipse now reports the phone there.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-_uAtP3IjgTU/UpurbaCNHdI/AAAAAAAANYU/MQ3Oxf8xoGk/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-_uAtP3IjgTU/UpurbaCNHdI/AAAAAAAANYU/MQ3Oxf8xoGk/s1600/Capture.PNG" height="220" width="320" /></a></div>
<br />
<br />
I don't know if anyone could follow my notes, and i'm too fed up to clean them up.<br />
The gist is this.<br />
<br />
<ul>
<li>7 pushes on build to enable the developer menu in the phone info screen</li>
<li>Go to the now visible developer menu and select USB debugging</li>
<li>Install the samsung usb drivers. Don't know which version really did it, if any. From Kies or from their website</li>
<li>Plug in the phone</li>
<li>Tell the USB to go to "camera" mode</li>
<li>Go to windows device manager and right click on the unknown samsung device</li>
<li>Select browse and select from list</li>
<li>Pick adb single sooner driver</li>
<li>Go back to the phone developer menu and unauthorize devices. plug it in again and it should ask to allow the computer to connect. Say yes.</li>
<li>Win!</li>
</ul>
<br />
<br /></div>
<div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com130tag:blogger.com,1999:blog-7372498041888039447.post-38761894727012396612013-11-02T23:05:00.003-04:002013-11-10T10:43:33.618-05:00Sony VAIO SVT13112FXS ultrabook blue screen caused by iastor.sysMy beloved Sony VAIO ultrabook laptop, model SVT13112FXS (SVT131A11L) is crashing every 10 minutes or so, even if it is idle, with a blue screen (BSOD). Blue screen says the problem is related to <b>iastor.sys </b>. This machine runs Windows 7.<br />
<br />
This machine has a hard drive and a solid state cache drive and iastor.sys is the intel RAID driver that allows the computer to use two drives as if it is a single drive, do fast caching, etc.<br />
<br />
<a href="http://www.amazon.com/gp/product/B0080C225Q/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B0080C225Q&linkCode=as2&tag=workingsilico-20"><img border="0" src="http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=B0080C225Q&Format=_SL160_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=workingsilico-20" /></a><img alt="" border="0" height="1" src="http://ir-na.amazon-adsystem.com/e/ir?t=workingsilico-20&l=as2&o=1&a=B0080C225Q" style="border: none !important; margin: 0px !important;" width="1" />
<br />
<br />
This all started after I left the machine behind at home on an international trip. Normally it is my travelling companion, but this time I didn't want the hassle of taking two laptops through security. I left it at home, unplugged, and probably in sleep mode. The battery drained completely and when I returned it was lifeless. I plugged it in and it complained that windows wasn't shut down properly but otherwise initially everything seemed OK. After 10 minutes of use, the blue screens started.<br />
<br />
In the end <b>the fix was to replace the SSD cache drive</b>. <b>This is a hardware problem, not a software problem</b>. Not a difficult repair. Involved unscrewing the back cover and pulling out one module and buying a replacement off eBay for $35. A little fooling around with the BIOS and Intel Rapid Store Software and all is good.<br />
<br />
Here is the whole debug trail...<br />
<br />
<u>Possible causes</u><br />
<ul>
<li>iastor.sys (Located in C:\windows\system32\drivers\iastor.sys) is corrupt</li>
<li>A hardware problem with one of the disks</li>
<li>Malware (this is a favorite vulnerability among hackers)</li>
<li>Virus scanner killing the machine on purpose when it finds something it can't fix</li>
</ul>
<br />
<u>Here is what I tried</u><br />
<ul>
<li>System restore to older time. Didn't solve the problem, and I regressed to before I started having the issue. </li>
<li>Ran chkdsk (right click on the drive, tools, check disk) and schedule a scan, reboot. chkdsk fails in the middle with the BSOD and it reboots endlessly scanning and crashing.</li>
<li>I removed the hard drive and put it in another machine and ran chkdsk. Completed and found no errors. But it back in the laptop and still crashes</li>
<li>Ran sfc /SCANNOW which completes, and says no errors. Still crashes.</li>
<li>Downloaded and ran tdsskill.exe from Kaspersky. This is supposed to catch malware that poses as iastor.sys. It ran and found no problems.</li>
<li>Ignore all the lies about rkill, malwarebytes, etc. Those programs have never worked for me and you end up getting more malware on your machine.</li>
<li>Full virus scan of the disk from another machine. It's clean</li>
<li>Msconfig, went through and stopped every process from the start menu that I didn't recognize. Didn't help</li>
<li>Tried to replace the iastor.sys files by hand. My other computers don't have this file to copy from since they don't have a RAID. </li>
<li>Renamed the iastor.sys to iastor.sys.X. Now the machine won't load windows. It wants to do startup repair but eventually BSOD's into the same screen. Dead end. </li>
<li>Put the drive back in another machine and restored the iastore.sys and iastorV.sys files from a previous version</li>
<li>Went to <a href="https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=17882">https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=17882</a> to download iastor.sys from Intel. None of the packages recent packages contained a 64 bit iastor.sys, just various versions like iastorV.sys, iastorF.sys. WTF?</li>
<li>Downloaded IATA89CD.exe from above site and ran. This is supposed to contain the Intel Matrix Storage Manager. It is dated 2009 it seems, don't know how this could be the right file. A window pops up and says the computer has version 11.0.0.1032 and the installer wants to overwrite with 8.9.0.1023. Seems wrong. Plowing ahead. It installs OK and reboots.</li>
<li>Won't start windows anymore. Bombs Lovely. Startup repair wants to run and restore the machine to an earlier point. Fail. Didn't let it regress but startup repair failed.</li>
<li>Rebooted and tried startup repair again. Fail. However the machine did not load windows, and I got another BSOD for iastor.sys. Now i'm stuck in a loop of BSOD and startup repair. </li>
<li>Eventually it lets me do a system restore and back out the changes to an earlier time. Finally it boots to windows but I'm back where I started with repeated BSODs.</li>
<li>May have downloaded the wrong thing. Searched again and found this: <a href="https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&ProdId=2101&DwnldID=23060&keyword=intel+rapid+Storage+Technology+(Intel+RST)&lang=eng">https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&ProdId=2101&DwnldID=23060&keyword=intel+rapid+Storage+Technology+(Intel+RST)&lang=eng</a></li>
<li>Installed it successfully. Restarted the computer. windows boots. Now I have multiple versions of iastor. iastorF.sys, iastorV.sys, iastorA.sys, as well as iastor.sys. Letting the computer sit for a while to see what happens. Boom BSOD. Fail.</li>
<li>This must be a hardware problem since I've done everything conceivable to fix iastor.sys</li>
<li> I want to try disabling the cache drive in the BIOS. Drive may be malfunctioning. F2 at the black sony screen is the way to get to BIOS: <a href="https://us.en.kb.sony.com/app/answers/detail/a_id/35240">https://us.en.kb.sony.com/app/answers/detail/a_id/35240</a>. Can't find any way to access the disk drives in the BIOS! WTF? BIOS has been nerfed.</li>
<li>I need to pull the cache drive. Went hunting for it. Unscrewed the three large screws on the battery and removed the battery. THree screws to remove the hard drive cover. Unscrewed the hard drive too, four more screws. (did this previously because I had put it in another machine). Opened up the back panel by removing all the small black screws around the outside edges on the bottom and two silver ones in the battery compartment. The bottom cover pops off with a little prying.</li>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-ZrLu9inQk1o/UnW3BRhWkGI/AAAAAAAANRs/3kcaJnOLai4/s1600/20131102_220717%5B1%5D.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto; text-align: center;"><img border="0" height="180" src="http://2.bp.blogspot.com/-ZrLu9inQk1o/UnW3BRhWkGI/AAAAAAAANRs/3kcaJnOLai4/s320/20131102_220717%5B1%5D.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">VAIO with the battery and hard drive removed</td></tr>
</tbody></table>
<div>
<br />
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-6xgHoAiqVnI/UnW3Eaqd7sI/AAAAAAAANR0/yDJ_PfHnPBA/s1600/20131102_221033%5B1%5D.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto; text-align: center;"><img border="0" height="180" src="http://1.bp.blogspot.com/-6xgHoAiqVnI/UnW3Eaqd7sI/AAAAAAAANR0/yDJ_PfHnPBA/s320/20131102_221033%5B1%5D.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">VAIO with the back cover removed. The PCIe SSD cache drive is the small green circuit board on the top edge towards the left.</td></tr>
</tbody></table>
</div>
<ul>
<li>Found the SSD cache drive. The little module at the top edge near the WLAN module. Removed one screw and pulled it out. It is about 2.5 inches by 1.5 inches with two samsung chips on it.</li>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-bqAEFW3tGKQ/UnW3NLMX-_I/AAAAAAAANSE/mfeYLCpVy84/s1600/20131102_221200%5B1%5D.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://4.bp.blogspot.com/-bqAEFW3tGKQ/UnW3NLMX-_I/AAAAAAAANSE/mfeYLCpVy84/s320/20131102_221200%5B1%5D.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Removed Samsung SSD</td></tr>
</tbody></table>
</div>
<div>
<br />
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-_yrzn9jRM_U/UnW3JqdEQgI/AAAAAAAANR8/s40lylV_gGo/s1600/20131102_221134%5B1%5D.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto; text-align: center;"><img border="0" height="180" src="http://1.bp.blogspot.com/-_yrzn9jRM_U/UnW3JqdEQgI/AAAAAAAANR8/s40lylV_gGo/s320/20131102_221134%5B1%5D.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">SSD flipped over, the part number is on the bottom side</td></tr>
</tbody></table>
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<ul>
<li>reBooted and I get a disk drive BIOS menu now! It noticed something changed. </li>
<li>First attempt I tried to just bypass the bios screen, I get "operating system not found" Power off and restart.</li>
<li>Next I try <Ctrl I> when it asked me and it tells me the cache volume is not present. Do I want to disable it? Bingo. Answer yes.</li>
<li>Computer boots to windows. A lot slower now. too bad. But it works!</li>
<li>If this fixes the problem I will have to decide if I'm going to buy a replacement cache drive, live with the slower boot, or buy a single SSD drive and figure out how to reload windows from scratch.</li>
<li>So far so good. System is stable. It is no longer BSOD every few minutes. Problem is I don't really know if the problem is the cache drive hardware or the software that talks to it. Since I removed the drive, both are gone now. Seems like I fully explored the software corruption angle, but it is impossible to be sure it wasn't a related file that expressed itself as an iastor.sys BSOD.</li>
<li>Found a used replacement 32GB drive on ebay, they are pulls from used equipment. Prices vary from $29 to $49 for a new one. Many are shipped from the far east. </li>
<li>Found some refurbs from US sellers</li>
<li><a href="http://www.ebay.com/itm/151116902504">http://www.ebay.com/itm/151116902504</a></li>
<li><img height="240" src="http://i.ebayimg.com/t/SAMSUNG-32GB-MZMPC032HBCD-00000-SSD-CXM1201Q-MZ-MPC0320-Tested-qh4-/00/s/MTEyNVgxNTAw/z/UMEAAMXQtRxSKg3q/$(KGrHqN,!k8FIgNhR+I,BSKg3pn7N!~~60_57.JPG" width="320" /></li>
<li>Pulled the trigger for $35. I figured it is worth the risk. If the problem returns, then it isn't the hard drive and I can resell the part on eBay.</li>
<li>I will update the post when the new part comes. Meanwhile I'm back in business without the cache drive. Computer works normally, it is just slower to boot and hibernate. 24 hours plus and still going without a BSOD.</li>
<li>New part came in the mail. Looks identical to the old one.</li>
<li>Opened the laptop back up again</li>
<li>Plugged in the replacement drive.</li>
<li>Rebooted. Now it noticed something was different and the disk BIOS menu came up, </li>
<li><a href="http://3.bp.blogspot.com/-GNFOVc84KPg/Un2nIfgqjiI/AAAAAAAANVI/-7JAxdClp1Q/s1600/20131108_220439%5B1%5D.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="180" src="http://3.bp.blogspot.com/-GNFOVc84KPg/Un2nIfgqjiI/AAAAAAAANVI/-7JAxdClp1Q/s320/20131108_220439%5B1%5D.jpg" width="320" /></a></li>
<li>and I pressed Ctrl I to configure as i did before.</li>
<li><a href="http://2.bp.blogspot.com/-UVqVmNzq104/Un2kffSBfmI/AAAAAAAANUw/SewqFk505_w/s1600/20131108_215115%5B1%5D.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="180" src="http://2.bp.blogspot.com/-UVqVmNzq104/Un2kffSBfmI/AAAAAAAANUw/SewqFk505_w/s320/20131108_215115%5B1%5D.jpg" width="320" /></a></li>
<li>I tried options 1 and 5 and both said Error. "Not enough available space to create a volume". I eventually I just exited and it booted normally. I'm not sure if the caching is going to automatically turn back on.</li>
<li>Hard to tell if cache is working</li>
<li>Rebooted again and the BIOS menu came up again. Dang. It still says "Disabled" next to the cache drive. Can't find out how to enable it. When I disabled it before it was obvious, but I didn't take a picture.</li>
<li>Disk shows up in windows under computer management but no options to enable it are obvious </li>
<li>Re-installed the windows RAID driver software I downloaded above <a href="https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&ProdId=2101&DwnldID=23060&keyword=intel+rapid+Storage+Technology+(Intel+RST)&lang=eng">https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&ProdId=2101&DwnldID=23060&keyword=intel+rapid+Storage+Technology+(Intel+RST)&lang=eng</a></li>
<li>From Windows: Start->All Programs -> "Intel Rapid Storage Technology" </li>
<ul>
<li>Status "Your system is functioning normally" and I see the a 30GB RAID array with 11 and 19GB sections. </li>
<li>A message at the bottom says "Acceleration using solid state drives: Disabled" and please reconnect the the accelerated disk or volume..</li>
<li>Indicates that the drive is no longer accessible. </li>
<li>In the manage menus </li>
<ul>
<li>Turned off and disabled the SSD cache, reset the drive</li>
<li>Tried to re-enable accleration, it says I must reboot</li>
</ul>
<li>rebooted</li>
</ul>
<li>Reentered Intel Rapid Storage Technology-> Performance, and turned on Acceleration! </li>
<li>Now it works. W00t!</li>
<li>It appears I had to clear out all the old data on the refurb drive and re-associate it. I think it was looking for the old drive ID. Looks like I'm back in business. </li>
<li>Soaking to see if it crashes. So far so good. 24 hours + and no BSOD.</li>
<li>Victory declared!</li>
<ul>
</ul>
</ul>
<br />
<div>
<br /></div>
</div>
<div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com7tag:blogger.com,1999:blog-7372498041888039447.post-11502273622101292152013-08-17T00:55:00.000-04:002013-08-17T15:24:41.026-04:00Java app to draw SVG files in prep for sending to CNC machine<div class="post-body entry-content" id="post-body-1095819998125134628" style="position: relative; width: 536.8571166992188px;">
I'm in the midst of writing the control program for an Ardunio powered CNC machine.<br />
<br />
I've decided I'll use SVG format to drive the CNC machine from the PC.<br />
<br />
I can generate SVG files from other pictures with this online free tool:<br />
<a href="http://www.autotracer.org/">http://www.autotracer.org/</a><br />
<br />
This tool allows you to view and edit them, and draw my own directly.<br />
<a href="http://svg-edit.googlecode.com/svn/branches/2.6/editor/svg-editor.html">http://svg-edit.googlecode.com/svn/branches/2.6/editor/svg-editor.html</a><br />
<br />
Here is the spec on the SVG file format<br />
<a href="http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathDataMovetoCommands">http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathDataMovetoCommands</a><br />
<br />
This is the SVG for a little graphic with some letters and a square I made.<br />
<br />
<span style="background-color: white; color: #674ea7; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: xx-small; line-height: 10.285714149475098px;"><?xml version="1.0" standalone="yes"?></span><br />
<span style="background-color: white; color: #674ea7; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: xx-small; line-height: 10.285714149475098px;"><svg width="161" height="150"></span><br />
<span style="background-color: white; color: #674ea7; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: xx-small; line-height: 10.285714149475098px;"><path style="fill:#ffffff; stroke:none;" d="M0 0L0 150L161 150L161 0L0 0z"/></span><br />
<span style="background-color: white; color: #674ea7; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: xx-small; line-height: 10.285714149475098px;"><path style="fill:#010101; stroke:none;" d="M1 1L1 109L117 109L117 1L1 1z"/></span><br />
<span style="background-color: white; color: #674ea7; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: xx-small; line-height: 10.285714149475098px;"><path style="fill:#ffffff; stroke:none;" d="M3 3L3 107L115 107L115 85C87.676 91.5053 87.5147 47.4563 115 54L115 3L3 3z"/></span><br />
<span style="background-color: white; color: #674ea7; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: xx-small; line-height: 10.285714149475098px;"><path style="fill:#010101; stroke:none;" d="M41 43L41 85L49 85L49 69C54.56 69 61.8856 70.2342 66.9568 67.5432C74.8268 63.3671 75.3453 49.6136 67.956 44.7423C61.5192 40.4989 48.4628 43 41 43M80 43L80 50L88 50L88 43L80 43z"/></span><br />
<span style="background-color: white; color: #674ea7; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: xx-small; line-height: 10.285714149475098px;"><path style="fill:#ffffff; stroke:none;" d="M49 50L49 62C66.8383 61.9882 66.8383 50.0118 49 50z"/></span><br />
<span style="background-color: white; color: #674ea7; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: xx-small; line-height: 10.285714149475098px;"><path style="fill:#010101; stroke:none;" d="M80 54L80 85L88 85L88 54L80 54z"/></span><br />
<span style="background-color: white; color: #674ea7; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: xx-small; line-height: 10.285714149475098px;"><path style="fill:#ffffff; stroke:none;" d="M107.043 59.9707C98.9687 61.792 101.299 81.8813 109.794 79.1489C117.684 76.611 116.364 57.8683 107.043 59.9707z"/></span><br />
<span style="background-color: white; color: #674ea7; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: xx-small; line-height: 10.285714149475098px;"></svg></span></div>
<div class="post-body entry-content" id="post-body-1095819998125134628" style="position: relative; width: 536.8571166992188px;">
<span style="background-color: white; color: #674ea7; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: xx-small; line-height: 10.285714149475098px;"><br /></span></div>
<div class="post-body entry-content" id="post-body-1095819998125134628" style="position: relative; width: 536.8571166992188px;">
<span style="background-color: white; color: #674ea7; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: xx-small; line-height: 10.285714149475098px;"><br /></span></div>
The task at hand now is to make a little graphics sub module for the Java control program to read in an SVG file, interpret the commands line by line and render it. I'll both draw it on the screen in Java as a dry run, and format and send the move commands at the same time to the Arduinos controlling stepper motors.<br />
<div>
<br /></div>
<div>
This builds on stuff in these previous posts.</div>
<div>
<a href="http://blog.workingsi.com/2013/08/java-app-to-draw-svg-bezier-curves.html">http://blog.workingsi.com/2013/08/java-app-to-draw-svg-bezier-curves.html</a></div>
<div>
<a href="http://blog.workingsi.com/2013/02/arduino-xyz-cnc-3d-printer-pc-software.html">http://blog.workingsi.com/2013/02/arduino-xyz-cnc-3d-printer-pc-software.html</a></div>
<div>
<br />
<div>
The major pieces are</div>
<div>
-Open and read in svg files</div>
<div>
-Parse them line by line to pull out the graphics commands</div>
<div>
-Draw the vectors/curves on the screen</div>
<div>
-Write out the CNC machine commands to the serial interface. That program is already written but needs to be integrated.</div>
<div>
<br /></div>
<div>
Having some compatibility problems with the various svg editors.</div>
<div>
I like the files autotracer.org makes, but svg-edit.googlecode.com can't read them. GIMP will import and display them just fine. internet explorer doesn't like them either, and displays a blank page. The files from svg-edit.googlecode.com have a lot of complex commands in them.</div>
<div>
Figured out that I want to just use the path tool in svg-edit.googlecode.com. The format is a bit different though.</div>
<div>
<br /></div>
<div>
svg-edit gives me this:</div>
<div>
<span style="color: #0b5394; font-size: x-small;"> <path id="svg_11" d="m367,98l121,8l3,71l33,-118" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke="#ff0000" fill="#ffffff"/></span></div>
<div>
<span style="color: #0b5394; font-size: x-small;"><br /></span></div>
autotracer.org gives me this:<br />
<div>
<span style="color: #0b5394; font-size: x-small;"><path style="fill:#c1bfb3; stroke:none;" d="M119 16L120 17L119 16z"/></span></div>
<div>
<span style="color: #0b5394; font-size: x-small;"><br /></span></div>
They differ as to whether they have commas, absolute or relative moves, order of arguments, etc.<br />
<div>
Played around a bit, and svg-edit seems to make files that gimp renders better.</div>
<div>
<br /></div>
<div>
Pushing forward, I'll try to interpret both styles. </div>
<div>
<br /></div>
<div>
Wrote the file handling and parsing code in Java, now I need to write the graphics so I can draw a picture on the screen to see what the cnc thinks it's going to draw. That is the best way to see if I've translated the file properly too.<br />
<br />
This took days and days to get right. Starting with some simple pictures of curves drawn in svg-edit through some vectorized complex pictures I eventually got this to work! I had some trouble with the relative curve commands and decoding the curve commands and the compound commands. The code gets over complicated and handling the absolute and relative syntax from the different svg file generators took a while to sort out.</div>
<div>
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-Fs13KKaZZx4/Ug7-5aqMSNI/AAAAAAAAM1Q/eWuIwDHQw2A/s1600/Capturess.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="http://1.bp.blogspot.com/-Fs13KKaZZx4/Ug7-5aqMSNI/AAAAAAAAM1Q/eWuIwDHQw2A/s400/Capturess.PNG" width="400" /></a></div>
<br /></div>
<div>
The program opens an svg file, and then parses the commands into path lists of points. Curves are expanded into lists of points for the CNC machine to draw. Java graphics draw the lists of points so I can see if it looks right.<br />
<br />
Things I learned:<br />
<ul>
<li>c commands have all the points relative to the starting point, not the last point in the list.</li>
<li>m is absolute if first in line, relative if later in line</li>
<li>if m shows up mid line, need to lift the pen and start a new line. at that point. Also true of M</li>
</ul>
The command parsing is ugly code, I have to go character by character through the svg commands and interpret them. A big case statement and while loops flattened out. uggh. But it works.<br />
<br />
The code at this point is posted at<br />
<a href="https://code.google.com/p/arduino-java-xyzcnc/downloads/list">https://code.google.com/p/arduino-java-xyzcnc/downloads/list</a><br />
<br />
Here is the steps to make a vector image file<br />
<br />
<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="http://3.bp.blogspot.com/-x9Pjac4BNC0/Ug-WBjkkHSI/AAAAAAAAM1g/4efYwP3jL5Q/s1600/Captureppt.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="203" src="http://3.bp.blogspot.com/-x9Pjac4BNC0/Ug-WBjkkHSI/AAAAAAAAM1g/4efYwP3jL5Q/s320/Captureppt.PNG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: x-small; text-align: start;">First I just used power point to make some text. This could come from anywhere.</span></td></tr>
</tbody></table>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-yD-0R0xJ580/Ug-WExO-KOI/AAAAAAAAM1o/965jLNx6Coo/s1600/Capturegimp.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="152" src="http://1.bp.blogspot.com/-yD-0R0xJ580/Ug-WExO-KOI/AAAAAAAAM1o/965jLNx6Coo/s320/Capturegimp.PNG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Then I cut and pasted the words into gimp and saved it as a .png graphics file. Again the png/gif/etc could come from any source</span></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="http://2.bp.blogspot.com/-Rw7nfmsC0y4/Ug-WopVKK9I/AAAAAAAAM14/DykMO4_y8Ng/s1600/Captureautotracer.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="287" src="http://2.bp.blogspot.com/-Rw7nfmsC0y4/Ug-WopVKK9I/AAAAAAAAM14/DykMO4_y8Ng/s320/Captureautotracer.PNG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Then I went to autotracer.org and uploaded the file. Hit send file and then download the resulting .svg file from the top.</span></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="http://3.bp.blogspot.com/-c5cekOQdsk4/Ug-WHhOeFcI/AAAAAAAAM1w/rYT4cEFpbOU/s1600/Capturerender.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="133" src="http://3.bp.blogspot.com/-c5cekOQdsk4/Ug-WHhOeFcI/AAAAAAAAM1w/rYT4cEFpbOU/s400/Capturerender.PNG" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Then I used my Java program to open the .svg file, filter and plot it to the screen. W00t! It worked!!! Now I have a vector file that I can send to the CNC machine.</span></td></tr>
</tbody></table>
<br />
<br />
I'm finding that svg-edit doesn't like the autotracer.org files if opened directly. Also svg-edit works better in internet explorer than chrome (where is pretty broken). If you hit the <svg> button and hand paste the .svg file from autotracer.org into svg-edit, it seems to work. Not sure what the syntax issue is, something in the headers.<br />
<br />
Here i show editing the svg file:<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="http://4.bp.blogspot.com/-2yyLTu1mItY/Ug-bGUJePkI/AAAAAAAAM2E/KdEte9InuR0/s1600/Capturesvgedit.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="200" src="http://4.bp.blogspot.com/-2yyLTu1mItY/Ug-bGUJePkI/AAAAAAAAM2E/KdEte9InuR0/s320/Capturesvgedit.PNG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Open the file in internet explorer, svg-edit. Did this by pasting the previous svg into the text window. Edited it and moved some words.</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="http://3.bp.blogspot.com/-yLLJbh-CPn8/Ug-bGSVwHzI/AAAAAAAAM2M/l5a9dN9rUi0/s1600/Capturesvgeditsvg.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="246" src="http://3.bp.blogspot.com/-yLLJbh-CPn8/Ug-bGSVwHzI/AAAAAAAAM2M/l5a9dN9rUi0/s320/Capturesvgeditsvg.PNG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Wrote out a new svg file. This time the commands are all in relative syntax. </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="http://1.bp.blogspot.com/-CIqxYrAx8gg/Ug-bGYwDBsI/AAAAAAAAM2I/pszqtvyf2Aw/s1600/Captureeditedrender.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="137" src="http://1.bp.blogspot.com/-CIqxYrAx8gg/Ug-bGYwDBsI/AAAAAAAAM2I/pszqtvyf2Aw/s400/Captureeditedrender.PNG" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">It works! Here it is in the Java program.</td></tr>
</tbody></table>
<br />
notes for my to do list.<br />
<ul>
<li>Need to fix Java graphics repaint - DONE (added overide of paint to redo the drawing)</li>
<li>Get rid of all the system.out.println's for debug - DONE</li>
<li>need to make background non-white because some lines are disappearing. - DONE</li>
<li>Also need to smarten up the calculation for how many segments I linearize the curves - DONE</li>
</ul>
</div>
<div>
Now to combine it with the CNC control java program...<br />
<br /></div>
</div>
<div>
This post is in progress....</div>
<div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-7372498041888039447.post-10958199981251346282013-08-02T19:51:00.000-04:002013-08-02T19:51:17.928-04:00Java app to draw SVG Bezier curvesI'm in the midst of writing the control program for an Ardunio powered CNC machine.<br />
<br />
I've decided I'll use SVG format to drive the CNC machine from the PC.<br />
<br />
I can generate SVG files from other pictures with this online free tool:<br />
<a href="http://www.autotracer.org/">http://www.autotracer.org/</a><br />
<br />
This tool allows you to view and edit them, and draw my own directly.<br />
<a href="http://svg-edit.googlecode.com/svn/branches/2.6/editor/svg-editor.html">http://svg-edit.googlecode.com/svn/branches/2.6/editor/svg-editor.html</a><br />
<br />
Here is the spec on the SVG file format<br />
<a href="http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathDataMovetoCommands">http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathDataMovetoCommands</a><br />
<br />
This is a little graphic with some letters and a square I made.<br />
<br />
<span style="color: #674ea7; font-size: x-small;"><?xml version="1.0" standalone="yes"?></span><br />
<span style="color: #674ea7; font-size: x-small;"><svg width="161" height="150"></span><br />
<span style="color: #674ea7; font-size: x-small;"><path style="fill:#ffffff; stroke:none;" d="M0 0L0 150L161 150L161 0L0 0z"/></span><br />
<span style="color: #674ea7; font-size: x-small;"><path style="fill:#010101; stroke:none;" d="M1 1L1 109L117 109L117 1L1 1z"/></span><br />
<span style="color: #674ea7; font-size: x-small;"><path style="fill:#ffffff; stroke:none;" d="M3 3L3 107L115 107L115 85C87.676 91.5053 87.5147 47.4563 115 54L115 3L3 3z"/></span><br />
<span style="color: #674ea7; font-size: x-small;"><path style="fill:#010101; stroke:none;" d="M41 43L41 85L49 85L49 69C54.56 69 61.8856 70.2342 66.9568 67.5432C74.8268 63.3671 75.3453 49.6136 67.956 44.7423C61.5192 40.4989 48.4628 43 41 43M80 43L80 50L88 50L88 43L80 43z"/></span><br />
<span style="color: #674ea7; font-size: x-small;"><path style="fill:#ffffff; stroke:none;" d="M49 50L49 62C66.8383 61.9882 66.8383 50.0118 49 50z"/></span><br />
<span style="color: #674ea7; font-size: x-small;"><path style="fill:#010101; stroke:none;" d="M80 54L80 85L88 85L88 54L80 54z"/></span><br />
<span style="color: #674ea7; font-size: x-small;"><path style="fill:#ffffff; stroke:none;" d="M107.043 59.9707C98.9687 61.792 101.299 81.8813 109.794 79.1489C117.684 76.611 116.364 57.8683 107.043 59.9707z"/></span><br />
<span style="color: #674ea7; font-size: x-small;"></svg></span><br />
<br />
I need to be able to interpret the Bezier curve commands and calculate the points to drive the Arduino to. <br />
<br />
Some References:<br />
<br />
<ul>
<li><a href="http://devmag.org.za/2011/04/05/bzier-curves-a-tutorial/">http://devmag.org.za/2011/04/05/bzier-curves-a-tutorial/</a></li>
</ul>
<br />
<br />
<ul>
<li><a href="http://stackoverflow.com/questions/9245666/calculate-the-perimeter-of-a-bezier-curve-in-java">http://stackoverflow.com/questions/9245666/calculate-the-perimeter-of-a-bezier-curve-in-java</a></li>
<li><img alt="quadratic Bezier formula" src="http://i.stack.imgur.com/Ylcdf.png" /></li>
<li><a href="http://stackoverflow.com/questions/5634460/quadratic-bezier-curve-calculate-point">http://stackoverflow.com/questions/5634460/quadratic-bezier-curve-calculate-point</a></li>
<li><a href="http://www.itk.ilstu.edu/faculty/javila/SVG/SVG_drawing1/cubic_curve.htm">http://www.itk.ilstu.edu/faculty/javila/SVG/SVG_drawing1/cubic_curve.htm</a></li>
<li><a href="https://forums.oracle.com/thread/1221004">https://forums.oracle.com/thread/1221004</a></li>
</ul>
<br />
The last one has the code at the end that I ended up starting with.<br />
<br />
First I want to make the Java program to compute all the points, and draw them.<br />
Here is the initial implementation of the code at the end of this post <br />
<ul>
<li><a href="https://forums.oracle.com/thread/1221004">https://forums.oracle.com/thread/1221004</a></li>
</ul>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-4egcuIplPDo/UfrtsxgtveI/AAAAAAAAMpU/mclHHb1h3OY/s1600/Captured.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="246" src="http://2.bp.blogspot.com/-4egcuIplPDo/UfrtsxgtveI/AAAAAAAAMpU/mclHHb1h3OY/s320/Captured.PNG" width="320" /></a></div>
<br />
It worked and drew a curve! Now I need to draw curves with two control points that are entered, and control the number of points in the curve. Looks like those functions are here.<br />
<br />
A little fooling around and I figured out the functions and made a GUI to draw the curves and the control points<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-95MLVl3JE9s/UfsZIHn2SQI/AAAAAAAAMpk/Bf0AeIndnMQ/s1600/Capturedd.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="http://2.bp.blogspot.com/-95MLVl3JE9s/UfsZIHn2SQI/AAAAAAAAMpk/Bf0AeIndnMQ/s320/Capturedd.PNG" width="320" /></a></div>
<br />
Posted the source code and jar file here:<br />
<a href="https://code.google.com/p/arduino-java-xyzcnc/downloads/list">https://code.google.com/p/arduino-java-xyzcnc/downloads/list</a><br />
<a href="https://code.google.com/p/arduino-java-xyzcnc/downloads/detail?name=BezierDraw.jar">https://code.google.com/p/arduino-java-xyzcnc/downloads/detail?name=BezierDraw.jar</a><br />
<br />
This is the guts of the routine:<br />
<br />
<span style="color: #674ea7; font-size: x-small;">package bezierdraw;</span><br />
<span style="color: #674ea7; font-size: x-small;"><br /></span>
<span style="color: #674ea7; font-size: x-small;">import java.awt.geom.Point2D;</span><br />
<span style="color: #674ea7; font-size: x-small;"><br /></span>
<span style="color: #674ea7; font-size: x-small;">public class BezierCurve {</span><br />
<span style="color: #674ea7; font-size: x-small;"> </span><br />
<span style="color: #674ea7; font-size: x-small;"> Point2D.Double[] cp;</span><br />
<span style="color: #674ea7; font-size: x-small;"> int numberOfPoints;</span><br />
<span style="color: #674ea7; font-size: x-small;"> Point2D.Double[] curvePoints;</span><br />
<br />
<span style="color: #674ea7; font-size: x-small;"> public BezierCurve(Point2D.Double[] cp, int numPoints) {</span><br />
<span style="color: #674ea7; font-size: x-small;"> this.cp = cp;</span><br />
<span style="color: #674ea7; font-size: x-small;"> numberOfPoints = numPoints;</span><br />
<span style="color: #674ea7; font-size: x-small;"> curvePoints = new Point2D.Double[numPoints];</span><br />
<span style="color: #674ea7; font-size: x-small;"> computeBezier();</span><br />
<span style="color: #674ea7; font-size: x-small;"> }</span><br />
<br />
<span style="color: #674ea7; font-size: x-small;"> protected Point2D.Double[] getCurvePoints() {</span><br />
<span style="color: #674ea7; font-size: x-small;"> return curvePoints;</span><br />
<span style="color: #674ea7; font-size: x-small;"> }</span><br />
<br />
<span style="color: #674ea7; font-size: x-small;"> private void computeBezier() {</span><br />
<span style="color: #674ea7; font-size: x-small;"> double dt = 1.0 / (numberOfPoints - 1);</span><br />
<br />
<span style="color: #674ea7; font-size: x-small;"> for(int j = 0; j < numberOfPoints; j++)</span><br />
<span style="color: #674ea7; font-size: x-small;"> curvePoints[j] = getCurvePoint(j*dt);</span><br />
<span style="color: #674ea7; font-size: x-small;"> }</span><br />
<span style="color: #674ea7; font-size: x-small;"> </span><br />
<span style="color: #674ea7; font-size: x-small;"> private Point2D.Double getCurvePoint(double t)</span><br />
<span style="color: #674ea7; font-size: x-small;"> {</span><br />
<span style="color: #674ea7; font-size: x-small;"> Point2D.Double result = new Point2D.Double();</span><br />
<br />
<span style="color: #674ea7; font-size: x-small;"> /* calculate the polynomial coefficients */</span><br />
<span style="color: #674ea7; font-size: x-small;"> double cx = 3.0 * (cp[1].x - cp[0].x);</span><br />
<span style="color: #674ea7; font-size: x-small;"> double bx = 3.0 * (cp[2].x - cp[1].x) - cx;</span><br />
<span style="color: #674ea7; font-size: x-small;"> double ax = cp[3].x - cp[0].x - cx - bx;</span><br />
<br />
<span style="color: #674ea7; font-size: x-small;"> double cy = 3.0 * (cp[1].y - cp[0].y);</span><br />
<span style="color: #674ea7; font-size: x-small;"> double by = 3.0 * (cp[2].y - cp[1].y) - cy;</span><br />
<span style="color: #674ea7; font-size: x-small;"> double ay = cp[3].y - cp[0].y - cy - by;</span><br />
<br />
<span style="color: #674ea7; font-size: x-small;"> /* calculate the curve point at parameter value t */</span><br />
<span style="color: #674ea7; font-size: x-small;"> double tSquared = t * t;</span><br />
<span style="color: #674ea7; font-size: x-small;"> double tCubed = tSquared * t;</span><br />
<br />
<span style="color: #674ea7; font-size: x-small;"> result.x = (ax * tCubed) + (bx * tSquared) + (cx * t) + cp[0].x;</span><br />
<span style="color: #674ea7; font-size: x-small;"> result.y = (ay * tCubed) + (by * tSquared) + (cy * t) + cp[0].y;</span><br />
<br />
<span style="color: #674ea7; font-size: x-small;"> return result;</span><br />
<span style="color: #674ea7; font-size: x-small;"> }</span><br />
<span style="color: #674ea7; font-size: x-small;"> </span><br />
<span style="color: #674ea7; font-size: x-small;">}</span><br />
<span style="color: #674ea7; font-size: x-small;"><br /></span>
<span style="color: #674ea7; font-size: x-small;">private void drawBezierPath(Point2D.Double p1, Point2D.Double cp1, Point2D.Double cp2, Point2D.Double p2, int numPoints) {</span><br />
<span style="color: #674ea7; font-size: x-small;"> Point2D.Double[] points = { p1, cp1, cp2, p2 };</span><br />
<span style="color: #674ea7; font-size: x-small;"> BezierCurve curve = new BezierCurve(points, numPoints);</span><br />
<span style="color: #674ea7; font-size: x-small;"> Point2D.Double[] p = curve.getCurvePoints();</span><br />
<span style="color: #674ea7; font-size: x-small;"> path = new GeneralPath();</span><br />
<span style="color: #674ea7; font-size: x-small;"> for(int j = 0; j < p.length; j++) {</span><br />
<span style="color: #674ea7; font-size: x-small;"> if(j == 0)</span><br />
<span style="color: #674ea7; font-size: x-small;"> path.moveTo((float)p[j].x, (float)p[j].y);</span><br />
<span style="color: #674ea7; font-size: x-small;"> else</span><br />
<span style="color: #674ea7; font-size: x-small;"> path.lineTo((float)p[j].x, (float)p[j].y);</span><br />
<span style="color: #674ea7; font-size: x-small;"> }</span><br />
<span style="color: #674ea7; font-size: x-small;"> g2d.setColor(Color.red);</span><br />
<span style="color: #674ea7; font-size: x-small;"> g2d.draw(path);</span><br />
<span style="color: #674ea7; font-size: x-small;"></span><br />
<span style="color: #674ea7; font-size: x-small;"> }</span><br />
<div>
<br /></div>
<br />
<br />
That is the basic C function. Now for the S function. The shorthand curve notation is a bit confusing.<br />
<a href="http://stackoverflow.com/questions/5287559/calculating-control-points-for-a-shorthand-smooth-svg-path-bezier-curve">http://stackoverflow.com/questions/5287559/calculating-control-points-for-a-shorthand-smooth-svg-path-bezier-curve</a><br />
<br />
From the SVG spec<br />
<table border="1" cellpadding="5" cellspacing="2" class="PathDataTable" style="background-color: #dddddd; color: black; font-family: sans-serif; line-height: 20px;" summary="cubic Bézier command"><tbody>
<tr><th>Command</th><th>Name</th><th>Parameters</th><th>Description</th></tr>
<tr><td><strong style="margin-top: 0px;">C</strong>(absolute)<br />
<strong>c</strong> (relative)</td><td>curveto</td><td>(x1 y1 x2 y2 x y)+</td><td>Draws a cubic Bézier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve. <strong style="margin-top: 0px;">C</strong> (uppercase) indicates that absolute coordinates will follow; <strong>c</strong> (lowercase) indicates that relative coordinates will follow. Multiple sets of coordinates may be specified to draw a polybézier. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybézier.</td></tr>
<tr><td><strong style="margin-top: 0px;">S</strong>(absolute)<br />
<strong>s</strong> (relative)</td><td>shorthand/smooth curveto</td><td>(x2 y2 x y)+</td><td>Draws a cubic Bézier curve from the current point to (x,y). <span style="background-color: yellow;">The first control point is assumed to be the reflection of the second control point on the previous command relative to the current point</span>. (If there is no previous command or if the previous command was not an C, c, S or s, assume the first control point is coincident with the current point.) (x2,y2) is the second control point (i.e., the control point at the end of the curve). <strong style="margin-top: 0px;">S</strong> (uppercase) indicates that absolute coordinates will follow; <strong>s</strong> (lowercase) indicates that relative coordinates will follow. Multiple sets of coordinates may be specified to draw a polybézier. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybézier.</td></tr>
</tbody></table>
<br />
I am only doing a cubic curve, and there are quadratic and elliptical types. Need to see if I need to implement the others or if I can get by with just implementing the Bezier cubic.<br />
<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-7372498041888039447.post-64814944382637667642013-07-30T21:07:00.000-04:002013-09-01T22:06:28.772-04:00Upgrading Arduino XYZ CNC Machine Tool Motor<br />
For a tool motor I previously used a scrounged rechargeable DC drill motor and chuck. The motor was from a 12V rechargeable drill. I used an Arduino and PWM to modulate the speed, but had to make a custom MOSFET hbridge add on to deal with the high current. This post: <a href="http://blog.workingsi.com/2011/05/notes-on-heavy-duty-motor-sheild-for.html">http://blog.workingsi.com/2011/05/notes-on-heavy-duty-motor-sheild-for.html</a> poorly documents my previous work ;-).<br />
<br />
The circuit I had worked fine for controlling the motor, but after some discussion with friends I decided that my motor was really not spinning at high enough RPM for most engraving and cutting jobs.<br />
<br />
Two options I see<br />
<br />
<ul>
<li>Use my dremel and add a solid state relay to control the AC. I probably won't be able to modulate speed any more</li>
<li>Buy a purpose build CNC DC spindle motor. </li>
</ul>
<div>
I also struggled a bit with a good motor mount for the old drill motor. I had a hose clamp around it but it looked lame and didn't seem very well aligned and stable.</div>
<div>
<br /></div>
<br />
I decided to invest in a high RPM spindle motor. Zen toolworks has two grades they sell. Fairly expensive, and the cheaper one is known to have high runout. I don't really like the plastic brackets, although the whole machine is made out of it, so I suppose it's strong enough.<br />
<br />
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm-na.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=workingsilico-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=B0039HCK6S" style="height: 240px; width: 120px;"></iframe>
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm-na.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=workingsilico-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=B009X1UN3Q" style="height: 240px; width: 120px;"></iframe>
<br />
<br />
Another vendor had a motor with a fan, and an aluminum mount. Total price would be about the the same.<br />
<br />
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm-na.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=workingsilico-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=B00BKUDCTA" style="height: 240px; width: 120px;"></iframe>
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm-na.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=workingsilico-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=B00DFVAGFA" style="height: 240px; width: 120px;"></iframe>
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm-na.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=workingsilico-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=B00E7ND54O" style="height: 240px; width: 120px;"></iframe>
<br />
<br />
However I noticed that the vendor ships from China. Long wait. I've bought stuff this way and it is usually OK, but I avoid it if I can. Impossible to return things if you are unhappy.<br />
<br />
I poked around ebay. Found the same motors everywhere for a variety of prices. Almost all ship from China or Hong Kong.<br />
<br />
Finally decided to buy this one for $79 from a US vendor. A little pricey. I hope it's worth it. It had a fan and the mounting block I need. Nice. I'll pay the premium for US seller.<br />
<a href="http://www.ebay.com/itm/300878974659?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649">http://www.ebay.com/itm/300878974659?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649</a><br />
<img height="371" src="http://i.ebayimg.com/t/DC-12-48v-CNC-300W-Air-cool-Spindle-Motor-with-Mount-bracket-ER11-US-Seller-/00/s/MTMxMFgxNDEw/z/zV8AAOxyzHxRJtl1/$(KGrHqRHJEkFEijF10q,BRJtl0KF3Q~~60_57.JPG" width="400" /><br />
<br />
<br />
I previously used a MCH3484 and a MCH3383 MOSFETs to make an Hbridge to PWM the speed from the Arduino. That should work again.<br />
<br />
I also need a power supply. The specs say this:<br />
<div>
<br />
<ul>
<li><span style="font-family: Arial; font-size: medium;">Work voltage: 12-48vdc (Suggest to use DC 48V)</span></li>
<li><span style="font-family: Arial; font-size: medium;">Rotation speed: 3000-12000r/min</span></li>
<li><span style="font-family: Arial; font-size: medium;">Power: 300w</span></li>
<li><span style="font-family: Arial; font-size: medium;">Torque:230mn.m</span></li>
</ul>
</div>
<div>
300W at 48V means 6.25A at highest power<br />
<br />
This little $12 DC/DC converter gives me 120W/5A, but I have to supply it with another DC input. That means I need a power supply to drive my power supply. No thanks.<br />
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm-na.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=workingsilico-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=B00BZR9PBW" style="height: 240px; width: 120px;"></iframe><br />
<br />
A bigger one for 10A and 500W. $28</div>
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm-na.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=workingsilico-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=B009VD1BV4" style="height: 240px; width: 120px;"></iframe>
<br />
<br />
I poked around looking for an AC powered 36V or 48V DC lab supply with little success on ebay or amazon. Digikey has stuff for >$200. Wow. Maybe this wasn't such a good idea.<br />
I'll keep looking for now for a deal on eBay, before I build a power supply.<br />
<br />
The motor came. It is a beast. Much bigger than the old drill motor. The aluminum mount is nice.<br />
I'll need to drill mounting holes in the plate on the Zen.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-vqy8ZcRGpBo/UfxDjWgXMxI/AAAAAAAAMqg/Gul7u3SmFbw/s1600/IMG_20130802_193814_985.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="http://4.bp.blogspot.com/-vqy8ZcRGpBo/UfxDjWgXMxI/AAAAAAAAMqg/Gul7u3SmFbw/s400/IMG_20130802_193814_985.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
I used my drill press to stick through the four mounting holes and drill through the face plate of the gantry. (I took the faceplate off). I found four lockwashers in my junk bin that fit the bolts that came with the mounting bracket and tightened it all up.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-Dm_gjmraJYc/UfxzffuJ6dI/AAAAAAAAMsQ/WveeOmpAHsU/s1600/IMG_20130802_224349_430.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://3.bp.blogspot.com/-Dm_gjmraJYc/UfxzffuJ6dI/AAAAAAAAMsQ/WveeOmpAHsU/s400/IMG_20130802_224349_430.jpg" width="225" /></a></div>
It went together surprisingly well, no issues whatsoever!<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-gItZUFbj7QQ/UfxzfnG-pXI/AAAAAAAAMsY/k0ZgXwYWins/s1600/IMG_20130802_224403_252.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://3.bp.blogspot.com/-gItZUFbj7QQ/UfxzfnG-pXI/AAAAAAAAMsY/k0ZgXwYWins/s400/IMG_20130802_224403_252.jpg" width="225" /></a></div>
<br />
Here it is mounted back on the Zen toolworks machine. I'm a little worried I went over the top on this one, since the faceplate is attached with 6 tiny screws and the mounting bracket has four giant bolts and 1/4 aluminum. I'll go easy with this thing and not rev it up full speed.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-5UUHwKB7VXw/UfxzgPpFlrI/AAAAAAAAMso/L4ANyPMpl24/s1600/IMG_20130802_225141_134.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="http://1.bp.blogspot.com/-5UUHwKB7VXw/UfxzgPpFlrI/AAAAAAAAMso/L4ANyPMpl24/s400/IMG_20130802_225141_134.jpg" width="400" /></a></div>
<br />
Slight assembly issue, the gantry screws are now behind the motor. I need to loosen the bolts, remove the motor from the mount, re-attach the gantry and put the motor back in. A little extra work.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-nDepToEjy60/Ufxzg0UsOII/AAAAAAAAMsw/pKa1n4iuXbw/s1600/IMG_20130802_225151_826.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="http://2.bp.blogspot.com/-nDepToEjy60/Ufxzg0UsOII/AAAAAAAAMsw/pKa1n4iuXbw/s400/IMG_20130802_225151_826.jpg" width="400" /></a></div>
<br />
Clearance looks good inside the gantry. The bolts don't hit anything.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-bBfhifhzR_s/UfxzhGZIorI/AAAAAAAAMs0/IyjTh-sejFM/s1600/IMG_20130802_225345_018.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="http://3.bp.blogspot.com/-bBfhifhzR_s/UfxzhGZIorI/AAAAAAAAMs0/IyjTh-sejFM/s400/IMG_20130802_225345_018.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Found a power supply on ebay for $45, free shipping. It is direct from China so there is some risk and it will take a while to get. Not sure why it is so much cheaper than everything else. Just a transformer is $25 if I'm going to make my own. Bought this one:<br />
<br />
<span style="color: #333333; font-family: Trebuchet, 'Trebuchet MS'; font-size: 18px; font-weight: bold;">36V 10A 350W AC to DC Switch Power Supply Transformer for LED Strip light CCTV</span><br />
<a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=231020237543">http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=231020237543</a><br />
<strong style="background-color: white; color: #102617; font-family: Verdana; font-size: small;">Input Voltage: 100~120V AC, 200~240V AC (Preset 220V)<br />Output Voltage: 36V DC<br />Output Current: 10A<br />Shell Material: Metal case / Aluminum base<br />Protection: Shortage Protection, Overload Protection, Over Voltage Protection</strong><br />
<strong style="background-color: white; color: #102617; font-family: Verdana; font-size: small;"><br /></strong>
<br />
<div>
It is only 36V versus the 48V that the motor can go to, but I think that 36V will be enough and 48V will be crazy fast. I have some hope of my hbridge motor driver still working up to 36V.</div>
<div>
<br /></div>
Waiting for it to come from China.....<br />
<br />
Motor finally came, a little faster than I expected but I was out of town.<br />
<br />
The power supply is a bit confusing, There is no power plug and mysteriously labeled terminal screw strip. A little googling on the part number LIHUA-360W on the side is encouraging. Looks like lots of people use these for reprap 3D printer power supplies (the 12V version).<br />
<a href="http://www.youtube.com/watch?v=HsbyccSemy8">http://www.youtube.com/watch?v=HsbyccSemy8</a><br />
<br />
You connect the power cord to the GND, N(neutral) & L(line) connections. =V and -V are 36V output. Hopefully the rails aren't divided such that I can't get the 3A I need from one terminal, or maybe I can gang them.<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="http://4.bp.blogspot.com/-zjBY2mxujxg/Uh_XHZJBX1I/AAAAAAAAM5I/OxmJS66mpZ4/s1600/IMG_20130829_183636_966.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://4.bp.blogspot.com/-zjBY2mxujxg/Uh_XHZJBX1I/AAAAAAAAM5I/OxmJS66mpZ4/s320/IMG_20130829_183636_966.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">I cut the end of an extra standard heavy duty three prong monitor power cord, and stripped the wires. There is a green (GND), white (neutral) and black (line) wire.</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="http://3.bp.blogspot.com/-Aj_SKd8q5C0/Uh_XIAg9IVI/AAAAAAAAM5c/m_zQH3Vp8sQ/s1600/IMG_20130829_183915_857.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://3.bp.blogspot.com/-Aj_SKd8q5C0/Uh_XIAg9IVI/AAAAAAAAM5c/m_zQH3Vp8sQ/s320/IMG_20130829_183915_857.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Hooked them up like this to the power supply like this. Green to gnd, White to N and black to L.</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="http://4.bp.blogspot.com/-E070QfnxUeg/Uh_XItpB1FI/AAAAAAAAM5k/Gf6h8oIqCfA/s1600/IMG_20130829_185656_573.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://4.bp.blogspot.com/-E070QfnxUeg/Uh_XItpB1FI/AAAAAAAAM5k/Gf6h8oIqCfA/s320/IMG_20130829_185656_573.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">I plugged it in and nothing happens. DC output is 0V. I used the DVM to measure the line voltage, and it reads 120V AC between N and L. Arggh. Fail. Then I remembered I forgot to flip the switch on the side to 115V, it had been on 240V. Plugged it in again and it works! No harm done. Win!</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="http://4.bp.blogspot.com/-xXlAv__UbeA/Uh_XIzWOvJI/AAAAAAAAM5o/N0uw7TDKcNc/s1600/IMG_20130829_185732_061.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://4.bp.blogspot.com/-xXlAv__UbeA/Uh_XIzWOvJI/AAAAAAAAM5o/N0uw7TDKcNc/s320/IMG_20130829_185732_061.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">You can see the green light on the left comes on.</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="http://3.bp.blogspot.com/-ea_NW_QFsSU/Uh_XJDsGA-I/AAAAAAAAM5s/B_4oeelgw54/s1600/IMG_20130829_185924_870.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://3.bp.blogspot.com/-ea_NW_QFsSU/Uh_XJDsGA-I/AAAAAAAAM5s/B_4oeelgw54/s320/IMG_20130829_185924_870.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Voltmeter on the V- and V+ terminals reads 36V. The small pot next to the light adjusts it, and it is pretty touchy. It started at 36.4 and I dialed it down to 36.0. The motor takes up to 48V, so I might later turn it up as high as it will go.</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="http://3.bp.blogspot.com/-8s4FglEjOU8/Uh_XJmST2xI/AAAAAAAAM58/ch8obkjqrZg/s1600/IMG_20130829_191224_399.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://3.bp.blogspot.com/-8s4FglEjOU8/Uh_XJmST2xI/AAAAAAAAM58/ch8obkjqrZg/s320/IMG_20130829_191224_399.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">I connected a cord to the DC output voltage.</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="http://2.bp.blogspot.com/-hmknUG7oGiw/Uh_XJ-mWYwI/AAAAAAAAM6A/Srrob8IHZVo/s1600/IMG_20130829_191514_150.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="400" src="http://2.bp.blogspot.com/-hmknUG7oGiw/Uh_XJ-mWYwI/AAAAAAAAM6A/Srrob8IHZVo/s400/IMG_20130829_191514_150.jpg" width="225" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Hooked it temporarily to the motor supply and plugged it in. Whirrrrrrrrr! </td></tr>
</tbody></table>
<span style="font-size: 12.727272033691406px; text-align: center;">The motor is smooth and quiet. Almost no vibration and quieter than I expected. I have no idea yet what the RPM I'm getting is, seems fast, but I need to think of a way to measure it. Left it run for 5-10 minutes and everything seems fine. No smoke. Hopefully I've got enough voltage for good operation. Looks like I'm in business.</span><br />
<span style="font-size: 12.727272033691406px; text-align: center;"><br /></span>
<span style="font-size: 12.727272033691406px; text-align: center;">While the motor was running, I measured the power supply voltage. If I was overloading the supply then I'd expect the voltage would have drooped. Good news, it still read 36.0V with the motor running.</span><br />
<span style="font-size: 12.727272033691406px; text-align: center;"><br /></span>
<span style="font-size: 12.727272033691406px; text-align: center;">I used the adjustment potentiometer to turn up the voltage to max, which measured around 39.1V. There was a noticeable pitch change in the speed of the motor, so the extra couple of volts made a difference. The motor is rated to 48V but I'm going to settle for 39V.</span><br />
<span style="font-size: 12.727272033691406px; text-align: center;"><br /></span>
<span style="font-size: 12.727272033691406px; text-align: center;"><br /></span>
<br />
<br />
<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com13tag:blogger.com,1999:blog-7372498041888039447.post-30171818465986247962013-07-27T21:34:00.000-04:002013-08-02T19:42:55.049-04:00Arduino XYZ CNC / 3D Printer Do-over<br />
Now that I've polished my Java skills over the past couple years I wanted to come back and improve a previous project of an XYZ CNC machine that was controlled by Arduinos and a crude PC Java program.<br />
<br />
This is the hardware I'm using. I've covered how to build all these pieces in earlier blog posts. As I work through the pieces I'll refresh the info on the hardware and sketches. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-w63gvctZgqo/UR2ZITP7DhI/AAAAAAAAJhw/GEU3KInQdKk/s1600/block+diagram+of+cnc.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="http://3.bp.blogspot.com/-w63gvctZgqo/UR2ZITP7DhI/AAAAAAAAJhw/GEU3KInQdKk/s400/block+diagram+of+cnc.PNG" width="400" /></a></div>
<br />
I'll need to make some software updates to the Arduinos, but the original Arduino sketches are posted on my download pages. I want to improve the handshaking, auto detect the arduinos, and process HPGL files better, plus make a better GUI.<br />
<br />
There are three Arduinos. The first is the XYZ motor controller that uses two motor shields from ADAfruit. I posted a hack on how to attach two to the same Arduino. I also replaced the motor driver chips with some higher capacity chips and put on heat sinks. The reason one arduino does all this work is I absolutely want to synchronize the x, y and z moves. I don't want to risk dropping a move or mistiming a move due to USB communication glitches. This arduino gets HPGL format commands that give position from and to commands and it calculates all the sub stepping to get there.<br />
<br />
The second arduino only controls the speed and direction of the cutter. The cutter is a cordless drill motor and chuck controlled by some heavy duty MOSFET switches. <br />
<br />
The third arduino is connected to position encoders and an LCD. It reads back the position and also displays it and any other messages the machine has to say. This is mostly used as a watchdog, since the steppers count position. If the position gets off from what the machine thinks it should be I should stop and let the user figure things out.<br />
<br />
Power is supplied by a old PC desktop power supply.<br />
<br />
My PC original control program was very crude and didn't work if the Arduinos were in different COM ports and didn't have file spooling capability. I'm way better at coding now, that was my very first program after "Hello World".<br />
<br />
So my project this time is to write a respectable java program that will work for everyone, It will read/spool in a standard HPGL command file and control the CNC. It will also have buttons for manual controlling the CNC.<br />
<br />
I'm using Java and the netbeans development environment, which is free from oracle.<br />
I'm starting with the basic Java serial tool I just wrote for the PC that will communicate with the Arduinos.<br />
<br />
<a href="http://blog.workingsi.com/2013/01/revisiting-arduino-control-from-pc.html" target="_blank">http://blog.workingsi.com/2013/01/revisiting-arduino-control-from-pc.html</a><br />
<div>
<img height="175" src="http://1.bp.blogspot.com/-uLuKsYOHGIg/URmj-36gSFI/AAAAAAAAJfQ/hwTeTCVBrV4/s200/Capture.PNG" width="200" /></div>
<br />
The first piece will be a startup routine that finds all three Arduinos and establishes a link. Each arduino sketch will be updated to send an initialization sequence I can look for.<br />
<br />
After that there will be a choice of entering manual mode to push buttons on the GUI to move, or load an HPGL drawing file. There should be a routine for setting the home position.<br />
<br />
First I'm going to work on communicating with the position sensor I described in this post:<br />
<a href="http://blog.workingsi.com/2011/02/position-sensor-for-arduino-xyz-cnc.html" target="_blank">http://blog.workingsi.com/2011/02/position-sensor-for-arduino-xyz-cnc.html</a><br />
I fired it up with the serial tool and the original code in the post is working fine, the encoder is constantly spitting out the position on the COM port as fast as it can. For now I shouldn't need to alter the Arduino sketch. My PC program will have to seek and identify this data stream and map it properly.<br />
<br />
Next I fired up the XYZ stepper Arduino and that seems to be in good order as well. The original sketch was built from this post. You need to use the custom library to use all four steppers<br />
<a href="http://blog.workingsi.com/2011/03/method-for-controlling-4-steppers-from.html" target="_blank">http://blog.workingsi.com/2011/03/method-for-controlling-4-steppers-from.html</a><br />
and the sketch for the XYZ control is posted on my download site:<br />
<a href="http://code.google.com/p/arduino-java-xyzcnc/downloads/detail?name=XYZ_CNC_HPGL_r13.pde&can=2&q=#makechanges" target="_blank">http://code.google.com/p/arduino-java-xyzcnc/downloads/detail?name=XYZ_CNC_HPGL_r13.pde&can=2&q=#makechanges</a><br />
<br />
<b><u>Writing the Java to connect to all the Arduinos</u></b><br />
<br />
First step is to perfect the serial port autodetection. I'll use the touchport command and then look for a unique broadcast from each Arduino in order to assign them to ports.<br />
<br />
After a long stall, I finally got this working in a recent project. <br />
<a href="http://blog.workingsi.com/2013/07/lcd-system-monitor-for-pc-case-bling.html">http://blog.workingsi.com/2013/07/lcd-system-monitor-for-pc-case-bling.html</a><br />
<br />
I had been hung up from a mistake. I used touchPort, to get the port names, and then instantiated a serial class to talk to each one. However that process wiped out my list of ports so the loop failed. Also I learned I have to wait and let the listener have time to hear each Arduino before moving on. Here are the basic pieces.<br />
<br />
This Java loop goes through all the ports:<br />
<span style="color: #674ea7; font-size: x-small;"> int iii=0;</span><br />
<span style="color: #674ea7; font-size: x-small;"> while (clientPortName.equals("")) {</span><br />
<span style="color: #674ea7; font-size: x-small;"> </span><br />
<span style="color: #674ea7; font-size: x-small;"> //scan for devices and list</span><br />
<span style="color: #674ea7; font-size: x-small;"> serial.touchPort("", Integer.valueOf(serialRates.getSelectedItem().toString()));</span><br />
<span style="color: #674ea7; font-size: x-small;"> jListPorts.setModel(new javax.swing.AbstractListModel() {</span><br />
<span style="color: #674ea7; font-size: x-small;"> String[] strings = serial.portNames;</span><br />
<span style="color: #674ea7; font-size: x-small;"> public int getSize() { return strings.length; }</span><br />
<span style="color: #674ea7; font-size: x-small;"> public Object getElementAt(int i) { return strings[i]; }</span><br />
<span style="color: #674ea7; font-size: x-small;"> });</span><br />
<span style="color: #674ea7; font-size: x-small;"> </span><br />
<span style="color: #674ea7; font-size: x-small;"> if (!serial.portNames[iii].equals("")) { </span><br />
<span style="color: #674ea7; font-size: x-small;"><br /></span>
<span style="color: #674ea7; font-size: x-small;"> System.out.println("PORT:" + serial.portNames[iii]);</span><br />
<span style="color: #674ea7; font-size: x-small;"> setupCom(serial.portNames[iii]);</span><br />
<span style="color: #674ea7; font-size: x-small;"> // give it some time to hear the Arduino calling</span><br />
<span style="color: #674ea7; font-size: x-small;"> long currentTimeMillis = System.currentTimeMillis();</span><br />
<span style="color: #674ea7; font-size: x-small;"> while (System.currentTimeMillis()<currentTimeMillis+3000 ) {</span><br />
<span style="color: #674ea7; font-size: x-small;"> //just hang out hoping for a letter</span><br />
<span style="color: #674ea7; font-size: x-small;"> } </span><br />
<span style="color: #674ea7; font-size: x-small;"> }</span><br />
<span style="color: #674ea7; font-size: x-small;"> iii++;</span><br />
<span style="color: #674ea7; font-size: x-small;"> if (iii>19) {</span><br />
<span style="color: #674ea7; font-size: x-small;"> System.out.println("Exiting, Arduino not found");</span><br />
<span style="color: #674ea7; font-size: x-small;"> System.exit(1);</span><br />
<span style="color: #674ea7; font-size: x-small;"> }</span><br />
<span style="color: #674ea7; font-size: x-small;"> }</span><br />
<br />
<br />
<br />
This routine below grabs each port and sets up a listener and sets a flag that breaks the loop above if the desired character is found.<br />
<br />
<span style="color: #674ea7; font-size: x-small;"> public void setupCom(final String portName) throws SerialException{</span><br />
<span style="color: #674ea7; font-size: x-small;"> //System.out.println(">>"+portName);</span><br />
<span style="color: #674ea7; font-size: x-small;"> serial.dispose();</span><br />
<span style="color: #674ea7; font-size: x-small;"> serial = new Serial(portName, Integer.valueOf(serialRates.getSelectedItem().toString()), 'E', 8, 2 );</span><br />
<span style="color: #674ea7; font-size: x-small;"> </span><br />
<span style="color: #674ea7; font-size: x-small;"> //Add the listener to pipe remote responses </span><br />
<span style="color: #674ea7; font-size: x-small;"> serial.addSerialEventListener(new Listener_SerialEvent() {</span><br />
<span style="color: #674ea7; font-size: x-small;"> @Override</span><br />
<span style="color: #674ea7; font-size: x-small;"> public void SerialEventOccurred(int message) {</span><br />
<span style="color: #674ea7; font-size: x-small;"> String message_out = formatRead(message); </span><br />
<span style="color: #674ea7; font-size: x-small;"> </span><br />
<span style="color: #674ea7; font-size: x-small;"> if (message_out.equalsIgnoreCase("Q")) {</span><br />
<span style="color: #674ea7; font-size: x-small;"> System.out.println(portName + " detected Q - gotcha!!!");</span><br />
<span style="color: #674ea7; font-size: x-small;"> clientPortName = portName;</span><br />
<span style="color: #674ea7; font-size: x-small;"> send("Hello World!"); //respond so Arduino stops sending Q</span><br />
<span style="color: #674ea7; font-size: x-small;"> }</span><br />
<span style="color: #674ea7; font-size: x-small;"> }</span><br />
<span style="color: #674ea7; font-size: x-small;"> });</span><br />
<span style="color: #674ea7; font-size: x-small;"> }</span><br />
<span style="color: #674ea7; font-size: x-small;"><br /></span>
I don't have to break the upper loop, I could go back and set up the port at the end of looping, but this is faster if I stop when the right port is found. <br />
<br />
I've updated the serial Arduino tool with a field for the character is it going to look for to connect. In this picture the GUI has three Arduinos connected. One is transmitting Z, one is busy, and one is transmitting A. The one transmitting Z , COM4, is grabbed and now send and receive can begin.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-_4lPg7F7iEw/UeX3Lzj14gI/AAAAAAAAMfY/CeHvQEgxWoA/s1600/Capturex.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="196" src="http://1.bp.blogspot.com/-_4lPg7F7iEw/UeX3Lzj14gI/AAAAAAAAMfY/CeHvQEgxWoA/s320/Capturex.PNG" width="320" /></a></div>
<br />
Download the executable here:<br />
<a href="https://code.google.com/p/arduino-java-xyzcnc/downloads/detail?name=SifishSerialArdunioTool.jar&can=2&q=">https://code.google.com/p/arduino-java-xyzcnc/downloads/detail?name=SifishSerialArdunioTool.jar&can=2&q=</a><br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
Now I will use multiple of these tools to search and connect to the three Arduinos.<br />
I've got that code working, each Arduino is set to broadcast a different character to be found by the serial comm port scanner. However that means I had to resurrect the old arduino code and modify it.<br />
<br />
I had no trouble with the encoder program <a href="https://code.google.com/p/arduino-java-xyzcnc/downloads/list">https://code.google.com/p/arduino-java-xyzcnc/downloads/list</a>, the rotary encoder sketch. I was able to add the establishContact() function from the Arduino serial response example.<br />
<br />
The XYZ motor controller program is broken. The old AFMotor.h libraries I had been using from Adafruit don't seem to be working, they don't compile in the new release. I updated new library from here:<br />
<a href="http://learn.adafruit.com/adafruit-motor-shield/downloads">http://learn.adafruit.com/adafruit-motor-shield/downloads</a><br />
that library seems OK, but my modified AFMotorA.h library for use in stacking shields is broken. maybe I need to remake it. <br />
<br />
The big problem turned out to be that now Arduino installs to the Program Files (x86) directory, which is read only and blocked by default. I had to make all the library files unblocked by right clicking and selecting properties. In the process I did remake the AFMotorA library. All I did was search and replace AFMotor for AFMotorA and AF_Stepper with AF_StepperA, and microsteppercurve to microsteppercurveA in the .cpp, .h and keywords files. Also rename the files AFMotorA.cpp and AFMotorA.h. Now the old sketch compiles pointing to the AFMotor libraries.<br />
<br />
I'm using three instances of my serial tool with only slight modification. One for each arduino.<br />
Had to do some mundane coding to pass the serial responses up to the main Arduino GUI by adding listeners to each of the serial port GUIs and passing them up to the main GUI.<br />
<br />
The connection process takes so long that I want to move it into a thread by itself rather than locking up the GUI for 15 seconds. that fixed a lot of weird problems I was having with the GUI not drawing, messages not scrolling etc.<br />
<br />
Cool, now I have a main GUI that when you press connect, runs out and finds 3 different Arduinos and scrolls a log of what it is doing. This simple task had eluded me for a while due to stupid mistakes.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-Bndu4ciuV6M/UeqxqZHrcZI/AAAAAAAAMhs/1K7YUvZSqJg/s1600/Captureg.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="249" src="http://3.bp.blogspot.com/-Bndu4ciuV6M/UeqxqZHrcZI/AAAAAAAAMhs/1K7YUvZSqJg/s320/Captureg.PNG" width="320" /></a></div>
<br />
<br />
Now the fun part, re-writing the code to actually move the XYZ machine.<br />
<br />
<b><u>Cleaning up the Arduino Encoder Program & Sketch</u></b><br />
<br />
Updated the code to pull the position from the Arduino, parse the string and display it. I'm finding the response time from the Arduino is really slow between when the encoders and LCD report the change, and when the string shows up on the serial bus. I'm going to change the encoder code to only print to serial when there is a change to reduce the traffic and hopefully prevent the backlog. It worked! Now I only send serial traffic when there is a change, and response is much faster.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-Jn79i6HH4yE/UeshnPH1-2I/AAAAAAAAMh8/6n08st8l014/s1600/Capturec.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="http://2.bp.blogspot.com/-Jn79i6HH4yE/UeshnPH1-2I/AAAAAAAAMh8/6n08st8l014/s320/Capturec.PNG" width="320" /></a></div>
<br />
Realized I need a function for the Encoder program to tell it to reset it's counters. That is for a Home position command. Added that and updated the position encoder program. Also found a bug that the position counters were unsigned integers!! The LCD calculation seemed right but the serial information signs were mixed up. Fixed it. It is working much better now! <br />
<br />
<span style="color: #0b5394;"> <span style="font-size: xx-small;">/* Rotary encoder readout for XYZ CNC machine */</span></span><br />
<span style="color: #0b5394; font-size: xx-small;"><br /></span>
<span style="color: #0b5394; font-size: xx-small;">// Encoders connected as follows</span><br />
<span style="color: #0b5394; font-size: xx-small;">// X encoder PIN A - Analog 0</span><br />
<span style="color: #0b5394; font-size: xx-small;">// X encoder PIN B - Analog 1</span><br />
<span style="color: #0b5394; font-size: xx-small;">// Y encoder PIN A - Analog 2</span><br />
<span style="color: #0b5394; font-size: xx-small;">// Y encoder PIN B - Analog 3</span><br />
<span style="color: #0b5394; font-size: xx-small;">// Z encoder PIN A - Analog 4</span><br />
<span style="color: #0b5394; font-size: xx-small;">// Z encoder PIN B - Analog 5</span><br />
<span style="color: #0b5394; font-size: xx-small;">// Pin C of all encoders is grounded, center pin of http://www.sparkfun.com/products/9117</span><br />
<span style="color: #0b5394; font-size: xx-small;">// thus variable PINC will read this entire register simultaneously</span><br />
<span style="color: #0b5394; font-size: xx-small;">// this avoids missing states of the encoder</span><br />
<span style="color: #0b5394; font-size: xx-small;">//Based on </span><br />
<span style="color: #0b5394; font-size: xx-small;">//http://www.circuitsathome.com/mcu/reading-rotary-encoder-on-arduino</span><br />
<span style="color: #0b5394; font-size: xx-small;">//Expanded to 3 encoders and written to be more clear and less over elegant</span><br />
<span style="color: #0b5394; font-size: xx-small;"><br /></span>
<span style="color: #0b5394; font-size: xx-small;">//Variables to set the counts/inch</span><br />
<span style="color: #0b5394; font-size: xx-small;">#define TH_PER_IN 20 //lead screw threads per inch</span><br />
<span style="color: #0b5394; font-size: xx-small;">#define CT_PER_REV 48 //encoder counts per revolution</span><br />
<span style="color: #0b5394; font-size: xx-small;">// Thus the accuracy of the measurement 1 inch /(TH_PER_IN*CT_PER_REV)</span><br />
<span style="color: #0b5394; font-size: xx-small;"><br /></span>
<span style="color: #0b5394; font-size: xx-small;">//Variable to reverse the sign if the machine and encoder don't agree with your sense of things</span><br />
<span style="color: #0b5394; font-size: xx-small;">// set to 1 or -1</span><br />
<span style="color: #0b5394; font-size: xx-small;">#define REFLECTX -1</span><br />
<span style="color: #0b5394; font-size: xx-small;">#define REFLECTY -1</span><br />
<span style="color: #0b5394; font-size: xx-small;">#define REFLECTZ 1</span><br />
<span style="color: #0b5394; font-size: xx-small;"><br /></span>
<span style="color: #0b5394; font-size: xx-small;">#include <LiquidCrystal.h></span><br />
<span style="color: #0b5394; font-size: xx-small;">LiquidCrystal lcd(7, 6, 5, 4, 3, 2);</span><br />
<br />
<span style="color: #0b5394; font-size: xx-small;">unsigned int olddata;</span><br />
<span style="color: #0b5394; font-size: xx-small;">unsigned int newdata;</span><br />
<span style="color: #0b5394; font-size: xx-small;">char newX;</span><br />
<span style="color: #0b5394; font-size: xx-small;">char newY;</span><br />
<span style="color: #0b5394; font-size: xx-small;">char newZ;</span><br />
<span style="color: #0b5394; font-size: xx-small;">char oldX;</span><br />
<span style="color: #0b5394; font-size: xx-small;">char oldY;</span><br />
<span style="color: #0b5394; font-size: xx-small;">char oldZ;</span><br />
<span style="color: #0b5394; font-size: xx-small;">long signed int counterX = 0;</span><br />
<span style="color: #0b5394; font-size: xx-small;">long signed int counterY = 0;</span><br />
<span style="color: #0b5394; font-size: xx-small;">long signed int counterZ = 0;</span><br />
<span style="color: #0b5394; font-size: xx-small;">char inByte = 0; // incoming serial byte</span><br />
<span style="color: #0b5394; font-size: xx-small;">// table of meaning of states, input is two bits old value, two bits new value</span><br />
<span style="color: #0b5394; font-size: xx-small;">// the encoder has either moved +1, -1 or stayed in the same place</span><br />
<span style="color: #0b5394; font-size: xx-small;">int8_t enc_states[] = {0,-1,1,0,1,0,0,-1,-1,0,0,1,0,1,-1,0}; </span><br />
<br />
<span style="color: #0b5394; font-size: xx-small;">void setup()</span><br />
<span style="color: #0b5394; font-size: xx-small;">{</span><br />
<span style="color: #0b5394; font-size: xx-small;"> /* Setup encoder pins as inputs */</span><br />
<span style="color: #0b5394; font-size: xx-small;"> // http://www.arduino.cc/en/Reference/PortManipulation</span><br />
<span style="color: #0b5394; font-size: xx-small;"> DDRC = B00000000; //Sets input direction all to analog inputs</span><br />
<span style="color: #0b5394; font-size: xx-small;"> PORTC = B11111111; //Sets pull ups on the analog pins to 1</span><br />
<span style="color: #0b5394; font-size: xx-small;"> Serial.begin (9600);</span><br />
<span style="color: #0b5394; font-size: xx-small;"> establishContact();</span><br />
<span style="color: #0b5394; font-size: xx-small;"> Serial.println("Encoders Found");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> counterX = 0;</span><br />
<span style="color: #0b5394; font-size: xx-small;"> counterY = 0;</span><br />
<span style="color: #0b5394; font-size: xx-small;"> counterZ = 0;</span><br />
<span style="color: #0b5394; font-size: xx-small;"> </span><br />
<span style="color: #0b5394; font-size: xx-small;"> pinMode(13 ,OUTPUT); //turn on backlight</span><br />
<span style="color: #0b5394; font-size: xx-small;"> digitalWrite(13, HIGH); //turn on backlight</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.begin(20,4);</span><br />
<span style="color: #0b5394; font-size: xx-small;"> delay(500); //Optrex display needs to rest after a begin</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.clear();</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.setCursor(0,0);</span><br />
<span style="color: #0b5394; font-size: xx-small;"> delay(100); //Optrex display needs to rest after setting cursor</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.print("XYZ CNC Position");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.setCursor(0,1);</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.print("X: ");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.setCursor(0,2);</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.print("Y: ");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.setCursor(0,3);</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.print("Z: ");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> </span><br />
<span style="color: #0b5394; font-size: xx-small;"> //send initial position</span><br />
<span style="color: #0b5394; font-size: xx-small;"> Serial.print(1000*counterX/(TH_PER_IN*CT_PER_REV*REFLECTX), DEC); Serial.print(":");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> Serial.print(1000*counterY/(TH_PER_IN*CT_PER_REV*REFLECTY), DEC); Serial.print(":");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> Serial.print(1000*counterZ/(TH_PER_IN*CT_PER_REV*REFLECTZ), DEC); </span><br />
<span style="color: #0b5394; font-size: xx-small;"> Serial.println(";");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> </span><br />
<span style="color: #0b5394; font-size: xx-small;">}</span><br />
<br />
<span style="color: #0b5394; font-size: xx-small;">void loop()</span><br />
<span style="color: #0b5394; font-size: xx-small;">{</span><br />
<span style="color: #0b5394; font-size: xx-small;"> //This loop needs to run fast to avoid missing encoder states</span><br />
<span style="color: #0b5394; font-size: xx-small;"> newdata = PINC;</span><br />
<span style="color: #0b5394; font-size: xx-small;"> </span><br />
<span style="color: #0b5394; font-size: xx-small;"> if( newdata != olddata ) {</span><br />
<span style="color: #0b5394; font-size: xx-small;"> </span><br />
<span style="color: #0b5394; font-size: xx-small;"> newX = newdata & 0x03; //mask out just the X bits</span><br />
<span style="color: #0b5394; font-size: xx-small;"> oldX = olddata & 0x03; //mask out just the X bits</span><br />
<span style="color: #0b5394; font-size: xx-small;"> oldX = oldX << 2; //move over to form address to table</span><br />
<span style="color: #0b5394; font-size: xx-small;"> counterX += enc_states[oldX + newX] ; //increment or decrement counter from table</span><br />
<span style="color: #0b5394; font-size: xx-small;"><br /></span>
<span style="color: #0b5394; font-size: xx-small;"> newY = newdata & 0x0C; //mask out just the Y bits</span><br />
<span style="color: #0b5394; font-size: xx-small;"> newY = newY >> 2; //shift to LSBs</span><br />
<span style="color: #0b5394; font-size: xx-small;"> oldY = olddata & 0x0C; //mask out just the Y bits</span><br />
<span style="color: #0b5394; font-size: xx-small;"> counterY += enc_states[oldY + newY] ; </span><br />
<span style="color: #0b5394; font-size: xx-small;"> </span><br />
<span style="color: #0b5394; font-size: xx-small;"> newZ = newdata & 0x30; //mask out just the Z bits</span><br />
<span style="color: #0b5394; font-size: xx-small;"> newZ = newZ >> 4; //shift to LSBs</span><br />
<span style="color: #0b5394; font-size: xx-small;"> oldZ = olddata & 0x30; //mask out just the Z bits</span><br />
<span style="color: #0b5394; font-size: xx-small;"> oldZ = oldZ >> 2; //shift to form address to table</span><br />
<span style="color: #0b5394; font-size: xx-small;"> counterZ += enc_states[oldZ + newZ] ;</span><br />
<span style="color: #0b5394; font-size: xx-small;"> </span><br />
<span style="color: #0b5394; font-size: xx-small;"> // only send updates over serial bus when data has changed to reduce traffic</span><br />
<span style="color: #0b5394; font-size: xx-small;"> Serial.print(1000*counterX/(TH_PER_IN*CT_PER_REV*REFLECTX), DEC); Serial.print(":");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> Serial.print(1000*counterY/(TH_PER_IN*CT_PER_REV*REFLECTY), DEC); Serial.print(":");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> Serial.print(1000*counterZ/(TH_PER_IN*CT_PER_REV*REFLECTZ), DEC); </span><br />
<span style="color: #0b5394; font-size: xx-small;"> Serial.println(";");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> </span><br />
<span style="color: #0b5394; font-size: xx-small;"> } else {</span><br />
<span style="color: #0b5394; font-size: xx-small;"> // only update the display when the data is NOT changing, this speeds up polling</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.setCursor(3,1);</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.print(1000*counterX/(TH_PER_IN*CT_PER_REV*REFLECTX), DEC);</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.print(" mils ");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.setCursor(3,2);</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.print(1000*counterY/(TH_PER_IN*CT_PER_REV*REFLECTY), DEC);</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.print(" mils ");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.setCursor(3,3);</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.print(1000*counterZ/(TH_PER_IN*CT_PER_REV*REFLECTZ), DEC);</span><br />
<span style="color: #0b5394; font-size: xx-small;"> lcd.print(" mils ");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> </span><br />
<span style="color: #0b5394; font-size: xx-small;"> // check if any serial messages have come in, since not busy</span><br />
<span style="color: #0b5394; font-size: xx-small;"> if (Serial.available() > 0) {</span><br />
<span style="color: #0b5394; font-size: xx-small;"> // get incoming byte:</span><br />
<span style="color: #0b5394; font-size: xx-small;"> inByte = Serial.read();</span><br />
<span style="color: #0b5394; font-size: xx-small;"> // reset position on indicated counter</span><br />
<span style="color: #0b5394; font-size: xx-small;"> if (inByte == 'X') counterX = 0;</span><br />
<span style="color: #0b5394; font-size: xx-small;"> if (inByte == 'Y') counterY = 0;</span><br />
<span style="color: #0b5394; font-size: xx-small;"> if (inByte == 'Z') counterZ = 0;</span><br />
<span style="color: #0b5394; font-size: xx-small;"> if (inByte == '@' ) {</span><br />
<span style="color: #0b5394; font-size: xx-small;"> counterX = 0; counterY = 0; counterZ = 0;</span><br />
<span style="color: #0b5394; font-size: xx-small;"> }</span><br />
<span style="color: #0b5394; font-size: xx-small;"> // any other serial traffic respond with current position</span><br />
<span style="color: #0b5394; font-size: xx-small;"> Serial.print(1000*counterX/(TH_PER_IN*CT_PER_REV*REFLECTX), DEC); Serial.print(":");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> Serial.print(1000*counterY/(TH_PER_IN*CT_PER_REV*REFLECTY), DEC); Serial.print(":");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> Serial.print(1000*counterZ/(TH_PER_IN*CT_PER_REV*REFLECTZ), DEC); </span><br />
<span style="color: #0b5394; font-size: xx-small;"> Serial.println(";");</span><br />
<span style="color: #0b5394; font-size: xx-small;"> }</span><br />
<span style="color: #0b5394; font-size: xx-small;"> </span><br />
<span style="color: #0b5394; font-size: xx-small;"> }</span><br />
<span style="color: #0b5394; font-size: xx-small;"> olddata = newdata;</span><br />
<span style="color: #0b5394; font-size: xx-small;">}</span><br />
<br />
<span style="color: #0b5394; font-size: xx-small;"> void establishContact() {</span><br />
<span style="color: #0b5394; font-size: xx-small;"> while (Serial.available() <= 0) {</span><br />
<span style="color: #0b5394; font-size: xx-small;"> Serial.print('Q'); // send a capital Q to identify myself</span><br />
<span style="color: #0b5394; font-size: xx-small;"> delay(300);</span><br />
<span style="color: #0b5394; font-size: xx-small;"> }</span><br />
<span style="color: #0b5394; font-size: xx-small;">}</span><br />
<br />
I realized I need to be able to calibrate and send a coordinate to the encoders and have them update their math to scale that to the known zero position. I'll do that once I make some progress on other fronts.<br />
<br />
<b><u>Writing the GUI to Manually Control The Motors</u></b><br />
<br />
Set up a GUI to send manual commands to the CNC machine. Functions for Jogging X,Y, and Z by a select-able step size. Turn on and off the tool and change it's speed. Display the encoder's value and the calculated location both. Finally an interpolated move command to calculate the vector to an inputted coordinate.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-cjHJQov2MX0/UeyBWHqW85I/AAAAAAAAMiM/OR3SyQgtGTE/s1600/Capturec.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="232" src="http://1.bp.blogspot.com/-cjHJQov2MX0/UeyBWHqW85I/AAAAAAAAMiM/OR3SyQgtGTE/s320/Capturec.PNG" width="320" /></a></div>
<br />
<br />
Next I need to go back and clean up the programming for the heavy duty motor driver.<br />
<a href="http://blog.workingsi.com/2011/05/notes-on-heavy-duty-motor-sheild-for.html">http://blog.workingsi.com/2011/05/notes-on-heavy-duty-motor-sheild-for.html</a><br />
I used a bunch of mosfets and random bipolars to convert an Adafruit motor sheild to drive a drill motor. I left this pretty rough. I need to clean up the control sketch for the Arduino and test it out. I set up a slider to control the speed. I'm not sure if I'll do active motor braking or not, depends on how things work.<br />
<br />
<b><u>Decided to update the motor controllers and eliminate one of the Arduinos!</u></b><br />
<br />
In the process of resurrecting the heavy duty motor shield circuit, and noticing that my blog post was kinda missing a lot of information, I discovered that Adafruit had updated their motor shield and no longer sold the old one I used. They now support stacking, which I had hacked up before.<br />
<a href="http://www.adafruit.com/products/1438">http://www.adafruit.com/products/1438</a><br />
It's totally cheating to use their shield, and maybe pricey as well, but it will save me a lot of time and what I build will be repeatable by others. Additionally it looks like I could stack and use a single Arduino to run all four motors X, Y, Z, and Tool. They now have a dedicated PWM chip on board. Before as well the load on the Arduino PWM was too much for four motors and I backed off to two Arduinos. I will still need to use the heavy duty Hbridge MOSFETs for the tool motor, but that is a minor mod. I pulled the trigger to upgrade the motor shields to the new version. It will save me an entire Arduino. Too bad I already wrote code, but it will be worth it.<br />
<br />
I'm rewriting the XYZ Arduino code now to support both the XYZ and the Tool speed and use the new Adafruit v2 motor shields stacked up. Additionally I'm going to change the architecture of the system. Previously I had the Arduino interpreting the HPGL code directly. That was very limiting, but I did it because I didn't know Java at the time. A better approach is to have the PC software do the hard work, and only send specific movement commands to the Arduino. The Arduino will still linear interpolation to move the X and Y motors together to make smooth diagonals. I don't think it's necessary to do linear interpolation with the Z axis.<br />
<br />
<u>New Arduino XYZTool code</u><br />
<br />
Java program will need to send the following commands to the Arduino.<br />
Semicolon indicates command termination and begin executing.<br />
Command set proposed:<br />
<br />
<ul>
<li>R; = Reset position counters to 0:0:0 (Set Home)</li>
<li>C; = Coordinates: Report back the current stepper counter position over the serial link for use in calibrating and catching errors</li>
<li>Pn; = Z axis relative move n steps</li>
<li>Zn; = Move to absolute Z coord</li>
<li>Mx:y; = Move relative by x:y steps</li>
<li>Ax:y; = Move to absolute coordinate x:y</li>
<li>Tn; = Set tool speed to n. May be positive or minus. 0 is off.</li>
<li>S; = Stop all motors</li>
<li>I; = power on/initialize motors</li>
</ul>
<div>
<br /></div>
After each command the Arduino will send back characters:<br />
<br />
<ul>
<li>B; - Arduino received the command and is busy executing it</li>
<li>R; - Ready for a new command</li>
<li>Cx:y:z - Arduino counters say this is the current coordinates</li>
</ul>
<br />
I added each of these commands to the buttons in the Java program. Now I need to jump back to the Arduino to interpret them.<br />
<br />
The Adafruit v2 motor shields came in the mail. I assembled them exactly like the tutorial. I stacked two shields, and shorted the address bit on the bottom one. One for XY and one for Z and tool. <a href="http://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino/stacking-shields">http://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino/stacking-shields</a><br />
I hooked up a tiny DC motor and three hobby steppers to the shields for a mock up to use while I write the code, without worrying about running the motors into a wall, etc.<br />
A basic motor party script with both shields worked right off the bat. <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-F2yJWa0cNg0/UfVUIwLS5cI/AAAAAAAAMkE/4ilk4rYqFIQ/s1600/IMG_20130728_132031_222.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="http://2.bp.blogspot.com/-F2yJWa0cNg0/UfVUIwLS5cI/AAAAAAAAMkE/4ilk4rYqFIQ/s400/IMG_20130728_132031_222.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
Now I'm rewriting the motor control program for the Arduino to interpret the simple commands from the Java GUI, rather than try to decode HPGL all by itself. That was limiting the functions I could perform. It didn't take as long as I thought it would, because I was able to reuse the heavy lifting from the old program and just change the command interpretation loops. I still need to add the timeout and error catching stuff but it's working pretty well already!<br />
<br />
Arduino sketch for XYZ CNC control:<br />
<span style="color: #8e7cc3; font-size: xx-small;">/*</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">Program to intepret CNC commands and activate motors</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">Uses Adafruit v2 motor shields http://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino/overview</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">Commands that will be received:</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">R; = Reset position counters to 0:0:0 (Set Home)</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">C; = Coordinates: Report back the current stepper counter position over the serial link for use in calibrating and catching errors</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">Pn; = Z axis relative move n steps</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">Zn; = Move to absolute Z coord</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">Mx:y; = Move relative by x:y steps</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">Ax:y; = Move to absolute coordinate x:y</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">Tn; = Set tool speed to n. May be positive or minus. 0 is off.</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">S; = Stop all motors</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">I; = Power all motors/ initialize</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">After each command the Arduino will send back characters:</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">B; - Arduino received the command and is busy executing it</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">R; - Ready for a new command</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">Cx:y:z - Arduino counters say this is the current coordinates</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;"> */</span><br />
<br />
<span style="color: #8e7cc3; font-size: xx-small;">#define INCH 4000 //steps per inch of the machine = threads per inch * steps per rotation </span><br />
<span style="color: #8e7cc3; font-size: xx-small;">#define RPM 30 //speed of the stepper motors</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">#include <Wire.h></span><br />
<span style="color: #8e7cc3; font-size: xx-small;">#include <Adafruit_MotorShield.h> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;">//#include "utility/Adafruit_PWMServoDriver.h"</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">// Create the motor shield object with the default I2C address for Z axis stepper and Tool</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">Adafruit_MotorShield AFMS_ZT = Adafruit_MotorShield(); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;">// Or, create it with a different I2C address for stacking for X and Y axis steppers</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">Adafruit_MotorShield AFMS_XY = Adafruit_MotorShield(0x61); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">// Connect a stepper motor with 200 steps per revolution (1.8 degree)</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">// to motor port #2 (M3 and M4)</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">Adafruit_StepperMotor *stepperZ = AFMS_ZT.getStepper(200, 2);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">// And connect a DC motor to port M1</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">Adafruit_DCMotor *myTool = AFMS_ZT.getMotor(1);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">// Connect two stepper motor with 200 steps per revolution (1.8 degree)</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">// to motor ports on bottom shield</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">Adafruit_StepperMotor *stepperX = AFMS_XY.getStepper(200, 1);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">Adafruit_StepperMotor *stepperY = AFMS_XY.getStepper(200, 2);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">String inputString = ""; // a string to hold incoming data</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">boolean stringComplete = false; // whether the string is complete</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">long previousMillis = 0; //used for timeout counter</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">long timeout = 10000; //timeout length</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">// Set up the basic machine position variables</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">signed long int Xpos = 0;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">signed long int Ypos = 0;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">signed long int Zpos = 0;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">// Set up the destination machine position variables</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">signed long int newXpos = 0;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">signed long int newYpos = 0;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">signed long int newZpos = 0;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">void setup()</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">{</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> // start serial port at 9600 bps:</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> Serial.begin(9600);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> inputString.reserve(200);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> establishContact(); // send a serial byte to establish contact until receiver responds </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> //Start the PWM</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> AFMS_XY.begin(); // create with the default frequency 1.6KHz</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> AFMS_ZT.begin(); // create with the default frequency 1.6KHz</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> //initialize motors</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> initMotors();</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> // Home position</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> resetPositionCounter();</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> Serial.println("Stepper Controller Online;");</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> reportCoords();</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;">}</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">void loop()</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">{</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> // if we get a valid byte, read analog ins:</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if (Serial.available() > 0) {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> // get the new byte:</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> char inChar = (char)Serial.read(); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;"> // if the incoming character is a newline, set a flag</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> // so the main loop can do something about it:</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if (inChar == ';') {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> stringComplete = true;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> } else {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> // add it to the inputString:</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> inputString += inChar;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> }</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> // emergency stop command, process immediatly no matter what I'm doing</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if (inChar == '*') emergencyStop();</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if (stringComplete) {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> //Indicate busy </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> Serial.print("B;"); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> previousMillis = millis(); //set the timeout counter to start</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;"> //Echo the command</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> //Serial.print(inputString);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> //decode and do what the command said</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> switch( inputString[0] ) {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> case '*' : emergencyStop(); break;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> case 'I' : initMotors(); break;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> case 'T' : setToolSpeed(); break;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> case 'C' : reportCoords(); break;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> case 'P' : relativeZMove(); break;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> case 'Z' : absoluteZMove(); break;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> case 'M' : relativeXYMove(); break;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> case 'A' : absoluteXYMove(); break;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> case 'R' : resetPositionCounter(); break;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> default : break;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> }</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> //clear the command</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> inputString = "";</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> stringComplete = false;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> // Indicate ready</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> Serial.print("R;"); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> } </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;"> } </span><br />
<span style="color: #8e7cc3; font-size: xx-small;">}</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">// else if ((previousMillis+timeout) > millis()) {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">// //Waited too long for the end of the command</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">// intputString = "";</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">// stringComplete = false;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">// Serial.println("E;");</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">// } </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">void establishContact() { //for initial identification</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> while (Serial.available() <= 0) {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> Serial.print("~"); // send a charachter to identify myself</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> delay(300);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> }</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">}</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">void emergencyStop() { //release all motors, limit hit or user intervention</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> myTool->run(RELEASE);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> stepperX->release();</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> stepperY->release();</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> stepperZ->release();</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> //Serial.println("All motors released;");</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">}</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">void setToolSpeed() { </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> signed long int newSpeed = extractCoord(inputString, 0);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if (newSpeed>0) myTool->run(FORWARD);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> else myTool->run(BACKWARD);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if (newSpeed == 0) myTool->run(RELEASE);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> else myTool->setSpeed(abs(newSpeed));</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">}</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">signed long int extractCoord(String numberString, int pos) { //pulls the signed coord from the serial input string</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> // pos indicates first or second coord desired</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> int splitPos = 0; //location of the : character</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> signed long int coord = 0; //temp storage for coords </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> signed int sign = 1; //temp storage for coord sign </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> char c; </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> //First find the position of the :</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> for (int i=1; i<numberString.length(); i++) {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if( numberString[i] == ':' ) splitPos = i ; </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> }</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if (splitPos ==0) { // there is only one coord </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> for (int i=1; i<numberString.length(); i++) {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> c = numberString[i];</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if( c == '-' ) sign = -1; // capture the sign </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if( c >= '0' && c <= '9') coord = (10 * coord) + (c - '0') ; // convert digits to a number </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> }</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> } else {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> switch (pos) {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> case 0 :</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> for (int i=1; i<splitPos; i++) {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> c = numberString[i];</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if( c == '-' ) sign = -1; // capture the sign </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if( c >= '0' && c <= '9') coord = (10 * coord) + (c - '0') ; // convert digits to a number </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> }</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> break;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> case 1: </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> for (int i=splitPos; i<numberString.length(); i++) {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> c = numberString[i];</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if( c == '-' ) sign = -1; // capture the sign </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if( c >= '0' && c <= '9') coord = (10 * coord) + (c - '0') ; // convert digits to a number </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> } </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> break;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> default: //something is wrong, return 0;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> break;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> }</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> } </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> return(coord * sign);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">}</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;">void resetPositionCounter() {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> Xpos = 0;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> Ypos = 0;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> Zpos = 0; </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> newXpos = 0;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> newYpos = 0;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> newZpos = 0;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">} </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">void reportCoords() {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> Serial.print(Xpos);Serial.print(":");Serial.print(Ypos); Serial.print(":");Serial.print(Zpos);Serial.println(";"); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;">}</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">void initMotors() {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> //initialize motors</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> myTool->setSpeed(RPM); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> myTool->run(RELEASE);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> stepperX->setSpeed(RPM); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> stepperY->setSpeed(RPM); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> stepperZ->setSpeed(RPM); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> //step motors one step and back to power the coils and hold</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> stepperX->step(1, FORWARD, SINGLE); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> stepperY->step(1, FORWARD, SINGLE);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> stepperZ->step(1, FORWARD, SINGLE); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> stepperX->step(1, BACKWARD, SINGLE); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> stepperY->step(1, BACKWARD, SINGLE);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> stepperZ->step(1, BACKWARD, SINGLE); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;">}</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">void relativeZMove(){</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> zMove(Zpos + extractCoord(inputString, 0));</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">}</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">void absoluteZMove(){</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> zMove(extractCoord(inputString, 0));</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">}</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">void relativeXYMove(){</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> linearInterpolationMove(Xpos+extractCoord(inputString, 0), Ypos+extractCoord(inputString, 1));</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">}</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">void absoluteXYMove(){</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> linearInterpolationMove(extractCoord(inputString, 0), extractCoord(inputString, 1));</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">}</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">void linearInterpolationMove ( signed long int newX, signed long int newY) {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> float distance = 0;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> int stepnum = 0;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> signed long int nextX;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> signed long int nextY ;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> signed long int oldX = Xpos;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> signed long int oldY = Ypos;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;"> //find the hypotenuse, the total distance to be traveled</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> distance = sqrt((newX - oldX)*(newX - oldX) + (newY - oldY)*(newY - oldY) ) + 0.5;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;"> //round to integer number of steps that distance. Step by two to minimize 0 size steps.</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> for (stepnum=0; stepnum <= distance; stepnum++) {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> //calculate the nearest integer points along the way </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> nextX = oldX + stepnum/distance*(newX-oldX);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> nextY = oldY + stepnum/distance*(newY-oldY);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;"> //move machine to that new coordinate, if 0 delta, don't move</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if ((distance < 4*INCH) && (distance > -4*INCH)) { //trap crazy values</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if ((nextX-Xpos) >= 1) stepperX->step((nextX - Xpos), FORWARD, SINGLE); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if ((nextX-Xpos) <= -1) stepperX->step((Xpos - nextX), BACKWARD, SINGLE);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if ((nextY-Ypos) >= 1) stepperY->step((nextY - Ypos), FORWARD, SINGLE); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if ((nextY-Ypos) <= -1) stepperY->step((Ypos - nextY), BACKWARD, SINGLE);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> //update the machine current position</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> Xpos = nextX;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> Ypos = nextY;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> } else {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> Serial.println("ERROR! Distance too big");</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> break;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> }</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> }</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> // nudge to the exact final desired coord to correct for rounding down errors</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if ((abs(newX-Xpos)<6) && (abs(newY-Ypos)<6)) { //trap crazy values</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if ((newX-Xpos) > 0) stepperX->step((newX - Xpos), FORWARD, SINGLE); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if ((newX-Xpos) < 0) stepperX->step((Xpos - newX), BACKWARD, SINGLE);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if ((newY-Ypos) > 0) stepperY->step((newY - Ypos), FORWARD, SINGLE); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if ((newY-Ypos) < 0) stepperY->step((Ypos - newY), BACKWARD, SINGLE);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> }</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> //update the machine current position</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> Xpos = newX;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> Ypos = newY;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">}</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;">void zMove (signed long int newZ) {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> //calculates steps to move, and moves, to new Z position requested</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> signed long int distance = 0;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> signed long int oldZ = Zpos;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;"> distance = newZ - oldZ;</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if ((distance < 8000) && (distance > -8000)) {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if (distance >= 1) stepperZ->step(distance, FORWARD, SINGLE); </span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> if (distance <= -1) stepperZ->step(-1*distance, BACKWARD, SINGLE);</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> } else {</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> //movement requested is large and likely an error</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> Serial.println("ERROR - Z axis range");</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"> }</span><br />
<span style="color: #8e7cc3; font-size: xx-small;"><br /></span>
<span style="color: #8e7cc3; font-size: xx-small;"> Zpos = newZ; //update machine current position</span><br />
<span style="color: #8e7cc3; font-size: xx-small;">}</span><br />
<br />
Fired up the Java GUI and started clicking buttons. It works! All the buttons are doing the right things. Immediately noticed I needed to make some GUI changes though.<br />
<br />
-Stop button works fine, but once I've done a release I need to have a function for re powering the motors to recover. Using the I; command for that;<br />
-Tool speed scale is way too low, need to bump it up -<br />
-Tool control, I didn't put on a direction button for forward/reverse - Done<br />
-I need to look for and obey the busy flags from the arduino - Done, and made a indicator light<br />
<br />
Things are working with the Java GUI, the busy light comes on, all the motors move the way I want. I'm in business. Here is what it looks like now. It has gotten a bit busy.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-1lLS5abx_bE/UfXD-o-NQaI/AAAAAAAAMko/rL_DTlgBevs/s1600/Captured.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="216" src="http://3.bp.blogspot.com/-1lLS5abx_bE/UfXD-o-NQaI/AAAAAAAAMko/rL_DTlgBevs/s400/Captured.PNG" width="400" /></a></div>
<br />
<br />
Next step is to figure out what to do on the calibration page.<br />
The way this should work is this:<br />
<br />
<ul>
<li>Start with a calibrated, precisely measured square printed on paper.</li>
<li>Manually move the XY to a the lower left position</li>
<li>Hit a button to say it is there</li>
<li>Manually move the XY to the upper right position</li>
<li>Enter the size of the square and hit a button to say it is there</li>
<li>Lower the tool down to touch the work</li>
<li>Hit a button to say it is at 0</li>
<li>Lift it and put it down on an object of known thickness</li>
<li>Enter the height and hit a button to say it is there</li>
<li>Now the encoders and counters can calculate the size of their steps in inches/mm.</li>
<li>The units should be changed from counts to inches in the display</li>
</ul>
Here is the calibration GUI. Added code to calculate the calibration and reset counters in the Arduinos as needed.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-ImXzoApst84/UfcrB6ZDO4I/AAAAAAAAMoc/xHKJK8sIEnM/s1600/Capturedd.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="230" src="http://2.bp.blogspot.com/-ImXzoApst84/UfcrB6ZDO4I/AAAAAAAAMoc/xHKJK8sIEnM/s400/Capturedd.PNG" width="400" /></a></div>
<br />
Next step is to go back and modify the GUI I previously made for Manual stepping to report values in the calibrated units that calibration measured or in raw steps as it does now. Easy added the multiply to the calculated position display.<br />
<br />
Alright... now off to figure out how to read and write graphics files. Basic communication and control all seem to be working well with the mockup machine.<br />
<br />
<br />
I posted the code for all the parts at<br />
<a href="https://code.google.com/p/arduino-java-xyzcnc/downloads/list">https://code.google.com/p/arduino-java-xyzcnc/downloads/list</a><br />
This is a working version for manual movement of the machines, haven't implemented the file reading and transferring part yet.<br />
<br />
'm rewriting my Java PC program. The task remaining is to add the file reading and translation code to my communication and control software. I need to be able to pick up some common format CNC files and execute them.<br />
<br />
I want to leverage as much as I can of existing software, and just write a simple line by line translator to take an existing file format and convert it to the commands i need to send to the Arduino.<br />
<br />
I used HPGL last time, but it is a dead language and is no longer supported by many tools and graphics editors. It will be really hard to convert pictures into HPGL. I need something new.<br />
<br />
<b><u>Researching 3D and CNC file formats... Again</u></b><br />
<br />
Lots of random scribbling as I google....<br />
<br />
<a href="http://answers.yahoo.com/question/index?qid=20110530081859AASSPLv">http://answers.yahoo.com/question/index?qid=20110530081859AASSPLv</a><br />
<span style="background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;">.stl – STL is a file format native to the stereolithography CAD software created by 3D Systems.</span><br />
<span style="background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;">.iges – The </span><span class="yshortcuts cs4-visible" id="lw_1375236168729_2" style="background-color: white; border-bottom-color: rgb(54, 99, 136); border-bottom-style: dotted; border-bottom-width: 2px; color: #366388; cursor: pointer; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;">Initial Graphics Exchange Specification</span><span style="background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;"> (IGES) (pronounced eye-jess) defines a neutral data format that allows the digital exchange of information among Computer-aided design (CAD) systems.</span><br />
<span style="background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;">.obj – OBJ (or .OBJ) is a geometry definition file format first developed by </span><span class="yshortcuts cs4-visible" id="lw_1375236168729_3" style="background-color: white; border-bottom-color: rgb(54, 99, 136); border-bottom-style: dotted; border-bottom-width: 2px; color: #366388; cursor: pointer; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;">Wavefront Technologies</span><span style="background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;"> for its Advanced Visualizer animation package. The file format is open and has been adopted by other 3D graphics application vendors. For the most part it is a universally accepted format.</span><br />
<span style="background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;">.3ds – 3DS is one of the file formats used by the Autodesk 3ds Max 3D modeling, animation and rendering software.</span><br />
<span style="background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;">Gerber - PC board drawing format</span><br />
<span style="background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;"><br /></span><span style="background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;">Wood carvers like STL files it seems</span><br />
<span style="background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;">DXF shows up too - that is autocad</span><br />
<span style="background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;"><br /></span><span style="background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;">This site has a lot of STL files</span><br />
<a href="http://www.cnc4free.org/">http://www.cnc4free.org/</a><br />
<div>
<br />
Tried to read one of the STL files. It is not in ASCII and GIMP can't open it. So that may not be the best option for me, to write an STL file interpreter. Most people are trying to create these files, not read them.<br />
<br />
<span style="background-color: white; font-family: Arial;">b2G that will convert monochrome .bmp file to stl file</span><br />
<br />
<b>.bmp</b> I have in the past written many programs that read and write .bmp files. The format is pretty simple XY pixels and intensity. I could use bmp as and easy option, but something more vectory seems better.<br />
<br />
This guy is way ahead of me. I'd have to switch to Linux to borrow his work.<br />
<a href="http://www.securetech-ns.ca/camm-linux.html">http://www.securetech-ns.ca/camm-linux.html</a><br />
<br />
G-code is used to run cnc machines at the lowest level.<br />
<br />
Some tools for creating gcode <a href="http://replicat.org/generators">http://replicat.org/generators</a><br />
<br />
This software converts Eagle PCB into gcode<br />
<a href="http://pcbgcode.org/index.php">http://pcbgcode.org/index.php</a><br />
<br />
cad.py looks like a convertor to gcode<br />
<br />
I looked at gcode on wikipedia and it's fairly hairy. Lots of commands to deal with.<br />
<br />
<b><u>Windows .bmp picture drawing</u></b><br />
<br />
Starting to think I will write a simple bmp drawer to start with.<br />
I want to get the tool running with something.<br />
<br />
bmp files say their size and have rows and columns of pixels. Easy to read. I can use gimp to create files of any size, scale them, etc to make them suitable. I'll start with black and white bmp files.<br />
<br />
I need to do some googling to make sure there isn't some tool out there I can borrow.<br />
<br />
If I choose to write it myself, the programming is going to go like this:<br />
<ol>
<li>Read in the bmp file into an array</li>
<li>Find the outer extent on top, left and right</li>
<li>move to the rough center</li>
<li>put the pen down on a black dot.</li>
<li>look for a neighbor that is black and move there</li>
<li>continue until no neighbors are black</li>
<li>lift</li>
<li>find another pixel that is black</li>
<li>move there</li>
<li>repeat until the drawing is done</li>
</ol>
<div>
I have some old skill code that read bmp files, I will pull that out and use it to start.<br />
<br />
<b><u>Exploring other options</u></b><br />
<br />
Found out vectorizing is called "autotracing". That gave me another thing to google<br />
<br />
There is an "autotracing" program on line. </div>
<div>
<a href="http://vectormagic.com/home">http://vectormagic.com/home</a><br />
But the problem is I would then need to be able to read EPS, SVG or PDF files. Maybe the demo will be enough, but it looks like it costs money.<br />
<br />
Found another that looks free and online. Takes a graphics file and creates vector files.<br />
<a href="http://www.autotracer.org/">http://www.autotracer.org/</a></div>
<div>
<br />
<ul>
<li>Tried it, and EPS output looks like a usable, ASCII vector file. </li>
<li>DXF file is ASCII readable as well. I'm sure this could get hairy, Autocad is pretty complex. But this file looks manageable.</li>
<li>SVG looks good too. Seems to be a human readable graphics file that I could interpret</li>
</ul>
</div>
<div>
<a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics">http://en.wikipedia.org/wiki/Scalable_Vector_Graphics</a><br />
SVG could get out of hand, with lots of shapes and fonts to support. However the basic file looks good<br />
<div class="line" style="font-family: monospace; font-size: 13px;">
<span class="webkit-html-tag"><path<span class="webkit-html-attribute"> <span class="webkit-html-attribute-name">style</span>="<span class="webkit-html-attribute-value">fill:#545a64; stroke:none;</span>"</span><span class="webkit-html-attribute"> <span class="webkit-html-attribute-name">d</span>="<span class="webkit-html-attribute-value">M30 3L30 10C31.0595 7.46568 31.0595 5.53432 30 3z</span>"</span>/></span></div>
<span class="text" style="font-family: monospace; font-size: 13px;"></span><br />
<div class="line" style="font-family: monospace; font-size: 13px;">
<br /></div>
<div class="line" style="font-family: monospace; font-size: 13px;">
This means Move to 30:3, Line to 30:10, Bezier Curve to a list of coords, z=end.</div>
<br />
Here is the spec on the SVG file format<br />
<a href="http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathDataMovetoCommands">http://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathDataMovetoCommands</a></div>
<br />
Played with <a href="http://www.autotracer.org/">http://www.autotracer.org/</a> and I'm pretty happy with the files it produces. It is really for 2D drawing but it makes simple vector files that are easy to turn into tool control files. Gimp can read and display them. Looks like a good quickie option to get off the ground.<br />
<br />
This is a little graphic with some letters and a square:<br />
<br />
<span style="color: #674ea7; font-size: x-small;"><?xml version="1.0" standalone="yes"?></span><br />
<span style="color: #674ea7; font-size: x-small;"><svg width="161" height="150"></span><br />
<span style="color: #674ea7; font-size: x-small;"><path style="fill:#ffffff; stroke:none;" d="M0 0L0 150L161 150L161 0L0 0z"/></span><br />
<span style="color: #674ea7; font-size: x-small;"><path style="fill:#010101; stroke:none;" d="M1 1L1 109L117 109L117 1L1 1z"/></span><br />
<span style="color: #674ea7; font-size: x-small;"><path style="fill:#ffffff; stroke:none;" d="M3 3L3 107L115 107L115 85C87.676 91.5053 87.5147 47.4563 115 54L115 3L3 3z"/></span><br />
<span style="color: #674ea7; font-size: x-small;"><path style="fill:#010101; stroke:none;" d="M41 43L41 85L49 85L49 69C54.56 69 61.8856 70.2342 66.9568 67.5432C74.8268 63.3671 75.3453 49.6136 67.956 44.7423C61.5192 40.4989 48.4628 43 41 43M80 43L80 50L88 50L88 43L80 43z"/></span><br />
<span style="color: #674ea7; font-size: x-small;"><path style="fill:#ffffff; stroke:none;" d="M49 50L49 62C66.8383 61.9882 66.8383 50.0118 49 50z"/></span><br />
<span style="color: #674ea7; font-size: x-small;"><path style="fill:#010101; stroke:none;" d="M80 54L80 85L88 85L88 54L80 54z"/></span><br />
<span style="color: #674ea7; font-size: x-small;"><path style="fill:#ffffff; stroke:none;" d="M107.043 59.9707C98.9687 61.792 101.299 81.8813 109.794 79.1489C117.684 76.611 116.364 57.8683 107.043 59.9707z"/></span><br />
<span style="color: #674ea7; font-size: x-small;"></svg></span><br />
<br />
I will need to implement the Curve function in the Arduino, and convert the control letters to match just to make life easier.<br />
<br />
Also found this code for running in a browser:<br />
<a href="https://code.google.com/p/svg-edit/">https://code.google.com/p/svg-edit/</a><br />
<br />
It has a demo which is a fully functional svg editor that produces similar graphics files that can be edited. Looks like a winner.<br />
<a href="http://svg-edit.googlecode.com/svn/branches/2.6/editor/svg-editor.html">http://svg-edit.googlecode.com/svn/branches/2.6/editor/svg-editor.html</a><br />
<br /></div>
<br />
At this point it seems appropriate to start other posts with this topic, this post is getting too long and covers too much.<br />
<br /><div class="blogger-post-footer">www.workingsi.com</div>Unknownnoreply@blogger.com98