Coding project

I need a small coding project, that will let me practice more than just simple procedural problems, but is not so massively complicated I die of it. I also, let’s be clear here, need sleep, food, and to remember what the inside of a bathtub looks like. Nevertheless, I’m looking for things in about that order.

I don’t know enough to know what an ideal project would be, which is making this hard.

Iterating Wobblebot (and a side project)

I’ve laid the cable track, planned the new screws and bought another identical to the second…

So, as it turns out, not all lead screws are the same, even when they are supposed to be. The first one I bought has a thread that’s at the right pitch, and the right height, but the trapezium shape is too narrow. This was leading to a huge backlash problem, which I thought I would have to deal with by making anti-backlash nuts. However, the other lead screw, which I had bought thinking it was a pair, doesn’t have that. There’s more metal, and it fits snugly in the nut I have. That means there’s hardly any backlash at all.

I’m still interested in making the anti-backlash nuts, and I have other uses for a tap for that shape of screw, so I’ve ordered a length that I’m going to try to tool into a tap, with the lathe and the mill. Clamping it is going to be a right beggar – I might enclose it in a thermoplastic and clamp that instead.

Itchy: Improving stuff

The current base of Itchy is a slice of plywood on some 40mm blocks with some nuts used as spacers. I’m calling that ‘non-ideal’. It’s going to have MDF on a raised base of some kind, probably made of lengths of 20×20 extrusion. It might be removable, and probably should be, but ‘removable’ just means having countersunk screws, and maybe some kind of cover for them. ETA:I just remembered I know where there’s some sheet steel. I must remember not to overmake this.

The entire gantry swivels about the lead screw. This is slightly more than non-ideal. It’s a significant error. Mat’s been helpful about that, after he stopped cringing. (He called it an abomination. I’m so proud.) Two lead screws worked from the same stepper would move that squarely. I’ll have to add anti-backlash nuts, but that isn’t a problem – I have two bearing blocks on either side, and I tapped them both. Adding in the second cross-piece hasn’t been a priority yet. When I do it, I’ll have to do it properly and arrange everything nicely. Right now crosspiece #1 is held on with two pairs of corner braces that are bolted to each other. That was only ever temporary, but I’m impressed by how well it’s been working.

The head needs building, rebuilding, or re-re-building, depending on how I’m keeping track. The belts are currently attached to a piece of acrylic, which is not actually terrible given the amount of pressure on it. However, I’ll be wanting to put more pressure on it. This is another non-ideal part. It’s not a critical part of this round of improvements. The motor at the end of the gantry is held on by a single piece of 5mm acrylic and the power of hope. That /is/ a critical part of the current round of improvements. I need to make that out of metal, and have a bottom brace to it as well. I’d have made it out of metal but that all went badly wrong when I put it onto the rotary table on the mill. We don’t have a single bit wide enough to get the raised part of a NEMA motor sit inside a hole. On the head I got around that by not having enough of a hole in the first place, but I knew the head was temporary, and I want to do this properly. The best way is probably to make a threaded rod for the mill that has a cone ending, so I can centre-find. I’m likely to eyeball it all and hope, though.

The biggest features now are the splorted wiring everywhere like someone has disembowelled a pinata full of multi-fruit bootlaces, and the fact that some of those wires are inherently unsafe. The limit switches are currently push-to-make, and should be push-to-break. That was a speed thing, but I can invert them easily enough now I know what the firmware is, and that it’ll support the pin inversion. I have cable track now, so I can run them all safely. The head/motor holder designs both need to take into account limit switches and wiring anchor points. I tried 3D printing track, but the joints were not good enough.

In order of importance, there are the safety items first – limit switches and wiring – and then the thing that’s arguably a safety item, in that I don’t want motors to snap off and should therefore get rid of the acrylic – and then the wobble along the bottom axis, which different people call the X or the Y. I’m thinking of calling it ‘the axis with the motor nearest to me’ which is my kind of naming scheme. (It’s a bit weird, because it’s not like a graph where you plot things. It’s a graph where the axes are used to move the other axes. So a movement in the X, from left to right, can be made by a stepper that is sitting along the Y axis. This has been a source of massive confusion to me, so the milling course at makespace just has ‘long axis’ and ‘short axis’ and then nobody has to think. And, more importantly, there’s less chance of fucking up through people not thinking.)

In terms of what I’m realistically going to do first, it’s got to be the wiring, then it’ll likely be the wobbly bottom, then the motor mounting, and then a big redesign of the head. I can probably deal with the wobble a bit by only having three blocks, which would let me position the rods to minimise the travel available – but that’s the wrong way of doing it, and a double lead screw is the right way.

Itchy: current task list

