One distraction after another…

Hello, and welcome to Random Thinker.

There is a long story about how this blog/site came into being and I thought that was probably worthy of my first blog posting. The story is fundamentally a tale of starting something, getting distracted by an aspect of it, digging deeper, getting distracted by an aspect of that, digging deeper etc.

The problem is that I’ve never finished the first thing, but the good thing is that I’ve learnt a whole heap of things along the way.

So it all started with a power cut (which is a fairly regular thing) and my two DSL modems didn’t come back online properly, they’re stuck up in a fairly inaccessible attic space so it’s a pain to get up there and manually power cycle them. I did a bit of research into network power strips with the idea of being able to turn sockets on and off from my iPhone or other device on the network, but they were very expensive.

So, next idea, build one!  One of the things you’ll hopefully notice about the Random Thinker is that if we can’t something we build it!

Anyway, with a smattering of electronics experience in the dim and distant past, and some experiments with customising old wireless routers using OpenWRT a plan was born … however even simple things like the sockets themselves and the enclosure looked to be very expensive. Then I discovered the ‘energenie’ radio controlled power strip. Four sockets controlled by a small radio based remote.

Now here’s problem number 1 … this would actually have been the perfect solution to my problem, but no, RT needed a network based solution. Why? Because it’s more techy!

So the good thing is that this device has four sockets, an enclosure and what looked to be a fair amount of space to house a custom board, but that board had to be small.

So now I feel I’m dragging this out a bit, perhaps I’ll make this the subject of another blog … the long and the short of it, I did some prototyping, bought a tiny 5v switched mode PSU board, a tiny Bifferboard to provide control and network, and then started looking at how to manufacture my PCB.

In my distant past I’d done a small amount of PCB work, mostly using Ferric Chloride to etch, and old fashioned tape to lay out the board. The UV approach is now much more straightforward, and easily done at home … I came very close to buying a UV exposure unit.

Problem 2 … I only want to manufacture the one board, you can send away to have prototype boards made for you, they are great … perfect quality, multi-layer, through hole plating, solder resist, screen printing … works out about £30ish. Why don’t I just do that? Because making boards yourself is far more fun!

So then I discovered the best way to make PCB’s at home … the Zen 7×7 CNC Milling Machine kit! This is a home-build kit of a fully functional CNC milling machine that you can use to do all sorts of things, but it does a really nice job of milling PCB’s using a method called isolation routing.

A bit extreme, you may think, for one PCB … but hopefully you’re learning that that’s not the point!  You can buy the kit in a variety of different flavours, with the basic one including all the basic materials and the stepper motors, all you need in addition is a controller card and the relevant software.

Now given that RT is based in the UK, and Zen are based in the US, and those nasty customs people like to add duty/VAT payments I wanted to keep the import amout as small as possible so I just ordered the basic kit, I could get the controller card from eBay where there were loads advertised.

The kit arrived, absolutely brilliant … you only need a screwdriver, an allen key, and a vice to build it … very easy, great fun (other than pushing the bearings in), and a couple of hours later I had a fully built CNC machine … unfortunately since my controller was coming from China/Hong Kong I had to wait a couple of weeks longer until I could get going.

In the meantime I start doing some research and discovered that all of these controller cards are run through the parallel port, and because of the nature of the control mechanism, the timing is critical and certain hardware and things on the OS can cause major problems.

Problem 3 … I should have just accepted this, but NO, not RT. This can’t be sensible, not in 2011! What we need is a separate controller, USB or Network that takes that pain away. There are some available, but, guess what … very expensive.

So, recognising that this isn’t a simple task, more detailed research into the technologies was required. This meant I became quite an expert (on paper at least) on the TB6560 controller chip used in most of these controller cards … I even built a horrific test board just to prove I could get it to work. Don’t laugh, it was functional and proved a couple of points which would be very useful later.

So then, thankfully, my card arrived from China. All up and running and things were great … I spent a fair amount of time working through tooling, speeds, feeds etc for milling PCB’s but was getting some reasonable results. Then I decided that the Zen Spindle I was using wasn’t accurate enough for the seriously fine SMT boards that I needed to create, so I ordered a Wolfgang Engineering TB-650 (not shown on his web site). This spindle needed a new mount, which I could make myself using the CNC machine … this highlighted a problem with missing steps and then led me on a very long and detailed diagnosis of the Chinese TB6560 card … this resulted in me finding numerous problems … this will be the subject of another blog post.

So, not content with the Chinese card, I decided to build my own … so I used some small controller modules and built a card (with separate PWM controller for the spindle) around them. This worked really well and is still the controller card I’m using today.

But that is not the end of the story … all of these controllers use a “chopping” method to control the motors, this means turning the supply on and off really quickly and picking the point to turn it off based on the current needed at any given point in time. This all works ok, but it’s not ideal … and there seems to be a view that “linear” controllers are better, but more expensive. Then I found Linistepper and realised that this was something I could build.

I’m a great fan of the Atmel Microcontrollers (there’s one on the board above), and so they seemed like an obvious choice, but in working out how to handle getting a controllable analogue signal I discovered the Cypress PSoC devices and so will experiment with those.

So it all started with a power cut, and I’ve been through power controllers, CNC machines, controllers cards, controllers chips, stepper motor control, microcontrollers, and now the PSoC devices. The good thing is that I have built a nice controller card, and use that every day for milling PCB’s, and I have great plans for the next “linear” version. My plan is to blog about some of the key aspects of this individually and also publish the outputs on my project pages.

I still don’t have the power controller 🙂

Happy distractions. RT.