Freesteel Blog » Machining

Monday, November 23rd, 2015 at 8:16 pm - - Machining

Let’s start with the most important circuit board I’ve milled in the last few days.

It’s the last one I did — and it should have been my first.

But we’re lazy at doing the necessary cutting trials, aren’t we?

There had been flaws in the circuits I had machined. In particular, some contours had not quite been fully cut leaving a little join of copper that I had to break with a scalpel. Also, some cuts were much cleaner than others.

Until I did these experiments I thought that uncut material would be at the ends of a cut, possibly due to a tool deflecting back from the cutting forces. And I imagined that the messier lines were because I was in a hurry and cutting too fast.

The truth was the exact opposite of what I thought.

Friday, November 13th, 2015 at 1:08 pm - - Machining 2 Comments »

TomC did the work of porting across the LinuxCNC based controller of the triangle machine tool on an ancient heavy desktop with a parallel port to a Beaglebone Black running Machinekit. The good news is it’s all back to working again, and I can access the UI through X11 over a network over a USB serial port, so there’s some latency, but who cares.

We heard that the BB used a special unit to generate the realtime pulses, rather than relying on a somewhat bogus “realtime” linux build. We began our investigation of the code and documentation.

The Programmable Realtime Units (there are two) attached to the ARM processor are small processors that share a few kilobytes of memory between themselves and with the the main processor and run at 200MHz in a very predictable manner, with each instruction taking one or two cycles. This provides a potential resolution of 5nanoseconds and an order of magnitude faster than the 16MHz arduino I was using for my anemometer experiments.

(My intuition is that this tech is very similar to GPUs, which have thousands of special purpose processors with their own tads of memory, shared memory, unique characteristics, and protocol for communicating with the main CPU.)

Wednesday, November 11th, 2015 at 4:29 pm - - Vero

The original purpose of the Wall Street stock market was to raise capital for big investment projects, such as railroads and steel plants. Later on it became a system for owners to take money out of their companies to fund lavish personal lifestyles by selling on their shares to speculators. The activity has about as much to do with investment as the Department of Defence is to do with defence.

Sunday, November 8th, 2015 at 6:05 pm - - Machining 1 Comment »

Occasionally hope triumphs over experience and I expose myself to another face-punch, like the one I got this morning when I learned that the triangular machine tool development had been rejected for the Innovation Vouchers Round 13.


This is lowest, most easy grant money to go for — according to everyone. You don’t even see the £5000 when you win it because it’s only paid to fit and proper people such as patent attorneys and college professors. If you can’t win one of these then you’re such a loser you don’t need to waste everyone’s time applying for anything more substantial. And boy have I wasted people’s time (including my own) in the past over other rejected projects.

Innovate UK (formally Technology Strategy Board) has only one job, which is to distribute £400million per year on the basis that:

“We work to:

* determine which science and technology developments will drive future economic growth
* meet UK innovators with great ideas in the fields we’re focused on
* fund the strongest opportunities
* connect innovators with the right partners they need to succeed
* help our innovators launch, build and grow successful businesses

You’ll note that this list does not include or imply that:

Our ambition is to acquire the most beautifully crafted set of grant applications in the world to provide a lining to the filing cabinets in our office.

You’d think it’d be obvious that a written application merely needs to meet a certain standard of expressiveness to merit being judged entirely on its content. It either passes that standard or it doesn’t, and I won’t be told that I failed because I simply didn’t sweat enough over the 1000 characters alloted on the form.

Nevertheless, here’s the case I wrote down for obtaining an innovation voucher which I intended on spending at the AMRC:

We have a CNC milling machine based on a triangular geometry that is capable of cutting steel and can be built from parts a tenth of the price of a conventional machine with the same capabilities. Several full scale prototypes have been built and have proven capable. Unfortunately neither of the inventors are trained mechanical engineers and we require expert advice on the design as well as an independent assessment of its potential.

