<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Keith&#039;s Electronics Blog &#187; Hacks</title>
	<atom:link href="http://www.neufeld.newton.ks.us/electronics/?cat=11&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.neufeld.newton.ks.us/electronics</link>
	<description></description>
	<lastBuildDate>Fri, 18 Apr 2025 00:10:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>AMPduino [from 2011 Draft]</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=1425</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=1425#comments</comments>
		<pubDate>Fri, 22 Jun 2018 19:23:01 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Salvage]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=1425</guid>
		<description><![CDATA[Another unpublished post dredged out of the distant past &#8212; this one apparently complete. Soon after I got my friend Cort hooked on the Arduino, he said he wished he could easily carry it to the office to play with over lunch, to the tire shop to work on while he waited, etc. I offered [...]]]></description>
			<content:encoded><![CDATA[<p><em>Another unpublished post dredged out of the distant past &#8212; this one apparently complete.</em></p>
<p>Soon after I got my friend Cort hooked on the Arduino, he said he wished he could easily carry it to the office to play with over lunch, to the tire shop to work on while he waited, etc.  I offered him <a href="?p=245">three-ring binders and boxed cases</a>, but that wasn&#8217;t quite what he was looking for.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/21/IMG956959.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/21/IMG956959_mid.jpg" alt="AMPduino case" /></a></p>
<p>After some discussion, we settled on an empty plastic case from a videocassette.  I visited our Media Resources department, had their video director help me scrounge up a suitably large case (Cort says &#8220;U-Matic 3/4&#8243; helical scan&#8221;), and updated the labeling.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/21/IMG959414.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/21/IMG959414_mid.jpg" alt="AMPduino case, inside" /></a></p>
<p>Cort cut out the spindle posts and then stickied down the Arduino, a couple of breadboards, and some other things useful for prototyping and now does all of his development with the AMPduino.  Handy for the workbench, the kitchen table, and the tire shop.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=1425</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modifying a Tower SG90 Servo for Continuous Rotation with Potentiometer Position Sensing, Part 1: Investigation and Continuous Rotation</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=1616</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=1616#comments</comments>
		<pubDate>Tue, 06 Jan 2015 12:15:41 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Inside]]></category>
		<category><![CDATA[Robotics]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=1616</guid>
		<description><![CDATA[A common strategy in the world of hobby robotics is to modify a servo for continuous rotation to use to drive the wheels of a tabletop robot. On its own, the servo takes power, ground, and a position input and moves the shaft within a range of rotation to match the angle requested on its [...]]]></description>
			<content:encoded><![CDATA[<p>A common strategy in the world of hobby robotics is to modify a servo for continuous rotation to use to drive the wheels of a tabletop robot.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2015/01/05/IMG_0308.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2015/01/05/IMG_0308_mid.jpg" alt="Tower SG90 Servo in hand for scale" /></a></p>
<p>On its own, the servo takes power, ground, and a position input and moves the shaft within a range of rotation to match the angle requested on its input wire.  It has one or more stops in its gearbox to prevent it from rotating past the end of its range; these need to be removed.  It also has a potentiometer as part of its positioning system, which &#8212; for the usual modification &#8212; needs to be tricked into thinking it&#8217;s always centered.  The modified servo then runs at full speed forward or backward trying to reach a requested position and thinking it has never succeeded in doing so; and the controller requires extra, external rotation sensing if you want to detect what the servo has actually done so far.</p>
<p>I wanted something a little different &#8212; PWM H-bridge control of the servo&#8217;s motor for variable speed forward and backward and access to the potentiometer to detect position (crudely and at low speed) and count wheel rotations (acceptably and at high speed).  This is actually an easier modification &#8212; but, though I&#8217;m surely not the first to do it, I&#8217;ve not run across it before.  I started last night.</p>
<p><span id="more-1616"></span></p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2015/01/05/IMG_0309.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2015/01/05/IMG_0309_mid.jpg" alt="Tower SG90 Servo base with screws" /></a></p>
<p>The cute little SG90 has four screws holding its case together.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2015/01/05/IMG_0310.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2015/01/05/IMG_0310_mid.jpg" alt="Tower SG90 Servo with base removed" /></a></p>
<p>After removing them, the base can be pulled off, revealing the back of the motor and the back of the control board.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2015/01/05/IMG_0312.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2015/01/05/IMG_0312_mid.jpg" alt="Tower SG90 Servo motor and potentiometer" /></a></p>
<p>With the control board pulled out, it&#8217;s easy to see that the motor and potentiometer are wired exactly as would be expected; and nicely color-coded, making it easy to see how to rewire the servo.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2015/01/05/IMG_0316.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2015/01/05/IMG_0316_mid.jpg" alt="Tower SG90 Servo gearbox with cap removed" /></a></p>
<p>The top of the case also pops off to reveal the gearbox.  The output shaft is in the lower right and the two nubs on the back side of the output gear are the stop that prevents continuous rotation.  I snipped them off in place using a very sharp diagonal cutter.</p>
<p>Next steps:  Select wiring harnesses and rewire the motor and potentiometer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=1616</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Modifying a Harbor Freight Solar Charger</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=1408</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=1408#comments</comments>
		<pubDate>Wed, 22 Jun 2011 01:01:39 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Inside]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=1408</guid>
		<description><![CDATA[My dashboard solar charger is one of the more useful things I&#8217;ve bought from Harbor Freight. My van has some weak short-circuit and slowly drains the battery, and as I don&#8217;t use the van all that often, I was at risk of coming out to a completely drained battery. I now keep one of these [...]]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://www.harborfreight.com/15-watt-solar-battery-charger-44768.html">dashboard solar charger</a> is one of the more useful things I&#8217;ve bought from Harbor Freight.  My van has some weak short-circuit and slowly drains the battery, and as I don&#8217;t use the van all that often, I was at risk of coming out to a completely drained battery.  I now keep one of these on the dash and the battery is always topped off.  When I first connected it, the van was sitting in shade and the (old) automotive battery measured 5V (!); after a week it was up to 9V and after another week it was fully charged.  Now I don&#8217;t ever have to think about a drained battery again.  At about $20 list and $15 on sale, it&#8217;s a steal.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/19/DSCN8303.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/19/DSCN8303_mid.jpg" alt="Harbor Freight solar charger model 44768" /></a></p>
<p>The <a href="/bus/">bus conversion project</a> is languishing but not forgotten, and I&#8217;ve been wanting to put one of these chargers into the bus for the same reasons as I had for the van.  The wiring situation is a little different, though &#8212; the bus has no cigarette lighter / power port, I&#8217;m intending to wire 12VDC throughout the bus with <a href="http://www.andersonpower.com/products/standard-powerpole.html">Anderson power pole</a> connectors, and I might like to have multiple solar trickle chargers (even before I install larger solar panels on the roof).</p>
<p>The issue with multiple panels, and even with a single panel connected to a battery that will also be charged by the alternator, and even with a single panel that may still be connected to the battery at night, is that photovoltaic cells don&#8217;t like to have reverse voltage applied.  The photovoltaic effect happens in a semiconductor junction, and although I can no longer find the reference I was reading the other day, I still know the cell doesn&#8217;t do well with a reverse voltage and should really be diode-protected.</p>
<p>Because I wasn&#8217;t sure how much (if any) circuitry was in the panel and how much (if any) was in the automotive power plug connector, I had to take both apart to (A) make sure the panel would be diode-protected even after I chopped off the power plug and (B) see whether either held any relevant / useful circuitry.</p>
<p><span id="more-1408"></span></p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/19/DSCN8273.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/19/DSCN8273_mid.jpg" alt="Harbor Freight solar charger model 44768, interior" /></a></p>
<p>Panel &#8212; nope, nothing there.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/19/DSCN8284.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/19/DSCN8284_mid.jpg" alt="Harbor Freight solar charger model 44768 power plug, interior" /></a></p>
<p>Power plug &#8212; the LED that flashes while light is falling on the panel, a rectifier diode, and some passives.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/19/DSCN8290.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/19/DSCN8290_mid.jpg" alt="Harbor Freight solar charger model 44768 power plug, circuit board" /></a></p>
<p>Oh, and an integrated circuit under a glob of epoxy.</p>
<p>Hm, will that be some sort of power conversion or regulation circuit, or just the LED flasher?</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/19/DSCN8290-wiring.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/19/DSCN8290-wiring_mid.jpg" alt="Harbor Freight solar charger model 44768 power plug, circuit board, annotated" /></a></p>
<p>The ground wire comes in from the panel, is soldered to the board, and connects to a ground wire running to the plug&#8217;s sleeve terminal.  The positive wire comes in from the panel, is soldered to the board, and connects to the rectifier&#8217;s anode; the cathode connects to a positive wire running to the plug tip.  The epoxy blob is therefore just the LED flasher.</p>
<p>The flashing LED is kind of a nice indication that the panel is delivering power to the battery; but I&#8217;m going to dispose of the plug; it&#8217;s not worth transplanting the PCB to the panel enclosure; and I can tell it&#8217;s making power &#8217;cause I can see there&#8217;s sunlight falling on it.  Also, something in this unit is flaky and the LED sometimes doesn&#8217;t flash even when the unit appears to be working.</p>
<p>So I need to chop off the whole power plug and wire in Anderson power poles, and somewhere in between the panel and the connector I need a protection diode.  Might as well use the one from the circuit since it&#8217;s free, and it turns out to be a <a href="http://www.fairchildsemi.com/pf/1N/1N5817.html">1N5817 Schottky</a>.  The Schottky&#8217;s fast turnaround time isn&#8217;t important for this application &#8212; it would have been selected for its low forward voltage drop of .45V @ 1A and about .3V @ the 120mA for which the panel is rated.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/19/DSCN8322.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/19/DSCN8322_mid.jpg" alt="Harbor Freight solar charger model 44768 with diode moved to panel" /></a></p>
<p>Put the diode inline in the power cord or move it inside the panel?  Since the diode is there to protect the panel from damage, I&#8217;m of a mind that it should be integral to the panel assembly &#8212; hard to separate and hard to bypass.  There&#8217;s lots of room inside the case, so I moved the diode there and enclosed it in heatshrink.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/19/DSCN8326.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/06/19/DSCN8326_mid.jpg" alt="Harbor Freight solar charger model 44768, modified" /></a></p>
<p>Anderson power poles (the red and black connector at the center) are genderless connectors with generous metal-to-metal contact suitable for fairly high-current applications and popular in the amateur radio community.  The individual shells have notches in the sides to slide together into whatever configuration of multi-pin connector you want.</p>
<p>And because they&#8217;re genderless (rotate the connector 180&deg; and it would plug together with a connector sitting in its original position), they&#8217;re great for batteries &#8212; put the same connector on the battery, the battery charger, and your load, and you can pick any two devices to plug together.</p>
<p>This suits my plan for the bus:  run appropriate-gauge DC wiring throughout and anywhere there&#8217;s a drop, I could plug in an AC or solar charger, a 12VDC light, an automotive USB charger, etc.  Even before I do <em>all</em> the wiring, it still pleases me to have a cable coming from the battery into which I can easily plug the solar trickle charger, a small power inverter, or a USB charger.</p>
<p>My one concern is that everywhere I&#8217;ve seen power poles, red/black has been used for 12V connections; but the <a href="http://www.andersonpower.com/products/colorcode_pp.html">Anderson color code chart</a> lists that red signifies 24V and yellow should be used for 12V.  Yellow is a lot harder to find, not only in use but also to purchase.  Although it seems important to conform to Anderson&#8217;s <em>de jure</em> standard of yellow/&lt;what?&gt;, I think using anything other than the <em>de facto</em> standard of red/black risks confusing anyone else familiar with power poles.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=1408</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Modifying a Car USB Adapter to (Finally) Charge My Cell Phone</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=1345</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=1345#comments</comments>
		<pubDate>Sat, 28 May 2011 14:25:28 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Inside]]></category>
		<category><![CDATA[Repairs]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=1345</guid>
		<description><![CDATA[A couple of years ago, I received this automotive USB-connector power adapter as a promotion at a conference. I use it to keep my iPod nano charged in the car, but I&#8217;ve noticed it doesn&#8217;t charge my Blackberry well. To be precise, it doesn&#8217;t charge my Blackberry. In fact, I&#8217;ve never been clear whether it [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of years ago, I received this automotive USB-connector power adapter as a promotion at a conference.  I use it to keep my iPod nano charged in the car, but I&#8217;ve noticed it doesn&#8217;t charge my Blackberry well.  To be precise, it doesn&#8217;t charge my Blackberry.  In fact, I&#8217;ve never been clear whether it even slows the rate of discharge, and sometimes it seems like it speeds it.  The Blackberry shows the lightning bolt charging symbol (The charging symbol is a <em>lightning bolt</em>, srsly? Ben Franklin is personally charging my phone?) but nobody&#8217;s home.</p>
<p>Note that I don&#8217;t blame the vendor whose logo happens to be on it &#8212; I&#8217;m sure they didn&#8217;t manufacture it.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/15/IMG_1443.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/15/IMG_1443_mid.jpg" alt="Automotive USB power adapter" /></a></p>
<p>After driving two and a half hours a week ago starting with a half charge on my BlackBerry, plugging it in midway through the trip, and arriving to have the BlackBerry finally shut off its radio due to depleted charge; and due to being in the presence of Cort; I decided it was time to see why the adapter couldn&#8217;t provide enough charge for the BlackBerry.</p>
<h3>Inside the Power Adapter</h3>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/15/RT34063APS-step-down.png"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/15/RT34063APS-step-down_mid.png" alt="Sample step-down circuit using RT34063APS DC-DC converter" /></a></p>
<p><span id="more-1345"></span></p>
<p>After peering and squinting at the control IC, I deciphered the part number RT34063APS and found a datasheet for the DC-DC converter.  It contained no theory of operation but did provide one sample circuit for step-down conversion.  The IC maintains 1.25V across R<sub>1</sub>, so R<sub>2</sub> and R<sub>1</sub> (on this diagram &#8212; different part numbers in the device at hand) program the output voltage by dividing V<sub>OUT</sub>.  The values of 3.6K&Omega; and 1.1K&Omega; should program it for 5V operation.</p>
<p>R<sub>SC</sub> is supposed to program a current limit (SC is &#8220;sense current,&#8221; perhaps?), with the IC maintaining 330mV across V<sub>CC</sub> to V<sub>IPK</sub>.  I&#8217;m not clear on how that limits the current, but I&#8217;ll take their word for it.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/15/IMG_1433.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/15/IMG_1433_mid.jpg" alt="Automotive USB power adapter, interior" /></a></p>
<p>Having found the IC datasheet, the next order of business was creating a schematic of my power adapter.  I examined the PCB and positioned all the components in EAGLE, substituting a couple of four-pin connectors for the IC that doesn&#8217;t exist in my library.  After verifying I had captured all the connections, I rearranged the components on the schematic from their positions on the PCB to this more logical placement.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/15/USB-adapter-sch.png"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/15/USB-adapter-sch_mid.png" alt="Schematic of automotive USB power adapter" /></a></p>
<p>While I was working on that, Cort had hooked up the adapter to his bench power supply and fed it 12-13V.  He measured the output and got about 4.64V with no load around the same time I was finding that R<sub>2</sub> = 3.0K&Omega; and R<sub>3</sub> = 1.00K&Omega;, programming the circuit for 5.0V operation.</p>
<p>The issue is that the series diode D2 drops the output voltage by somewhere in the .6V &#8211; .8V range (from the 1N4007 datasheet, in the no-load to 200mA load range); and Cort measured 5.29V &#8211; 5.30V at D2&#8242;s anode.</p>
<p>Grrrrreat!  We&#8217;re calling this a 5V output, but due to the protection diode, feeding the output scarcely over 4.6V, and thinking that devices expecting 5V will charge on it!</p>
<h3>Works Fine with No Output Protection</h3>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/15/IMG_1439.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/15/IMG_1439_mid.jpg" alt="Automotive USB power adapter under load test" /></a></p>
<p>The first thing we did was pull D2 and replace it with a jumper wire.  No D2, no voltage drop.  5.30V output.  Great!</p>
<p>But then my conscience got the better of me.  D2 is obviously there to protect the DC-DC converter from a higher voltage where it&#8217;s expecting a load; and although I don&#8217;t <em>intend</em> to connect such a thing, who knows what may happen.</p>
<h3>Change the Voltage Divider?</h3>
<p/>
<table border=1 cellspacing=0 cellpadding=5 align=center>
<tr>
<th></th>
<th>Original</th>
<th>Change R3</th>
<th>Change R2</th>
<th colspan=3>Change Both</th>
</tr>
<tr>
<td colspan=7></td>
</tr>
<tr>
<td>R2</td>
<td>1000</td>
<td>1000</td>
<td><em>850</em></td>
<td>1200</td>
<td><em>935</em></td>
<td><em>1134</em></td>
</tr>
<tr>
<td>R3</td>
<td>3000</td>
<td><em>3528</em></td>
<td>3000</td>
<td><em>4234</em></td>
<td>3300</td>
<td>4000</td>
</tr>
<tr>
<td colspan=7></td>
</tr>
<tr>
<td>V(REG)</td>
<td>5</td>
<td>5.66</td>
<td>5.66</td>
<td>5.66</td>
<td>5.66</td>
<td>5.66</td>
</tr>
<tr>
<td>V(OUT)</td>
<td>4.34</td>
<td>5</td>
<td>5</td>
<td>5</td>
<td>5</td>
<td>5</td>
</tr>
<tr>
<td colspan=7></td>
</tr>
<tr>
<td>V(D1)</td>
<td>0.66</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<p>My next thought was to change the resistor values to regulate the voltage to 5.66V so the post-diode output would be 5V.  I made a spreadsheet and played around with substitutions for R<sub>2</sub> and R<sub>3</sub> but didn&#8217;t come up with any combination I loved using standard values.</p>
<h3>Diode in voltage regulation circuit</h3>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/27/DSCN8145.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/27/DSCN8145_mid.jpg" alt="Automotive USB power adapter with diode compensation in voltage regulation circuit" /></a></p>
<p>Finally I had a better idea, the one we stuck with.  We inserted a diode (a small-signal diode &#8217;cause it was easier to fit in place) between the regulated voltage and the top of the voltage divider.  It drops .6V &#8211; .7V from the regulated voltage before it gets sampled for the feedback circuit, so the voltage is regulated to about 5.6V &#8211; 5.7V, then D2 takes its .6V &#8211; .7V, and we get about 5.0V &#8211; 5.1V at the output like we oughtta.</p>
<table border=1 cellspacing=0 cellpadding=5 align=center>
<tr>
<th>Configuration</th>
<th>Load (Est)</th>
<th>Voltage</th>
</tr>
<tr>
<td>Internal 1.2K&Omega; drain</td>
<td>4.4mA</td>
<td>5.25V</td>
</tr>
<tr>
<td>560&Omega;</td>
<td>14mA</td>
<td>5.21V</td>
</tr>
<tr>
<td>2x 120&Omega;</td>
<td>90mA</td>
<td>5.13V</td>
</tr>
<tr>
<td>3x 120&Omega;</td>
<td>132mA</td>
<td>5.11V</td>
</tr>
<tr>
<td>5x 120&Omega;</td>
<td>216mA</td>
<td>5.09V</td>
</tr>
<tr>
<td>6x 120&Omega;</td>
<td>258mA</td>
<td>5.08V</td>
</tr>
<tr>
<td>15&Omega;</td>
<td>342mA</td>
<td>5.07V</td>
</tr>
<tr>
<td>10&Omega;</td>
<td>508mA</td>
<td>5.04V</td>
</tr>
<tr>
<td>8&Omega;</td>
<td>549mA</td>
<td>4.36V</td>
</tr>
</table>
<p>We were curious about the accuracy of its regulation, so Cort grabbed a resistor, hooked it up to the outputs with gator wires, and measured the output voltage.  It was a bit high but the load was very light, so we tried a lower-valued resistor to increase the load.  Then two, then more, and more, and more; and by the time we got to the 8&Omega; sand resistor we were giddy and cackling for no reason I can figure out in retrospect.</p>
<p>Looks like it has pretty good regulation up to about 500mA load, and we haven&#8217;t even monkeyed with R<sub>SC</sub> yet.  That should be plenty good to charge my phone.</p>
<h3>The Trial</h3>
<p>I drove two and a half hours home with my phone plugged in all the way.  I deliberately didn&#8217;t fully charge it the night before, so I started the trip with half a charge and ended with no charge.</p>
<p>You gotta be kidding me.</p>
<h3>USB Power Negotiation</h3>
<p>I&#8217;m familiar with the formal power negotiation a device is supposed to do with a USB hub (using a maximum of 100mA unless it negotiates more), but I also know that most devices can charge from power sources I&#8217;m pretty sure don&#8217;t have full-fledged negotiation in them.  And I started thinking about <a href="http://www.ladyada.net/make/mintyboost/icharge.html">Adafruit&#8217;s great writeup of charging iPhones with a MintyBoost</a>.</p>
<p>The bottom line is that iPhones want the USB data lines strapped to certain voltages to tell them &#8220;I&#8217;m not really USB but I&#8217;ll give you power.&#8221;  Not only that, but in later iPhones, different voltages inform the device of different amounts of current it&#8217;s allowed to draw.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/27/DSCN8150.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/27/DSCN8150_mid.jpg" alt="Automotive USB power adapter circuit board, back" /></a></p>
<p>I was back at Cort&#8217;s house Wednesday night and mentioned that I wanted the data lines strapped to 3.3V.  He asked whether I wanted him to fix my power adapter while I finished proofreading my conference presentation for Thursday, and we had a deal.</p>
<p>Looks like he used 10K&Omega; and 15K&Omega; on the 5Vish output to give me 3V on the data lines.  We weren&#8217;t sure whether we needed a separate voltage divider on each data line like the MintyBoost uses, but when we plugged in my Blackberry the current draw (as registered by the power supply) jumped from 72mA to 290mA.</p>
<p>I&#8217;d forgotten my USB charging cable at home so didn&#8217;t get a chance to charge the Blackberry on the return trip, but the huge increased draw on the adapter&#8217;s supply side is a pretty good sign that I&#8217;m really finally charging.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=1345</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Guest Post: LEDs and Ping-Pong Balls to Replace 10W Sign Bulbs</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=1286</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=1286#comments</comments>
		<pubDate>Fri, 25 Mar 2011 17:12:47 +0000</pubDate>
		<dc:creator>Cort Buffington (n0mjs)</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[LEDs]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=1286</guid>
		<description><![CDATA[My friend Cort Buffington doesn&#8217;t have an active blog of his own but is doing interesting things with 110VAC light bulbs and is looking for ways to migrate to LEDs. What follows is a write-up of his tests with LEDs and ping-pong-ball diffusers. Cort&#8217;s Quest for 10W Sign Bulb Replacements For some time I&#8217;ve been [...]]]></description>
			<content:encoded><![CDATA[<p>My friend Cort Buffington doesn&#8217;t have an active blog of his own but is doing interesting things with 110VAC light bulbs and is looking for ways to migrate to LEDs.  </p>
<p><a href="http://gallery.me.com/n0mjs#100096&#038;view=grid&#038;bgcolor=black&#038;sel=22"><img src="http://gallery.me.com/n0mjs/100096/IMG_0957/web.jpg?ver=13010215230001" alt="Star Seq'r and disco ball" /></a></p>
<p>What follows is a write-up of his tests with LEDs and ping-pong-ball diffusers.</p>
<h3>Cort&#8217;s Quest for 10W Sign Bulb Replacements</h3>
<p>For some time I&#8217;ve been trying to figure out how to make an LED equivalent to a 10W colored sign bulb. Whether it be the G style intermediate base or the S style medium base. The big problem has been a diffuser. Sign bulbs are meant to be looked at, not to illuminate other things, so this is of paramount importance. I very quickly came across a LOT of information online with folks using ping pong balls, and Keith was just as eager as I to try this out. The initial tests with ping pong balls worked&#8230;. sort of. Ping pong (or beer pong if you&#8217;re in college) balls  do work, but there are a couple of immediate problems:</p>
<p><span id="more-1286"></span></p>
<h3>Brightness</h3>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/12/IMG_0610.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/12/IMG_0610_mid.jpg" alt="super-bright yellow LED shows a hot spot" /></a></p>
<p>Trying to get a light level similar to a sign bulb with an LED in a ping pong ball is a trick. Well diffused LEDs aren&#8217;t bright enough, while so called &#8220;super-bright&#8221; LEDs often have entirely too narrow of a beam, resulting in hot/cold spots on the ball. I have read many a post with folks scuffing LEDs, cutting the ends off, etc. I tried all of these methods, and while they do work, they weren&#8217;t producing the results I wanted.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/12/IMG_0615.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/12/IMG_0615_mid.jpg" alt="Flat-top 180 degree LED" /></a></p>
<p>So what did I do? Nothing scientific to be sure. I went through my drawer of assorted LEDs and nothing was looking good. Then I happened to pop an odd shaped (cylindrical) white LED that Keith &#8220;loaned&#8221; me into the ball and bazinga! It worked perfectly. I immediately contacted Keith to get info on where he got the LED. As it turns out, there are cylindrical (not inverted cones, but completely cylindrical) LEDs that have very close to a 180 degree beamwidth. I purchased several colors from C-LEDs from <a href="http://c-leds.com/store/category.php?id_category=10">this category</a> and they work perfectly. While there, I found they also have super-bright diffused LEDs in <a href="http://c-leds.com/store/category.php?id_category=132">this category</a> which work almost identically, despite very different mcd ratings.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/12/IMG_0616.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/12/IMG_0616_mid.jpg" alt="Yellow in a white ball washes out" /></a></p>
<p>Everything worked except for the yellow. I could not get a good yellowy yellow or find one bright enough&#8230;. and one other nagging problem. The white balls reflect room light really well. So unlike a light bulb, they wash out in room light very quickly with colored LEDs in them. If the room is dark, they&#8217;re great, but it doesn&#8217;t take too much light for the ambient light reflection to start competing with the interior illumination.</p>
<h3>Colored Ping Pong Balls</h3>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/12/IMG_0618.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/12/IMG_0618_mid.jpg" alt="White in a yellow ball looks good." /></a></p>
<p>In order to fight the white-ball-illuminated-by-ambient-light problem, I ordered some colored ping pong balls. I also had an idea that I would use a super-bright white LED inside a yellow ball to overcome the yellow brightness problem. I had tried dying, coloring, painting&#8230;. nothing worked to make a white ball a colored ball (that looked good with an LED in it) other than just buying colored balls.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/12/IMG_0620.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/12/IMG_0620_mid.jpg" alt="White in a red ball is dim" /></a></p>
<p>Unfortunately, I now had a new problem. I fixed the yellow issue, but now red was dismally dim. Blue wasn&#8217;t that great either, but I could live with it. I also immediately grew to like the colored ball appearance when the LED is not on also. But what to do about red?</p>
<h3>Back to Colored LEDs</h3>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/12/IMG_0622.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/12/IMG_0622_mid.jpg" alt="Red in a red ball looks good" /></a></p>
<p>This was the final solution to the problem. I found by inserting a red LED into the red ball, the brightness came WAY up. Perfect. In fact, this technique helped out the blue as well, while yellow and green both looked best using a white LED in a colored ball.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/11/ping-pong-leds.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/11/ping-pong-leds_mid.jpg" alt="Ping-pong balls with LEDs" /></a></p>
<p>There is a bit of variance in the luminosity of the balls now, but not much, and a variance easily fixed by reducing the current to the brighter two colors just slightly. The photo above shows the finished &#8220;product&#8221; in a dark room. Note there are some &#8220;challenges&#8221; with the CCD in my camera, the far left is green and far right is blue. In addition to some color problems, the camera also shows &#8220;hot spots&#8221; on both the red and blue balls that are not actually present.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=1286</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PCB Milling with the MakerBot CupCake:  Aluminum Leveling Platform</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=1302</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=1302#comments</comments>
		<pubDate>Sun, 20 Mar 2011 03:02:14 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[CNC]]></category>
		<category><![CDATA[Equipment]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[MakerBot CupCake]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=1302</guid>
		<description><![CDATA[Last weekend I got my Dremel rigidly mounted in my CupCake for PCB milling, but the platform holding the PCB was attached with double-stick foam and was being deflected by the milling bit cutting the copper, causing considerable deviation from the intended milling path. Last night Steve cut some more aluminum plate for me and [...]]]></description>
			<content:encoded><![CDATA[<p>Last weekend <a href="?p=1294">I got my Dremel rigidly mounted in my CupCake for PCB milling</a>, but the platform holding the PCB was attached with double-stick foam and was being deflected by the milling bit cutting the copper, causing considerable deviation from the intended milling path.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/19/DSCN7917.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/19/DSCN7917_mid.jpg" alt="Leveling platform in MakerBot CupCake" /></a></p>
<p>Last night Steve cut some more aluminum plate for me and today I assembled a rigidly-mounted leveling platform to replace the stock build platform.  The lower plate has holes matching the machine screws attaching the top of the Y stage, and I used slightly longer screws to bolt through both the aluminum plate and the original wood top into the Y carriage.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/19/DSCN7925.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/19/DSCN7925_mid.jpg" alt="Leveling screw with nylock nut, upper view" /></a></p>
<p>I drilled holes in the corners, tapped the upper plate, and enlarged the holes in the lower plate.  The socket-head cap screws spin freely in the lower plate while adjusting the upper plate&#8217;s height (I used a continuity meter to check when the milling bit was just barely touching the plate in each corner); then the nylon-insert nuts lock the screws in position.  The whole assembly is quite rigid once tightened.</p>
<p>A number of designs for leveling build platforms use only springs between the two plates.  I was concerned that without a nut, the machine screws might back out under vibration.  Also, when extruding, having a platform with some give reduces the damage if you miscalculate the Z position and gouge the platform; but for milling, the whole point of this replacement is to remove any play in the platform.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/19/DSCN7939.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/19/DSCN7939_mid.jpg" alt="PCB milled in MakerBot CupCake" /></a></p>
<p>The results were not tremendously better than before (left board, top row of pads; right board from commercial mill for comparison), so I slowed the feed rate to .1&#8243; per minute and let the mill finish the rest of the board for five hours, just to see whether I could produce usable traces.  The traces cut at an outrageously slow feed rate are much better than previous results, but still a bit, shall we say, <em>interpretive</em> for my taste.</p>
<p>Having watched the Dremel bit trying to cut the copper and having tested it handheld out of the machine, I do recognize that it&#8217;s not the right bit for this job.  I have some carbide engraving bits recommended by Pierre (exuinoxefr) on the way from Hong Kong, and I think they&#8217;ll make a significant difference.  In April.</p>
<p>Meanwhile, note the three pads in the center of the board.  Even at only one stepper motor step per second, the board took a very consistently incorrect path under the toolhead.  Also note that the diagonal lines look like they were drawn with a left-handed quill pen &#8212; NE/SW lines are thicker than NW/SE.</p>
<p>I believe this is caused by the considerable play between the original CupCake bushings and the guide rods.  Tighter bushings would cause more friction, so they were chosen for a bit of a loose fit.  Even though the platform is now rigidly mounted on the Y carriage, the Y carriage wiggles on the Y guide rods and the X-Y carriage wiggles on the X guide rods.</p>
<p>I&#8217;m extremely interested in the <a href="http://www.thingiverse.com/thing:4213">Mendel-inspired replacement X-Y assembly</a> by Thingiverse contributor &#8220;twotimes.&#8221;  It replaces the bushings with sets of roller bearings spaced around the guide rods; the bearings can be tightened against the rods and still roll smoothly.  I intend to get in touch and ask whether it successfully removes the play from the carriages.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/19/DSCN7913.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/19/DSCN7913_mid.jpg" alt="Leveling platform in MakerBot CupCake, closeup" /></a></p>
<p>Although my immediate interest is whether I can use the CupCake that I already own as a PCB milling machine, the enhancements I&#8217;m making will improve it as a filament deposition machine as well.  The lack of leveling in my heated build platform prevented me from printing larger models; I&#8217;ve already drilled my heated platform to fit interchangeably into this new system.  Smoother X-Y action from a replacement carriage can only help, too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=1302</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>PCB Milling with the MakerBot CupCake: Aluminum Z-Stage Supplement for Rigid Dremel Mounting</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=1294</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=1294#comments</comments>
		<pubDate>Mon, 14 Mar 2011 02:22:29 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[CNC]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[MakerBot CupCake]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=1294</guid>
		<description><![CDATA[In my previous attempt to trace-isolation-mill a PCB with my MakerBot CupCake, the CupCake&#8217;s entire acrylic Z platform (intended to support the light weight of the filament heater and extruder) was flexing under the torque of the Dremel bit dragging through the copper layer of the PCB. This week I picked up 1/4&#8243; aluminum plate [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="?p=1282">previous attempt to trace-isolation-mill a PCB with my MakerBot CupCake</a>, the CupCake&#8217;s entire acrylic Z platform (intended to support the light weight of the filament heater and extruder) was flexing under the torque of the Dremel bit dragging through the copper layer of the PCB.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/13/DSCN7882.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/13/DSCN7882_mid.jpg" alt="MakerBot CupCake with aluminum Z-stage reinforcement and Dremel mount" /></a></p>
<p>This week I picked up 1/4&#8243; aluminum plate at the yard to reinforce the Z stage and support a more rigid Dremel mount.  <a href="http://www.atwoodstudio.com/">Steve Atwood</a> printed the <a href="http://www.thingiverse.com/thing:457">DXF of the MakerBot Z stage mechanical drawing</a> for me, which I used as a template to drill and tap holes matching those in the acrylic (forgetting, unfortunately, to double-check the accuracy of the feed rate on Steve&#8217;s inkjet printer &#8212; but I compensated for the resulting aspect ratio problem with a file).</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/13/DSCN7887.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/13/DSCN7887_mid.jpg" alt="MakerBot CupCake with aluminum Z-stage reinforcement and Dremel mounted" /></a></p>
<p>I put together a good-enough Dremel mount with plastic from the visual arts scrap bin.  Initially I lined the mounting hole with foam weatherstripping, but the Dremel was wiggling just a bit even with the clamp tightened down.  It&#8217;s less wiggly without the foam.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/13/DSCN7902.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/13/DSCN7902_mid.jpg" alt="Circuit board milled on MakerBot CupCake" /></a></p>
<p>The multi-pass milling looks like someone applied a GIMP randomizing filter to the original pattern, but at least the bit <em>is</em> consistently cutting the copper.  The Dremel mount isn&#8217;t flexing any more &#8212; the irregularity is from the double-stick foam I used to attach the milling platform to the XY stage; the platform and board were swaying significantly under the bit.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=1294</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PCB Milling with the MakerBot CupCake and a Dremel (Almost)</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=1282</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=1282#comments</comments>
		<pubDate>Tue, 08 Mar 2011 04:53:56 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[CNC]]></category>
		<category><![CDATA[Equipment]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[MakerBot CupCake]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=1282</guid>
		<description><![CDATA[My Dremel&#8217;s spindle had much more solid bearings than the Handy Grinder, so I mounted it in the CupCake tonight to try milling with it. It fit even worse through the Z stage than the Handy Grinder, but I remember having said something about the drill not even needing to be vertical as long as [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/07/DSCN7843.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/07/DSCN7843_mid.jpg" alt="Dremel mounted in MakerBot CupCake (lower view)" /></a></p>
<p>My Dremel&#8217;s spindle had much more solid bearings than the Handy Grinder, so I mounted it in the CupCake tonight to try milling with it.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/07/DSCN7854.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/07/DSCN7854_mid.jpg" alt="Dremel mounted in MakerBot CupCake (upper view)" /></a></p>
<p>It fit even worse through the Z stage than the Handy Grinder, but I remember having said something about the drill not even needing to be vertical as long as the bit&#8217;s tip made contact with the workpiece.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/07/DSCN7859.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/07/DSCN7859_mid.jpg" alt="Dremel milling PCB in MakerBot CupCake" /></a></p>
<p>The XY platform wasn&#8217;t quite level (deeper cutting on the right than the left); but the real problem was that the Z stage was <em>flexing</em>.  Not lifting off the Z stage guides &#8212; I could feel the acrylic bending as the tool direction changed.  This demanded backing off the Z axis to an extremely shallow, ineffective cut to keep the milling tip from tracking the cutting direction as it did with the Handy Grinder.</p>
<p>Increasing the rigidity of the Z stage by bolting a large plate to it while mounting the Dremel is my top priority for getting closer to usable performance.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/07/DSCN7863.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/07/DSCN7863_mid.jpg" alt="PCB after milling attempts" /></a></p>
<p>Straight off the mill after a variety of different attempts on the same workpiece.  Parts of it almost look usable &hellip;</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/07/DSCN7874.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/07/DSCN7874_mid.jpg" alt="PCB after milling attempts, sanded" /></a></p>
<p>But sanded, it&#8217;s clear that in most places the bit barely scratched the copper and wasn&#8217;t even close to scoring through, because of the obligatory shallow cut.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=1282</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>PCB Milling with the MakerBot CupCake (Almost)</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=1276</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=1276#comments</comments>
		<pubDate>Mon, 07 Mar 2011 02:11:41 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[CNC]]></category>
		<category><![CDATA[Equipment]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[MakerBot CupCake]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=1276</guid>
		<description><![CDATA[I crave a CNC mill for trace-isolation milling prototype PC boards and I haven&#8217;t managed to get my CupCake filament deposition machine calibrated so I can use it. (Build platform leveling and filament feed are my current showstoppers. I&#8217;ll get back to it.) I knew that someone had proposed mounting a Dremel in place of [...]]]></description>
			<content:encoded><![CDATA[<p>I crave a CNC mill for trace-isolation milling prototype PC boards and I haven&#8217;t managed to get my CupCake filament deposition machine calibrated so I can use it.  (Build platform leveling and filament feed are my current showstoppers.  I&#8217;ll get back to it.)</p>
<p>I knew that someone had <a href="http://wiki.makerbot.com/forum/t-152342/turning-cupcake-into-a-subtractive-cnc">proposed mounting a Dremel in place of the CupCake&#8217;s extruder</a> and that MaskedRetriever had modeled a <a href="http://www.thingiverse.com/thing:632">mounting bracket</a>; but curiously, I haven&#8217;t heard any more about using the CupCake for milling.  Surely someone has done it; I just haven&#8217;t run across it.</p>
<p>Last night while I was asleep, the facts and the immediacy of the situation came together:  EAGLE can output trace-isolation g-code and ReplicatorG reads g-code and drives the CupCake.  Really???  PCB trace-isolation milling is that simple???</p>
<p>Yes.  Yes it is.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/DSCN7806.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/DSCN7806_mid.jpg" alt="Circuit board layout drawn with pen in MakerBot CupCake" /></a></p>
<p><span id="more-1276"></span></p>
<h3>PCB-GCode</h3>
<p>I have plenty of sample PCB layouts I could use for testing and I knew exporting trace-isolation g-code from EAGLE required a User Language Program (ULP) but couldn&#8217;t remember the details.  It turns out to be the marvelous <a href="ftp://ftp.cadsoft.de/eagle/userfiles/ulp/pcb-gcode-3.3.2.zip">PCB-GCode</a> written by John Johnson, which is a free download from <a href="http://www.cadsoftusa.com/cgi-bin/download.pl?page=/home/cadsoft/html_public/download.htm.en&#038;dir=eagle/userfiles/ulp">CadSoft&#8217;s user-contributed ULP page</a>.  Don&#8217;t be distracted by pcb-gcode-wizard; it&#8217;s a viewer you can use after running PCB-Gcode.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/EAGLE-directories.png"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/EAGLE-directories.png" alt="EAGLE directory path configuration dialog" /></a></p>
<p>As noted in a <a href="http://pcbgcode.org/read.php?15,165">forum post</a>, if you have multiple directories in your ULP search path, PCB-Gcode only finds its supporting files in the first directory listed.  Be sure to unzip it to the application ULP directory (not my first choice, as it&#8217;s overwritten every time a new EAGLE version is installed) or list your private ULP directory first (not my first choice, as that leads to a long directory-clicking experience every time you want to run an EAGLE-supplied ULP).</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/PCB-GCode-setup.png"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/PCB-GCode-setup_mid.png" alt="PCB-GCode setup screen" /></a></p>
<p>You begin by telling PCB-GCode a little about your milling machine, including positions and feed rates (and that ReplicatorG wants dimensions in mm).  Once configured, running PCB-GCode is almost anticlimactic.  It flashes some things on and off in your board layout while it figures toolpaths, then drops several <code>*.nc</code> g-code files in your directory.  ReplicatorG really likes g-code files to be named <code>*.gcode</code>, so I copied the top-side file accordingly.</p>
<h3>Testing with a Pen</h3>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/DSCN7804.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/DSCN7804_mid.jpg" alt="Pen mounted in MakerBot CupCake" /></a></p>
<p>To be sure PCB-GCode&#8217;s output was compatible with ReplicatorG, I first loaded the resulting g-code file and ran the CupCake with the extruder still mounted, far above the build platform.  It appeared to be moving the platform appropriately.</p>
<p>Next I wanted to test that the orientation and scale were as I expected, and for that I needed a bit more permanent record of the movements of the machine.  I used the extruder&#8217;s dino mounts to mark four hole positions on a stick, drilled another hole for a pen, mounted it on the Z stage, and had a $0 version of the $85 <a href="http://store.makerbot.com/makerbot-unicorn-pen-plotter-kit.html">Unicorn pen plotter</a>.</p>
<p>I attached a spare <a href="?p=835">acrylic base plate from my heated build platform</a> to the Y stage with double-stick foam, covered it with a cutout from a cereal box, and taped paper to that.</p>
<p>As shown above, EAGLE &rarr; CupCake pen plotter worked great!  Orientation and scale were as expected on the first try; and I got to see the multi-pass isolation milling, which should ease some of my troubles with solder bridging over milled gaps.</p>
<h3>Milling</h3>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/DSCN7832.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/DSCN7832_mid.jpg" alt="Handy grinder and Dremel bit packaging" /></a></p>
<p>For my milling attempt, I turned to the Handy Grinder (tastes like real octopus!) that I bought a <em>loooong</em> time ago with the intent of building a CNC drill/mill.  The advantage it offers over a Dremel is that it&#8217;s nearly cylindrical &#8212; and almost exactly 1.75&#8243; diameter &#8212; so instead of making a fancy mount, I used a hole saw to cut a recess in the side of another stick, lined the recess with a couple of strips of adhesive foam, and held the tool in place with zip ties.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/DSCN7825.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/DSCN7825_mid.jpg" alt="Handy grinder mounted in MakerBot CupCake" /></a></p>
<p>Sure, it&#8217;s eccentric in the Z stage&#8217;s extruder hole; but with no homing system, I&#8217;m eyeballing the starting position anyway.  Frankly, the tool doesn&#8217;t even need to be perfectly vertical &#8212; as long as the point of the milling bit is the first thing to contact the work surface, it&#8217;ll do the job.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/DSCN7816.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/DSCN7816_mid.jpg" alt="Old PC board barely scratched by milling attempt" /></a></p>
<p>Well, it <em>would</em> do the job if it were up to the job.  Unfortunately, the Dremel bit isn&#8217;t the right shape for milling copper, as you can see by the ferocious blows (er, gentle scratches) it dealt the PCB; and the Handy Grinder collet&#8217;s runout is tremendous, as you can see by the mill marks that double back on themselves as the collet bent along with the PCB movement.  Nope, this combination is not going to work.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/DSCN7836.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/03/06/DSCN7836_mid.jpg" alt="Handy grinder, collet view" /></a></p>
<p>That&#8217;s a whole lotta collet and not nearly enough bearing.  That&#8217;s also a pseudo end mill that I tried after the V-grooving bit, with no better results.</p>
<p>And I was <em>so close</em>!</p>
<p>Looks like I need to go shopping for a new spindle and for a proper milling bit.  Suggestions welcome, even if the right tool has a complex profile so I can&#8217;t simply use a hole saw to make a mounting system out of a stick.</p>
<p>I do think the method is viable.  My Z stage is an early enough model that it can lift right off the nuts on the threaded rods; but I can add retaining plates if the right spindle and bit need more downward pressure than their own weight.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=1276</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Temperature Deviation Alarm Board for PID Crockpot Controller</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=1222</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=1222#comments</comments>
		<pubDate>Fri, 11 Feb 2011 23:05:22 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=1222</guid>
		<description><![CDATA[After assembling my PID crockpot controller, I successfully cooked a couple of medium KC strips at 60&#176;C. When I tried to cook medium-rare at 55&#176;C, though, I kept finding the temperature at 59&#176;C. Not believing that I&#8217;m destined to eat medium steaks for the rest of my life, I want to fix this. My first [...]]]></description>
			<content:encoded><![CDATA[<p>After assembling my <a href="?p=1199">PID crockpot controller</a>, I successfully cooked a couple of medium KC strips at 60&deg;C.  When I tried to cook medium-rare at 55&deg;C, though, I kept finding the temperature at 59&deg;C.  Not believing that I&#8217;m destined to eat medium steaks for the rest of my life, I want to fix this.</p>
<p>My first guess about what&#8217;s happening is that the crockpot is well-enough insulated that the controller&#8217;s longest delay for how often it turns on the heat is still too short.  If so, I may get better control using the crockpot on its (dumb) low heat setting, which could be activated more frequently without driving the temperature as high.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/02/DSCN7713.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/02/DSCN7713_mid.jpg" alt="PID crockpot controller with temperature deviation alarm LEDs" /></a></p>
<p>Regardless, if I can&#8217;t trust the controller to control, I need a monitor external to the controller to let me know when the temperature has gone out of range so I know I don&#8217;t yet have a satisfactory system.  Although the immediate problem was overheating, I should also like to know about undertemperature problems as well.  Happily, the controller has temperature deviation alarms; but less happily, they are momentary and only show when the temperature is <em>currently</em> out of range.  Enter the alarm latch.</p>
<p><span id="more-1222"></span></p>
<h3>Alarm Latch Board</h3>
<p>I want to capture when the PID controller alerts that the actual temperature is above or below the target temperature by more than a threshold, and I want to latch the fact that the deviation occurred until I come pay attention to it and reset the alarm in preparation for the next error.</p>
<p>A simple S-R latch suffices for my needs and I had 74*279s in my parts bin.  When a 74*279&#8242;s <span style="text-decoration: overline">S</span> (set) input goes low, the Q output goes high; when the <span style="text-decoration: overline">R</span> (reset) input goes low, the Q output goes low.</p>
<p>An S-R latch produces indeterminate output when both <span style="text-decoration: overline">S</span> and <span style="text-decoration: overline">R</span> are asserted at the same time &#8212; but as this would only happen if I were trying to reset the alarm while the deviant condition was still occurring, I don&#8217;t mind so much.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/01/temp-alarm-rs-latch.png"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/01/temp-alarm-rs-latch_mid.png" alt="SR latch schematic" /></a></p>
<p>The PID controller has three pins for output alarms, labeled as ALM1 and ALM2 (both normally open) and common.  From the sound when an alarm actuates, I believe these are implemented by small electromechanical relays.</p>
<p>In order to pull down the latch&#8217;s <span style="text-decoration: overline">S</span> input when the alarm triggers, I connected the PID controller&#8217;s alarm common pin to ground and put a pull-up resistor on each alarm line.</p>
<p>In order to pull down the latch&#8217;s <span style="text-decoration: overline">R</span> input when I press the reset button, I connected one side to ground and put a pull-up resistor on the reset line.</p>
<p>Milled, tinned, and assembled:</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/01/DSCN7676.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/01/DSCN7676_mid.jpg" alt="PID controller deviation alarm latch board, front side" /></a></p>
<p>The outward-facing side of the board has the components that protrude through the front panel: the LEDs and reset button.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/01/DSCN7668.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/01/DSCN7668_mid.jpg" alt="PID controller deviation alarm latch board, back side" /></a></p>
<p>The inward-facing side of the board has everything else.</p>
<p><strong>Lesson learned:  Use bigger pads and smaller holes on milled boards.</strong>  The small trace isolation and lack of soldermask make for <em>very</em> easy solder bridging; and the large, untinned gap between the pad and the component lead sitting inside an unplated hole occasionally makes for very difficult solder bridging.</p>
<p>Because of the bridging problem, I tested for (inappropriate) continuity after soldering every joint &#8212; it&#8217;s much easier to fix problems when I know exactly where the problems must be.</p>
<h3>Rebuilding the Front Panel</h3>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/02/DSCN7679.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/02/DSCN7679_mid.jpg" alt="PID crockpot controller with new front panel layout (open)" /></a></p>
<p>I tried marking panel drill locations through the PCB&#8217;s holes with a center punch, but I&#8217;m a pretty poor machinist; zoom on the loose panel&#8217;s lower right mounting screw for a glimpse of only one of my many transgressions.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/02/DSCN7687.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/02/DSCN7687_mid.jpg" alt="PID crockpot controller new front panel layout" /></a></p>
<p>In an attempt to pretend I&#8217;m better than that (or, to reconcile my high standards with my low abilities), I laid out the front panel in OpenOffice Draw, printed it at 1:1 scale, and rubber-cemented it to a new piece of plastic.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/02/DSCN7692.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/02/DSCN7692_mid.jpg" alt="Vertical milling plastic control panel" /></a></p>
<p>Rather than cut the PID controller&#8217;s mounting hole by running a knife against a rule (over and over and over and over) like last time, I ran the panel along a fence clamped to my Dremel drill press table in an impromptu vertical milling setup.  (Yes, that is a routing bit.)</p>
<p>I knew that moving the workpiece from right to left would produce the cleanest cut but forgot it would also cause the bit&#8217;s rotation to pull the workpiece away from the fence.  I practiced on a scrap piece (also known as the previous panel) and ended up making a L-R pass to cut and a R-L pass to clean.</p>
<p>I was able to drill my precisely-marked holes quite adequately on the mini drill press.</p>
<p>I <em>so</em> need a CNC mill.</p>
<h3>Controller (Re)assembly</h3>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/06/DSCN7742.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/02/06/DSCN7742_mid.jpg" alt="PID crockpot controller interior" /></a></p>
<p>The TTL latch board necessitated the addition of a 5V power supply and the addition of a cutie 5V switcher module from eBay necessitated reorganization of the controller&#8217;s contents.  Everything is now nicely hot-glued down and all the AC wiring is replaced with new 16-gauge.  (I was surprised no one commented on the temporary undersized wiring in my first assembly.)</p>
<p>The PID controller&#8217;s ratcheting collar that&#8217;s supposed to clamp it to the panel is a little too big to fit inside the case, so the controller wasn&#8217;t quite rigid with respect to the panel.  A couple of rubber feet stuck to the interior of the case top and bottom grip it in position quite nicely.</p>
<p>I also bought some thermocouple jacks so I no longer have to screw its connector pins into the old barrier strip every time I use the crockpot.  Need to design and print a nice panel-mount bracket for the jack.</p>
<h3>So?</h3>
<p>Erm.  Yes.  Does it work well.</p>
<h4>Forgot to update inputs</h4>
<p>The schematic shown here is not in fact what I constructed.  Because I still remember when ICs could sink more current than they could source, I&#8217;m in the habit of wiring LEDs between V<sub>CC</sub> and an output rather than between an output and ground, and that&#8217;s how I initially drew this circuit.  Consequently the alarm lines were then connected to the <span style="text-decoration: overline">R</span> inputs so that the alarms would reset the outputs to low, turning on the LEDs.</p>
<p>Then I had the presence of mind to test whether the 74*279&#8242;s outputs were predictably high or low after being powered up and before inputs were applied (the power-up state is not guaranteed); and lo!, they boot low.</p>
<p>How sharper than a serpent&#8217;s tooth would it be to have to press reset every time I powered on the controller, methinks, knowing that I could have wired it so I had not have had to.  So exeunt LEDs to V<sub>CC</sub> and enter LEDs to ground.</p>
<p>Alas, I failed to exeunt omnes and instead left the <span style="text-decoration: overline">S</span> and <span style="text-decoration: overline">R</span> inputs as they were; so now my controller powers up with the LEDs off, I press reset, the LEDs come on, and I curse the fool who laid out the alarm board.</p>
<h4>Actual PID controller alarm capabilities</h4>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2009/05/03/DSCN3662.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2009/05/03/DSCN3662_mid.jpg" alt="PID controller" /></a></p>
<p>Lo!, were this my only shortcoming, I would praise the day of my good fortune; but some fool also neglected to compare the actual model of PID controller he owned with the capability list in the datasheet &#8212; the list, that is, of which of the controller&#8217;s copious <em>possible</em> capabilities are actually present in the particular controller owned by the fool.</p>
<p>Such as, for example, the presence of (oh, I shudder even to type these words) <em>only one alarm implemented</em> in my controller.</p>
<p>Some fool also failed to <em>test</em> the alarm feature before building an external latching board.  Had he done so, he might have discovered that in spite of the controller being quite clearly labeled as a model with &#8220;Deviation high alarm,&#8221; <em>not</em> &#8220;Deviation high alarm with hold action,&#8221; it appears in practice to have hold action.</p>
<p>That&#8217;s right &#8212; not only are the LEDs on when they should be off; but one of them will never do anything; and the entire latch board is superfluous because the controller&#8217;s onboard LEDs, in spite of the designation on the datasheet, latch.</p>
<p>Sigh.</p>
<p>At least after all this, I can still know &#8212; as planned &#8212; when the temperature climbs above the target.  I am cooking some lukewarm water for dinner right now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=1222</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
