I wired up the second pump, which runs at a different voltage to the first pump, to Sparky, so we now have boards with voltages of 48v, 24v and 12v. I don’t think I’m going to be looking at 6.
I /think/ the 12v is 12v. I just got hit by a nagging suspicion that’s my stepdown to 24 and now I just don’t know. Balls. I mean, I know at the time that I tried to make a stepdown and then I found the board thta did it… but did I know at the time or did I just remember knowing? Doppleballs.
I need to make a taper of brass with a female thread that’s 3/8 at 12tpi, which is a very coarse thread. It turns out a place called Tracy Tools in Devon carries these taps, so I’m not going to have to make one. However, it’s not a usual size, so I had to check with the person paying that I could get this one tool for this one job. I /could/ make one – but I really don’t want to.
I made an initial list of hardware for the first build, which is the ordinary stuff like ‘raspberry pi’ and ‘SD card’. The big case is completely dismantled, and all useful parts I could get to easily have been stripped off. I now have far too many heat sinks, but I may use one on Itchy anyhow.
I’m not anticipating big problems, although I’m going to have to grab some extension cables for the USB dongles and the Cat5.
The engineer who came pre-installed at our workshop pointed out to me the way to do steppers.
The Arduino can tick over far faster than the stepper driver wants to move. (This may not in fact be true; I went for some rather over-spec stepper drivers. But arguendo, this is the case.) So, I use the smallest size of step, and crank up the tick rate. I can use the Arduino to time the steps so if I want to slow down, I’m just missing out a lot. That restores a lot of the pins I thought I was going to need, and makes me a happy person.
He also had some things to say about end stops and soft stops – he says it’s best to do it in the microcontroller, because that will keep track of the last direction in which you moved. If you try to cut out the stepper controller by over-riding the direction at the same time, you’re going to get a race condition.
Lastly he added the purely mechanical point that you can ramp the head up the cut-out switch rather than risking flattening it coming in from on top, and still have the hard stop beyond the switch so nothing falls off at high speed.
An end stop has two states. So, if A is triggered to make Dir explicitly head away from the stop, then /A will also have a change in state, which can be used to feed in info telling the machine there has been a hard stop. This can be used both for zeroing, and for a full ‘WTF all brakes on how did you get out of bounds’ that happens in software – but that is a slave to the directional change we apply directly to the DIR pin. It might be a toggle gate/flip-flop.
The electronics of this may need testing, but it should be possible to hit a high pin to ground and not have the direction go high. That is, to have the grounding effect be bigger than the directional instruction, If not, the software still works. Pull-up/pull-down resistors may be involved at the pin end. Need to dig out whether you can have a resistor as an out pin. Don’t think so. But as an in pin would be fine. Still, it takes an extra pin in.
So, I have an arduino breadboarded to a stepper driver right now, and I’m staring at it, and thinking about how to control several of them. If I want tiny steps, I need to be able to switch different pins on and off, and I’m going to want tiny steps. That uses up a lot of pins.
I have two possible options. The hardware one is to have all of the driver speed pins run from one analogue pin, which I then run through a couple of comparators to get the level I want. That’ll give me output from one pin, but I do have to write out some logic tables and make the board more complicated.
The software method is to have three arduinos, slaved to a master computer (probably a Raspberry Pi by serial interface to the Pi GPio) and send the full movement to each, but screen it so that each Arduino only moves for its own movements, and hence can’t get out of step. (It could miss steps and not recover them, but that’s an issue to deal with in software, and I have ideas anyhow.)
The slot-in solution is probably a Reprap RAMPS controller, so I should look into that, but it’s extra money and a Pro Mini costs under a fiver, plus I have a couple hanging around.
I could /just/ manage a two-axis machine where I operate the z axis by hand and call the machine a plotter. That’s not likely to satisfy me, though. So, it’s time to talk with the programmer I’ve roped in – she’s going to know more than me about timings, multiple threads, and the like. She thinks I know what I’m doing. Don’t tell her!
I grabbed the details for the nema 17 motor, and built a lay-out in inkscape, and then set out to mill it. It was my first time trying to use the circular vice at makespace – I stupidly failed to work out that something that had the mill directly over it might not actually be centred on the circular vice. As that was the bit that was travelling, the resulting circle was wrong and horrible. And, because I was unlucky with the direction I chose, it was wrong and horrible and too big. I stopped halfway through and tidied up.
When tidying up I managed to get a bit of swarf in my cleavage. This was not as bad as crisps usually are.
Today’s fun was making the head move on the gantry…
So, to make a CNC machine you need to make a thing, the cutter, move in X, Y, Z. There are a couple of ways you can do it – I am choosing to have the cutter moving, but I could also keep the cutter still and move the thing beneath it. My way is a moving gantry CNC cutter.
The X axis, or how far across the piece you are, is the gantry. It sits over the top of the piece. You mount it onto the Y axis, so it can run up and down. On top of the X axis, you mount the Z axis, or how high the cutter goes. In the door and up the stairs… and then turn left on the landing.
This gantry is made of an aluminium extrusion with very little variation, so I can run wheels straight along it. Those wheels are holding the blue plate on. The plate is attached to a toothed belt, and the belt goes around a pulley and around a motor with a pulley on, and back to the plate on the other side. When the motor goes one way or another, so does the plate.
The belt goes through the middle of the gantry here, where there is a hollow. Right now I’m pulling it by hand, but everything on the right is milled by me. Pleasingly, the mill I used is a manual one on which you keep the cutter still and the thing underneath it moves. It’s very satisfying.
These brackets have big spaces in to fit bearings into. Those let the bar (currently an Allen key) turn freely. That lets the pulley turn freely too. The smaller holes are for mounting. Small bolts go through and attach to the gantry. There are various ways to do that. Magic happens. The step on each is so they both sit the same distance out from the end, and the bolts are forced into a line, so the pulley is vertical.
To make the making easier, I used a laser cutter to prototype the ends in 5mm acrylic. I tried to use the chop saw but it’s in a sad state and a hacksaw ws genuinely better. Next up in the yak shaving stakes: fixing the chop saw.