Project: Itchy

I have just been given a lot of aluminium profile. I want to make a cnc router to allow me to engrave acrylic sheets and cut lino. The lino cutting will be the easiest problem, as it just needs a 2d movement and some human setting of the x axis. Plus a lot of glue.

So, the first thing I need to know is how the heck to build it. I don’t want to move a plate under a fixed head, if I can help it, as that makes the entire base way too big, and I don’t want to take up too much space. If I wanted to engrave an area a x b I’d need twice the run, 2a x 2b, to go from left to right. Given I might create big stuff, it’s too large for storage, and too clumsy, and I don’t want to move the platen. I think it’s called a platten. I don’t know how to spell that, so I’ve tried both ways.

So, I’m going to have to move the head, which means linear bearings and stepper motors. And stepper drivers. There should be plenty of explanations out on the internet, and I just need to find an explanation that isn’t geared to solutions I’m not using.

On the internet.


Pi-Puter – Name

The Pi-based building a computer project needs a name. It’s really just a bunch of small, separate solutions. Everything takes input or is there for output, and I just need to join things up.

Solutions -> Pi Lab/Lab Bench/Benchtop Pi
Joining things -> Sew What?/Popper Pi/Glue Sniffer/ZipPi.

ZipPi. I like ZipPi. At some point the spelling may change, or the capital letter may be decapitated, or I might decide it’s too much like Sparky, but for now, it’s ZipPi, pronounced Zippy.

Pi-Puter Notes

Useful and not so useful notes on this project.

I’m breaking it down into pre-computer tasks, rather than trying it all at once. So, organising the power supply for the pi, organising the power supply for the peripherals, and so on. I’ll need to do sound and video, wireless, and a few other things.

Pi-Puter project

I’ve got a love-bored relationship with the Raspberry Pi. On the one hand, it’s a fantastic piece of kit and really cool and you can do stuff with it. On the other hand, I don’t have anything I need to do with it. I’ve got a few ideas about things I /could/ make, but nothing has really shouted. However, I also have an old computer case that I could hack about, which has a known good power supply I don’t know to be bad, and I could make a low-powered but fun working computer out of that. I could embed everything I need into the CD and HD racks in the case, and have nothing actually show if you look into it through the fan outlets. There could be LEDs. Blue ones.

I’d need a screen, a powered hub, the pi and peripherals, and what else? Oh, tea. And a severe hatred for all mankind. Luckily, I have most of that stuff.

Sparky v2 – electronics layout

The Version 1 main board of Sparky has a circuit diagram which is neatly broken up into bits, so that every bit does one thing, and they can all be chained together to make up a whole circuit. When we had to add things, it was easy to do, because the diagram was already in bits, so we could swap bits in and out. So, I’m going to try that here. I’ll name each bit for the part, and you should be able to walk through from any part to the end result of that particular bit. Later, I’ll break down the individual bits to their actual wiring, inputs, and outputs. Important parts like capacitors are here so I don’t forget them later, and do not indicate I think a bit is finished.

Power (24 v) -> voltage converter -> 12v and 5v

12v -> smoothing capacitor -> Stepper Driver

12v -> Water pumps (filter and probe, or all in one)

Spark Power -> Spark Board* -> Spark Probe*

Spark Board* -> LVL* -> Arduino

Board cut-outs -> Arduino (input pull-ups)

Frame cut-outs (end stops) -> Arduino

5v Power Indicator LED

Arduino -> Stepper Driver

Reset mini button -> Stepper Driver

Stepper Driver -> Stepper*

* Solved problem/finished item

The spark board sits on a flying lead, and can be put in at any time. The board cut-outs allow us to drive the stepper in the opposite direction to the expected one, by over-riding the rest of the electronics, meaning we can force the probe up or down. The frame cut-outs are safety interlocks, which stop our motor when we are about to go too far, to protect the parts.

So the Arduino will be taking in the LVL pin, and four different cut-outs, and outputting five instruction pins. (Step, Direction, M0, M1, M2). It will also output the Reset pin so we can be sure the stepper driver is following the Arduino and not moving during boot-up, and the sleep pin, so we can control its waking state. The 5V line itself will power the driver itself, so we can’t power it without the LED coming on. I think the main danger to the driver is if we’re running power through the 12v line when we accidentally unplug it, so that might get changed, but for now I’m planning not to power the driver through the Arduino, which might under exceptional circumstances be powered to 5v while the board is off.

ETA: I had a quick convo with Mat and hardly made him wince at all, and I’ve reduced the 24 volt stepper/pump power line to 12 volt, and I’m happier than I was about them being on the same supply. He’s happier than he was because I told him I wasn’t in the same city as him. I was lying, but we do that for people we like. I’m told.

Sparky, redesign in software

So, I’ve probably learned everything I can about electronics from this particular TTL build. For example, I now know what TTL stands for, what 5 volts tastes like, and what a pull-up resistor is. Mat knows that explaining things to a non-expert is haaaaard and that left alone I will do crazy things. So we’ve both learned.

The main board of Sparky is a horror of add-ons, re-mapping, remaking and coloured wires. At least the coloured wires are consistent. Orange for one side of the level we want, green for the other. However, I need to replace most of the bits of the main board with the Arduino.

The step-down needs to be done in hardware. I’m not running 40 volts through an Arduino, even to see what happens[0]. The level comparisons can be done at 5 volts, and indeed it’ll be easier to do that then to twiddle analogue knobs. The first thing we’ll be finding out is whether we’re grounded. If the probe is touching the material, we want to move up. (If we can’t move up, for example because we just hit a switch and the material fell over on the probe, we probably want to cut off the spark circuit, but I’m not building relays into this.)

We want to avoid false positives, so we check a smoothed version of LVL. That smoothing is also done in hardware, with a capacitor.

If the probe isn’t touching the material, then we test to see if the smoothed LVL (see, we’re using the function, or at least a value we passed along) is 0. If so, we move down.

If neither of those things is the case, we leave well alone for Tau, where Tau is the period of the spark capacitor charging. Then we loop again.

‘move’ here is a function, which tells the stepper chip DIR, and then hits the STEP pin. I’m guessing we can do that in two lines of code, and the pause between them will be enough, but DIR might take a moment to wake up, and if that happens it can be dealt with.

So, the shape of it:

    +--Check not grounded -- if grounded move up then start loop again.
         + Check not high -- if high, move down then start loop again.
             + If nothing else, stay where you are for Tau then start loop again.

Things I’ll need:

  • LVL measurement – this will expand the timing loop if we end up sampling repeatedly
  • comparator function – /U and /D variables, vs LVL. Check that /U and /D are different and in the correct order – if no space between them, abort and complain.
  • spark delay calculator/outer timing loop
  • movement function
  • tea

On the wishlist:

  • Serial.print output in various formats
  • M0 M1 M2 pins to be isolated with dipswitches. Whatever they are.
  • more tea

[0] If I were going to be doing that, I’d use considerably higher voltage.

It’s all downhill from here

This is a blog dedicated to the making that Diana does, often in the company of others, often to the exclusion of eating, sleeping, or personal hygiene. It’s also dedicated to those who help her, and those who glaze over and rock quietly when she talks to them.

You helped!

It’s a space in which learning will often be accompanied by failure and the word ‘fuck’ whispered quietly but vehemently as the magic smoke escapes from something expensive, or with a tiny grinding sound, a drill bit breaks in a piece of steel.