<?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>joebrown.org.uk</title>
	<atom:link href="http://www.joebrown.org.uk/wp/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.joebrown.org.uk/wp</link>
	<description>Belief in Divine Intervention shown to be worthless, so I&#039;ve done this stuff myself.</description>
	<lastBuildDate>Wed, 16 May 2012 08:59:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A Newcastle Quayside Walk</title>
		<link>http://www.joebrown.org.uk/wp/?p=8445</link>
		<comments>http://www.joebrown.org.uk/wp/?p=8445#comments</comments>
		<pubDate>Tue, 15 May 2012 11:26:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Observation]]></category>
		<category><![CDATA[Places and People]]></category>
		<category><![CDATA[Gateshead]]></category>
		<category><![CDATA[High-Level Bridge]]></category>
		<category><![CDATA[Millenium Bridge]]></category>
		<category><![CDATA[Newcastle]]></category>
		<category><![CDATA[SAGE Building]]></category>
		<category><![CDATA[Tyne Bridge]]></category>

		<guid isPermaLink="false">http://www.joebrown.org.uk/wp/?p=8445</guid>
		<description><![CDATA[<p>A few posts ago, I displayed a few photos of a depressing walk around Gateshead Town Centre, and appended a link to a zip file containing the complete set of photos I took on the walk.</p>
<p>As a (stark) contrast, this post shows one or two photos of the Newcastle and Gateshead Quayside development, and again [...]]]></description>
			<content:encoded><![CDATA[<p>A few posts ago, I displayed a few photos of a depressing walk around Gateshead Town Centre, and appended a link to a zip file containing the complete set of photos I took on the walk.</p>
<p>As a (stark) contrast, this post shows one or two photos of the Newcastle and Gateshead Quayside development, and again I&#8217;ve appended the full set of photos as a zip archive should anyone wish to look at these. </p>
<p>As with the walk last month, I&#8217;ve included an annotated map, showing my stroll, and also provided a text description for each photo.</p>
<p>I leave you to make your own mind up regarding comparisons that can be drawn from the two walk&#8217;s photos.<br />
<div class="wp-caption alignnone" style="width: 744px"><img alt="Route of Walk." src="http://joebrown.org.uk/images/anottated_walkMay12th.png" title="Route of Walk." width="734" height="580" /><p class="wp-caption-text">Route of Walk.</p></div></p>
<div class="wp-caption alignnone" style="width: 1010px"><img alt="View (south) of Hilton Hotel Gateshead" src="http://joebrown.org.uk/images/HiltonHotel.JPG" title="View (south) of Hilton Hotel Gateshead" width="1000" height="750" /><p class="wp-caption-text">View (south) of Hilton Hotel Gateshead</p></div>
<div class="wp-caption alignnone" style="width: 1010px"><img alt="I call this one Arcs - I hope you can see why." src="http://joebrown.org.uk/images/Arcs.JPG" title="I call this one Arcs - I hope you can see why." width="1000" height="750" /><p class="wp-caption-text">I call this one &#39;Arcs&#39; - I hope you can see why.</p></div>
<div class="wp-caption alignnone" style="width: 1010px"><img alt="Blinking Bridge" src="http://joebrown.org.uk/images/BlinkingBridge.JPG" title="Blinking Bridge" width="1000" height="750" /><p class="wp-caption-text">Blinking Bridge</p></div>
<p><strong>Downloads.</strong><br />
My description of each photo in the zip archive is here: <a href="http://joebrown.org.uk/images/walkMay12th.txt">http://joebrown.org.uk/images/walkMay12th.txt</a><br />
and the zip archive is here:<a href="http://joebrown.org.uk/images/agfaMay12th2012.zip"> http://joebrown.org.uk/images/agfaMay12th2012.zip</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.joebrown.org.uk/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.joebrown.org.uk/wp/?feed=rss2&amp;p=8445</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Patch Tuesday &#8211; Microsoft&#8217;s Latest Bag Of Shite</title>
		<link>http://www.joebrown.org.uk/wp/?p=8438</link>
		<comments>http://www.joebrown.org.uk/wp/?p=8438#comments</comments>
		<pubDate>Wed, 02 May 2012 12:20:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Observation]]></category>
		<category><![CDATA[Bag of Shite]]></category>
		<category><![CDATA[Microsoft Automatic Update]]></category>
		<category><![CDATA[Patch Tuesday]]></category>

		<guid isPermaLink="false">http://www.joebrown.org.uk/wp/?p=8438</guid>
		<description><![CDATA[<p>I&#8217;ve just spent most of the morning recovering one of my machines that I had foolishly allowed Microsoft to automatically update.</p>
<p>It&#8217;s an XP machine, and after the &#8216;upgrade&#8217; yesterday was almost unusable this morning, with huge delays in accessing Explorer, and much, much worse, hanging when any attempt was made to shut down.</p>
<p>This successfully prevented [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just spent most of the morning recovering one of my machines that I had foolishly allowed Microsoft to automatically update.</p>
<p>It&#8217;s an XP machine, and after the &#8216;upgrade&#8217; yesterday was almost unusable this morning, with huge delays in accessing Explorer, and much, much worse, hanging when any attempt was made to shut down.</p>
<p>This successfully prevented me from doing a  system restore, as this useless piece of crap will not run unless a clean automatic shutdown is achieved.</p>
<p>Eventually, I persuaded the machine into safe-mode &#8211; the only way of doing this successfully was from msconfig! Then restored the machine to the 28th April (last week).<br />
I now have a fully-functional machine again. Oh yes, and one in which I&#8217;ve now turned off Automatic Updates &#8211; forever.</p>
<p>The only reason I&#8217;ve stuck with Windows, is that most of the development tools I used, had no Linux equivalent, and that is no longer true. Very soon, I will ditch Microsoft completely &#8211; nothing they have to offer tempts me to upgrade from XP, it&#8217;s just more of the same with expensive wrapping.</p>
<p>For the record, I&#8217;m running a dual-core AMD Athlon 64, 5000+ at 2.61Ghz, with 3.25GB of RAM.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.joebrown.org.uk/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.joebrown.org.uk/wp/?feed=rss2&amp;p=8438</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PCB Milling Diary – April 12th 2012</title>
		<link>http://www.joebrown.org.uk/wp/?p=8402</link>
		<comments>http://www.joebrown.org.uk/wp/?p=8402#comments</comments>
		<pubDate>Thu, 12 Apr 2012 10:25:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Hackit & Bodge]]></category>
		<category><![CDATA[Mechanical Engineering]]></category>
		<category><![CDATA[PCB Isolation Routing]]></category>
		<category><![CDATA[Workshop]]></category>
		<category><![CDATA[CNC Conversion]]></category>
		<category><![CDATA[Isolation Routing]]></category>
		<category><![CDATA[Milling Circuit Boards]]></category>
		<category><![CDATA[Proxxon MF70]]></category>

		<guid isPermaLink="false">http://www.joebrown.org.uk/wp/?p=8402</guid>
		<description><![CDATA[<p>Updated @ 16:28 13th April 2012
(see supplemental)</p>
<p>I&#8217;m playing catch-up here. The contents of this post refer to work over two days old, delay in writing it up is due to other, more pressing matters.
The good news is that after using LineGrinder to generate the G-Code from my little PCB, the two mysteriously-missing areas on the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Updated @ 16:28 13th April 2012</strong><br />
(see <em>supplemental</em>)</p>
<p>I&#8217;m playing catch-up here. The contents of this post refer to work over two days old, delay in writing it up is due to other, more pressing matters.<br />
The good news is that after using LineGrinder to generate the G-Code from my little PCB, the two mysteriously-missing areas on the PCB are correctly rendered. I halted cutting of the traces due to the fact that a) there was insufficient depth-of-cut, and b) because of (a) the convex shape of the board made undercut inevitable.</p>
<div class="wp-caption alignnone" style="width: 975px"><img alt="RH Side: HV_OPAmp top foil - cut 2 using gcodes from LineGrinder." src="http://joebrown.org.uk/images/MillTable/Diary/cut2_small.JPG" title="RH Side: HV_OPAmp top foil - cut 2 using gcodes from LineGrinder." width="965" height="417" /><p class="wp-caption-text">RH Side: HV_OPAmp top foil - cut 2 using gcodes from LineGrinder.</p></div>
<p>Just about everything is better in this attempt. !st, the &#8216;JB&#8217; and &#8216;1&#8242; completely missing from the previous try are clearly visible. The pad outlines are a better shape, and not chewed to ribbons by repetitive tracing as in pcb-gcode. All that remains is to ensure correct depth-of-cut and present as flat a surface as is possible to the tool. This means a better clamping method than I used to-date.</p>
<div class="wp-caption alignnone" style="width: 1010px"><img alt="Clamping used to-date" src="http://joebrown.org.uk/images/MillTable/Diary/MyClamps_small.JPG" title="Clamping used to-date" width="1000" height="468" /><p class="wp-caption-text">Clamping used to-date</p></div>
<p>Above you can see my test board, sitting atop a sacrificial fibre-board. The aggregate thickness of these is around 4.5mm. I cut and milled one side of some 20mm gauge-angle so that the inside width of the cut side is 6mm &#8211; sufficient to generate a small angle when tightened to the mill table. I drilled 6mm holes to correspond to the mill table slots, and opened these slightly with a 6mm slot drill. The result is as you see above.<br />
Probing the surface shows up a distinct, but slight convex hull, highest in the centre &#8211; furthest from the clamps. I will be investigating two methods of overcoming this, the first and most obvious of clamping the sides of the board as well, the second using pre-probing of the tool-route, outputting a compensating Z-axis dimension, and re-combining this with the original gcode. ( a little &#8216;z&#8217; if you like)<br />
This is not a new idea, and as I&#8217;m currently &#8216;logging&#8217; the g-codes in the file-system as they are sent to the controller, it is a simple matter to send adjustments as the probe run is done, so to this end I&#8217;ve implemented the code, but have yet to try it out in anger.</p>
<p>As for pcb-gcode? Well I won&#8217;t bother investigating further, as the results from LineGrinder are just far superior. You may be interested to know that proper arcs (in gcode) are output for the pad ends, using LineGrinder, whereas rough polygons are output in pcb-gcode. Also, the drill holes are &#8217;spotted&#8217;. I&#8217;m convinced which is the winner.<br />
Below is the VEGA DATA simulator output.</p>
<div class="wp-caption alignnone" style="width: 966px"><img alt="VEGA DATA simulation from LineGrinder gcodes" src="http://joebrown.org.uk/images/MillTable/Diary/t2_LineGrinder.PNG" title="VEGA DATA simulation from LineGrinder gcodes" width="956" height="502" /><p class="wp-caption-text">VEGA DATA simulation from LineGrinder gcodes</p></div>
<p>I&#8217;ll report on my pre-probed cut in the next post of this diary.</p>
<p>JWB 12th April 2012</p>
<p><em><strong>Supplemental &#8211; added April 13th 2012</strong></em><br />
No, I haven&#8217;t done the probing yet, but did try out re-arranging my setup.<br />
First of all, I used a longer piece of circuit board.<br />
Secondly, I didn&#8217;t tighten the clamps so enthusiastically as previously.<br />
I then ran a clock gauge across the surface. No discernable distortion was evident in the centre two-thirds of the board.<br />
<div class="wp-caption alignnone" style="width: 785px"><img alt="Setup for flatness test of circuit board" src="http://joebrown.org.uk/images/MillTable/Diary/surface-heigttest.JPG" title="Setup for flatness test of circuit board" width="775" height="710" /><p class="wp-caption-text">Setup for flatness test of circuit board</p></div></p>
<p>Next, I increased the depth of cut in the gcode file to 4 thou.<br />
The result is as below:<br />
<div class="wp-caption alignnone" style="width: 734px"><img alt="Third attempt at cutting traces" src="http://joebrown.org.uk/images/MillTable/Diary/thirdcut.JPG" title="Third attempt at cutting traces" width="724" height="543" /><p class="wp-caption-text">Third attempt at cutting traces</p></div><br />
This is useable!<br />
A few comments:<br />
1st, the space there should exist between the pad with &#8216;1&#8242; to it&#8217;s right and the SMD pad immediately below didn&#8217;t make it &#8211; it was always very fine, and adjustment of the Eagle project will sort this out.<br />
Secondly, the apparent S/C between bottom-row pad 3 and isolated scrap is simply swarf &#8211; it dusted away.<br />
Third. Although I like the DIL socket and SIL pin-holes &#8217;spotted&#8217;, some of these &#8217;spots&#8217; are deeper than I would have preferred. (<em>Edit: This is entirely my fault, due to my over-enthusiastic global-replace of the Z-axis dimension!</em>)<br />
These are simply niggles, and the machine can now be considered fully-operational.</p>
<p><strong>Downloads</strong><br />
The Eagle project I based these tests on is linked elsewhere, but the gcode file I used to generate these cuts is here: <a href="http://joebrown.org.uk/images/MillTable/Diary/t2.nct">http://joebrown.org.uk/images/MillTable/Diary/t2.nct</a><br />
<strong>Links</strong><br />
The 1mm cone cutter I used is available from <a href="http://www.esr.co.uk/electronics/products/frame_pcb.htm" target="_blank">ESR</a>: Order Code 275-140, Description	 1.0mm Miller Cutter &#8211; Conical, priced GBP £0.84.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.joebrown.org.uk/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.joebrown.org.uk/wp/?feed=rss2&amp;p=8402</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Gateshead Walk</title>
		<link>http://www.joebrown.org.uk/wp/?p=8388</link>
		<comments>http://www.joebrown.org.uk/wp/?p=8388#comments</comments>
		<pubDate>Wed, 11 Apr 2012 19:50:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[From The Throne Room]]></category>
		<category><![CDATA[Observation]]></category>
		<category><![CDATA[Places and People]]></category>
		<category><![CDATA[Gateshead]]></category>
		<category><![CDATA[The other side of The Sage]]></category>
		<category><![CDATA[Wasteland]]></category>

		<guid isPermaLink="false">http://www.joebrown.org.uk/wp/?p=8388</guid>
		<description><![CDATA[<p>I took a walk in Gateshead this morning. I had business at the Civic Centre, so thought I would check on progress (if any) that Gateshead Council had made in tidying up the disgraceful state of the once-proud Gateshead High Street. I documented my walk with pictures, all 250Mb of which are too much to [...]]]></description>
			<content:encoded><![CDATA[<p>I took a walk in Gateshead this morning. I had business at the Civic Centre, so thought I would check on progress (if any) that Gateshead Council had made in tidying up the disgraceful state of the once-proud Gateshead High Street. I documented my walk with pictures, all 250Mb of which are too much to load individually up to my album site. I give a taster here, but if any former Gateshead dweller would like to see this &#8217;snapshot&#8217;, a zip archive is available.<br />
First below I show my short walk:<br />
<div class="wp-caption alignnone" style="width: 946px"><img alt="Gateshead Walk 11th April 2012" src="http://joebrown.org.uk/images/walk_small.png" title="Gateshead Walk 11th April 2012" width="936" height="660" /><p class="wp-caption-text">Gateshead Walk 11th April 2012</p></div></p>
<p>I suppose the lowest point in the walk is the site of the Odeon Cinema &#8211; wasteland now for many years. Trouble is, things don&#8217;t actually get much better.<br />
<div class="wp-caption alignnone" style="width: 1010px"><img alt="Odeon Wasteland - We come along, on Saturday Morning. Greeting everybody with a smile" src="http://joebrown.org.uk/images/Odeon_wasteland.JPG" title="Odeon Wasteland - We come along, on Saturday Morning. Greeting everybody with a smile" width="1000" height="750" /><p class="wp-caption-text">Odeon Wasteland - &#39;We come along, on Saturday Morning. Greeting everybody with a smile&#39;</p></div></p>
<p>The once-proud Co-op has now been completely superceded by the Mamon Behemoth. The building below used to contain the Co-op &#8216;Food Hall&#8217;, where I was sent for the Saturday shop. You stood in a queue, until someone took your list, then he did all of the running around. Nowadays, you do all of the running around, and then you stand in a queue. Progress?</p>
<div class="wp-caption alignnone" style="width: 1010px"><img alt="Site of the former Gateshead Co-op" src="http://joebrown.org.uk/images/FormerlyCoop.JPG" title="Site of the former Gateshead Co-op" width="1000" height="750" /><p class="wp-caption-text">Site of the former Gateshead Co-op</p></div>
<p>The photo below shows new development on what became cynically described as the &#8220;set for the film &#8216;Get Carter&#8217;&#8221;. In other words, the infamous multi-storey car-park and it&#8217;s cafe that never sold even one cup of tea. I worked in Barkers (Radio store), which was just on the left down here, and we watched the film being made.<br />
I wonder if this new development will fare any better than the late-60&#8217;s monstrosity?</p>
<div class="wp-caption alignnone" style="width: 1010px"><img alt="New set for re-make of Get Carter" src="http://joebrown.org.uk/images/NewBeginnings.JPG" title="New set for re-make of Get Carter" width="1000" height="750" /><p class="wp-caption-text">New set for re-make of &#39;Get Carter&#39;</p></div>
<p>I would show you more, but it doesn&#8217;t get any better I&#8217;m afraid. Maybe you think differently.<br />
My zip archive of the walk is here: <a href="http://joebrown.org.uk/images/agfa April 11th 2012.zip">http://joebrown.org.uk/images/agfa April 11th 2012.zip</a><br />
and commented photo list here: <a href="http://joebrown.org.uk/images/catalog.txt">http://joebrown.org.uk/images/catalog.txt</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.joebrown.org.uk/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.joebrown.org.uk/wp/?feed=rss2&amp;p=8388</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PCB Milling Diary &#8211; April 8th 2012</title>
		<link>http://www.joebrown.org.uk/wp/?p=8363</link>
		<comments>http://www.joebrown.org.uk/wp/?p=8363#comments</comments>
		<pubDate>Sun, 08 Apr 2012 12:00:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Hackit & Bodge]]></category>
		<category><![CDATA[Mechanical Engineering]]></category>
		<category><![CDATA[PCB Isolation Routing]]></category>
		<category><![CDATA[PIC Microcontroller]]></category>
		<category><![CDATA[Workshop]]></category>
		<category><![CDATA[CNC Conversion]]></category>
		<category><![CDATA[Isolation Routing]]></category>
		<category><![CDATA[Milling Circuit Boards]]></category>
		<category><![CDATA[Proxxon MF70]]></category>

		<guid isPermaLink="false">http://www.joebrown.org.uk/wp/?p=8363</guid>
		<description><![CDATA[<p>A great deal of what we see on the Web, project-wise, is the &#8216;finished&#8217; product. Every questionable decision has been &#8216;revisioned&#8217;, and what warts remain are carefully hidden, or presented as &#8216;features&#8217;. Yeah, I know this is a pretty cynical view, but unfortunately, nearer the truth, than even I would like to admit.
One of the [...]]]></description>
			<content:encoded><![CDATA[<p>A great deal of what we see on the Web, project-wise, is the &#8216;finished&#8217; product. Every questionable decision has been &#8216;revisioned&#8217;, and what warts remain are carefully hidden, or presented as &#8216;features&#8217;. Yeah, I know this is a pretty cynical view, but unfortunately, nearer the truth, than even I would like to admit.<br />
One of the great lessons I found, in a long career of software engineering, was to document every &#8216;<em>failure&#8217;</em>, every &#8216;good&#8217; idea that turned out to be just plain bad, and attempt to make this collective wisdom available to the whole software group, so that when new &#8216;brooms&#8217; came along, the same tedious business of making the same mistakes again was avoided. Well, it didn&#8217;t always work, but most of the time it proved very useful.</p>
<p>I could have documented my experiences alongside the Project Development posts, but I feel that would be the wrong place to do so, hence this separate diary.</p>
<p>Yesterday, I cut my first traces &#8216;in anger&#8217; on a piece of copper-clad circuit-board. This was two copies of the bottom pads of the small HV_OP_AMP project I&#8217;ve been using as a test-set for the Proxxon MF70 CNC Conversion Project.<br />
The results of this were encouraging.<br />
This morning I cut the top trace of the same small board. Again the result is encouraging, but not without issues. So, rather than simply quietly sorting out these issues, I thought it might be a good idea to share these with others, contemplating similar projects.</p>
<p>1st take a look at the photo of the bottom pads, cut yesterday. (on a scrap piece of FR4 board)<div class="wp-caption alignnone" style="width: 889px"><img alt="HV_OpAmp Circuit Board - bottom foil." src="http://joebrown.org.uk/images/MillTable/Diary/t2_ncb.JPG" title="HV_OpAmp Circuit Board - bottom foil." width="879" height="352" /><p class="wp-caption-text">HV_OpAmp Circuit Board - bottom foil.</p></div></p>
<p>And now, the bottom foil, together with a blow-up print-out of the foil as it should be.<br />
<div class="wp-caption alignnone" style="width: 807px"><img alt="HV_OpAmp Circuit Board - Top foil and print-out blow-up" src="http://joebrown.org.uk/images/MillTable/Diary/t2_nct.JPG" title="HV_OpAmp Circuit Board - Top foil and print-out blow-up" width="797" height="750" /><p class="wp-caption-text">HV_OpAmp Circuit Board - Top foil and print-out blow-up</p></div></p>
<p>Now, in my opinion, the upper photo shows excessive depth-of-cut, using the &#8216;default&#8217; values in the pcb-gcode.ulp program. This sets the Z depth to -0.254mm, in Imperial units that&#8217;s 10mil. Considering FR4 board with 1oz copper is quoted to be around 2.08mil thick, 10mil seemed excessive. So some juggling required there. Also, as a result of excessive cutter depth, and the cone profile of the 0.5mm cutter I used, some loss of area can be noted around the pads &#8211; especially the small link pad. (The Mickey-Mouse ear of the pad 2nd-row, 4th from left) Despite these comments, these are matters which can clearly be cleared up with attention to the set-up.</p>
<p>Now moving to the 2nd photo, this too, has several issues. Ist of all, I reduced tool penetration to 0.102mm &#8211; or 4thou in Imperial measure. Removal of copper was still retained, but the setting showed up the sensitivity to a non-flat (slightly-convex) circuit board, in that the area closest to the left-hand clamp has not been completely cleared of copper where required. This led to short-circuits etc. Again, this is a matter of setup, and one I&#8217;m not unduly concerned about.<br />
I marked the traces I was happy with on the blown-up print-out with small red ticks. As you will see a large percentage of the board I considered satisfactory.</p>
<p>What was a mystery were the two areas, both left and right, that I&#8217;ve surrounded with dotted lines and question marks. These two areas are supposed to contain SMD pads &#8211; instead they have been ignored.<br />
Up until this point, I had trusted the output of the pcb-gcode program. I began to suspect that maybe that trust had been misplaced.<br />
I downloaded and installed a trial version of VEGA DATA, and after a lot of fiddling managed to get the simulator to run. Yes, you&#8217;ve guessed &#8211; with exactly the same results, in that the two areas mentioned above are not machined as they should be.</p>
<p><div class="wp-caption alignnone" style="width: 976px"><img alt="VEGA DATA View of simulated trace cut of HV_OpAmp Top Foil" src="http://joebrown.org.uk/images/MillTable/Diary/t2_nct_VEGA_DATA.PNG" title="VEGA DATA View of simulated trace cut of HV_OpAmp Top Foil" width="966" height="482" /><p class="wp-caption-text">VEGA DATA View of simulated trace cut of HV_OpAmp Top Foil</p></div><br />
So. My Milling software and CNC conversion works &#8211; leastways it follows the instructions given to it, without protest or error.</p>
<p>Before I go further I need to investigate why pcb-gcode is ignoring parts of my PCB layout. When I do know, then I&#8217;ll let you know too.</p>
<p>JWB 8th April 2012</p>
<p><strong>Downloads</strong><br />
The Schematic and Board I&#8217;m using for test can be found here: <a href="http://joebrown.org.uk/images/MillTable/Diary/HV_OpAmp_Discr.sch">http://joebrown.org.uk/images/MillTable/Diary/HV_OpAmp_Discr.sch</a> and here: <a href="http://joebrown.org.uk/images/MillTable/Diary/HV_OpAmp_Discr.brd">http://joebrown.org.uk/images/MillTable/Diary/HV_OpAmp_Discr.brd</a><br />
My top-foil gcode file (this is a txt file, you can read using Notepad): <a href="http://joebrown.org.uk/images/MillTable/Diary/t2.nct">http://joebrown.org.uk/images/MillTable/Diary/t2.nct</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.joebrown.org.uk/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.joebrown.org.uk/wp/?feed=rss2&amp;p=8363</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting a Proxxon MF70 Milling Machine To CNC – 4</title>
		<link>http://www.joebrown.org.uk/wp/?p=8298</link>
		<comments>http://www.joebrown.org.uk/wp/?p=8298#comments</comments>
		<pubDate>Thu, 05 Apr 2012 10:48:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Hackit & Bodge]]></category>
		<category><![CDATA[Mechanical Engineering]]></category>
		<category><![CDATA[PIC Microcontroller]]></category>
		<category><![CDATA[Workshop]]></category>
		<category><![CDATA[6N137]]></category>
		<category><![CDATA[Circuit Board production]]></category>
		<category><![CDATA[CNC]]></category>
		<category><![CDATA[Isolation Routing]]></category>
		<category><![CDATA[Milling]]></category>
		<category><![CDATA[MOC3020]]></category>
		<category><![CDATA[Proxxon MF70]]></category>
		<category><![CDATA[Spindle Speed Control]]></category>
		<category><![CDATA[Stepper Motors]]></category>
		<category><![CDATA[TRIAC Control]]></category>

		<guid isPermaLink="false">http://www.joebrown.org.uk/wp/?p=8298</guid>
		<description><![CDATA[A Simple Thumb Drive G-Code Delivery System
<p>Updated with File System Source-Code &#038; example of logging 15th April 2012</p>
<p>This post in one in a series. Other posts you may be interested in are as follows:</p>


Converting a Proxxon MF70 Milling Machine To CNC – 1: Introduction.
Converting a Proxxon MF70 Milling Machine To CNC – 2: The User [...]]]></description>
			<content:encoded><![CDATA[<h3>A Simple Thumb Drive G-Code Delivery System</h3>
<p><strong>Updated with File System Source-Code &#038; example of logging 15th April 2012</strong></p>
<p><em>This post in one in a series. Other posts you may be interested in are as follows:</em></p>
<div class="widget widget_links">
<ul>
<li><a href="http://www.joebrown.org.uk/wp/?p=8021">Converting a Proxxon MF70 Milling Machine To CNC – 1: Introduction.</a></li>
<li><a href="http://www.joebrown.org.uk/wp/?p=8161">Converting a Proxxon MF70 Milling Machine To CNC – 2: The User Interface.</a></li>
<li><a href="http://www.joebrown.org.uk/wp/?p=8241">Converting a Proxxon MF70 Milling Machine To CNC – 3: Controlling the MF70 Spindle Speed.</a></li>
<li><a href="http://www.joebrown.org.uk/wp/?cat=765">In addition, you may be interested in my diary of progress with PCB Milling</a></li>
</ul>
<p>At the start of this series of posts, I said I did not want a PC to control my Milling Operations, so some local delivery method of supplying the gcode files is required. Having said that, the system is &#8216;open&#8217;, and a simple XON/XOFF terminal program running on a PC can be used if required. G-Codes can also be typed in on a terminal keyboard, though this method could prove tiresome with even moderately-sized circuit boards. It <em>is</em>, though very useful for simple tests.</p>
<p>Whilst deliberating the problem, I first considered the Vinculum, from FTDI, but naturally (for me) would have preferred a PIC-based OTG (on-the-go) system. I had been carrying on email conversations regarding this with Gert Bouland in Holland, and he had suggested the Elektor USB Logger project (from December 2011) as one possible candidate. Gert subsequently kindly sent me a fully-built board, complete with PIC installed. I downloaded the logger firmware into the device, connected it up to the serial port of the Mill Controller and established that it worked. I then set about demolishing most of the original source-code, and developed the simple File System I describe below.</p>
<p>Before doing that is would be useful to briefly describe the original &#8216;logger&#8217; hardware as presented in Elektor. If you haven&#8217;t already got a copy of Elektor December 2011, I recommend you purchase one, and read the full article by Thomas Fischl, if you intend to follow my route.</p>
<p>The schematic for the Elektor logger has been reproduced below:</p>
<table>
<tbody>
<tr>
<td>
<div class="wp-caption alignnone" style="width: 531px"><img alt="The Elektor USB Data Logger - December 2011" src="http://joebrown.org.uk/images/MillTable/usblogger.PNG" title="The Elektor USB Data Logger - December 2011" width="521" height="515" /><p class="wp-caption-text">The Elektor USB Data Logger - December 2011</p></div>
</td>
<td>
The schematic shows a PIC24FJ64GB002 connected as a USB &#8216;host&#8217; to the USB type &#8216;A&#8217; socket. Interface (via the internal UART) is made by a dedicated set of peripheral pins to the 2-row 10-pin header.</p>
<p>Four connections are brought out in this way, sufficient for RX,TX and RTS,CTS if required. My application uses only RX and TX, handshaking being achieved with the software protocol XON/XOFF.</p>
<p>Circuit operation is simple, with a one-button/one LED (not shown on diagram) user interface. </p>
<p>On power-up, if a thumb drive is present, the unit will self-configure a baud-rate from a &#8216;config.txt&#8217; file on the thumb drive, then start logging characters received on the RX input line. When desired, logging can be stopped by hitting S1, and then the thumb drive can be removed, and a file &#8216;LOGGING.TXT&#8217; can then be accessed by plugging the drive into a PC.
</td>
</tr>
</tbody>
</table>
<p>Use of the logger hardware for providing access to gcode files can be made with no changes to the hardware whatsoever &#8211; but I added a reset switch between MCLR and GND &#8211; a necessary addition I felt.<br />
<strong>Update 15th April 2012.</strong><br />
I have removed the setting of the baud rate from &#8216;config.txt&#8217;, and also removed any support code for this. My application uses 19,200 Baud as a &#8217;standard&#8217;, so I&#8217;ve hard-coded this in &#8216;main&#8217;.<br />
I also added 2 LEDS to the hardware, one to signal when XOFF is in operation (which is most of the time), and one toggled on a byte send to the Mill Controller. These LEDs are connected to RA1 and RA0 respectively. (see source-code for operation of these LEDs)</p>
<p>Milling of circuit boards will require access to three types of files:<br />
1. A drill file.<br />
2. Top-trace routing.<br />
3. Bottom-trace routing.</p>
<p>Using the gcode-producing facility on Eagle files produces different names for each file, but I wanted to keep the system as simple as possible, and most importantly, avoid long filenames. I plumped for three filters for the three file types above:</p>
<p>*.ncd &#8211; drill files<br />
*.nct &#8211; top trace files<br />
*.ncb &#8211; bottom trace files</p>
<p>Furthermore, these are known only within the file system itself &#8211; I see no need to propagate fixed alpha strings into the Mill controller, so that the Mill controller only knows of files of type 1,2 or 3. That means, when you decide on a different naming convention, only one change to one set of software needs to be done.</p>
<p>We need the following facilities on the Mill Controller and File system then:</p>
<p>Ask the file system to give a list of files of a given type, 1, 2 or 3.<br />
Ask the file system to send the contents of a file, line by line.<br />
Additionally, the file system should recognize a signal for temporary halt (XOFF), and when to re-start sending the file (XON)<br />
Finally, the file system should recognize an abort signal. (CAN)</p>
<p>Currently, because of the limited scope of the Mill Controller keypad, most of the &#8217;special&#8217; facilities are accessed as so-called <em>functions</em>. In the table below, I have described the actions for each of these in turn, with appropriate reaction by the File System.</p>
<table>
<thead>
<tr>
<th>Function No.</th>
<th>Purpose</th>
<th>File System Action</th>
<th>Result</th>
</tr>
</thead>
<tbody>
<tr>
<td>50
<td>List files in group 1, one at a time.</td>
<td>File system searches on drive, and presents 1st file to Mill Controller (if found) from group 1</td>
<td>Filename displayed on Mill controller LCD</td>
</tr>
<td>51
<td>List files in group 2, one at a time.</td>
<td>File system searches on drive, and presents 1st file to Mill Controller (if found) from group 2</td>
<td>Filename displayed on Mill controller LCD</td>
</tr>
<td>52
<td>List files in group 3, one at a time.</td>
<td>File system searches on drive, and presents 1st file to Mill Controller (if found) from group 3</td>
<td>Filename displayed on Mill controller LCD</td>
</tr>
<td>53
<td>Fetch next file in list.</td>
<td>File system searches on drive, and presents next file to Mill Controller (if there is one) from current group.</td>
<td>Filename displayed on Mill controller LCD</td>
</tr>
<td>54
<td>Execute current file.</td>
<td>File system presents <em>contents</em> of current file to Mill Controller, line by line.</td>
<td>Lines of gcodes executed by Mill Controller.</td>
</tr>
<td>55
<td>Abort current operation</td>
<td>File system aborts current operation, closing any open files.</td>
<td>Action on Mill Controller halted.</td>
</tr>
</tbody>
</table>
<p>Software handshaking, using XON and XOFF is carried out transparently, by the software.</p>
<p>A code snippet from the software main loop running inside the file system, should give some clarity to one side of these transactions:</p>
<p><span class="codetext"></p>
<pre>
<font color="blue">

		if (deviceAttached) // stick inserted in orifice?
		{
			// check for incoming data from Mill Controller
			if (rx_in_index != rx_out_index)
			{
				// there's a char
				ch = rxbuf[rx_out_index++];
				if (rx_out_index == BUF_SIZE)
					rx_out_index = 0;

				switch (ch)
				{
					case XOFF : // stop sending to controller
								stop = 1;
						break;
					case XON : // re-start sending to controller
								stop = 0;
						break;
					case STX : // start of text command
								for (cmd_index = 0; cmd_index < CMD_SIZE+1; cmd_index++)
								{
									cmd[cmd_index] = 0x00; // zeroise command buffer
								}
								cmd_index = 0;
						break;
					case ETX : // end of text command
								ExecuteCmd(cmd);
						break;
					case CAN : // cancel current sequence
								if (myInputFile != NULL)
									FSfclose(myInputFile); // close any open input file.
								tx_out_index = tx_in_index = 0; // cancel anything buffered
								stop = 0; // cancel any current XOFF

						break;
					default: // place char in cmd buffer
								cmd[cmd_index++] = ch;
								if (cmd_index == CMD_SIZE)
								{
									cmd_index = 0; // CMD BUFFER FULL
								}
						break;
				}
			}

			if (tx_in_index != tx_out_index) // if there's data for the Mill Controller, send a byte of it
			{
				// there is stuff to send to controller
				if (!stop) // not stopped by previous XOFF?
				{
					// output a char to UART
					while(U1STAbits.TRMT == 0); // wait 'til last sent
					{
						unsigned char ch = txbuf[tx_out_index++];
						U1TXREG = ch;
						if (tx_out_index == BUF_SIZE)
							tx_out_index = 0;
					}
				}
			}
			else // no data? Are we executing a gcode file currently?
			{
				if (myInputFile != NULL)
				{
					// then get next line to send to UART
					if (!FSfeof(myInputFile)) // check for end of file
					{
						chsread = freadln(line, BUF_SIZE-1, myInputFile); // read line until CR/LF
						if (chsread != 0)
						{
							for (i = 0; i < chsread; i++)
							{
								SendBufferedChar (line[i]); // place line in TX output buffer
							}
							SendBufferedChar(CR); // Mill g-code interpreter needs these
							SendBufferedChar(LF);

							// debug - log it as well
							Log(line);
							LogChar(CR);
							LogChar(LF);
						}
					}
					else // end of file, so close it.
					{
						FSfclose(myInputFile);
					}

				}
			}			

		}

</font>
</pre>
<p></span></p>
<p>It can be seen from the 1st section of code (the switch and case statements), that commands from the Mill Controller are split into two groups. Those that manage the flow of data between the Mill Controller and the File System, and those that respond to commands regarding the file system itself.<br />
The 1st group is reasonably self-explanatory, the second may not be immediately obvious. A file-system command is sent from the Mill Controller bracketed with STX and ETX &#8211; in other words each command must begin with the control code STX and finish with ETX. The command is assembled, byte by byte received in the buffer &#8216;cmd&#8217;, and only when ETX is received is an attempt made to service it. This is shown in code snippet 2, below.<br />
<em>It might prove useful to point out that &#8216;ext_strs&#8217; is an array containing the 3 filters previously discussed (*.ncd, *.nct, and *.ncb)</em></p>
<p><span class="codetext"></p>
<pre>
<font color="blue">

///////////////////////////////////////////////////////////////////////////////
//
// Execute command for Mill controller
//
// Set up execution of a command
//
// commands are simple:
// a letter possibly followed by a number in some cases
// Example sequences:
// "D1" : search directory for drill files (extension .ncd); response: if none found return 'NAK'
//        else return ACK then STX and retrieve and send the filename and extension <name>.<ext> then ETX
// "N" : retrieve and send next filename found; same as for "F". If list exhausted, return 'NAK'
// "E" : retrieve and send each line of the (current) file (name in rec) (terminated CR/LF) in sequence;
//       response: do this until instructed to stop with "CAN" or told to halt (temporarily) with XOFF etc.
//
// The control code 'CAN', if received, will stop execution, cancelling any sequence, and close any open file.
//
void ExecuteCmd (char * cmd)
{
	int n = 0;
	int attr;
	switch 	(cmd[0])
	{
		case 'D' : 	// need a number specifying file extension
			n = atoi(cmd+1);
			attr = ATTR_MASK;
			filefound = 0;
			if ((n > 0) &#038;&#038; (n < 4)) // accept ONLY 1 - 3
			{
				filetype = n - 1; // (lookup array is zero-indexed)
				// do Findfirst
				if  (FindFirst (ext_strs[filetype], attr, &#038;rec) == 0 )
				{
					SendByte(ACK); // success , got a name
					SendBufferedString(rec.filename);
					filefound = 1;
				}
				else
				{
					// none, indicate failure
					SendByte(NAK);
				}
			}
			else
			{
				filetype = 0;
				// number not acceptable
				SendByte(NAK);
			}

			break;
		case 'E' : 	// begin sending current file contents to controller
				if (filefound == 1)
					myInputFile = FSfopen(rec.filename, "r"); // open the file
				else
					SendByte(NAK);
			break;
		case 'N' : 	// send next (or subsequent) filename for filespec given in N command
				if (FindNext(&#038;rec) == 0) // yes, there's another
				{
					filefound = 1;
					SendByte(ACK); // success , got a name
					SendBufferedString(rec.filename);
				}
				else // no more? then tell Mill Controller so.
				{
					filefound = 0;
					SendByte(NAK);
				}
			break;
	}
}

</font>
</pre>
<p></span></p>
<p>As you will see from the above, everything is kept simple and brevity is considered virtuous. I&#8217;ve left my comment field intact on the above which describes examples of use. Note that only 3 &#8216;commands&#8217; are needed or used by the Mill Controller:<br />
&#8216;D&#8217; followed by a group number 1,2 or 3 asks for the &#8216;directory&#8217; listing of the group specified. (starting with the 1st file found)<br />
&#8216;N&#8217; tells the file system to send the next filename in the group.<br />
&#8216;E&#8217; tells the file system to send the contents of the file, line by line.<br />
You can quickly relate the lettered commands to the function numbers given in the table above.</p>
<p>A discussion of the gcode interpreter itself will cover the Mill Controller aspects of commanding the filesystem, and this will form a later post.</p>
<p><em>With acknowledgements to Elektor Magazine and Thomas Fischl, for the application, and warm thanks to Gert Bouland for his kind support in providing ready-built hardware.</em></p>
<p><strong>Links</strong>. The Elektor article on the USB Data Logger can be found here: <a href="http://www.elektor.com/magazines/2011/december/usb-data-logger.1992177.lynkx" target="_blank">http://www.elektor.com/magazines/2011/december/usb-data-logger.1992177.lynkx</a></p>
<p><strong>Updated 15th April 2012</strong> File System Project &#038; Source-Code &#038; example of logging are here: <a href="http://joebrown.org.uk/images/MillTable/MillFS_15_04_2012.zip">http://joebrown.org.uk/images/MillTable/MillFS_15_04_2012.zip</a> and here: <a href="http://joebrown.org.uk/images/MillTable/LOGGING_15_02-2012.TXT">http://joebrown.org.uk/images/MillTable/LOGGING_15_02-2012.TXT</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.joebrown.org.uk/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.joebrown.org.uk/wp/?feed=rss2&amp;p=8298</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google &#8211; Stop f***ing asking for my mobile number when I sign in to GMail</title>
		<link>http://www.joebrown.org.uk/wp/?p=8293</link>
		<comments>http://www.joebrown.org.uk/wp/?p=8293#comments</comments>
		<pubDate>Tue, 03 Apr 2012 09:37:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blogettes]]></category>
		<category><![CDATA[Observation]]></category>
		<category><![CDATA[Places and People]]></category>

		<guid isPermaLink="false">http://www.joebrown.org.uk/wp/?p=8293</guid>
		<description><![CDATA[<p>No, you aren&#8217;t getting my Mobile number.
If you persist in asking me &#8211; I will close my gmail account.
]]></description>
			<content:encoded><![CDATA[<p><H3>No, you aren&#8217;t getting my Mobile number.</h3>
<h3>If you persist in asking me &#8211; I will close my gmail account.</h3>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.joebrown.org.uk/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.joebrown.org.uk/wp/?feed=rss2&amp;p=8293</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting a Proxxon MF70 Milling Machine To CNC – 3</title>
		<link>http://www.joebrown.org.uk/wp/?p=8241</link>
		<comments>http://www.joebrown.org.uk/wp/?p=8241#comments</comments>
		<pubDate>Sat, 31 Mar 2012 08:24:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Hackit & Bodge]]></category>
		<category><![CDATA[Mechanical Engineering]]></category>
		<category><![CDATA[PIC Microcontroller]]></category>
		<category><![CDATA[Workshop]]></category>
		<category><![CDATA[6N137]]></category>
		<category><![CDATA[Circuit Board production]]></category>
		<category><![CDATA[CNC]]></category>
		<category><![CDATA[Isolation Routing]]></category>
		<category><![CDATA[Milling]]></category>
		<category><![CDATA[MOC3020]]></category>
		<category><![CDATA[Proxxon MF70]]></category>
		<category><![CDATA[Spindle Speed Control]]></category>
		<category><![CDATA[Stepper Motors]]></category>
		<category><![CDATA[TRIAC Control]]></category>

		<guid isPermaLink="false">http://www.joebrown.org.uk/wp/?p=8241</guid>
		<description><![CDATA[Controlling the MF70 Spindle Speed
<p>Updated 28th April 2012 with Eagle Schematic and Printed Circuit Board Design.</p>
<p>This post in one in a series. Other posts you may be interested in are as follows:</p>


Converting a Proxxon MF70 Milling Machine To CNC – 1: Introduction.
Converting a Proxxon MF70 Milling Machine To CNC – 2: The User Interface.
Converting a [...]]]></description>
			<content:encoded><![CDATA[<h3>Controlling the MF70 Spindle Speed</h3>
<p><strong>Updated 28th April 2012 with Eagle Schematic and Printed Circuit Board Design.</strong></p>
<p><em>This post in one in a series. Other posts you may be interested in are as follows:</em></p>
<div class="widget widget_links">
<ul>
<li><a href="http://www.joebrown.org.uk/wp/?p=8021">Converting a Proxxon MF70 Milling Machine To CNC – 1: Introduction.</a></li>
<li><a href="http://www.joebrown.org.uk/wp/?p=8161">Converting a Proxxon MF70 Milling Machine To CNC – 2: The User Interface.</a></li>
<li><a href="http://www.joebrown.org.uk/wp/?p=8298">Converting a Proxxon MF70 Milling Machine To CNC – 4: A Simple Thumb Drive G-Code Delivery System.</a></li>
<li><a href="http://www.joebrown.org.uk/wp/?cat=765">In addition, you may be interested in my diary of progress with PCB Milling</a></li>
</ul>
</div>
<p>I&#8217;ve already mentioned that I&#8217;ve attempted to automate as much as is possible, so as to avoid tedium and the inevitable problems with repeatability when human intervention is involved. It would be useful to define required Tool speed alongside the tool definitions, so that when a tool is selected by gcode, the speed suited to the tool and work is automatically selected and implemented.</p>
<p><strong>Hardware</strong></p>
<p>The MF70 comes equipped with speed control based, to put it bluntly, on a lamp dimmer. As a picture is always worth at least a thousand words, I&#8217;ve included my impression of the MF70 speed controller in the schematic below.<br />
<div class="wp-caption alignnone" style="width: 497px"><img alt="Authors impression of Proxxon MF70 Speed Controller" src="http://joebrown.org.uk/images/MillTable/ProxxonMillSpeedControl.png" title="Authors impression of Proxxon MF70 Speed Controller" width="487" height="452" /><p class="wp-caption-text">Author&#39;s impression of Proxxon MF70 Speed Controller</p></div><br />
The circuit is ubiquitous, but I&#8217;ll glance over the operation.<br />
Control over the firing angle of the TRIAC is managed by the 500K pot, together with the associated capacitors, assisted by the DIAC, hence altering the effective voltage across the bridge rectifier which supplies power to the DC brushed motor. The circuit is popular because it is cheap, and relatively problem free, the only mechanical component being the 500K pot.<br />
Proxxon have marked the dial on the speed control knob in a range from 5000 to 20000 rpm. I have not checked this, but indications are that though a little rough, the calibration is adequate, given that the control over speed using a pot in this way is not linear, with greater incremental increases in speed as the knob is rotated clockwise.</p>
<p>Given my very healthy respect of mains-level voltages, and un-isolated ones in particular, I originally intended leaving things exactly as they are, and affixing a geared model-control servo motor to the side of the motor casing. I subsequently decided that this would end up as a mechanical monstrosity, which was difficult to keep free of metal swarf, and promising myself to be ultra careful, decided on interfacing directly with the electronics of the motor controller itself.</p>
<p>I haven&#8217;t &#8216;played&#8217; with TRIACS in any serious sense, my experience pre-programming days was solely with Thyristors, so some time has been spent reading Application Notes. Not much has changed though, and the simple requisites for phase control are the determining of the zero-cross point in the AC supply, and the production of a GATE_ON signal after a pre-determined delay, depending on speed required.<br />
Below, the Blue trace shows the zero-crossing pulse, (note that this occurs every 10ms here in the UK, where we have a 50Hz supply) whilst in red the ACTIVE LOW Triac control signal is shown, well delayed until just over 8ms after zero-crossing. The reason why the Triac control signal is ACTIVE LOW will become apparent in the next schematic.</p>
<div class="wp-caption alignnone" style="width: 650px"><img alt="Phase Control of Proxxon Motor @ approx 5000rpm" src="http://joebrown.org.uk/images/MillTable/S5000_01.png" title="Phase Control of Proxxon Motor @ approx 5000rpm" width="640" height="480" /><p class="wp-caption-text">Phase Control of Proxxon Motor @ approx 5000rpm</p></div>
<p>Now contrast the above oscillogram with that below taken at a speed of 20,000 rpm.<br />
Here, the ACTIVE LOW Triac control signal is triggered at around 5ms after zero-crossing, thereby turning the triac on much longer, hence delivering more power to the motor.<br />
<div class="wp-caption alignnone" style="width: 650px"><img alt="Phase Control of Proxxon Motor @ approx 20,000 rpm" src="http://joebrown.org.uk/images/MillTable/S20000.png" title="Phase Control of Proxxon Motor @ approx 20,000 rpm" width="640" height="480" /><p class="wp-caption-text">Phase Control of Proxxon Motor @ approx 20,000 rpm</p></div></p>
<p>As well as controlling the speed of the motor, our additions should cater for turning the spindle motor on and off, as well as allowing for original manual control, and probably most important, shutting off spindle motor power when the BIG RED SWITCH is hit by the user, as mentioned in the 1st post on this subject.<br />
Last, but most certainly not least, control signals should be isolated from the mains voltages on the existing speed-control board.</p>
<p>So a shortlist of requirements so far:</p>
<p><em>Detection of zero-crossing of the AC supply.<br />
Generation and provision of the TRIAC gate signal.<br />
Emergency shut-down.<br />
Provision for manual control.<br />
Complete isolation of mains-connected electronics from controlling electronics.</em></p>
<p>I came up with the following:<br />
<div class="wp-caption alignnone" style="width: 1029px"><img alt="Proxxon MF70 Milling Machine Automated Speed Controller" src="http://joebrown.org.uk/images/MillTable/ProxxonMillSpeedControl_Complete.png" title="Proxxon MF70 Milling Machine Automated Speed Controller" width="1019" height="727" /><p class="wp-caption-text">Proxxon MF70 Milling Machine Automated Speed Controller</p></div><br />
Don&#8217;t be put off by the apparent complexity of the above &#8211; look at each part individually. </p>
<p>First, the &#8216;original&#8217; speed controller is retained on the right of the diagram, with only 3 small changes:</p>
<p>1. The connection between the DIAC and TRIAC has been severed, and flying connections taken to contacts on RELAY 2.<br />
2. A flying lead has been added to A2 of the TRIAC, which connects to resistor R6.<br />
3. A flying lead has been added to A1 of the TRIAC, which connects to capacitor C7.</p>
<p>A phase-control signal PHASE_CONTROL supplies ACTIVE LOW pulses to the opto-isolated TRIAC MOC3020, whose supply and snubber are connected as mentioned in (2) above, and whose output is taken from pin 4, via RELAY 2, to the TRIAC, whenever RELAY 2 is activated.</p>
<p>A zero-crossing detector circuit comprises R9, BR2, a zener diode, R10, LED2, C7, R11 and a 6N137. This generates a positive-going pulse every 10ms, ZERO_CROSS, which is opto-isolated from the mains supply.</p>
<p>A spindle motor ON/OFF circuit is comprised of Q1, D1 and RELAY 1. An ACTIVE HIGH on MOTOR_ON, will turn on the spindle motor if the Manual/Automatic switch (top-left of schematic) is set to &#8216;Automatic&#8217;.</p>
<p>Most importantly, the &#8216;Controlled 5V+&#8217; supply comes from the &#8216;+5V supply to motors&#8217; shown on the BIG RED SWITCH diagram in 1st post of this series. This ensures that when the user hits the &#8216;PANIC&#8217; switch, not only will the X, Y and Z stepper motor supplies be cut, but the spindle motor will also be deprived of power.</p>
<p>Note I&#8217;ve shown the relays in their &#8216;de-activated&#8217; state, which would be so if the Manual/Automatic switch was set to &#8216;Manual&#8217;, or the user has hit the PANIC button. In this state, the original Speed controller can be used, switching on the supply using the original (and retained) switch.</p>
<p>A suitable printed circuit design in Eagle is now available. Component &#038; foil sides look like this:<br />
<div class="wp-caption alignnone" style="width: 902px"><img alt="MF70 Spindle Control from PIC Microcontroller - Component Side" src="http://joebrown.org.uk/images/MillTable/SpindleControl_Components_small.PNG" title="MF70 Spindle Control from PIC Microcontroller - Component Side" width="892" height="346" /><p class="wp-caption-text">MF70 Spindle Control from PIC Microcontroller - Component Side</p></div><br />
<div class="wp-caption alignnone" style="width: 901px"><img alt="MF70 Spindle Control from PIC Microcontroller - Foil Side" src="http://joebrown.org.uk/images/MillTable/SpindleControl_topfoil_small.PNG" title="MF70 Spindle Control from PIC Microcontroller - Foil Side" width="891" height="345" /><p class="wp-caption-text">MF70 Spindle Control from PIC Microcontroller - Foil Side</p></div><br />
<strong>Software</strong></p>
<p>As mentioned above, the relationship in AC control, between time and speed is not linear, and I had no wish to make exact, and complex calculations in software. Instead I decided on allowing the use of the &#8216;S&#8217; gcode to select spindle RPM to the nearest 1000, in a range 1000 to 20,000 &#8211; a little better than the 5000 to 20,000 allowed by the original controller. The plan is to parse the input speed gcode, then divide this by 1000, to give an index into a look-up table containg effective phase-delays (TMR0 counts), the contents of which could later be tweaked with the use of a tachometer.</p>
<p>So the look-up table will look similar to this:<br />
<span class="codetext"></p>
<pre>
<font color="blue">
const rom unsigned int phaseval[] = {20000,21000,22000,23000,24100,24450,24750,25000,26000,26750,27500,28000,28500,29000,29500,30000,32000,35000,38000,41000};
</font>
</pre>
<p></span></p>
<p>G-code speed parsing like this:<br />
<span class="codetext"></p>
<pre>
<font color="blue">
		if (gcode.present &#038; GCODE_S)
		{
			int temp;
			// accept 1000 - 20,000
			// convert to 1 - 20
			// and look up tmr0reload in table
			// rough? yes, but later, calibrate with tachometer
			temp = gcode.S / 1000;
			if (temp > 0 &#038;&#038; temp < 21)
			{
				temp = phaseval[temp-1];
				// tmr0reload is volatile so disable interrupts
				INTCONbits.GIEL = 0; // low priority/peripheral ints
				INTCONbits.GIEH = 0; // enable high priority ints

				tmr0reload = temp;

				// re-enable interrupts
				INTCONbits.GIEL = 1; // low priority/peripheral ints
				INTCONbits.GIEH = 1; // enable high priority ints
			}
		}
</font>
</pre>
<p></span></p>
<p>And the interrupt system which processes the zero-cross signal and generates the PHASE_CONTROL signal:</p>
<p><span class="codetext"></p>
<pre>
<font color="blue">
InterruptHandlerHigh ()
{
	if ( INTCONbits.INT0IE == 1 &#038;&#038; INTCONbits.INT0IF == 1)		// test for RB0 edge interrupt - ZERO-CROSSING
	{
		// clear INT0 interrupt flag
		INTCONbits.INT0IF = 0;

		PORTBbits.RB1 = 1; // drive phase control HIGH (OFF)

		TMR0H = tmr0reload >> 8;
		TMR0L = tmr0reload &#038; 0xff; // reload TMR0

		INTCONbits.T0IF = 0; // clear TMR0 interrupt flag.
		INTCONbits.T0IE = 1; // enable TMR0 interrupt
	}

        // TMR0 interrupt
        if (INTCONbits.TMR0IE == 1 &#038;&#038; INTCONbits.TMR0IF == 1) // test T0 rollover
	{
		INTCONbits.TMR0IF = 0; // clear TMR0 interrupt flag
		INTCONbits.T0IE = 0; // disable TMR0 interrupt

		PORTBbits.RB1 = 0; // turn phase contol ON
	}
.
.
.
</font>
</pre>
<p></span></p>
<p>A photo album exists showing my experiments in the development of the prototype speed controller. This can be viewed here: <a href="http://cullercoats.joebrown.org.uk/#53.22">http://cullercoats.joebrown.org.uk/#53.22</a><br />
I&#8217;ve also embedded a Shockwave viewer of the album below. The photos are best viewed full-screen.<br />
<object width="464" height="348" type="application/x-shockwave-flash" data="http://iloapp.joebrown.org.uk/gallery/swf/embedFlashGallery.swf?albumId=53&#038;galleryLocation=cullercoats&#038;domainName=joebrown.org.uk" name ="embedFlashGallery"><param name="movie" value="http://iloapp.joebrown.org.uk/gallery/swf/embedFlashGallery.swf?albumId=53&#038;galleryLocation=cullercoats&#038;domainName=joebrown.org.uk"/><param name="quality" value="high"/><param name="bgcolor" value="#000000"/><param name="allowScriptAccess" value="always"/><param name="allowFullScreen" value="true"/><a href="http://cullercoats.joebrown.org.uk/#53">http://cullercoats.joebrown.org.uk/#53</a></object></p>
<p><strong>Datasheet/Application Notes</strong>. I have provided copies of the following PDF documents for your convenience:<br />
<a href="http://joebrown.org.uk/images/MillTable/6N137.pdf">6N137 &#8211; opto-coupled Schottky Transistor</a><br />
<a href="http://joebrown.org.uk/images/MillTable/moc3011.pdf">Opto-coupled TRIAC MOC3020</a></p>
<p><strong>Suppliers</strong>: Everything I used here was available at my local friendly Electronics Store <a href="http://www.esr.co.uk/" target="_blank">ESR</a>. The relays were actually 6volt units &#8211; they run quite happily on 5volts.</p>
<p><strong>Update 28th April 2012</strong><br />
The Eagle schematic and board files are here: <a href="http://joebrown.org.uk/images/MillTable/SpindleControl.sch">http://joebrown.org.uk/images/MillTable/SpindleControl.sch</a> and here: <a href="http://joebrown.org.uk/images/MillTable/SpindleControl.brd">http://joebrown.org.uk/images/MillTable/SpindleControl.brd</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.joebrown.org.uk/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.joebrown.org.uk/wp/?feed=rss2&amp;p=8241</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting a Proxxon MF70 Milling Machine To CNC – 2</title>
		<link>http://www.joebrown.org.uk/wp/?p=8161</link>
		<comments>http://www.joebrown.org.uk/wp/?p=8161#comments</comments>
		<pubDate>Wed, 21 Mar 2012 16:34:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Mechanical Engineering]]></category>
		<category><![CDATA[PIC Microcontroller]]></category>
		<category><![CDATA[Workshop]]></category>
		<category><![CDATA[Circuit Board production]]></category>
		<category><![CDATA[CNC]]></category>
		<category><![CDATA[Isolation Routing]]></category>
		<category><![CDATA[MF70]]></category>
		<category><![CDATA[Milling]]></category>
		<category><![CDATA[Proxxon MF70]]></category>
		<category><![CDATA[Stepper Motors]]></category>

		<guid isPermaLink="false">http://www.joebrown.org.uk/wp/?p=8161</guid>
		<description><![CDATA[The User Interface
<p>This post in one in a series. Other posts you may be interested in are as follows:</p>


Converting a Proxxon MF70 Milling Machine To CNC – 1: Introduction.
Converting a Proxxon MF70 Milling Machine To CNC – 3: Controlling the MF70 Spindle Speed.
Converting a Proxxon MF70 Milling Machine To CNC – 4: A Simple Thumb [...]]]></description>
			<content:encoded><![CDATA[<h3>The User Interface</h3>
<p><em>This post in one in a series. Other posts you may be interested in are as follows:</em></p>
<div class="widget widget_links">
<ul>
<li><a href="http://www.joebrown.org.uk/wp/?p=8021">Converting a Proxxon MF70 Milling Machine To CNC – 1: Introduction.</a></li>
<li><a href="http://www.joebrown.org.uk/wp/?p=8241">Converting a Proxxon MF70 Milling Machine To CNC – 3: Controlling the MF70 Spindle Speed.</a></li>
<li><a href="http://www.joebrown.org.uk/wp/?p=8298">Converting a Proxxon MF70 Milling Machine To CNC – 4: A Simple Thumb Drive G-Code Delivery System.</a></li>
<li><a href="http://www.joebrown.org.uk/wp/?cat=765">In addition, you may be interested in my diary of progress with PCB Milling</a></li>
</ul>
<p>My layout is shown below. It may not be as intuitive or informative as the layout on a PC display, but contains everything I have found necessary for control of the Mill. (and previously the DRO&#8217;s on my other Milling Machine and Lathe.)<br />
I should stress here, that this is an overlay &#8211; i.e. a plastic-faced, easy-to-clean front which has a cut-out for the LCD display on the left, space for ON/OFF switches and Edge-detection LED below that, and on the right, covers over a set of TACT switch buttons, which protrude slightly through the container front.<br />
It is cheap and easy to make. (I laminate mine after printing the design on paper) It is also easy to change, should you want to alter the colours, wording, and even position of the legend, after changing the switch layout. (and detection in software if necessary) First and foremost then, it is adaptable.</p>
<p><img src="http://joebrown.org.uk/images/MillTable/MillTableV1.02.png" alt="" /></p>
<p>Let me now describe briefly how the above is used to control the Mill functions.</p>
<div>
<ul>
<li><font size="6" color="maroon">J</font>ogging an axis. Any axis can be jogged a pre-determined distance (number of stepper-steps) in both directions of travel. For a single jog, the relevant jog key is depressed and released, and for continuous jogging, a press-release then press and hold. The jog keys are the <img src="http://joebrown.org.uk/images/MillTable/lessthan.PNG"/> and<img src="http://joebrown.org.uk/images/MillTable/morethan.PNG"  /> on the same line as the axis you wish to jog.
<li><font size="6" color="maroon">S</font>etting <em><strong>Absolute Zero</strong></em> for an axis. This is a common operation, and so has been made as easy as possible. First of all the <img src="http://joebrown.org.uk/images/MillTable/Zero.PNG" alt="" /> pad is pressed, then the axis  <img src="http://joebrown.org.uk/images/MillTable/X.PNG"/>,  <img src="http://joebrown.org.uk/images/MillTable/Y.PNG"/>, or <img src="http://joebrown.org.uk/images/MillTable/Z.PNG"/>, is required. You then have a <em><strong>choice of methods</strong></em> you can employ to set the zero:
<ol>
<li><font size="6" color="maroon">P</font>ress <img src="http://joebrown.org.uk/images/MillTable/Zero.PNG" alt="" /> again, to <strong>select the current position</strong> of the axis you have selected as the new Absolute Zero.<em><strong> Or:</strong></em></li>
<li><font size="6" color="maroon">S</font>tart <strong>entering a decimal value</strong> using the numeric keys, (optionally preceded by<img src="http://joebrown.org.uk/images/MillTable/plusminus.PNG" alt="" />)  an optional decimal point at any position, and complete entry of the number by pressing the <img src="http://joebrown.org.uk/images/MillTable/enter.PNG" alt="" /> pad. <em><strong>Or:</strong></em></li>
<li><font size="6" color="maroon">P</font>ress the axis key <em>again</em> to select <strong>setting the absolute zero by edge-detection</strong>. Then using the <img src="http://joebrown.org.uk/images/MillTable/morethan.PNG" alt="" /> and <img src="http://joebrown.org.uk/images/MillTable/lessthan.PNG" alt="" /> pads co-responding to the axis you are setting, jog the axis until the tool hits the work. A flashing &#8216;<strong>E</strong>&#8216; will be displayed alongside the relevant axis display on the LCD, until the edge is found. The tool will auto-retract when an edge is detected, and the position at which the edge was detected will be stored as the Absolute Zero for that axis.</li>
</ol>
</li>
<li><font size="6" color="maroon">S</font>etting <em><strong>a preset value</strong></em> for an axis. This is also a common operation. First of all the axis for which we want to set a preset is pressed: <img src="http://joebrown.org.uk/images/MillTable/X.PNG"/>,  <img src="http://joebrown.org.uk/images/MillTable/Y.PNG"/>, or <img src="http://joebrown.org.uk/images/MillTable/Z.PNG"/>. You are then invited to select a preset number 0-9. When this is done, you then have a <em><strong>choice of methods</strong></em> you can employ to set the preset value:
<ol>
<li><font size="6" color="maroon">P</font>ress <img src="http://joebrown.org.uk/images/MillTable/Zero.PNG" alt="" /> to <strong>select the current position</strong> of the axis you have selected as the new preset value.<em><strong> Or:</strong></em></li>
<li><font size="6" color="maroon">S</font>tart <strong>entering a decimal value</strong> using the numeric keys, (optionally preceded by<img src="http://joebrown.org.uk/images/MillTable/plusminus.PNG" alt="" />)  an optional decimal point at any position, and complete entry of the number by pressing the <img src="http://joebrown.org.uk/images/MillTable/enter.PNG" alt="" /> pad. <em><strong>Or:</strong></em></li>
<li><font size="6" color="maroon">P</font>ress the axis key <em>again</em> to select <strong>setting the preset value by edge-detection</strong>. Then using the <img src="http://joebrown.org.uk/images/MillTable/morethan.PNG" alt="" /> and <img src="http://joebrown.org.uk/images/MillTable/lessthan.PNG" alt="" /> pads co-responding to the axis you are setting, jog the axis until the tool hits the work. A flashing &#8216;<strong>E</strong>&#8216; will be displayed alongside the relevant axis display on the LCD, until the edge is found. The tool will auto-retract when an edge is detected, and the position at which the edge was detected will be stored as the selected preset value for that axis.</li>
</ol>
</li>
<li><img src="http://joebrown.org.uk/images/MillTable/absinc.PNG" /> Selects between the use of Absolute and Incremental co-ordinate values.</li>
<li><img src="http://joebrown.org.uk/images/MillTable/inchmm.PNG" /> Selects between the use of Imperial (inches) and Metric (mm) method of measurement.</li>
<li><img src="http://joebrown.org.uk/images/MillTable/clearcancel.PNG" /> Is used to clear a number, or cancel an operation if one is in progress.</li>
<li><img src="http://joebrown.org.uk/images/MillTable/func.PNG" /> Is the multi-purpose entry key for a wide variety of operations and data entry. This will be discussed later, with each function detailed in a table.</li>
</ul>
</div>
<h3>Implementation</h3>
<p>Currently, and as has been briefly mentioned above, the keypad is implemented as a matrix of low-cost, but robust, TACT switches. The rows of which are driven low in turn, by 4 outputs from PORT D of the PIC Micro-controller. The values of each column is tested in turn by 5 inputs on PORT A of the PIC Microcontroller.<br />
Schematics of the keypad and controller board are given below:<br />
<div class="wp-caption alignnone" style="width: 650px"><img alt="MillTable Keypad Matrix Schematic" src="http://iloapp.joebrown.org.uk/data/_gallery//public/49/1330501705_resized.png" title="MillTable Keypad Matrix Schematic" width="640" height="362" /><p class="wp-caption-text">MillTable Keypad Matrix Schematic</p></div><br />
<div class="wp-caption alignnone" style="width: 914px"><img alt="Mill Table Controller Schematic using PIC18F4620" src="http://iloapp.joebrown.org.uk/data/_gallery//public/49/1325333682_resized.png?width=904&#038;height=627" title="Mill Table Controller Schematic using PIC18F4620" width="904" height="627" /><p class="wp-caption-text">Mill Table Controller Schematic using PIC18F4620</p></div></p>
<p>Worth mentioning here, is that the &#8216;gaps&#8217; on the 1st column of the keypad schematic, can be regarded as &#8216;phantom&#8217; keys. Use of this is made in implementing the edge-finder, which occupies the &#8217;slot&#8217; immediately above S20 on the keypad schematic, and is thus activated by RD5 and detected on RA0. Special code is executed every time the keypad is scanned, to test this location 1st, and it therefore takes priority over every other key.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.joebrown.org.uk/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.joebrown.org.uk/wp/?feed=rss2&amp;p=8161</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting a Proxxon MF70 Milling Machine To CNC  &#8211; 1</title>
		<link>http://www.joebrown.org.uk/wp/?p=8021</link>
		<comments>http://www.joebrown.org.uk/wp/?p=8021#comments</comments>
		<pubDate>Tue, 13 Mar 2012 06:36:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Mechanical Engineering]]></category>
		<category><![CDATA[PIC Microcontroller]]></category>
		<category><![CDATA[Workshop]]></category>
		<category><![CDATA[Circuit Board production]]></category>
		<category><![CDATA[CNC]]></category>
		<category><![CDATA[Isolation Routing]]></category>
		<category><![CDATA[MF70]]></category>
		<category><![CDATA[Milling]]></category>
		<category><![CDATA[Proxxon MF70]]></category>
		<category><![CDATA[Stepper Motors]]></category>

		<guid isPermaLink="false">http://www.joebrown.org.uk/wp/?p=8021</guid>
		<description><![CDATA[Overview</p>
<p>This post in one in a series. Other posts you may be interested in are as follows:</p>


Converting a Proxxon MF70 Milling Machine To CNC – 2: The User Interface.
Converting a Proxxon MF70 Milling Machine To CNC – 3: Controlling the MF70 Spindle Speed.
Converting a Proxxon MF70 Milling Machine To CNC – 4: A Simple Thumb [...]]]></description>
			<content:encoded><![CDATA[<h3>Overview</H3></p>
<p><em>This post in one in a series. Other posts you may be interested in are as follows:</em></p>
<div class="widget widget_links">
<ul>
<li><a href="http://www.joebrown.org.uk/wp/?p=8161">Converting a Proxxon MF70 Milling Machine To CNC – 2: The User Interface.</a></li>
<li><a href="http://www.joebrown.org.uk/wp/?p=8241">Converting a Proxxon MF70 Milling Machine To CNC – 3: Controlling the MF70 Spindle Speed.</a></li>
<li><a href="http://www.joebrown.org.uk/wp/?p=8298">Converting a Proxxon MF70 Milling Machine To CNC – 4: A Simple Thumb Drive G-Code Delivery System.</a></li>
<li><a href="http://www.joebrown.org.uk/wp/?cat=765">In addition, you may be interested in my diary of progress with PCB Milling</a></li>
</ul>
<p>This project has been driven by a desire to free myself from the lengthy, expensive, fiddly, and extremely dirty, business of producing printed circuit boards. (PCBs)<br />
The name, and it&#8217;s acronym have already become a misnomer in forward-thinking British Schools and elsewhere, where the production of circuit boards is being done by a wholly mechanical process, rather then photography and etching with acid. This process has been given the title &#8216;<strong>isolation routing</strong>&#8216;, and the waste product &#8211; a mixture of copper and circuit board substrate &#8211; be it SRBP or fibreglass, is far easier to reclaim and recycle than the disgusting result of etching copper with Ferric Chloride solution, or it&#8217;s even more noxious alternatives. As important is the question of quality and repeatability &#8211; readers of my posts may remember several occasions when I complain that my home-made circuit boards do not live up to expectations, especially in winter when my &#8216;chemical&#8217; lab (a walled-off section of my garage) is cold.</p>
<p>There were several constraints on my project, not the least of which was cost. I could not afford a CNC milling machine capable of the accuracy required, nor lash-out on expensive suites of software to drive proprietory drivers.<br />
Secondly, I do not want a PC in my workshop, they are a liability, prone to crashing, and limit choices too much.<br />
Thirdly, I wanted to make use of software tools I already have, in my case the Eagle Editor, plus tools that as well as tried and tested, were available free on the Web.</p>
<p>My modus-operandi is relatively straight forward:</p>
<div class="widget widget_links">
<ul>
<li>Select a small, reasonably-priced Milling machine and convert it to CNC i.e fit stepper-motors to each of the axes X, Y and Z.</li>
<li>Design and construct MOSFET driver boards for the stepper motors using readily-available and reasonably-priced components.</li>
<li>Design and construct a controller-board that accepts as it&#8217;s input a text-file containing G-Code instructions, and which generates control signals to the stepper-drivers as it&#8217;s output.</li>
<li>Use Eagle as my circuit-board design tool, and use the plug-in &#8216;pcb-gcode.ulp&#8217; to convert the Eagle files into G-Code drill and routing files.</li>
</div>
<p>Note that there&#8217;s nothing particularly novel about my list above, all of these things have been done before. Further, almost each of the stages mentioned can be substituted by the purchase of a commercial equivalent.</p>
<p><strong>Difficulty and Facilities</strong><br />
Anyone contemplating treading a similar path to mine will probably wish to avail themselves of the short-cuts a commercial offering might bring, due either to their lack of facilities or feeling that their skill-set precludes parts of the path I have chosen.<br />
I have to be honest here. I have a well-equipped engineering workshop (my garage has no room for a car anymore). It <em>will</em> be possible to do the mechanical conversion of the MF70 to CNC without the use of a lathe, but more difficult.<br />
The electronics, though relatively trivial, needs to be produced to a reasonable standard &#8211; after all, it will be driving machinery. So you must be able to solder correctly, and follow a circuit diagram and printed-circuit layout.<br />
What you don&#8217;t need, is any software-engineering skills, though if you did, these would be useful for customising the code.<br />
Oh yes, you will need to brush-up on your understanding of g-codes, as you will probably want to edit in some small way, the files produced after running pcb-gcode.ulp in Eagle.</p>
<p>It would be useful to point out that this post is only the first of many on this topic. I will attempt in this post and all others that follow, to explain everything I&#8217;ve done, so please be patient. Email requests for information not yet presented may be politely ignored, though comments and queries on what has already been presented are welcome. There is a photo album which will be updated from time to time, and this can be found here: <a href="http://cullercoats.joebrown.org.uk/#49.81" target="_blank">http://cullercoats.joebrown.org.uk/#49.81</a><br />
so that your question(s) may be answered by referring to it. A Shockwave viewer to the album is embedded below. Photos are best viewed full screen.<br />
<object width="464" height="348" type="application/x-shockwave-flash" data="http://iloapp.joebrown.org.uk/gallery/swf/embedFlashGallery.swf?albumId=49&#038;galleryLocation=cullercoats&#038;domainName=joebrown.org.uk" name ="embedFlashGallery"><param name="movie" value="http://iloapp.joebrown.org.uk/gallery/swf/embedFlashGallery.swf?albumId=49&#038;galleryLocation=cullercoats&#038;domainName=joebrown.org.uk"/><param name="quality" value="high"/><param name="bgcolor" value="#000000"/><param name="allowScriptAccess" value="always"/><param name="allowFullScreen" value="true"/><a href="http://cullercoats.joebrown.org.uk/#49">http://cullercoats.joebrown.org.uk/#49</a></object></p>
<p>A Photo Album documenting the experiments whilst developing the Spindle Speed Controller is also available here: <a href="http://cullercoats.joebrown.org.uk/#53.22">http://cullercoats.joebrown.org.uk/#53.22</a>, and a Shockwave viewer to this album is embedded below.<br />
<object width="464" height="348" type="application/x-shockwave-flash" data="http://iloapp.joebrown.org.uk/gallery/swf/embedFlashGallery.swf?albumId=53&#038;galleryLocation=cullercoats&#038;domainName=joebrown.org.uk" name ="embedFlashGallery"><param name="movie" value="http://iloapp.joebrown.org.uk/gallery/swf/embedFlashGallery.swf?albumId=53&#038;galleryLocation=cullercoats&#038;domainName=joebrown.org.uk"/><param name="quality" value="high"/><param name="bgcolor" value="#000000"/><param name="allowScriptAccess" value="always"/><param name="allowFullScreen" value="true"/><a href="http://cullercoats.joebrown.org.uk/#53">http://cullercoats.joebrown.org.uk/#53</a></object></p>
<p><H3>Mission Impossible?</H3></p>
<p><em>&#8220;Good morning, Mr. Phelps. Your mission, Jim, should you choose to accept it..&#8221;</em></p>
<p>The art of the possible is to break down a complex task into it&#8217;s constituent parts, analyse these, deciding on inputs and outputs from each task, and devising a solution to attain this. So as a taster, let&#8217;s look at what we have to deal with as an output of the circuit-board <em>design</em> process:</p>
<table>
<tr>
<td>
<div class="wp-caption alignnone" style="width: 371px"><img alt="High-Voltage Op-Amp PCB" src="http://joebrown.org.uk/images/MillTable/HV_OpAmpFullBoard.PNG" title="High-Voltage Op-Amp PCB" width="361" height="283" /><p class="wp-caption-text">High-Voltage Op-Amp PCB</p></div>
</td>
<td>
<div class="wp-caption alignnone" style="width: 370px"><img alt="High-Voltage Op-Amp Board - drill layout only" src="http://joebrown.org.uk/images/MillTable/HV_OpAmpHoles.PNG" title="High-Voltage Op-Amp Board - drill layout only" width="360" height="277" /><p class="wp-caption-text">High-Voltage Op-Amp Board - drill layout only</p></div>
</td>
</tr>
</table>
<p>For my example, consider only the <em>drilling</em> process of the holes shown on the rightmost picture above.<br />
Running <em>pcb-gcode.ulp</em> in The Eagle editor will produce some files, in amongst which is the drill file &#8211; containing a list of g-code instructions to perform the drilling operation. The file isn&#8217;t very big, but even so, I&#8217;ll list only the 1st part of it which shows all relevant g-code content we need to process.</p>
<p><span class="codetext"></p>
<pre>
<font color="blue">
N01 ( This gcode generated by C:/Program Files/EAGLE-4.16r2/ulp/pcb-gcode.ulp )
N02 ( Copyright 2005 by John Johnson. See readme.txt for licensing terms. )
N03
N04 ( This file generated from the board C:/Program Files/EAGLE-4.16r2/projects/Line mixer/HV_OpAmp_Discr.brd )
N05 ( This file generated 12/03/2012 07:02:59  )
N06
N07 ( T01 0.600000 )
N08 ( T02 0.812800 )
N09 ( T03 1.016000 )

N10 G21
N11
N12 G90

N13 M05
N14 G00 X139.7000 Y86.3600 Z193.0400
N15 M06 T01  ; 0.6000
N16 G00 Z0.5080
N17 M03
N18 G04 P3.000000

N19 G00 Z0.508000
N20 G00 X-11.1125 Y94.2975
N21 G01 Z-3.0480 F127.00
N22 G01 Z0.508000
N23 (R0.5080  P10.000000)
N24 (G00 Z0.508000)

N25 G00 X-16.1925 Y86.3600
N26 G01 Z-3.048000
N27 G01 Z0.508000
N28 (G00 Z0.508000)

N29 G00 X-20.3200 Y93.9800
N30 G01 Z-3.048000
N31 G01 Z0.508000

N32 M05
N33 G00 X139.7000 Y86.3600 Z193.0400
N34 M06 T02  ; 0.8128
N35 G00 Z0.5080
N36 M03
N37 G04 P3.000000
N38 G00 Z0.508000

N39 G00 X-10.1600 Y85.0900
N40 G01 Z-3.0480 F127.00
N41 G01 Z0.508000
N42 (R0.5080  P10.000000)
N43 (G00 Z0.508000)

N44 G00 X-10.1600 Y92.7100
N45 G01 Z-3.048000
N46 G01 Z0.508000
N47 (G00 Z0.508000)

N48 G00 X-12.7000 Y85.0900
N49 G01 Z-3.048000
N50 G01 Z0.508000
N51 (G00 Z0.508000)

N52 G00 X-12.7000 Y92.7100
N53 G01 Z-3.048000
N54 G01 Z0.508000
N55 (G00 Z0.508000)
</font>
</pre>
<p></span><br />
I&#8217;ve added line numbers to the original file, so that I can refer to these in what follows. I have also broken the text in to meaningful chunks, each chunk performing a discrete mini-task.<br />
I&#8217;ll briefly discuss some of the above, leaving the reader to fathom the remainder, using a good g-code reference. In the following, please ignore the bracketed code in the text.</p>
<p>First of all, two aspects of the above may have occurred to you as a little strange, the first being that some of the X-coordinates are negative, the other that the Y-coordinates have a large offset applied to them.<br />
The first phenomenon results from Eagle insisting that my board is drawn upside down &#8211; and yes it is, my track is on the &#8216;top&#8217; of the board. The second is easy, in my layout I cropped the board from it&#8217;s original Euro-card size to the top left corner, rather than the bottom left. (mea culpa) This will be clearly seen if you load my board into your Eagle Editor.</p>
<p>N13 thru N18 represent a tool-change sequence &#8211; a set of instructions to the controller to effect the loading of a tool &#8211; tool number 1 in this case.<br />
The <strong>M05 </strong>instruction on line N13 tells the controller to switch off the spindle motor<br />
The<strong> G00</strong> instruction on line N14, instructs the controller to move the axes to the X, Y and Z positions given, so as to effect easy change of the tool.<br />
On line N15, the <strong>M06</strong> instruction, followed by the tool identity <strong>T01</strong> indicates that the controller should load Tool 1, in this case a drill 0.6mm in diameter.<br />
Line N16, a <strong>G00</strong> instruction tells the controller to lower the tool to a position 0.508mm above zero, where zero is the surface of the workpiece.<br />
The <strong>M03</strong> instruction, on line N17, tells the controller to switch the spindle back on.<br />
On line N18, the <strong>G04</strong>, followed by a pause period <strong>P3.0</strong>, tells the controller to wait. (until motor comes up to speed)</p>
<p>The above sequence will be repeated every time a tool change is required.</p>
<p>Now following the above, there is a drilling operation:</p>
<p>On line N19, the Z-axis is lowered to 0.508mm above zero &#8211; yes, this is probably superfluous, but I didn&#8217;t write/produce this code!<br />
The <strong>G00</strong> instruction on line N20, tells the controller to move to the position X-11.1125, Y94.2975.<br />
Line N21 is the drilling operation. <strong>G01</strong> instructs the controller to lower the tool into the work for a distance of 3.048mm, at the specified feed-rate of 127mm per minute.<br />
When this is complete, line N22 instructs the controller to raise the tool back to 0.508mm.</p>
<p>The above action is repeated for each hole required in the board, with tool-changes when hole diameter changes.<br />
The codes I have emboldened above, plus one or two more for setting absolute/incremental mode, and dimensional units inches/millimeters, are all that are required to drill a board.<br />
I am not intending to provide a reference here, so you should discover for yourself exactly what is meant by the above-used codes, paying particular attention  to the difference between <strong>G00</strong> and <strong>G01</strong>.</p>
<p>At this point, a good exercise would be to load up the small HV_OpAmp project, and viewing the board, cursor around the design comparing the coordinates with those given in the drill file above.<br />
<strong>Downloads</strong><br />
I&#8217;ve copied the HV_OpAmp board and schematic files here:<a href="http://joebrown.org.uk/images/MillTable/HV_OpAmp_Discr.brd"> http://joebrown.org.uk/images/MillTable/HV_OpAmp_Discr.brd</a><br />
and here: <a href="http://joebrown.org.uk/images/MillTable/HV_OpAmp_Discr.sch">http://joebrown.org.uk/images/MillTable/HV_OpAmp_Discr.sch</a><br />
Also a copy of the drill file produced by pcb-gcode.ulp here:<a href="http://joebrown.org.uk/images/MillTable/HV_OpAmp_Discrbd.nc"> http://joebrown.org.uk/images/MillTable/HV_OpAmp_Discrbd.nc</a><br />
<strong>Links</strong><br />
The pcb-gcode.ulp software is available here: <a href="http://pcbgcode.org/list.php?12" target="_blank">http://pcbgcode.org/list.php?12</a><br />
One example of sites dedicated to PCB Isolation Routing: <a href="http://www.brusselsprout.org/PCB-Routing/" target="_blank">http://www.brusselsprout.org/PCB-Routing/</a></p>
<p><strong>Reality &#8211; a hard or soft landing?</strong></p>
<p>In the above I refer to <em>the controller</em> at almost every other phrase. Put simply, this chap/gal/entity is an <em>ideal</em> controller &#8211; one who will interpret and carry out the instructions given in an safe, precise and expeditious manner, in other words carry out the operations in both <em>spirit</em> <em>and substance</em>.</p>
<p>Of course in the real world, there will be some instructions which cannot be carried out by the machine, without some human intervention, so that our <em>controller</em> refers to the machine/man <em>meld</em>.<br />
In practical terms then, the <em>controller</em> will actually be somewhere between simply a human automaton, sitting in front of a manual milling machine equipped with DRO, reading the above file, and twiddlling the knobs, to a fully-blown automatic monster, in which every operation is fully automated.<br />
My project aims for as much automation as is possible, given the constraints discussed above. On the MF70 CNC conversion discussed, the only operation in which there will be human interaction, once a g-code file execution is taking place, will be in the tool-change process, and this will be made as simple as unloading the current tool and fitting the one indicated.</p>
<p>So the execution of g-codes is conditional on the facilities available on the system running them, but there are also other matters to consider. Taking the apparently simple instruction of turning on the spindle motor, <strong>M03</strong> in the above code. How fast should we run the motor at?<br />
If the spindle motor will only run at one speed on your machine, then do you really care? As an engineer though, you should be matching the spindle speed to that required for correct operation with the tool diameter, and the material you are cutting &#8211; anything less will lead to less-than-perfect results.<br />
So satisfactory execution of your g-code will rely on your correctly pre-programmed information taking regard of these parameters.</p>
<p>Again, I have tried to program as much facility into the controller to automagically select the correct speed, given tool diameter and materials, but bear in mind that the first (and currently only) aim of the project is the small-scale production of circuit boards. Source-code will be available for those who wish to extend and/or modify any functionality.</p>
<p><H3>Command, Control, &#038; Safety</H3></p>
<p>Before beginning this project I trawled the Web for ideas. In most of the home-brew designs offered, it appears to be expected that the human be a constant spectator to milling operations, ready to intervene when &#8217;something goes wrong&#8217;. The designs offer very little in the way of elementary protection against the self-destruction of stepper-motors for example. This project implements limit-sensing and also edge-sensing as aids to safety and security. The edge-sensing should be considered an essential, as without it, tool-changing will be boring and tiresome.</p>
<p><strong>Stepper Control</strong></p>
<p>Control of each of the stepper motors is via a MOSFET driver board, Parking &#038; Sense Board and ancilliary wiring. Although these items are separate, they should nevertheless be considered together as an aid to understanding.</p>
<table>
<tbody>
<tr>
<td>
<div class="wp-caption alignnone" style="width: 892px"><img alt="MOSFET Stepper Driver V2.00" src="http://joebrown.org.uk/images/MillTable/StepperCardV2_schematic_small.PNG" title="MOSFET Stepper Driver V2.00" width="882" height="486" /><p class="wp-caption-text">MOSFET Stepper Driver V2.00</p></div></td>
<td>There is really not much to say about this circuit. It simply converts the TTL voltage-levels from PIC controller, into a high-current drive for each of the 4 phases of a stepper motor. Requirements of each MOSFET are a very low R<sub>DS</sub>, and a Gate-Source turn-on voltage of less than 4.5volts.</td>
</tr>
<tr>
<td>
<div class="wp-caption alignnone" style="width: 718px"><img alt="Stepper Wiring" src="http://joebrown.org.uk/images/MillTable/StepperSupply_small.png" title="Stepper Wiring" width="708" height="541" /><p class="wp-caption-text">Stepper Wiring</p></div>
</td>
<td>The 4 phases from the board above should be connected to the corresponding inputs here. <strong>GND</strong> is self-explanatory, but <strong>Sense</strong>, <strong>Normal</strong> &#038; <strong>Park</strong> have the following significance. <strong>Sense</strong> should be regarded as an output from the wiring, and reflects the state of the 5volt supply to the motor. This is taken to a sampling node on the Parking Sense wiring shown below.<br />
<strong>Park</strong> &#038; <strong>Normal</strong> are two distinct 5 volt supplies, only one of which will be active at any given time. Both these lines are output from relay contacts on the Parking/Sense wiring below.<br />
The two micro-switches form the limit switches on each axis e.g. Left &#038; Right on the X-axis.It will be seen the the &#8216;<strong>Normal&#8217;</strong> supply is made available to the motor, when these switches are not activated, and the &#8216;<strong>Park</strong>&#8216; supply when one or other of the switches are activated i.e. at the limit-of-travel of an axis. A fuse protects the motor windings from stall currents.</td>
</tr>
<tr>
<td>
<div class="wp-caption alignnone" style="width: 877px"><img alt="Parking &#038; Sense Wiring" src="http://joebrown.org.uk/images/MillTable/ParkingSense.png" title="Parking &#038; Sense Wiring" width="867" height="584" /><p class="wp-caption-text">Parking &#038; Sense Wiring</p></div>
</td>
<td>Under default conditions, the line <strong>PARK_ON</strong> from the PIC controller is LOW, so that the MOSFET is switched OFF, and hence the relay is de-energised. Motor supply in these circumstances is available via <strong>NORMAL</strong>.<br />
Consider the following scenario: One of the limit-switches on the above wiring has been activated. We can follow the path of the 5volt supply from it&#8217;s source on this wiring, via the &#8216;<strong>NORMAL&#8217;</strong> route and discover it broken by the activated switch. &#8216;<strong>SENSE</strong>&#8216; will fall to <strong>zero</strong> volts.<br />
This negative-going signal is filtered by R3 and R4 and given to a control pin on the PIC Controller via <strong>/LIMIT</strong>.<br />
What happens next, depends on what the context of the operation being carried out was.<br />
Most importantly it is worth noting that<em> if the controller took no action, power has been removed from the motor</em>, so it will not stall when a limit is reached.<br />
Special provision is made here for the case where an axis has been &#8216;deliberately&#8217; driven to a limit &#8211; such as a parking position. Should it be pertinent, the PIC will activate the <strong>PARK_ON</strong> line to the small MOSFET relay-driver, hence switching the 5volt supply to <strong>PARK</strong>. Referring back to the stepper wiring above, there is now a path via the activated limit-switch and control of the situation is re-asserted by the controller software. </td>
</tr>
<tr>
<td>
<div class="wp-caption alignnone" style="width: 476px"><img alt="Edge Finder Wiring" src="http://joebrown.org.uk/images/MillTable/EdgeFinder.png" title="Edge Finder Wiring" width="466" height="431" /><p class="wp-caption-text">Edge Finder Wiring</p></div>
</td>
<td>Although very important in enabling the automation of tool height measurement, and lateral position with respect to the work, the Edge Finder has an important safety and protection role also. Attempting to drive a tool downwards through work whilst the spindle is not revolving will inevitably result in the tool shattering and/or the Z-axis stepper stalling, or worse &#8211; both. The thought of high-speed steel tool fragments flying about is not one to be taken lightly, and should be avoided at all costs. A simple interlock between spindle on/off and the edge finder should proscribe against such an event happening.<br />
The MF70 motor housing is earthed, so that the tool-tip will also be earthed, whilst the table is isolated i.e. currently not connected to anything.<br />
Conveniently then, using the arrangement on the left, we can arrange for the opto-isolator transistor to turn ON, when the tool tip touches the Mill Table and/or work.</td>
</tr>
<tr>
<td>
<div class="wp-caption alignnone" style="width: 587px"><img alt="Motor Supply Master Switching" src="http://joebrown.org.uk/images/MillTable/BigRedSwitch.png" title="Big Red Switch" width="577" height="473" /><p class="wp-caption-text">Motor Supply Master Switching</p></div>
</td>
<td>There is no doubt that the ability to quickly, and with minimal force or dexterity, break the supply voltage to a motor, has saved many a limb, if not life.<br />
Even though the forces available are pipsqueak compared to a standard Mill or Lathe, I strongly advise the fitting of some form of PANIC button, one that is easy to find, and requires just a touch to activate.<br />
The POWER ON button, by contrast, should have minimum profile, and require reasonable force to activate.<br />
Here I have shown the simple scheme I use. A small micro-switch acts as the PANIC button, its actuator being a large red knob, conveniently sited, whilst the ON switch is a standard low-cost, low profile indented push-button.<br />
If control of the motor-supply is to be implemented, then the 5V output from this circuit should form an OFF function for this also.<br />
I discuss control of the MF70 motor unit at a later date.</td>
</tr>
</tbody>
</table>
<p><strong>To be continued</strong><br />
<em>This post, and the several to follow, will be edited and amended as I make further information ready for publishing.</em></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.joebrown.org.uk/wp/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.joebrown.org.uk/wp/?feed=rss2&amp;p=8021</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	<img style='margin:0;padding:0;border:0;' width='1px' height='1px' src="http://www.joebrown.org.uk/wp/wp-content/plugins/mystat/mystat.php?act=time_load&id=467191&rnd=1882899114" /></channel>
</rss>