Luckily, in these enlightened days, InnovateUK actually publishes where the grants are going, so I don’t have to file FOI requests as I once used to. The 60 winners of the previous Round 12 have been disclosed.

Here’s one of them, which is presumably intending to drive future feline growth:

To Design and build a fully automated Cat feeder that can support up to eight cats for up to 4 days or the length of a bank holiday weekend.

The feeder will also make use of modern connectivity technologies so as not to break the link between owner and cats but also allow additional functional options such as play and monitoring.

The Modular design will allow for customization for owners offering greater flexibility and increasing the consumer market this product is aimed for.

Here’s another:

New trendy Fashion line for everyone. Pick’n’Mix your t-shirt to make it suitable for you

And another:

Honesty Foods develops a liquid tea bag which contains sufficient protein and fibre to take the edge off your appetite and therefore help reduce snacking.

And another:

With the support of Innovate UK, CookieSmart is developing an exciting new Internet of Things (IoT) application for kids!

And another:

PitchForMe plans to build a platform which gives insight into the real person prior to meeting, from which employers can make informed hiring decisions. An employer would be able to fully understand a candidate’s qualities. Through a cloud based dashboard solution they will be able to find people who have aligned values and truly fit their company. Also included would be personality traits, video pitching, and work histories. Personality profiling would be available which determines strengths, how an employee works within a team, and areas for development.

I’m not making these up. This one is pretty timely:

The external expert will be able to help in defining the technological feasibility if(sic) developing a Human presence detector and linking it to an app that will alert the drive/logistics provider to the presence of human entity located within the trailer of the HGV.

This one is plainly the text of a job ad, and not an answer to a question posed in the application form. Yet somehow it got accepted:

We are looking for a talented and experienced hybrid mobile app developer (minimum 5 years experience) who has a passion for innovation, to join our team on a 3 month contract. You will be providing guidance, advice and technical leadership on a senior level to launch the re-build of our existing iOS app. Your superior technical skills will contribute to the future of the company and to the success of Must. The successful candidate will have extensive previous experience working with PhoneGap or Ionic. The successful candidate will also have experience in the build and deployment of a medium to large scale application capable of horizontal scaling. Candidates must already have the right to work in the UK without sponsorship.

Perhaps machine tools are just too passe and boring. Well, how about this:

An expert external CNC programmer will be able to create a programme for us to use on the machine. We are hoping to develop a programme that will enable us to create different extending tables of bespoke sizes just by inputting the dimensions for each table. This will enable us to create tables of an extremely high quality with precise dimensions.

Sure, it’s a great thing to do, but is it innovative?

If schools were places of learning, then this one should easily be within the capabilities of a school kid as part of an end of year project. I don’t see anyone putting such resources and needs together.

None of this makes me feel any better. In fact it makes me feel worse. Once again I’m a failure. Go suck on it.

Now that I have wallowed long enough in this particular punch in the face, you don’t need to know how much of this blogpost has already been deleted. It’s pretty lucky I don’t have any rent to pay except to the hackspace, or I’d be homeless at this rate.

Friday, October 30th, 2015 at 7:34 pm - - Machining

As you can see, I got lent a G320 servo drive to play with.


This time I put it into a slightly more sophisticated test regime than with my leadshine driver experiments involving sending 8 step pulses 1800 duration (except the first one which was 600ms duration) [in purple], then giving it 12 forward pulses from the encoder with duration 360ms followed by 4 backward pulses from the encoder of 1800ms to simulate an overshoot [in cyan]. The PWM voltage out is in yellow.

You can see opposing denser and weaker voltage layers in opposition as the driver delivers more of 24V+ and less of 24V- in equal measure in response to the inputs.


Wednesday, October 28th, 2015 at 11:08 am - - Machining

The first BeagleBoneBlack in the picture was already bust when I gave it to Tom. He broke his own one when wiring it to the triangle milling machine during replacement of its desk-top PC LinuxCNC controller system. Then, with nothing better to do, we got to work on those Leadshine DB810A servo drives and broke the Z-axis one when we wired an oscilliscope across the plus and minus motor power poles. These are temperamental devices that spend a lot of time flipping back to the error state with the red LED so we weren’t 100% sure it was broken until we did the same job to the ‘Y’-axis driver.


