<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1776091989945548678</id><updated>2024-10-10T12:50:24.050-04:00</updated><title type='text'>Nuts and Bots</title><subtitle type='html'>A place to post workings from my electronics laboratory.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nutsandbots.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://nutsandbots.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mike Bentley</name><uri>http://www.blogger.com/profile/00106946921133534104</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlXK-0Fk47OerWjgvCBu56TPQTqhAffCcX6I3iXBPefWYrUYkZMWVklzVxcIbasFNyuv36sxtiS4CQ10EaIbqmBfEH6rb1b0gZU_nc_n7PjwHncvRtih8zTIr5J5sjlzw/s220/grimreaper.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1776091989945548678.post-4729056279954583551</id><published>2014-08-20T00:06:00.000-04:00</published><updated>2014-08-20T00:29:03.723-04:00</updated><title type='text'>Baby Reminder prototype</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLiacLquDYezf_dIrAgzdZdnsy3Ah1R60QjSfAhyBmdbvMwZU-R8_8ce2B4iLUfSCGU5Ol4cLL16bKyFoylAhmgFEL2iG-eywK4QpLOJ8Rivaoy21oxuv_gTa7rCPC-WeUaw54bmOXOD8/s1600/20140819_232452.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLiacLquDYezf_dIrAgzdZdnsy3Ah1R60QjSfAhyBmdbvMwZU-R8_8ce2B4iLUfSCGU5Ol4cLL16bKyFoylAhmgFEL2iG-eywK4QpLOJ8Rivaoy21oxuv_gTa7rCPC-WeUaw54bmOXOD8/s1600/20140819_232452.jpg&quot; height=&quot;180&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinWy8JTds8mEgc_Rl0LbVEDOBgKejIEXdFS5kmv_Bh45xg8Js0YKSBplKy33a267Fe76hY-o15G2TvvCJQ_CUfsRV_hU2d1WAi62-MTcaJP9J7-IsmeFWmNuB8NMhFOi4jf49Jhyphenhyphen5FW9o/s1600/20140819_232807.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinWy8JTds8mEgc_Rl0LbVEDOBgKejIEXdFS5kmv_Bh45xg8Js0YKSBplKy33a267Fe76hY-o15G2TvvCJQ_CUfsRV_hU2d1WAi62-MTcaJP9J7-IsmeFWmNuB8NMhFOi4jf49Jhyphenhyphen5FW9o/s1600/20140819_232807.jpg&quot; height=&quot;180&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Some quick pics of a prototype I have been working on. It reminds you to check if you have a baby onboard when the car engine is turned off by playing a lullaby tune. It works on power ports that turn off or stay on when the key is removed by sensing voltage levels and auto calibrating to your vehicle. The green led turns on when the unit is armed and working. When the engine is turned off, after a delay of 2.5 seconds the green led turns off and the tune is played. I&#39;m still tweaking the program parameters.</content><link rel='replies' type='application/atom+xml' href='http://nutsandbots.blogspot.com/feeds/4729056279954583551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nutsandbots.blogspot.com/2014/08/baby-reminder-prototype.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/4729056279954583551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/4729056279954583551'/><link rel='alternate' type='text/html' href='http://nutsandbots.blogspot.com/2014/08/baby-reminder-prototype.html' title='Baby Reminder prototype'/><author><name>Mike Bentley</name><uri>http://www.blogger.com/profile/00106946921133534104</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlXK-0Fk47OerWjgvCBu56TPQTqhAffCcX6I3iXBPefWYrUYkZMWVklzVxcIbasFNyuv36sxtiS4CQ10EaIbqmBfEH6rb1b0gZU_nc_n7PjwHncvRtih8zTIr5J5sjlzw/s220/grimreaper.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLiacLquDYezf_dIrAgzdZdnsy3Ah1R60QjSfAhyBmdbvMwZU-R8_8ce2B4iLUfSCGU5Ol4cLL16bKyFoylAhmgFEL2iG-eywK4QpLOJ8Rivaoy21oxuv_gTa7rCPC-WeUaw54bmOXOD8/s72-c/20140819_232452.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1776091989945548678.post-552422867250350856</id><published>2014-07-24T23:38:00.000-04:00</published><updated>2014-07-24T23:39:44.131-04:00</updated><title type='text'>Picaxe 20M2 cheat sheet</title><content type='html'>I just finished making a cheat sheet for my favorite Picaxe chip, the 20M2. I figured I would share it here for those interested. It is posted on the Picaxe forum website so you need to be a member to get it I think.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.picaxeforum.co.uk/attachment.php?attachmentid=16918&amp;amp;d=1406256437&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;Picaxe 20M2 Cheat Sheet&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutsandbots.blogspot.com/feeds/552422867250350856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nutsandbots.blogspot.com/2014/07/picaxe-20m2-cheat-sheet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/552422867250350856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/552422867250350856'/><link rel='alternate' type='text/html' href='http://nutsandbots.blogspot.com/2014/07/picaxe-20m2-cheat-sheet.html' title='Picaxe 20M2 cheat sheet'/><author><name>Mike Bentley</name><uri>http://www.blogger.com/profile/00106946921133534104</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlXK-0Fk47OerWjgvCBu56TPQTqhAffCcX6I3iXBPefWYrUYkZMWVklzVxcIbasFNyuv36sxtiS4CQ10EaIbqmBfEH6rb1b0gZU_nc_n7PjwHncvRtih8zTIr5J5sjlzw/s220/grimreaper.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1776091989945548678.post-4943897904457714908</id><published>2013-10-16T22:55:00.002-04:00</published><updated>2013-10-16T23:05:18.102-04:00</updated><title type='text'>New Workbench!</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisNZWh0T2vPEL6ygFwTSH9yU4wEn1EXopsSdcbtkJTQ3VsjAa_Gb4ntPxc2LgcvAG3S67cVp2fez-Ng4vhzKMOVIJ42D5z8jY9DkCqlihBLJLfZ0sFkW7bfpMcshLxQRKp30VBswiuuJY/s1600/IMG_20131015_221021_844.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisNZWh0T2vPEL6ygFwTSH9yU4wEn1EXopsSdcbtkJTQ3VsjAa_Gb4ntPxc2LgcvAG3S67cVp2fez-Ng4vhzKMOVIJ42D5z8jY9DkCqlihBLJLfZ0sFkW7bfpMcshLxQRKp30VBswiuuJY/s320/IMG_20131015_221021_844.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8uvs7RiFJhi5kEjFvogH8yQ-azIAUySbUK8qR1_OUqG7WVPpadV02H7hvk2pPsjFvhpmHPwnitJDTj_YCLM-oTSqxwVBzm1VZ-ECTZmnugJWfFHm5p03TF4JSN0jMCkkGX7EvPCkVGkI/s1600/IMG_20131015_221142_234.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8uvs7RiFJhi5kEjFvogH8yQ-azIAUySbUK8qR1_OUqG7WVPpadV02H7hvk2pPsjFvhpmHPwnitJDTj_YCLM-oTSqxwVBzm1VZ-ECTZmnugJWfFHm5p03TF4JSN0jMCkkGX7EvPCkVGkI/s320/IMG_20131015_221142_234.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqvHva-a-WE0wVYcSSuPqaTIrIIRJbIaQyf14XOzgaa8YuREGiqG5xLBwgmciSqeOBw97A57Htf5SzpFVyR8QZgxCXrI0pE1zpOqoC1h5HxZswXJerIkFUsqGdM_UU9LZ36G71Lro1Y2w/s1600/IMG_20131015_221309_576.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqvHva-a-WE0wVYcSSuPqaTIrIIRJbIaQyf14XOzgaa8YuREGiqG5xLBwgmciSqeOBw97A57Htf5SzpFVyR8QZgxCXrI0pE1zpOqoC1h5HxZswXJerIkFUsqGdM_UU9LZ36G71Lro1Y2w/s320/IMG_20131015_221309_576.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWGIKC5NlHGyiN3VIPLoL3beEr6xnQiiAP1QszfPlvmZ9PjIRx7KNZxBQ3972YPViZEiJ2WU2T5aK5YHmdSJtXNOFX_Jk-GhyphenhyphenvGWsOpAUErvcYkqifPfPihbLNhK43YMJtCJjiTX4bTTM/s1600/IMG_20131015_221547_262.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWGIKC5NlHGyiN3VIPLoL3beEr6xnQiiAP1QszfPlvmZ9PjIRx7KNZxBQ3972YPViZEiJ2WU2T5aK5YHmdSJtXNOFX_Jk-GhyphenhyphenvGWsOpAUErvcYkqifPfPihbLNhK43YMJtCJjiTX4bTTM/s320/IMG_20131015_221547_262.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;I just finished building my new electronics lab workbench downstairs in the basement. I really like it. I used the 2x4 Basics kit from Amazon.com which lets you easily create a custom workbench using only 2x4&#39;s and plywood sheets. I used a high quality finished oak 3/4&quot; plywood for the top. The basement is unfinished and a bit dingy so I decided to make the bench enclosed. It is 6 feet wide and 3 feet deep. I also installed a True-HEPA air purifier which creates a positive pressure inside the benchtop area, especially when it is closed up. I am trying to achieve an equivalent of an ISO 6 or Class 1000 clean space. I want it clean so I don&#39;t get any dust buildup on my parts and test instruments. I&#39;m also looking to do some vacuum chamber experiments with metal film deposition and I need clean air for my 2 stage rotary oil sealed vacuum pump. I just need a Bell Jar and test stand now...&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutsandbots.blogspot.com/feeds/4943897904457714908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nutsandbots.blogspot.com/2013/10/new-workbench.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/4943897904457714908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/4943897904457714908'/><link rel='alternate' type='text/html' href='http://nutsandbots.blogspot.com/2013/10/new-workbench.html' title='New Workbench!'/><author><name>Mike Bentley</name><uri>http://www.blogger.com/profile/00106946921133534104</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlXK-0Fk47OerWjgvCBu56TPQTqhAffCcX6I3iXBPefWYrUYkZMWVklzVxcIbasFNyuv36sxtiS4CQ10EaIbqmBfEH6rb1b0gZU_nc_n7PjwHncvRtih8zTIr5J5sjlzw/s220/grimreaper.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisNZWh0T2vPEL6ygFwTSH9yU4wEn1EXopsSdcbtkJTQ3VsjAa_Gb4ntPxc2LgcvAG3S67cVp2fez-Ng4vhzKMOVIJ42D5z8jY9DkCqlihBLJLfZ0sFkW7bfpMcshLxQRKp30VBswiuuJY/s72-c/IMG_20131015_221021_844.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1776091989945548678.post-536771146781342607</id><published>2013-08-28T22:20:00.000-04:00</published><updated>2013-12-02T00:59:27.190-05:00</updated><title type='text'>Impedance Tester alpha build</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1WrSlUdI7Kasb3gNdzAIiin5NoSWmOUFvVaPJ1NRiDGhkikkkyZk8-g0t-fsIusvuy-hqF88bp6vFnL3LFWDFO_vKKMS5VkxSI58keuWFKO5Qiv2KooWeHGPv2i-TR7SopnPJIhg-kjQ/s1600/IMG_20130828_213321_141.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1WrSlUdI7Kasb3gNdzAIiin5NoSWmOUFvVaPJ1NRiDGhkikkkyZk8-g0t-fsIusvuy-hqF88bp6vFnL3LFWDFO_vKKMS5VkxSI58keuWFKO5Qiv2KooWeHGPv2i-TR7SopnPJIhg-kjQ/s320/IMG_20130828_213321_141.jpg&quot; style=&quot;cursor: move;&quot; width=&quot;320&quot; /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;IT&#39;S ALIVE!&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&amp;nbsp;I finally got the pieces together and assembled the components onto the main board of the impedance tester project. &lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&amp;nbsp; I did some initial testing of each AD circuit (MCP3202 12-bit for voltage and ACS713 hall sensor for current) and then the FET on/off test. Everything worked perfectly! So I&#39;ve got some very beta code going using the terminal as the UI. Looks good so far! I am getting consistent results within +/- .3 milliOhms so I am very pleased! I am cycling ~10 amps of load (~1.2 Ohm resistance) and using a kelvin style hookup to keep the load current from interfering with the voltage sense at the cell/battery. I need extreme accuracy and a sensing resolution of .001 volts in order to get a valid internal resistance measurement. As always leave a comment if you want me to post the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7b_xtgezJQLPSscCnjZEaxKHU8OwweOntNt3aOVRfxQYB-hNHkW0LxDdKT81lrCm2K9MmwxCxDXELhr_I8-dNAcxej-zDFGt6RsPGZMGZwwVPAFUK8_xbluQTeFFEHc9CG6vNjzEacbY/s1600/IMG_20130828_212203_946.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7b_xtgezJQLPSscCnjZEaxKHU8OwweOntNt3aOVRfxQYB-hNHkW0LxDdKT81lrCm2K9MmwxCxDXELhr_I8-dNAcxej-zDFGt6RsPGZMGZwwVPAFUK8_xbluQTeFFEHc9CG6vNjzEacbY/s320/IMG_20130828_212203_946.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBLR-MkfUT8rwd3uK_ieEXwoo_kpluYJV8hsTPL4pLqsbEKptZoBuX1FZMXviTjbAjO8Fvd2NAyOXn1c_bBkI2d7bThCDAFr63p7XLqvH2L6gUGa-B4rcXEaLN-d9UdDGgl666WL-gU2U/s1600/IMG_20130828_212457_690.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBLR-MkfUT8rwd3uK_ieEXwoo_kpluYJV8hsTPL4pLqsbEKptZoBuX1FZMXviTjbAjO8Fvd2NAyOXn1c_bBkI2d7bThCDAFr63p7XLqvH2L6gUGa-B4rcXEaLN-d9UdDGgl666WL-gU2U/s320/IMG_20130828_212457_690.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwHLHJeV26myehaDGMRXBWtOrGfJVEEgvzUSM8O-oFm__nyb7untG6Nyp15S1JhB3jH8yik6uCNNpm76VSABYNZUIjQ_woKCtvkCsRKrXWIcVCNQ9IMqU8D7J2Cp09zEUg15h0ojZyUNE/s1600/IMG_20130828_213042_664.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwHLHJeV26myehaDGMRXBWtOrGfJVEEgvzUSM8O-oFm__nyb7untG6Nyp15S1JhB3jH8yik6uCNNpm76VSABYNZUIjQ_woKCtvkCsRKrXWIcVCNQ9IMqU8D7J2Cp09zEUg15h0ojZyUNE/s320/IMG_20130828_213042_664.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&#39; Program By Michael Bentley.&lt;br /&gt;
&lt;br /&gt;
#picaxe 20x2&lt;br /&gt;
#Terminal 9600&lt;br /&gt;
#No_Table&lt;br /&gt;
#No_Data&lt;br /&gt;
#freq m4&lt;br /&gt;
&lt;br /&gt;
Symbol ADVal = W0&lt;br /&gt;
&lt;br /&gt;
Symbol Channel = B2&lt;br /&gt;
Symbol Q = B3&lt;br /&gt;
Symbol Config = B4&lt;br /&gt;
Symbol AMP = W3&lt;br /&gt;
Symbol V1 = W4&lt;br /&gt;
Symbol V2 = W5&lt;br /&gt;
Symbol V3 = W15&lt;br /&gt;
Symbol V4 = W12&lt;br /&gt;
Symbol U = B12&lt;br /&gt;
Symbol W = B13&lt;br /&gt;
Symbol X = B14&lt;br /&gt;
Symbol Y = B15&lt;br /&gt;
Symbol Z = B16&lt;br /&gt;
Symbol VOLT = W10&lt;br /&gt;
Symbol VOLTSTART = W11&lt;br /&gt;
Symbol IMP = W13&lt;br /&gt;
Symbol IMP2 = W14&lt;br /&gt;
&lt;br /&gt;
Symbol FET = C.5&lt;br /&gt;
Symbol SCK = B.7&lt;br /&gt;
Symbol CS = B.0&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;HSPISetup spimode00, spimedium&lt;br /&gt;
&amp;nbsp; &amp;nbsp;Low SCK&lt;br /&gt;
&amp;nbsp; &amp;nbsp;High CS&lt;br /&gt;
&amp;nbsp; &amp;nbsp;Pause 500&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;SerTxD (&quot;Impedance Tester&quot;, CR, LF, LF, &quot;by Michael A. Bentley&quot;,CR, LF, LF)&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
Main:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;Do&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; pause 500&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Channel = 0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;GoSub ADMeas&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VOLTSTART = ADVal&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;V1 = ADVal * 3&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;V2 = ADVal * 5/10&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;V3 = ADVal * 0/100&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;V4 = ADVal *5/1000&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VOLT = V1+V2+V4&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BINTOASCII VOLT,U,W,X,Y,Z&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SerTxD (U,W,&quot;.&quot;,X,Y,Z,&quot; Volts - Press any key to start test&quot;,CR,LF)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SerRxD [3000,Main],Z&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IF VOLTSTART &amp;gt; 275 then Goto Test&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;Loop&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
Test:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; serTXD (&quot;Testing...&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; V1 = VOLTSTART - 275&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; high FET&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; for X = 0 to 255&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; channel = 0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gosub ADMeas&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ADVal &amp;lt; V1 then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; low FET&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SerTxD (&quot;ABORT-Unstable Voltage!&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; goto Main&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; endif&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pause 12&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; next X&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; pause 50&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; readadc10 B.1, AMP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; AMP = AMP - 103&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Channel = 0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; GoSub ADMeas&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; V1 =ADVal&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; pause 10 &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; low FET&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; pause 100&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Channel = 0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; GoSub ADMeas&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ADVal = ADVal - V1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; V1 = ADVal * 3 * 10&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; V2 = ADVal * 5&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; V3 = ADVal * 0/10&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; V4 = ADVal * 5/100 &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; VOLT = V1+V2+V3+V4&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; VOLT = VOLT *10&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; V1 = AMP * 2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; V2 = AMP * 6/10&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; V3 = AMP * 4/100&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; AMP = V1 + V2 + V3&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; IMP = VOLT/AMP * 10&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; IMP2 = VOLT//AMP *10 /AMP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; IMP = IMP +IMP2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; BINTOASCII IMP,U,W,X,Y,Z&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SerTxD (LF,W,X,Y,&quot;.&quot;,Z,&quot; mOHM&quot;, CR, LF, LF)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; pause 500&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;Goto Main&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
ADMeas:&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;low B.0&lt;br /&gt;
&amp;nbsp; &amp;nbsp;hspiout (001101) &#39; CH0&lt;br /&gt;
&amp;nbsp; &amp;nbsp;hspiin (b1,b0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;high B.0&lt;br /&gt;
&amp;nbsp; &amp;nbsp;w0=w0/8&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;Return</content><link rel='replies' type='application/atom+xml' href='http://nutsandbots.blogspot.com/feeds/536771146781342607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nutsandbots.blogspot.com/2013/08/its-alive-i-finally-got-pieces-together.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/536771146781342607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/536771146781342607'/><link rel='alternate' type='text/html' href='http://nutsandbots.blogspot.com/2013/08/its-alive-i-finally-got-pieces-together.html' title='Impedance Tester alpha build'/><author><name>Mike Bentley</name><uri>http://www.blogger.com/profile/00106946921133534104</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlXK-0Fk47OerWjgvCBu56TPQTqhAffCcX6I3iXBPefWYrUYkZMWVklzVxcIbasFNyuv36sxtiS4CQ10EaIbqmBfEH6rb1b0gZU_nc_n7PjwHncvRtih8zTIr5J5sjlzw/s220/grimreaper.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1WrSlUdI7Kasb3gNdzAIiin5NoSWmOUFvVaPJ1NRiDGhkikkkyZk8-g0t-fsIusvuy-hqF88bp6vFnL3LFWDFO_vKKMS5VkxSI58keuWFKO5Qiv2KooWeHGPv2i-TR7SopnPJIhg-kjQ/s72-c/IMG_20130828_213321_141.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1776091989945548678.post-3870294366289757444</id><published>2012-08-25T17:40:00.000-04:00</published><updated>2013-08-28T22:34:34.663-04:00</updated><title type='text'>Shocker!</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpNzsCV9dsm5EZ1IOGS6udBb4QI7YPX_3CGlIV035YDMs9w1bvfvPBVWIedm7ZrAYGhhlg5vP3CUkIvnEuaB7mlS-g5nQpWVGKq54DaR6aXBijMnplOnjJutTJh4mTFTvk8BwbrsOwqUg/s320/2012-08-25_17-06-35_852.jpg&quot; width=&quot;320&quot; /&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;WARNING!!! High voltages present! Use caution!&lt;/span&gt;&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
My son asked me a while ago if we could build a device that would shock people. I said &quot;why not&quot; and drew up this little circuit. We then cobbled it together from some pieces I already had. This is not a debilitating device, it just gives a potent &quot;what the heck!&quot; kind of shock. It has a peak impulse of +1250V when the field in the transformer collapses and I am pulsing at 1000Hz. I checked the maximum current draw with the secondary shorted and measured 4.7milliamps so it is under the &quot;heart safe&quot; 5 milliamp limit. The driver is a Picaxe 08M. The first test was disappointing because the frequency was low and timing of the magnetic field setup and collapse was off. I could just hold the wires and feel the pulses.Once I got the timing tweaked using an o-scope by changing the code in the micro, watch out! This sucka bites! I also had to remove the diode across the transformer as it was absorbing the field collapse impulse which turned out to be much stronger than the setup inrush voltage pulse. Go figure, I should have known this given the time to setup the field from the apparent high impedance source of the battery on the primary was longer than the field collapse rate on the secondary and all that energy over time was being released much faster during the field collapse.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;WARNING&lt;/span&gt;&lt;/b&gt;: Potentially hazardous voltages may be present within this circuit.Clicking read more will allow you to see the inside pictures and schematic. If you decide to build this circuit please be careful and responsible. You are responsible as the creator of the device for it&#39;s proper use and operation. If you are under 18 you MUST consult with your parent/guardian before building this project. Failure to do so will result in suspension of hobbyist activities and banishment from the lab!&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpNzsCV9dsm5EZ1IOGS6udBb4QI7YPX_3CGlIV035YDMs9w1bvfvPBVWIedm7ZrAYGhhlg5vP3CUkIvnEuaB7mlS-g5nQpWVGKq54DaR6aXBijMnplOnjJutTJh4mTFTvk8BwbrsOwqUg/s1600/2012-08-25_17-06-35_852.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpHeJZ8ZKvPT8dqmaO1d9DJAKlheRHkjj0OUBl41Zu_jkZgSblXVieBZqVN8Rfy90jFscf5F7K3GwxXtw-xQaUNdfsDQksAfUBEJjwHlwQYtwJLl6ewEBy5Jruyy5XmG5rcoq1Wi4NB1w/s1600/2012-08-25_17-08-14_210.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpHeJZ8ZKvPT8dqmaO1d9DJAKlheRHkjj0OUBl41Zu_jkZgSblXVieBZqVN8Rfy90jFscf5F7K3GwxXtw-xQaUNdfsDQksAfUBEJjwHlwQYtwJLl6ewEBy5Jruyy5XmG5rcoq1Wi4NB1w/s320/2012-08-25_17-08-14_210.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8phIF_e47o1QtWKQvuiu6R-AwglpQxUb-nuCO2AqRBkIaP6PlcAPuX-3PVT4G9FmkprzMsXG-uJfAt8oR-dWMYw-5HWMJTXI4Gt0TNbb-eLURuGYSZXbiHEsQubf16hyCIs3tCFvYGJU/s1600/2012-08-25_17-12-36_850.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8phIF_e47o1QtWKQvuiu6R-AwglpQxUb-nuCO2AqRBkIaP6PlcAPuX-3PVT4G9FmkprzMsXG-uJfAt8oR-dWMYw-5HWMJTXI4Gt0TNbb-eLURuGYSZXbiHEsQubf16hyCIs3tCFvYGJU/s320/2012-08-25_17-12-36_850.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuqGn51Iwbk5GtCrIJM_zIfqzFJovRpnfl-wk3jT-paBJ71WYjPl9UvVLNTmIrREYB5AvReCMosc5kZg39r7eYDQ3_b4-PLDWKop8Sw97D3ILpimBGHmoiRA1PWJMQwBbKt3G9bfDmd_4/s1600/P1010038.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuqGn51Iwbk5GtCrIJM_zIfqzFJovRpnfl-wk3jT-paBJ71WYjPl9UvVLNTmIrREYB5AvReCMosc5kZg39r7eYDQ3_b4-PLDWKop8Sw97D3ILpimBGHmoiRA1PWJMQwBbKt3G9bfDmd_4/s320/P1010038.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutsandbots.blogspot.com/feeds/3870294366289757444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nutsandbots.blogspot.com/2012/08/shocker.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/3870294366289757444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/3870294366289757444'/><link rel='alternate' type='text/html' href='http://nutsandbots.blogspot.com/2012/08/shocker.html' title='Shocker!'/><author><name>Mike Bentley</name><uri>http://www.blogger.com/profile/00106946921133534104</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlXK-0Fk47OerWjgvCBu56TPQTqhAffCcX6I3iXBPefWYrUYkZMWVklzVxcIbasFNyuv36sxtiS4CQ10EaIbqmBfEH6rb1b0gZU_nc_n7PjwHncvRtih8zTIr5J5sjlzw/s220/grimreaper.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpNzsCV9dsm5EZ1IOGS6udBb4QI7YPX_3CGlIV035YDMs9w1bvfvPBVWIedm7ZrAYGhhlg5vP3CUkIvnEuaB7mlS-g5nQpWVGKq54DaR6aXBijMnplOnjJutTJh4mTFTvk8BwbrsOwqUg/s72-c/2012-08-25_17-06-35_852.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1776091989945548678.post-6901661884363699154</id><published>2012-08-24T20:29:00.002-04:00</published><updated>2013-09-05T01:19:58.785-04:00</updated><title type='text'>PCB arrival</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC-T0z_MahQI5z1c7C8oxhUUTorR7QFX25YCd7xtg8ddhU_N5z73CX7nlE14KoOvVoNVa6a9DK3v3ge9qJenc0Dzd1fDfG3sLyjhaWYPEU2mFsYPK4FMnrP3shnwakeLjsAO6Udjcottw/s1600/2012-08-24_19-44-34_984.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC-T0z_MahQI5z1c7C8oxhUUTorR7QFX25YCd7xtg8ddhU_N5z73CX7nlE14KoOvVoNVa6a9DK3v3ge9qJenc0Dzd1fDfG3sLyjhaWYPEU2mFsYPK4FMnrP3shnwakeLjsAO6Udjcottw/s320/2012-08-24_19-44-34_984.jpg&quot; style=&quot;cursor: move;&quot; width=&quot;320&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
Hooray! My new custom circuit boards for my battery impedance tester project just arrived. Now I can start assembling a prototype and get some code going on the micro (Picaxe 20X2). I should be able to achieve 350 micro-ohm resolution, which should be good as most of the batteries I intend to test are 4000 uOhms and greater when new. This should give me a good idea of the battery health. I intend to cycle the 1 Ohm load across the battery and measure the voltage drop with the 12-bit ADC. I haven&#39;t decided if I&#39;m going to ramp it up PWM style or just switch it on, read voltage, then back off. I will have to try both ways and see what works best.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL_UW_eDQCnfNLyATWN8RlSNI84N0ZVglk8Bp-cLCmZqTVXC2r7eWDacJVCvUIkjzEPHkszVczBRT4lUeeZXOejxHvLx2ceNhpP0QLA9gy3ra2Alzr4zNmcJf27ThfU_5uOKN-OU6Bi3w/s1600/Batt+Tester+pcb.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL_UW_eDQCnfNLyATWN8RlSNI84N0ZVglk8Bp-cLCmZqTVXC2r7eWDacJVCvUIkjzEPHkszVczBRT4lUeeZXOejxHvLx2ceNhpP0QLA9gy3ra2Alzr4zNmcJf27ThfU_5uOKN-OU6Bi3w/s320/Batt+Tester+pcb.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH641JJwff-Znxfx256RxZAQSZjqWLKt6wn4qGkSUGNyvNo2q1BanfSL-NZ9YDdRqluHqoTRqQkuFYaIy_VmEhH9BFIgTpilpnL1Dh3xJnOcsA8atvAMolF5B2mSDdp4GtKd3cLJ2mCRI/s1600/Batt+Tester+schematic.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH641JJwff-Znxfx256RxZAQSZjqWLKt6wn4qGkSUGNyvNo2q1BanfSL-NZ9YDdRqluHqoTRqQkuFYaIy_VmEhH9BFIgTpilpnL1Dh3xJnOcsA8atvAMolF5B2mSDdp4GtKd3cLJ2mCRI/s320/Batt+Tester+schematic.jpg&quot; width=&quot;198&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nutsandbots.blogspot.com/feeds/6901661884363699154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nutsandbots.blogspot.com/2012/08/hooray-my-new-custom-cicuit-boards-for.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/6901661884363699154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/6901661884363699154'/><link rel='alternate' type='text/html' href='http://nutsandbots.blogspot.com/2012/08/hooray-my-new-custom-cicuit-boards-for.html' title='PCB arrival'/><author><name>Mike Bentley</name><uri>http://www.blogger.com/profile/00106946921133534104</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlXK-0Fk47OerWjgvCBu56TPQTqhAffCcX6I3iXBPefWYrUYkZMWVklzVxcIbasFNyuv36sxtiS4CQ10EaIbqmBfEH6rb1b0gZU_nc_n7PjwHncvRtih8zTIr5J5sjlzw/s220/grimreaper.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC-T0z_MahQI5z1c7C8oxhUUTorR7QFX25YCd7xtg8ddhU_N5z73CX7nlE14KoOvVoNVa6a9DK3v3ge9qJenc0Dzd1fDfG3sLyjhaWYPEU2mFsYPK4FMnrP3shnwakeLjsAO6Udjcottw/s72-c/2012-08-24_19-44-34_984.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1776091989945548678.post-2882655775540667231</id><published>2012-08-24T00:43:00.003-04:00</published><updated>2013-08-28T22:38:00.125-04:00</updated><title type='text'>Battery Charger - PWM controlled.</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDfwvPjubGa9BJ45l1zo9-Tbx1XEglZLas-loO0JZvCZqrdAP85gIEzoXQrqfTjTwA461tGyYM_sfbvbNPxEzUPXyt2GzZJRs1JuC03Zi1meLVke7pVw92z4-yqjepa8vkRAiW6Bx3x9M/s1600/2011-12-04_01-39-40_171.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDfwvPjubGa9BJ45l1zo9-Tbx1XEglZLas-loO0JZvCZqrdAP85gIEzoXQrqfTjTwA461tGyYM_sfbvbNPxEzUPXyt2GzZJRs1JuC03Zi1meLVke7pVw92z4-yqjepa8vkRAiW6Bx3x9M/s320/2011-12-04_01-39-40_171.jpg&quot; style=&quot;cursor: move;&quot; width=&quot;320&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
This is my latest project I just completed. It is a multi-channel lead acid battery charger. It can be used for VRLA, gell cell and wet cell types. It is designed to charge battery jars with a nominal voltage between 4 and 12 volts.&amp;nbsp;It will also work well with any battery type requiring a constant voltage float charge. It has built in limiting circuitry to keep each channel at or below 1.25 amps. The individual channels may be paralleled for higher current. Once the set voltage is adjusted and the channel is turned on, the charger will try to drive to the set voltage while automatically current limiting. As the set voltage is reached the current diminishes to a fractional amount that is required to &quot;float&quot; the battery at that setpoint. The system has automatic fault detection for over/undervoltage and battery disconnect as well as open cell detection and will automatically turn off the affected channel.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The charger is built around a modular approach whereby the charger cicuitry is on small charger PCBs that connect to a main 24V supply and are driven via a PWM signal from a microcontroller. They also provide a voltage feedback to the microcontroller via ADC input. A 4x20 matrix serial lcd screen and 4&amp;nbsp;membrane type&amp;nbsp;buttons are used for HMI. The microcontroller used is a Picaxe 20M2 mounted on a Kiwi Patch board. The power supply is by Mean Well and there is a cooling fan mounted left side to keep&amp;nbsp;everything running cool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrkLI2DQEB9x1nnVGsdCY-zcG4ov0KBr1CxCPrH_bTRWBymUnKjkCF78SGi0rbBlrBST_Ut5t_cPJ7ygixFz1t29JugZvJvarL6-exjhoIZdtpRry0QF9gGVS7eiJx9FnyKHtle6qM87I/s1600/2011-12-04_01-41-06_337.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrkLI2DQEB9x1nnVGsdCY-zcG4ov0KBr1CxCPrH_bTRWBymUnKjkCF78SGi0rbBlrBST_Ut5t_cPJ7ygixFz1t29JugZvJvarL6-exjhoIZdtpRry0QF9gGVS7eiJx9FnyKHtle6qM87I/s320/2011-12-04_01-41-06_337.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI-1E161LCZ84vvxAADiBbAM5SuLBCim8wFy6SklhcpCC-h2BX2Sh9ZYG4kc-pIaTGEv5nVS7kIQ7QK1AVVV2lq0uvG-KLOYeT0TISAEEaZNJdEAwYptJFAFGrgVOPORrz0yW7tPhpub4/s1600/2011-12-04_01-41-38_678.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI-1E161LCZ84vvxAADiBbAM5SuLBCim8wFy6SklhcpCC-h2BX2Sh9ZYG4kc-pIaTGEv5nVS7kIQ7QK1AVVV2lq0uvG-KLOYeT0TISAEEaZNJdEAwYptJFAFGrgVOPORrz0yW7tPhpub4/s320/2011-12-04_01-41-38_678.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjltAd6YZxZUjVwsnIR-7iiN-NpBmBlbOZnvIQKieyf8oGWg9WJaOWaTaDjASKPPUP28u141fMJyWs-r652nRlwnZRXKpj1seytFPz7wijmQAkMSelVLa6IASq5ATHFIp1yWdK0HvWUDuo/s1600/2012-05-01_01-19-25_687.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjltAd6YZxZUjVwsnIR-7iiN-NpBmBlbOZnvIQKieyf8oGWg9WJaOWaTaDjASKPPUP28u141fMJyWs-r652nRlwnZRXKpj1seytFPz7wijmQAkMSelVLa6IASq5ATHFIp1yWdK0HvWUDuo/s320/2012-05-01_01-19-25_687.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1KNrCHyAz1NX2LC3CPAIFZ787ihLImCkwG3fnkcVKNVwOBscJePnUW7AihgQiApT475hPICKggDA599K8MqCKp0DNkTANTdpa_zaFxqBvPWBqHVP79FfwcrDUs90u72JaF5RpTXiJV5E/s1600/2012-05-01_01-20-50_310.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1KNrCHyAz1NX2LC3CPAIFZ787ihLImCkwG3fnkcVKNVwOBscJePnUW7AihgQiApT475hPICKggDA599K8MqCKp0DNkTANTdpa_zaFxqBvPWBqHVP79FfwcrDUs90u72JaF5RpTXiJV5E/s320/2012-05-01_01-20-50_310.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkG9T2f_3lRMpG5dm8JtIEFovL-pPydsc1xIHGpla7g8QFkgFmdODwBJJRCnQun6vXpbUURutRpOsvUMhKebpXS8ZYxDYiwEfhVE5Ye7jFXHnUxCGcFwJRH-C0AnqlON9vYI9IyVs0-I4/s1600/2012-05-01_01-21-21_211.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkG9T2f_3lRMpG5dm8JtIEFovL-pPydsc1xIHGpla7g8QFkgFmdODwBJJRCnQun6vXpbUURutRpOsvUMhKebpXS8ZYxDYiwEfhVE5Ye7jFXHnUxCGcFwJRH-C0AnqlON9vYI9IyVs0-I4/s320/2012-05-01_01-21-21_211.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgziXANTga8bh74m5gVhu4q-sdMUqOeqzOwiQ6gsrxJ7tkyRlZHMSIx7Wpoauva3xNyBhTRcHbYmc79XnXpfeRLoW80bcvGi9cVDMgVlVL0OK_0UI8VTzzWCTy9mkBY2SkhS6vW7ZOERcw/s1600/2012-05-01_01-21-30_787.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgziXANTga8bh74m5gVhu4q-sdMUqOeqzOwiQ6gsrxJ7tkyRlZHMSIx7Wpoauva3xNyBhTRcHbYmc79XnXpfeRLoW80bcvGi9cVDMgVlVL0OK_0UI8VTzzWCTy9mkBY2SkhS6vW7ZOERcw/s320/2012-05-01_01-21-30_787.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfHWLOG4-3G1RsU36PpauybFegnO7J6OmKinEnwq5LfFstj6-9yxpHXv_sIXPdA0YHt5Z6qF3i5aNmJM9t7zt8Iuxbw-3bHQK9Xc0mmIKtkg6RPKpwReXidk-8EulRXWcjDtZ3CurTJ4g/s1600/2012-05-17_23-47-45_410.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfHWLOG4-3G1RsU36PpauybFegnO7J6OmKinEnwq5LfFstj6-9yxpHXv_sIXPdA0YHt5Z6qF3i5aNmJM9t7zt8Iuxbw-3bHQK9Xc0mmIKtkg6RPKpwReXidk-8EulRXWcjDtZ3CurTJ4g/s320/2012-05-17_23-47-45_410.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbGEz0BtweRRt79C3Y81O8waCrhbonfvI0pjszhX-LxlyKR3KD2l5EZWheDwv0NXX8vZy635y43rcrhnAlhcf28CnpnMA0qVxodIL3s4TQZsAT9cPEIbj7a-v-2O-4iMKp2VDKrYl1jjs/s1600/P1010037.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbGEz0BtweRRt79C3Y81O8waCrhbonfvI0pjszhX-LxlyKR3KD2l5EZWheDwv0NXX8vZy635y43rcrhnAlhcf28CnpnMA0qVxodIL3s4TQZsAT9cPEIbj7a-v-2O-4iMKp2VDKrYl1jjs/s320/P1010037.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg12Uq2m5oe8tcj7P46hpB5Wxihhc11sgpNbhzA4-5ou_-ld9BZwBpjvBkDB8Q5vwa5HuiTjgOjbtz7OQviPjZQ0vIRarb1fqkeXmTnH6e6iTbU4rnsX8kiNGD5btvLOH27M5yweKi-GSY/s1600/Charger+buttons.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;79&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg12Uq2m5oe8tcj7P46hpB5Wxihhc11sgpNbhzA4-5ou_-ld9BZwBpjvBkDB8Q5vwa5HuiTjgOjbtz7OQviPjZQ0vIRarb1fqkeXmTnH6e6iTbU4rnsX8kiNGD5btvLOH27M5yweKi-GSY/s320/Charger+buttons.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
symbol PWR1 = bit0&lt;br /&gt;
symbol PWR2 = bit1&lt;br /&gt;
symbol PWR3 = bit2&lt;br /&gt;
symbol PWR4 = bit3&lt;br /&gt;
symbol FLT1 = bit4&lt;br /&gt;
symbol FLT2 = bit5&lt;br /&gt;
symbol FLT3 = bit6&lt;br /&gt;
symbol FLT4 = bit7&lt;br /&gt;
symbol  i= b1&lt;br /&gt;
symbol ADC =W1&lt;br /&gt;
symbol PWM1 = W2&lt;br /&gt;
symbol PWM2 = W3&lt;br /&gt;
symbol PWM3 = W4&lt;br /&gt;
symbol PWM4 = W5&lt;br /&gt;
symbol SP = W6&lt;br /&gt;
symbol SP2 = W7&lt;br /&gt;
symbol SP3 = W8&lt;br /&gt;
symbol eval = W9&lt;br /&gt;
symbol ADC1 = W10&lt;br /&gt;
symbol ADC2 = W11&lt;br /&gt;
symbol ADC3 = W12&lt;br /&gt;
symbol ADC4 = W13&lt;br /&gt;
rem temporary setpoints placed in NV memory-remove in final&lt;br /&gt;
&#39;SP = 650&lt;br /&gt;
&#39;write 10,word SP&lt;br /&gt;
&#39;write 20,word SP&lt;br /&gt;
&#39;write 30,word SP&lt;br /&gt;
&#39;write 40,word SP&lt;br /&gt;
rem _______________________________________________________&lt;br /&gt;
&lt;br /&gt;
pause 2000&lt;br /&gt;
hsersetup B9600_16,&lt;br /&gt;
&#39;hserout 0,(&quot; PWM Battery Charger      Mike Bentley&quot;)&lt;br /&gt;
&#39;pause 10000&lt;br /&gt;
setup:&lt;br /&gt;
hserout 0,(124,2,50,124,0,&quot;#  VOLT  SETP  STATE&quot;,124,24,0,124,25,50,&quot;1&quot;,124,24,0,124,25,40,&quot;2&quot;,124,24,0,124,25,30,&quot;3&quot;,124,24,0,124,25,20,&quot;4&quot;)&lt;br /&gt;
&lt;br /&gt;
lcdloop:&lt;br /&gt;
s_w3 = ADC1&lt;br /&gt;
gosub vconvert&lt;br /&gt;
hserout 0,(124,24,18,124,25,50)&lt;br /&gt;
if s_w2 &amp;gt; 9 then&lt;br /&gt;
hserout 0,(#s_w1,&quot;.&quot;,#s_w2,&quot; &quot;) &lt;br /&gt;
else&lt;br /&gt;
hserout 0,(#s_w1,&quot;.0&quot;,#s_w2,&quot; &quot;)&lt;br /&gt;
endif&lt;br /&gt;
read 10,word SP2&lt;br /&gt;
s_w3 = SP2&lt;br /&gt;
gosub vconvert&lt;br /&gt;
hserout 0,(124,24,54)&lt;br /&gt;
if s_w2 &amp;gt; 9 then&lt;br /&gt;
hserout 0,(#s_w1,&quot;.&quot;,#s_w2,&quot; &quot;) &lt;br /&gt;
else&lt;br /&gt;
hserout 0,(#s_w1,&quot;.0&quot;,#s_w2,&quot; &quot;)&lt;br /&gt;
endif&lt;br /&gt;
if PWR1 = 1 then&lt;br /&gt;
hserout 0,(&quot; ON &quot;)&lt;br /&gt;
else&lt;br /&gt;
hserout 0,(&quot; OFF&quot;)&lt;br /&gt;
&lt;br /&gt;
endif&lt;br /&gt;
if s_w4 = 10 then&lt;br /&gt;
hserout 0,(&quot; *&quot;)&lt;br /&gt;
else&lt;br /&gt;
hserout 0,(&quot;  &quot;)&lt;br /&gt;
&lt;br /&gt;
endif&lt;br /&gt;
&#39;pause 400&lt;br /&gt;
&lt;br /&gt;
s_w3 = ADC2&lt;br /&gt;
gosub vconvert&lt;br /&gt;
hserout 0,(124,24,18,124,25,40)&lt;br /&gt;
if s_w2 &amp;gt; 9 then&lt;br /&gt;
hserout 0,(#s_w1,&quot;.&quot;,#s_w2,&quot; &quot;) &lt;br /&gt;
else&lt;br /&gt;
hserout 0,(#s_w1,&quot;.0&quot;,#s_w2,&quot; &quot;)&lt;br /&gt;
endif&lt;br /&gt;
read 20,word SP2&lt;br /&gt;
s_w3 = SP2&lt;br /&gt;
gosub vconvert&lt;br /&gt;
hserout 0,(124,24,54)&lt;br /&gt;
if s_w2 &amp;gt; 9 then&lt;br /&gt;
hserout 0,(#s_w1,&quot;.&quot;,#s_w2,&quot; &quot;) &lt;br /&gt;
else&lt;br /&gt;
hserout 0,(#s_w1,&quot;.0&quot;,#s_w2,&quot; &quot;)&lt;br /&gt;
endif&lt;br /&gt;
if PWR2 = 1 then&lt;br /&gt;
hserout 0,(&quot; ON &quot;)&lt;br /&gt;
else&lt;br /&gt;
hserout 0,(&quot; OFF&quot;)&lt;br /&gt;
endif&lt;br /&gt;
if s_w4 = 20 then&lt;br /&gt;
hserout 0,(&quot; *&quot;)&lt;br /&gt;
else&lt;br /&gt;
hserout 0,(&quot;  &quot;)&lt;br /&gt;
&lt;br /&gt;
endif&lt;br /&gt;
&#39;pause 400&lt;br /&gt;
&lt;br /&gt;
s_w3 = ADC3&lt;br /&gt;
gosub vconvert&lt;br /&gt;
hserout 0,(124,24,18,124,25,30)&lt;br /&gt;
if s_w2 &amp;gt; 9 then&lt;br /&gt;
hserout 0,(#s_w1,&quot;.&quot;,#s_w2,&quot; &quot;) &lt;br /&gt;
else&lt;br /&gt;
hserout 0,(#s_w1,&quot;.0&quot;,#s_w2,&quot; &quot;)&lt;br /&gt;
endif&lt;br /&gt;
read 30,word SP2&lt;br /&gt;
s_w3 = SP2&lt;br /&gt;
gosub vconvert&lt;br /&gt;
hserout 0,(124,24,54)&lt;br /&gt;
if s_w2 &amp;gt; 9 then&lt;br /&gt;
hserout 0,(#s_w1,&quot;.&quot;,#s_w2,&quot; &quot;) &lt;br /&gt;
else&lt;br /&gt;
hserout 0,(#s_w1,&quot;.0&quot;,#s_w2,&quot; &quot;)&lt;br /&gt;
endif&lt;br /&gt;
if PWR3 = 1 then&lt;br /&gt;
hserout 0,(&quot; ON &quot;)&lt;br /&gt;
else&lt;br /&gt;
hserout 0,(&quot; OFF&quot;)&lt;br /&gt;
endif&lt;br /&gt;
if s_w4 = 30 then&lt;br /&gt;
hserout 0,(&quot; *&quot;)&lt;br /&gt;
else&lt;br /&gt;
hserout 0,(&quot;  &quot;)&lt;br /&gt;
&lt;br /&gt;
endif&lt;br /&gt;
&#39;pause 400&lt;br /&gt;
&lt;br /&gt;
s_w3 = ADC4&lt;br /&gt;
gosub vconvert&lt;br /&gt;
hserout 0,(124,24,18,124,25,20)&lt;br /&gt;
if s_w2 &amp;gt; 9 then&lt;br /&gt;
hserout 0,(#s_w1,&quot;.&quot;,#s_w2,&quot; &quot;) &lt;br /&gt;
else&lt;br /&gt;
hserout 0,(#s_w1,&quot;.0&quot;,#s_w2,&quot; &quot;)&lt;br /&gt;
endif&lt;br /&gt;
read 40,word SP2&lt;br /&gt;
s_w3 = SP2&lt;br /&gt;
gosub vconvert&lt;br /&gt;
hserout 0,(124,24,54)&lt;br /&gt;
if s_w2 &amp;gt; 9 then&lt;br /&gt;
hserout 0,(#s_w1,&quot;.&quot;,#s_w2,&quot; &quot;) &lt;br /&gt;
else&lt;br /&gt;
hserout 0,(#s_w1,&quot;.0&quot;,#s_w2,&quot; &quot;)&lt;br /&gt;
endif&lt;br /&gt;
if PWR4 = 1 then&lt;br /&gt;
hserout 0,(&quot; ON &quot;)&lt;br /&gt;
else&lt;br /&gt;
hserout 0,(&quot; OFF&quot;)&lt;br /&gt;
endif&lt;br /&gt;
if s_w4 = 40 then&lt;br /&gt;
hserout 0,(&quot; *&quot;)&lt;br /&gt;
else&lt;br /&gt;
hserout 0,(&quot;  &quot;)&lt;br /&gt;
&lt;br /&gt;
endif&lt;br /&gt;
pause 200&lt;br /&gt;
if s_w4 &amp;gt; 0 then&lt;br /&gt;
peek 28, word SP2&lt;br /&gt;
hserout 0,(124,24,18,124,25,10,&quot;IMP &quot;,#SP2,&quot; &quot;)&lt;br /&gt;
else&lt;br /&gt;
hserout 0,(124,24,18,124,25,10,&quot;        &quot;)&lt;br /&gt;
endif&lt;br /&gt;
&#39;pause 400&lt;br /&gt;
goto lcdloop&lt;br /&gt;
&lt;br /&gt;
vconvert:&lt;br /&gt;
s_w1 = s_w3 * 21&lt;br /&gt;
s_w2 = s_w3 *25/100&lt;br /&gt;
s_w1 = s_w1 + s_w2/10&lt;br /&gt;
s_w2 = s_w1&lt;br /&gt;
s_w1 = s_w1/100&lt;br /&gt;
s_w3 = s_w1 * 100&lt;br /&gt;
s_w2 = s_w2 - s_w3&lt;br /&gt;
pause 200&lt;br /&gt;
return&lt;br /&gt;
&lt;br /&gt;
start1:&lt;br /&gt;
&#39;pause 3000&lt;br /&gt;
PWM1 = 1000&lt;br /&gt;
PWM2 = 1000&lt;br /&gt;
PWM3 = 1000&lt;br /&gt;
PWM4 = 1000&lt;br /&gt;
PWR1 = 1&lt;br /&gt;
PWR2 = 1&lt;br /&gt;
PWR3 = 1&lt;br /&gt;
PWR4 = 1&lt;br /&gt;
pwmout pwmdiv64,C.5,249,PWM1&lt;br /&gt;
pwmout pwmdiv64,C.3,249,PWM2&lt;br /&gt;
pwmout pwmdiv64,C.2,249,PWM3&lt;br /&gt;
pwmout pwmdiv64,B.1,249,PWM4&lt;br /&gt;
&lt;br /&gt;
main1:&lt;br /&gt;
eval = 0&lt;br /&gt;
s_w5 = 0&lt;br /&gt;
s_w6 = 1000&lt;br /&gt;
read 10,word SP&lt;br /&gt;
for i = 1 to 15&lt;br /&gt;
readadc10 B.2,ADC&lt;br /&gt;
if ADC &amp;gt; s_w5 then&lt;br /&gt;
s_w5 = ADC&lt;br /&gt;
elseif ADC &amp;lt; s_w6 then&lt;br /&gt;
s_w6 = ADC&lt;br /&gt;
endif&lt;br /&gt;
eval = eval + ADC&lt;br /&gt;
next i&lt;br /&gt;
ADC1 = eval/15&lt;br /&gt;
eval = s_w5 - s_w6&lt;br /&gt;
if s_w4 = 10 then&lt;br /&gt;
poke 28, word eval&lt;br /&gt;
endif&lt;br /&gt;
&#39;eval = eval + ADC&lt;br /&gt;
&#39;next i&lt;br /&gt;
&#39;ADC1 = eval/15&lt;br /&gt;
if SP &amp;gt; ADC1 then&lt;br /&gt;
eval = SP-ADC1&lt;br /&gt;
else&lt;br /&gt;
eval = 0 &lt;br /&gt;
endif&lt;br /&gt;
if PWR1 = 0 then goto main2 &lt;br /&gt;
if ADC1 &amp;lt; 200 or ADC1 &amp;gt; 800 or eval &amp;gt; 200 then&lt;br /&gt;
PWR1 = 0&lt;br /&gt;
FLT1 = 1&lt;br /&gt;
PWM1 = 1000&lt;br /&gt;
pwmduty C.5,1000&lt;br /&gt;
goto main2&lt;br /&gt;
endif&lt;br /&gt;
&#39;sertxd (#PWM1,cr,lf)&lt;br /&gt;
if ADC1 = SP then&lt;br /&gt;
goto main2&lt;br /&gt;
endif&lt;br /&gt;
increase:&lt;br /&gt;
if ADC1 &amp;lt; SP then&lt;br /&gt;
if PWM1 &amp;gt; 0 then&lt;br /&gt;
PWM1 = PWM1 -1&lt;br /&gt;
endif&lt;br /&gt;
pwmduty C.5,PWM1&lt;br /&gt;
goto main2&lt;br /&gt;
endif&lt;br /&gt;
decrease:&lt;br /&gt;
if ADC1 &amp;gt; SP then&lt;br /&gt;
eval = ADC1 -SP&lt;br /&gt;
if eval &amp;gt; 20 then&lt;br /&gt;
PWM1 = PWM1 +2 max 1000&lt;br /&gt;
endif&lt;br /&gt;
PWM1 = PWM1 +1 max 1000  &lt;br /&gt;
pwmduty C.5,PWM1&lt;br /&gt;
goto main2&lt;br /&gt;
endif&lt;br /&gt;
&lt;br /&gt;
main2:&lt;br /&gt;
eval = 0&lt;br /&gt;
s_w5 = 0&lt;br /&gt;
s_w6 = 1000&lt;br /&gt;
read 20,word SP&lt;br /&gt;
for i = 1 to 15&lt;br /&gt;
readadc10 B.3,ADC&lt;br /&gt;
if ADC &amp;gt; s_w5 then&lt;br /&gt;
s_w5 = ADC&lt;br /&gt;
elseif ADC &amp;lt; s_w6 then&lt;br /&gt;
s_w6 = ADC&lt;br /&gt;
endif&lt;br /&gt;
eval = eval + ADC&lt;br /&gt;
next i&lt;br /&gt;
ADC2 = eval/15&lt;br /&gt;
eval = s_w5 - s_w6&lt;br /&gt;
if s_w4 = 20 then&lt;br /&gt;
poke 28, word eval&lt;br /&gt;
endif&lt;br /&gt;
&#39;eval = eval + ADC&lt;br /&gt;
&#39;next i&lt;br /&gt;
&#39;ADC2 = eval/15&lt;br /&gt;
if SP &amp;gt; ADC2 then &lt;br /&gt;
eval = SP-ADC2&lt;br /&gt;
else&lt;br /&gt;
eval = 0&lt;br /&gt;
endif&lt;br /&gt;
if PWR2 = 0 then goto main3 &lt;br /&gt;
if ADC2 &amp;lt; 200 or ADC2 &amp;gt; 800 or eval &amp;gt; 200 then&lt;br /&gt;
PWR2 = 0&lt;br /&gt;
FLT2 = 1&lt;br /&gt;
PWM2 = 1000&lt;br /&gt;
pwmduty C.3,1000&lt;br /&gt;
goto main3&lt;br /&gt;
endif&lt;br /&gt;
if ADC2 = SP then&lt;br /&gt;
goto main3&lt;br /&gt;
endif&lt;br /&gt;
increase2:&lt;br /&gt;
if ADC2 &amp;lt; SP then&lt;br /&gt;
if PWM2 &amp;gt; 0 then&lt;br /&gt;
PWM2 = PWM2 -1&lt;br /&gt;
endif&lt;br /&gt;
pwmduty C.3,PWM2&lt;br /&gt;
goto main3&lt;br /&gt;
endif&lt;br /&gt;
decrease2:&lt;br /&gt;
if ADC2 &amp;gt; SP then&lt;br /&gt;
eval = ADC2 -SP&lt;br /&gt;
if eval &amp;gt; 20 then&lt;br /&gt;
PWM2 = PWM2 +2 max 1000&lt;br /&gt;
endif&lt;br /&gt;
PWM2 = PWM2 +1 max 1000  &lt;br /&gt;
pwmduty C.3,PWM2&lt;br /&gt;
goto main3&lt;br /&gt;
endif&lt;br /&gt;
&lt;br /&gt;
main3:&lt;br /&gt;
eval = 0&lt;br /&gt;
s_w5 = 0&lt;br /&gt;
s_w6 = 1000&lt;br /&gt;
read 30,word SP&lt;br /&gt;
for i = 1 to 15&lt;br /&gt;
readadc10 B.4,ADC&lt;br /&gt;
if ADC &amp;gt; s_w5 then&lt;br /&gt;
s_w5 = ADC&lt;br /&gt;
elseif ADC &amp;lt; s_w6 then&lt;br /&gt;
s_w6 = ADC&lt;br /&gt;
endif&lt;br /&gt;
eval = eval + ADC&lt;br /&gt;
next i&lt;br /&gt;
ADC3 = eval/15&lt;br /&gt;
eval = s_w5 - s_w6&lt;br /&gt;
if s_w4 = 30 then&lt;br /&gt;
poke 28, word eval&lt;br /&gt;
endif&lt;br /&gt;
&#39;eval = eval + ADC&lt;br /&gt;
&#39;next i&lt;br /&gt;
&#39;ADC3 = eval/15&lt;br /&gt;
if SP &amp;gt; ADC3 then&lt;br /&gt;
eval = SP-ADC3&lt;br /&gt;
else&lt;br /&gt;
eval = 0&lt;br /&gt;
endif&lt;br /&gt;
if PWR3 = 0 then goto main4 &lt;br /&gt;
if ADC3 &amp;lt; 200 or ADC3 &amp;gt; 800 or eval &amp;gt; 200 then&lt;br /&gt;
PWR3 = 0&lt;br /&gt;
FLT3 = 1&lt;br /&gt;
PWM3 = 1000&lt;br /&gt;
pwmduty C.2,1000&lt;br /&gt;
goto main4&lt;br /&gt;
endif&lt;br /&gt;
if ADC3 = SP then&lt;br /&gt;
goto main4&lt;br /&gt;
endif&lt;br /&gt;
increase3:&lt;br /&gt;
if ADC3 &amp;lt; SP then&lt;br /&gt;
if PWM3 &amp;gt; 0 then&lt;br /&gt;
PWM3 = PWM3 -1&lt;br /&gt;
endif&lt;br /&gt;
pwmduty C.2,PWM3&lt;br /&gt;
goto main4&lt;br /&gt;
endif&lt;br /&gt;
decrease3:&lt;br /&gt;
if ADC3 &amp;gt; SP then&lt;br /&gt;
eval = ADC3 -SP&lt;br /&gt;
if eval &amp;gt; 20 then&lt;br /&gt;
PWM3 = PWM3 +2 max 1000&lt;br /&gt;
endif&lt;br /&gt;
PWM3 = PWM3 +1 max 1000  &lt;br /&gt;
pwmduty C.2,PWM3&lt;br /&gt;
goto main4&lt;br /&gt;
endif&lt;br /&gt;
&lt;br /&gt;
main4:&lt;br /&gt;
eval = 0&lt;br /&gt;
s_w5 = 0&lt;br /&gt;
s_w6 = 1000&lt;br /&gt;
read 40,word SP&lt;br /&gt;
for i = 1 to 15&lt;br /&gt;
readadc10 B.5,ADC&lt;br /&gt;
if ADC &amp;gt; s_w5 then&lt;br /&gt;
s_w5 = ADC&lt;br /&gt;
elseif ADC &amp;lt; s_w6 then&lt;br /&gt;
s_w6 = ADC&lt;br /&gt;
endif&lt;br /&gt;
eval = eval + ADC&lt;br /&gt;
next i&lt;br /&gt;
ADC4 = eval/15&lt;br /&gt;
eval = s_w5 - s_w6&lt;br /&gt;
if s_w4 = 40 then&lt;br /&gt;
poke 28, word eval&lt;br /&gt;
endif&lt;br /&gt;
&#39;eval = eval + ADC&lt;br /&gt;
&#39;next i&lt;br /&gt;
&#39;ADC4 = eval/15&lt;br /&gt;
if SP &amp;gt; ADC4 then&lt;br /&gt;
eval = SP-ADC4&lt;br /&gt;
else&lt;br /&gt;
eval = 0&lt;br /&gt;
endif&lt;br /&gt;
if PWR4 = 0 then goto main1 &lt;br /&gt;
if ADC4 &amp;lt; 200 or ADC4 &amp;gt; 800 or eval &amp;gt; 200 then&lt;br /&gt;
PWR4 = 0&lt;br /&gt;
FLT4 = 1&lt;br /&gt;
PWM4 = 1000&lt;br /&gt;
pwmduty B.1,1000&lt;br /&gt;
goto main1&lt;br /&gt;
endif&lt;br /&gt;
if ADC4 = SP then&lt;br /&gt;
goto main1&lt;br /&gt;
endif&lt;br /&gt;
increase4:&lt;br /&gt;
if ADC4 &amp;lt; SP then&lt;br /&gt;
if PWM4 &amp;gt; 0 then&lt;br /&gt;
PWM4 = PWM4 -1&lt;br /&gt;
endif&lt;br /&gt;
pwmduty B.1,PWM4&lt;br /&gt;
goto main1&lt;br /&gt;
endif&lt;br /&gt;
decrease4:&lt;br /&gt;
if ADC4 &amp;gt; SP then&lt;br /&gt;
eval = ADC4 -SP&lt;br /&gt;
if eval &amp;gt; 20 then&lt;br /&gt;
PWM4 = PWM4 +2 max 1000&lt;br /&gt;
endif&lt;br /&gt;
PWM4 = PWM4 +1 max 1000  &lt;br /&gt;
pwmduty B.1,PWM4&lt;br /&gt;
goto main1&lt;br /&gt;
endif&lt;br /&gt;
&lt;br /&gt;
start2:&lt;br /&gt;
&lt;br /&gt;
buttonread:&lt;br /&gt;
if pinC.6 = 1 and pinB.0 = 0 then&lt;br /&gt;
s_w4 = s_w4 +10&lt;br /&gt;
if s_w4 = 50 then &lt;br /&gt;
s_w4 =0&lt;br /&gt;
endif&lt;br /&gt;
pause 300&lt;br /&gt;
endif&lt;br /&gt;
&lt;br /&gt;
if pinC.4 = 1 and s_w4 &amp;gt; 0 then&lt;br /&gt;
&lt;br /&gt;
read s_w4,word SP3&lt;br /&gt;
if SP3 &amp;lt; 700 then&lt;br /&gt;
inc SP3&lt;br /&gt;
write s_w4,word SP3&lt;br /&gt;
endif &lt;br /&gt;
pause 50&lt;br /&gt;
endif&lt;br /&gt;
&lt;br /&gt;
if pinB.7 = 1 and s_w4 &amp;gt; 0 then&lt;br /&gt;
&lt;br /&gt;
read s_w4,word SP3&lt;br /&gt;
if SP3 &amp;gt; 200 then&lt;br /&gt;
dec SP3&lt;br /&gt;
write s_w4,word SP3&lt;br /&gt;
endif&lt;br /&gt;
pause 50&lt;br /&gt;
endif&lt;br /&gt;
&lt;br /&gt;
if pinB.0 = 1 then&lt;br /&gt;
select case s_w4&lt;br /&gt;
case 10&lt;br /&gt;
FLT1=0&lt;br /&gt;
PWR1=1&lt;br /&gt;
if pinC.6 = 1 then &lt;br /&gt;
PWM1 = 500&lt;br /&gt;
endif&lt;br /&gt;
case 20&lt;br /&gt;
FLT2=0&lt;br /&gt;
PWR2=1&lt;br /&gt;
if pinC.6 = 1 then &lt;br /&gt;
PWM2 = 500&lt;br /&gt;
endif&lt;br /&gt;
case 30&lt;br /&gt;
FLT3=0&lt;br /&gt;
PWR3=1&lt;br /&gt;
if pinC.6 = 1 then &lt;br /&gt;
PWM3 = 500&lt;br /&gt;
endif&lt;br /&gt;
case 40&lt;br /&gt;
FLT4=0&lt;br /&gt;
PWR4=1&lt;br /&gt;
if pinC.6 = 1 then &lt;br /&gt;
PWM4 = 500&lt;br /&gt;
endif&lt;br /&gt;
endselect&lt;br /&gt;
pause 200&lt;br /&gt;
endif&lt;br /&gt;
pause 50&lt;br /&gt;
goto buttonread&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nutsandbots.blogspot.com/feeds/2882655775540667231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nutsandbots.blogspot.com/2012/08/this-is-my-latest-project-i-just.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/2882655775540667231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/2882655775540667231'/><link rel='alternate' type='text/html' href='http://nutsandbots.blogspot.com/2012/08/this-is-my-latest-project-i-just.html' title='Battery Charger - PWM controlled.'/><author><name>Mike Bentley</name><uri>http://www.blogger.com/profile/00106946921133534104</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlXK-0Fk47OerWjgvCBu56TPQTqhAffCcX6I3iXBPefWYrUYkZMWVklzVxcIbasFNyuv36sxtiS4CQ10EaIbqmBfEH6rb1b0gZU_nc_n7PjwHncvRtih8zTIr5J5sjlzw/s220/grimreaper.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDfwvPjubGa9BJ45l1zo9-Tbx1XEglZLas-loO0JZvCZqrdAP85gIEzoXQrqfTjTwA461tGyYM_sfbvbNPxEzUPXyt2GzZJRs1JuC03Zi1meLVke7pVw92z4-yqjepa8vkRAiW6Bx3x9M/s72-c/2011-12-04_01-39-40_171.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1776091989945548678.post-1116094690647488944</id><published>2012-08-24T00:02:00.000-04:00</published><updated>2012-09-12T11:24:04.074-04:00</updated><title type='text'>USB Charger</title><content type='html'>Here is my USB charger that I made about 1.5 years ago. It has a bit of wear and tear on it but is still holding up. It can output over an amp of current to any USB chargeable device. The display shows voltage and current draw. It shuts off after 60 seconds automatically if no current is drawn. The screen is a .96&quot; OLED and that is a 6V solar cell on top so it charges itself just by laying around, preferably in the sun. It has 6000 mAh of Li-poly onboard and can be charged by either solar, mini-usb or DC 6V input. It uses an LV-&lt;br /&gt;
BOOST, Allegro ACS713 current monitor, FET and a Picaxe 20X2. The charger board is by Sparkfun.
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirBsgLVs4g39WUTA8WF-pffvCKBGu6mXmcUDLTHk1E3ZOVubWNSQxvele9dBseucMJUGiz6ts1B-DapLc-UT_Sybw-S9pXdUZzM4ojlzVsfJFnbaODtMtHfojXCRuyG3KnEoC70jy-nvM/s1600/P1010026.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirBsgLVs4g39WUTA8WF-pffvCKBGu6mXmcUDLTHk1E3ZOVubWNSQxvele9dBseucMJUGiz6ts1B-DapLc-UT_Sybw-S9pXdUZzM4ojlzVsfJFnbaODtMtHfojXCRuyG3KnEoC70jy-nvM/s400/P1010026.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDRMQpi0Ar_PhSdwPvQD-bpK8XNB_0YNAAxTWYOFafhn_S5EFqufG5jxS-doB_SSGB0w6cHIW48CfDHm4eQD9oRpdjdFvu9u1g0yWyRjVo7IBdx5Yn2xI4pjRyxTN9R1lQpnbav6MfNsM/s1600/P1010031.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDRMQpi0Ar_PhSdwPvQD-bpK8XNB_0YNAAxTWYOFafhn_S5EFqufG5jxS-doB_SSGB0w6cHIW48CfDHm4eQD9oRpdjdFvu9u1g0yWyRjVo7IBdx5Yn2xI4pjRyxTN9R1lQpnbav6MfNsM/s400/P1010031.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibgdY8_hB2p8kDoG6EODuaZbkgx8afyzxXAOxEseMp1IPTfXMxk6HAZZAItBCPilwoKbKwwNyEx_NXW1isd1q5Mrt31JmsffclPZDJ2WAC14nqk1RT31Z4vN_WPywFO8sUVxTPPinYSSw/s1600/P1010036.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibgdY8_hB2p8kDoG6EODuaZbkgx8afyzxXAOxEseMp1IPTfXMxk6HAZZAItBCPilwoKbKwwNyEx_NXW1isd1q5Mrt31JmsffclPZDJ2WAC14nqk1RT31Z4vN_WPywFO8sUVxTPPinYSSw/s400/P1010036.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
#no_table&lt;br /&gt;#picaxe 20x2&lt;br /&gt;HIGH C.5&lt;br /&gt;LET adcsetup = 00000000011111&lt;br /&gt;POKESFR $22,4&lt;br /&gt;SYMBOL R = B0&lt;br /&gt;SYMBOL G = B1&lt;br /&gt;SYMBOL COLOR = W1&lt;br /&gt;SYMBOL COLOR2 = W2&lt;br /&gt;SYMBOL V =W3&lt;br /&gt;SYMBOL VOLTS =W4&lt;br /&gt;SYMBOL MA = W5&lt;br /&gt;SYMBOL MAMPS =W6&lt;br /&gt;SYMBOL VPOINTER = B14&lt;br /&gt;SYMBOL MPOINTER = B15&lt;br /&gt;SYMBOL POS = B16&lt;br /&gt;SYMBOL POS2 = B17&lt;br /&gt;SYMBOL POS3 = B18&lt;br /&gt;SYMBOL VOLD = W13&lt;br /&gt;SYMBOL VPOLD =B19&lt;br /&gt;SYMBOL MOLD = W14&lt;br /&gt;SYMBOL MPOLD = B20&lt;br /&gt;SYMBOL U = B21&lt;br /&gt;SYMBOL W = B22&lt;br /&gt;SYMBOL X = B23&lt;br /&gt;SYMBOL Y = B24&lt;br /&gt;SYMBOL Z = B25&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;HIGH C.0&lt;br /&gt;&lt;br /&gt;PAUSE 1000&lt;br /&gt;HSERSETUP B38400_8, 0&lt;br /&gt;HSEROUT 0, ($55)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;&lt;br /&gt;HSEROUT 0, ($45)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;R = 31&lt;br /&gt;G = 0&lt;br /&gt;HSEROUT 0, ($4F, $01)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;POS = 30&lt;br /&gt;HSEROUT 0, ($53, 8,0,2,0,31,1,1,&quot;V&quot;,$00)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;HSEROUT 0, ($53, 4,36,2,0,31,1,1,&quot;mA&quot;,$00)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;BARS:&lt;br /&gt;W1 = B0*2048&lt;br /&gt;W2 = B1*32&lt;br /&gt;W1 = W1 + W2&lt;br /&gt;&lt;br /&gt;HSEROUT 0, ($4C, POS, 0, POS, 11, B3,B2)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;HSEROUT 0, ($4C, POS, 36, POS, 47, B3,B2)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;INC POS&lt;br /&gt;HSEROUT 0, ($4C, POS, 0, POS, 11, B3,B2)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;HSEROUT 0, ($4C, POS, 36, POS, 47, B3,B2)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;&lt;br /&gt;IF R &amp;gt; 0 THEN&lt;br /&gt; R = R - 1&lt;br /&gt; G = G + 2&lt;br /&gt; POS = POS + 1&lt;br /&gt; GOTO BARS&lt;br /&gt;ENDIF&lt;br /&gt;VOLD = 320&lt;br /&gt;VPOLD =30&lt;br /&gt;X = 3&lt;br /&gt;Y = 2&lt;br /&gt;Z = 0&lt;br /&gt;MOLD = 1&lt;br /&gt;MPOLD = 30&lt;br /&gt;TMR3SETUP %10110001&lt;br /&gt; &lt;br /&gt;POINTERS:&lt;br /&gt;READADC10 4,V&lt;br /&gt;VOLTS = V *4/10&lt;br /&gt;V=V-800*100/223&lt;br /&gt;V = V * 63/100 +30&lt;br /&gt;VPOINTER = V&lt;br /&gt;IF VOLTS &amp;lt; 320 THEN&lt;br /&gt;VPOINTER = 29&lt;br /&gt;ENDIF&lt;br /&gt;&lt;br /&gt;IF VOLTS &amp;lt;&amp;gt; VOLD THEN&lt;br /&gt;POS2 = VPOLD - 4&lt;br /&gt;POS3 = VPOLD + 4&lt;br /&gt;R = VPOLD - 12&lt;br /&gt;IF R &amp;gt; 70 THEN&lt;br /&gt;R =70&lt;br /&gt;ENDIF&lt;br /&gt;BINTOASCII VOLD,U,W,X,Y,Z&lt;br /&gt;HSEROUT 0, ($47, VPOLD,13,POS2,17,POS3,17,0,0)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;HSEROUT 0, ($53, R,19,16,0,0,1,1,X,&quot;.&quot;,Y,Z,$00)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;ENDIF&lt;br /&gt;&lt;br /&gt;IF VOLTS &amp;lt;&amp;gt; VOLD THEN&lt;br /&gt;POS2 = VPOINTER - 4&lt;br /&gt;POS3 = VPOINTER + 4&lt;br /&gt;R = VPOINTER - 12&lt;br /&gt;IF R &amp;gt; 70 THEN&lt;br /&gt;R =70&lt;br /&gt;ENDIF&lt;br /&gt;BINTOASCII VOLTS,U,W,X,Y,Z&lt;br /&gt;HSEROUT 0, ($47, VPOINTER,13,POS2,17,POS3,17,123,224)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;HSEROUT 0, ($53, R,19,16,0,31,1,1,X,&quot;.&quot;,Y,Z,$00)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;PAUSE 50&lt;br /&gt;ENDIF&lt;br /&gt;&lt;br /&gt;VOLD = VOLTS&lt;br /&gt;VPOLD = VPOINTER&lt;br /&gt;&lt;br /&gt;READADC10 2,MA&lt;br /&gt;IF MA &amp;lt; 121 THEN&lt;br /&gt;MA = 119&lt;br /&gt;ENDIF&lt;br /&gt;IF MA &amp;gt; 145 THEN&lt;br /&gt;MA = MA*105/100&lt;br /&gt;ENDIF&lt;br /&gt;MAMPS = MA -119*216/10&lt;br /&gt;MA=MA-119*100/46&lt;br /&gt;MA = MA * 63/100 +30&lt;br /&gt;MPOINTER = MA&lt;br /&gt;&lt;br /&gt;IF MAMPS &amp;lt; 1 THEN&lt;br /&gt;MPOINTER = 29&lt;br /&gt;ENDIF&lt;br /&gt;&lt;br /&gt;IF MAMPS &amp;lt;&amp;gt; MOLD THEN&lt;br /&gt;POS2 = MPOLD - 4&lt;br /&gt;POS3 = MPOLD + 4&lt;br /&gt;R = MPOLD - 12&lt;br /&gt;IF R &amp;gt; 70 THEN&lt;br /&gt;R =70&lt;br /&gt;ENDIF&lt;br /&gt;HSEROUT 0, ($47, MPOLD,49,POS2,53,POS3,53,0,0)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;HSEROUT 0, ($53, R,55,16,0,0,1,1,#MOLD,$00)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;ENDIF&lt;br /&gt;&lt;br /&gt;IF MAMPS &amp;lt;&amp;gt; MOLD THEN&lt;br /&gt;POS2 = MPOINTER - 4&lt;br /&gt;POS3 = MPOINTER + 4&lt;br /&gt;R = MPOINTER - 12&lt;br /&gt;IF R &amp;gt; 70 THEN&lt;br /&gt;R =70&lt;br /&gt;ENDIF&lt;br /&gt;&lt;br /&gt;HSEROUT 0, ($47, MPOINTER,49,POS2,53,POS3,53,123,224)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;HSEROUT 0, ($53, R,55,16,0,31,1,1,#MAMPS,$00)&lt;br /&gt;HSERIN 0,1&lt;br /&gt;ENDIF&lt;br /&gt;PAUSE 5000&lt;br /&gt;&lt;br /&gt;MOLD = MAMPS&lt;br /&gt;MPOLD = MPOINTER&lt;br /&gt;&lt;br /&gt;IF MAMPS &amp;gt;0  THEN&lt;br /&gt;TIMER3 =0&lt;br /&gt;ELSE&lt;br /&gt;IF TIMER3 &amp;gt;240 THEN&lt;br /&gt;LOW C.5&lt;br /&gt;ENDIF&lt;br /&gt;ENDIF&lt;br /&gt;&lt;br /&gt;GOTO POINTERS&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nutsandbots.blogspot.com/feeds/1116094690647488944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nutsandbots.blogspot.com/2012/08/here-is-my-usb-charger-that-i-made.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/1116094690647488944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/1116094690647488944'/><link rel='alternate' type='text/html' href='http://nutsandbots.blogspot.com/2012/08/here-is-my-usb-charger-that-i-made.html' title='USB Charger'/><author><name>Mike Bentley</name><uri>http://www.blogger.com/profile/00106946921133534104</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlXK-0Fk47OerWjgvCBu56TPQTqhAffCcX6I3iXBPefWYrUYkZMWVklzVxcIbasFNyuv36sxtiS4CQ10EaIbqmBfEH6rb1b0gZU_nc_n7PjwHncvRtih8zTIr5J5sjlzw/s220/grimreaper.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirBsgLVs4g39WUTA8WF-pffvCKBGu6mXmcUDLTHk1E3ZOVubWNSQxvele9dBseucMJUGiz6ts1B-DapLc-UT_Sybw-S9pXdUZzM4ojlzVsfJFnbaODtMtHfojXCRuyG3KnEoC70jy-nvM/s72-c/P1010026.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1776091989945548678.post-332545084319239011</id><published>2012-01-22T13:12:00.002-05:00</published><updated>2012-09-12T11:28:53.498-04:00</updated><title type='text'>Battery Current Alert</title><content type='html'>&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;Here are a few pics of my battery current alert or BCA. It watches ripple currents induced by the rectifier in a VRLA or other lead acid systems to determine battery health and sets off an alarm if the ripple is too high or too low. It uses a picaxe 14M microprocessor, precision reference, precision rectifier (personal hybrid design using a ZXCT1041- see U1,C1,C2,R7-R9.) The final design replaced the dip switch bank and led shown in the drawing with 2 toggle switches and a buzzer.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwcvno_zBZAi0OtRYkQFmFrd07QT-v3R2A3DB6Frym-dAYuXmlJCISqhIxYGNkg9XZnLGOccR6MJ5KK1lt3ajuf4D96pt8HjuAzUJBeYh_MPgcBOVQmod2D4qCPdsBN_qX4ge5dao7Ww0/s1600/P1010408.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwcvno_zBZAi0OtRYkQFmFrd07QT-v3R2A3DB6Frym-dAYuXmlJCISqhIxYGNkg9XZnLGOccR6MJ5KK1lt3ajuf4D96pt8HjuAzUJBeYh_MPgcBOVQmod2D4qCPdsBN_qX4ge5dao7Ww0/s640/P1010408.JPG&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizM3mOP0KIu6R-wU8vI6DU0POv7FzuXYBAnKHg-hBSP4f8EUTTII9c94NGzKOg3S04oSm3xWwAVBS4jMMl12Xhnfb8wVzNVB678tp1T6OaWZ1MmbGslGb5aApoU28RTD2SM8okqcKSSsQ/s1600/BCA+schematic+image.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;460&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizM3mOP0KIu6R-wU8vI6DU0POv7FzuXYBAnKHg-hBSP4f8EUTTII9c94NGzKOg3S04oSm3xWwAVBS4jMMl12Xhnfb8wVzNVB678tp1T6OaWZ1MmbGslGb5aApoU28RTD2SM8okqcKSSsQ/s640/BCA+schematic+image.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDte_I_l1aqtRsAb5ffqkKUwAflkaRVEtOoz_FEksIzncIq5JrXVnEhvkSKnKo5-iO8XymeLKmlnYp7t8QFSIgqiLTrg6nVG2Przq4coLBk05vtUHb4ckWppCbamZR5PJZhbLNTZXWJeQ/s1600/P1010412.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDte_I_l1aqtRsAb5ffqkKUwAflkaRVEtOoz_FEksIzncIq5JrXVnEhvkSKnKo5-iO8XymeLKmlnYp7t8QFSIgqiLTrg6nVG2Przq4coLBk05vtUHb4ckWppCbamZR5PJZhbLNTZXWJeQ/s640/P1010412.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
symbol amps3 =W4&lt;br /&gt;symbol achirp = W1&lt;br /&gt;symbol in =W0&lt;br /&gt;symbol n = W3&lt;br /&gt;symbol n2 = W2&lt;br /&gt;symbol amps = B12&lt;br /&gt;symbol amps2 = W5&lt;br /&gt;symbol chirp = B13&lt;br /&gt;&lt;br /&gt;setup:&lt;br /&gt;disablebod&lt;br /&gt;gosub getadc&lt;br /&gt;if pin1 = 1 then &lt;br /&gt; amps = n&lt;br /&gt;else&lt;br /&gt; read 0,amps&lt;br /&gt;endif&lt;br /&gt;write 0,amps&lt;br /&gt;if amps &amp;lt; 4 then&lt;br /&gt; high 1 &lt;br /&gt;end&lt;br /&gt;endif&lt;br /&gt;achirp = amps&lt;br /&gt;gosub ampchirp&lt;br /&gt;amps2 = amps * 75/100&lt;br /&gt;amps3 = amps * 125/100&lt;br /&gt;&lt;br /&gt;main:&lt;br /&gt;gosub getadc&lt;br /&gt;if n &amp;lt; amps2 or n &amp;gt; amps3 then&lt;br /&gt; sound 1,(60,40,80,40,60,40)&lt;br /&gt; sleep 6&lt;br /&gt;else&lt;br /&gt; sleep 30&lt;br /&gt;endif&lt;br /&gt;if pin1 = 1 then&lt;br /&gt; achirp =n&lt;br /&gt; gosub ampchirp&lt;br /&gt; pause 2000&lt;br /&gt; achirp = amps2&lt;br /&gt; gosub ampchirp&lt;br /&gt;endif &lt;br /&gt;goto main &lt;br /&gt;&lt;br /&gt;getadc:&lt;br /&gt;high 5&lt;br /&gt;pause 600&lt;br /&gt;n2 = 0&lt;br /&gt;for n =1 to 120&lt;br /&gt; readadc10 4,in&lt;br /&gt; n2 =n2+in&lt;br /&gt;next n&lt;br /&gt;n = n2/120&lt;br /&gt;&#39;sertxd (#n,&quot; &quot;,cr)&lt;br /&gt;readadc10 0,in&lt;br /&gt;sertxd (#in,&quot; &quot;,cr)&lt;br /&gt;in=51400/in * n/100&lt;br /&gt;n = in&lt;br /&gt;&#39;sertxd (#n,&quot; &quot;,cr)&lt;br /&gt;n2 = 55&lt;br /&gt;n = in * n2/10&lt;br /&gt;n2 = in * 10/1000&lt;br /&gt;n = n + n2/10&lt;br /&gt;sertxd (#n,cr,lf)&lt;br /&gt;low 5&lt;br /&gt;n = 40 &#39;remove this line for actual operation.&lt;br /&gt;return&lt;br /&gt;&lt;br /&gt;ampchirp:&lt;br /&gt;chirp= achirp/10&lt;br /&gt;if chirp &amp;gt; 0 then&lt;br /&gt; for n2 = 1 to chirp &lt;br /&gt;  pulsout 1,25000&lt;br /&gt;  pause 150&lt;br /&gt; next n2&lt;br /&gt;else&lt;br /&gt; gosub zero&lt;br /&gt;endif&lt;br /&gt;pause 2000&lt;br /&gt;chirp = chirp*10&lt;br /&gt;chirp = achirp - chirp&lt;br /&gt;if chirp &amp;gt; 0 then&lt;br /&gt; for n2 = 1 to chirp&lt;br /&gt;  pulsout 1,25000&lt;br /&gt;  pause 150&lt;br /&gt; next n2&lt;br /&gt;else&lt;br /&gt; gosub zero&lt;br /&gt;endif&lt;br /&gt;pause 2000 &lt;br /&gt;return&lt;br /&gt;&lt;br /&gt;zero:&lt;br /&gt;for n2 = 1 to 3&lt;br /&gt; pulsout 1,5000&lt;br /&gt; pause 20&lt;br /&gt;next n2&lt;br /&gt;return&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://nutsandbots.blogspot.com/feeds/332545084319239011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nutsandbots.blogspot.com/2012/01/this-is-test-post-to-see-what-text-will.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/332545084319239011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1776091989945548678/posts/default/332545084319239011'/><link rel='alternate' type='text/html' href='http://nutsandbots.blogspot.com/2012/01/this-is-test-post-to-see-what-text-will.html' title='Battery Current Alert'/><author><name>Mike Bentley</name><uri>http://www.blogger.com/profile/00106946921133534104</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='23' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlXK-0Fk47OerWjgvCBu56TPQTqhAffCcX6I3iXBPefWYrUYkZMWVklzVxcIbasFNyuv36sxtiS4CQ10EaIbqmBfEH6rb1b0gZU_nc_n7PjwHncvRtih8zTIr5J5sjlzw/s220/grimreaper.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwcvno_zBZAi0OtRYkQFmFrd07QT-v3R2A3DB6Frym-dAYuXmlJCISqhIxYGNkg9XZnLGOccR6MJ5KK1lt3ajuf4D96pt8HjuAzUJBeYh_MPgcBOVQmod2D4qCPdsBN_qX4ge5dao7Ww0/s72-c/P1010408.JPG" height="72" width="72"/><thr:total>0</thr:total></entry></feed>