Minimal task list to have a working plotter machine that doesn’t tear itself apart

  • Make all screw-driven axes have drive that’s at the same level as the drive screw. Looking at you, Y axis.
  • Metal X axis termination for motor mount, including lower brace
  • Extend and route wiring through cable track (motors and limit switches)
  • Build platen for flat things to sit on while the head moves
  • Y axis anti-backlash nut
  • Take up slack on X axis belt
  • Duct tape Sharpie to machine head

I can dodge some of these things. I don’t need to rebuild the motor mount unless it starts to fall apart. I could move the limits of the machine away from the Y axis motor. But, to make it be the version 1 that I want, it needs to have those things done.

Itchy: leaps and bounces

All of Itchy’s parts work individually, and Co-squid found a tool chain that will drive the Arduino from output from Inkscape. Inkscape has gcode extensions. Of course it has. So now, I just have to put it together. The machine went from jerky, jumpy bouncing to having some smoothness of movement today.

Co-squid goes back to her house soon, and I’m going to have to work out where to put what I am calling Itchy and she is calling Murderbot. Given the fragment of scalpel I found in the second hand parts, I think it already was a cutter. I’m going to find some way of keeping that bit of scalpel in there.

Itchy: work list

I’ve got a gantry, and some bearings; those need to be joined. The blocks need drilling, partly tapping, and to have the tender minstrations of a slitting saw applied. I’ve got a day to do that.

I need to assemble it all, including the blocks and a central lead screw. Then the gantry has to be attached to all of that. I don’t have a connector for the lead screw right now. I’ll look into oldham connectors just because I haven’t used those yet, but I’ve ordered another of the aluminium spirals. Last I looked, oldham connectors cost money. It would be fun to make one, though, so I can say I have.

The microswitches need to go onto the frame, and be wired in.

I need to 3D print cable lay, and work out where to put it, including platforms for it to run along if necessary.

My programmer squid (don’t ask) arrives tomorrow, and I need to get her up to speed. I fully expect I will then be left in her dust. I’m OK with that as long as she leaves a trail of comments.

The breadboarded electronics need to be veroboarded.

Itchy Gantry – proof of concept

With the help of an engineer at makespace, I debugged the gantry. Running a multimeter across the wires to check the resistance of each motor coil made sure that they were not burned out, but then we got out the oscilloscope and tried to work out why the hell the driver was not driving.

Finally we spotted that the live jumper that should have been 11V was only about 2V by the VMOT pin. We whipped that out, put in a different jumper to some different spots on the breadboard, and got the X motor working again. Then the Z driver got put in (although not attached to the lead screw) and they both worked.

I know how to build the Y axis on the unsupported rod, by clamping X section aluminium in front of and behind each of the cylindrical bearings. That’s then two points of contact along each rod, and each of those points can move, so I lock them together with more X section and bolt the gantry to that. That’s the minimal build that my programming friend will need.

I’ve got end stop microswitches, which I’d like to get into place as soon as possible, but cable lay is probably more important. Still, the gantry head moves and the motor on it turns, and that’s nearly the Morse Code machine I’m after for this stage of the build.

Also, am chuffed; the guy who was helping me probably has a spare bench power supply to lend me, so I’m going to be able to do more at home. He wrote down the name of the motor driver I was using, so as well as solving a problem with me, he got something definite out of it. DRV8825, for the record.

Itchy Motor Driver Failure

So, picoFarads are not the same as microFarads.

I was reading a data sheet on my phone and the mu looked enough like a p that I put in the wrong capacitor. I might already have burned it out before that, although I think the power supply was regulated and it should have been fine – but once I turned the power on properly and had everything at the right levels… the 11v line kept trending downwards. The motor power supply was grounding. The magic smoke had escaped.

I needed to check that I hadn’t burned out the motors, which I did by checking their resistance. At about 3 Ohms, that was not hugely high (burned out) or very low (a direct connection that should not exist inside the motor) so I hadn’t fragged the bigger hardware. Just one chip.

With the help of someone hiding from work at makespace, I worked out the problems I had left – chiefly that the power supply to the working motor chip was not seated properly, or was somehow resisting. I suspect a bit of fluff or dirt in the breadboard, but whatever it was, the gantry started doing what it should have when I pulled out the jumper and put in a different one to different holes.

Having someone who knows what to look up and why makes a huge difference. I’ve mostly done this project on my own, but today someone else’s knowledge took a couple of hours of what would have been hopeful poking and prodding, and made it efficient. (I need to grab the oscilloscope as a reflex, not after trying lots of other things.) So, I had the Z axis motor working, and the X axis motor moving from the same Arduino, and I haven’t yet built the Y axis at all. I’ve got about 3 weeks to do that.

ZipPi: messing with the Pi

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.