And that’s how we reduced three hand-held oblong items of electronic gadgetry to three lifeless plastic bricks in one day.

We took all three drivers out of the box and put them on the bench with a 24 volt power supply to verify that the remaining ‘X’-axis one was working differently on account of the fact that we hadn’t broken it yet.

Friday, October 23rd, 2015 at 4:20 pm - - Machining

A day of pain on the proxxon mini machine produced this terrible result:

In the evening I was able to work with the big machine in the closet while another meeting was going on in the Dinky main room. My got it’s such a pleasure to use. And so quiet, without these buzzing stepper motors and noisy spindles. Here’s the raw code that made the toolpaths.

I’ve been pushing so hard on this I’ve not updated anything else. Back on weekend of 10th October I had a couple of flights off Mam Tor.
I stayed the night with Becka in the TSG hut and flew with 25 other hang-gliders on Sunday. No crashes happened and I didn’t talk to many of them in the field on packing up. It’s not like being with cavers. There’s not so much use we can be to each other, other than getting in one another’s way.

And finally I spent most of the fortnight cycling down to the allotment after receiving an official warning that we’ve not been weeding it enough. This takes me past the new Kings Leadership Academy which is not in Warrington, but on the site of the out of date website of University Academy Liverpool as you can see from the signage facts on the ground:


This is just half measures. They should go for the full Bill & Ted experience and use the original sayings:

Be Excellent to Each Another

Party on, Dudes

These, in fact, have a lot more meaning and application, in the way that “Excellence is a habit” is self-centred and ultimately empty.

On the other hand “Be excellent to each other” is the motto of Noisebridge hacker space founded by Mitch Altman who explained that this is their one and only rule. It’s something that has meaning, you can act on it, and hold yourself up to it.

Furthermore, “Party on, Dudes” does make clear that we are here having a party. Life is a party. There’s enough food and toys in the room with sociable people and we’re all here to share and enjoy it. And we intend to continue this party on. Nothing could be clearer than that.

It would be nice if the students got it together to sort out that sign, and the other one, which says: “Making Great Leaders”, because someone’s got to do the goddamn work at some point, and it would be nice if such people were valued instead of ground into the ground by all these self-appointed “leaders”.

You could start with the pathologies of meaningless mottos and the deterioration in direction outlined by a interviewee on This Is Hell who began:

I recently spent a semester teaching writing at an elite liberal-arts college. At strategic points around the campus, in shades of yellow and green, banners displayed the following pair of texts. The first was attributed to the college’s founder, which dates it to the 1920s. The second was extracted from the latest version of the institution’s mission statement:

The paramount obligation of a college is to develop in its students the ability to think clearly and independently, and the ability to live confidently, courageously, and hopefully.


Let us take a moment to compare these texts. The first thing to observe about the older one is that it is a sentence. It expresses an idea by placing concepts in relation to one another within the kind of structure that we call a syntax. It is, moreover, highly wrought: a parallel structure underscored by repetition, five adverbs balanced two against three…

The second text is not a sentence. It is four words floating in space, unconnected to one another or to any other concept. Four words — four slogans, really — whose meaning and function are left undefined, open to whatever interpretation the reader cares to project on them.

Think of it as an intelligence test. Nail up a bunch of ridiculous signs around the school building and if nobody pulls them down (metaphorically and/or physically) then that school’s education has failed.

For more, there’s on-going entertainment at the FOI Website for the LDL report.

Wednesday, October 21st, 2015 at 9:09 am - - Machining

I’ve been going hammer-and-tongs at this code for almost two weeks now. To prove it’s real, here it is. No one is ever going to lock this algorithm away again. This time it’s a public good.


Back in the 1990s I implemented M. Held’s algorithm twice as it was written up, first in his PhD thesis, and later in a CAD paper. He later developed a third implementation, which I didn’t implement.

This version is a totally different approach and has the potential for being fully robust no matter what.


The plan right now is to get only this particular input shape working properly — and I can spot a few bugs still there, damn! — so that I can make a toolpath to cut a stamp, which involves area clearing, chamfering and V-groove cutting. It’s got to push through.



That’s better.

Notwithstanding a lot of technical debt I should deal with while the code is fresh on my mind, this is ready to turn into some toolpaths. Unfortunately the big machine tool in the closet is unavailable due to meetings in the spare room, so I’ll be using the mini Proxxon tool to prove this algorithm.

And while I’m packaging this up into a fit state to be presented, I need to remind myself exactly why I’ve been suckered by the Not-Invented-Here force-field and avoided using the relevant CGAL package that’s freely available and fully optimized.

For the sake of reclaiming my time I have to find a way that this code exceeds it. But it won’t be in terms of speed and efficiency, that’s for sure.

Wednesday, October 7th, 2015 at 7:52 pm - - Machining

A speculative challenge of machining some leather stamping tools out of brass has led me to do more work on my voronoi experiment hacked as part of my barmesh model.

To make a brass tool requires some area clearing, chamfering and then v-grooving the details.

Like most coders, I do suffer from Not-Invented-Here Syndrome, but at least I did look at OpenVoronoi last year.

I’ve also had a try out of jscut (an in-browser CAM system) which has a V-engrave feature that is not quite right for this application. Nevertheless, the C++ voronoi code underlying this (which I should study at some point) is here and it’s then compiled into Javascript that runs in the browser using Emscripten. Emscripten is a technology that changes everything about where you expect code to be applied.

The stuff I’m doing is quite buggy, but I can at least see a way for it to handle pure arcs in the contours coming in. Most 2D contour voronoi implementations give up once they can do polygons, because it just gets too complicated to be worth it. But this algorithm works by sampling on a regular grid and shouldn’t suffer from complexity that comes in.

The thin cyan lines is the 5-sided polygon with one concave vertex. The yellow lines is the voronoi diagram, and I’ve plotted the nodes of the mesh in different colours depending on its voronoi polygon.

Here is a sparser mesh to show that I am able to subdivide the cells (white line segments) to get to the details. (Something looks wrong at node (2,3).)

Wednesday, September 16th, 2015 at 7:40 pm - - Flightlogger

Following on from last week’s episode and the Emil’s sterling work reverse engineering the HC-SR04 echo location board, JD tapped in to a couple of pins on the surface mounted microcontroller so we could get the echo signal directly.


I’ll try to report this as straightforwardly as possible without too many diversions about how we worked it all out.

With two HC-SR04s facing one another, and as per the datasheet, the scope tracing is as follows:
Cyan is the trigger to device A, Magenta is the 40kHz 8-cycle wave generated by device A (delayed to allow the MAX232A chip to charge up), Yellow is its corresponding echo pin which is programmed to go high once the 8 cycle signal goes out, and Blue is the received signal in device B. [The corresponding wave generated by device B is received at the same time by device A which is programmed to take its the echo pin (yellow) low.]

Zoomed in on the initial cycle to see there are 8 and that their wavelength is four to a vertical division, or about 25microseconds each, corresponding to 40kHz. The transducers probably resonate at this frequency (to give a better energy to sound conversion) which is why so many more waves are received than sent out.

This is the received signal, overlaying the half-second of samples (about 10 because I’m repeating the loop with a delay of 50milliseconds) proving that it’s pretty stable.

By zooming in on a single wavelength and averaging over the previous 64 we can make it dance with the application of the fan

Device B (the receiver) is the one by the oscilloscope. By directing the fan along the sound vector we’re able to blow back the sound signal by approximately half a wavelength or about 12microseconds.

I’ve spent hours playing with this setup, but it’s only going to be any good if we can read the values using a microcontroller, like an Arduino.