Posts

Embedded Rust

I want to become fluent in Rust, and I have a few things I'd like to do with embedded systems, so I figured I'd combine the two. This has got a lot easier since I first thought about it: there's a book . The thing I specifically want to do is regularly sample the ADC, using non-blocking APIs. This is sort of supported: There are some standardised HAL API s, and they use nb  which is a generalised non-blocking mechanism. This does mean, however, that you end up needing a spin loop that tries everything you are waiting for. You can handle interrupts, so perhaps there's a sleep function that wakes up after an interrupt has been processed? Then I could add something like Chibios events: the interrupt would set the right event flag, and the main loop would act on each event flag that was set, each time it woke up. I don't need to do this, because the RTFM framework does it already, and statically analyses your program for deadlocks. RTFM lets you define '...

Caliper data port using ADC - no conversion circuit

EspDRO  uses the ESPs ADC to avoid needing a level converter to receive caliper data. This makes me think I could do even better using STM32 ADC and Chibios: efficiently reading several calipers at once. I got out the calipers I'd previously soldered wires too, and promptly managed to break the wires off one. There are several connectors on Thingiverse now. I think I better print one. I found the EspDRO link in this one .

Another circular saw cross cut jig

Image
I never did get around to upgrading my circular saw cross cut jig for thicker material. Anyway, I found a Youtube video describing how to make one out of wood that I'm pretty sure I could get right, because it allows you to build the miter bar separately, and has a pretty fool proof way of setting it square. It's in two parts. The first makes the frame: and the second shows you how to make the guides: The whole channel is fascinating . I can't find anything like the window frame extrusion used in the videos. That would give pretty ideal results given my height limit of 10mm, but I guess what I got to work last time will work again: I just won't be able to make it any longer than last time. There are loads of good ideas here. I can't figure out exactly what some of the parts are, but I think I can figure out some equivalents in all cases.

Brushless fan

I bought a brush-less fan PFB1212UHE  for £14. It seemed like a good deal - I was mostly concerned with the air flow and static pressure. It would have been better to buy an AC fan, because I need a 60W 12V power supply to control it. That's going to double the price... At one point I also thought I was going to need a brushless motor controller, but it just runs on 12V, and has an output signal which is one pulse per revolution. I guess that makes variable speed control relatively easy. It really is a powerful fan! It weights 380g and can levitate a couple of millimetres off the desk.

Air scrubber

I've been wondering what I might do to control air quality in my very small shed. It's 1.5x1.8x2.1M, or 5.7 cubic meters, or 200 cubic feet. If I was just going to buy something specifically for this purpose, this WEN air filtration system costs £112, and would suck all the air in my shed through it twice in a minute. It's not massive - 50x45x25cm, but it would help if it was smaller, and it's noise isolation requires it to be hung from the ceiling, which I can't do if I don't want to bang my head on it. Lots of people have posted on YouTube on how to make air filtration systems using box fans. They are generally scaled up compared to the WEN, rather than down. This video points out why using a box fan isn't that good an idea. It's a rather over-complicated solution though: you can just buy a plate fan that includes a baffle. I suppose it's great if you have a fan you don't want. This video is the only attempt to make something signifi...

More digital calliper data

Image
Unlike some of the links in my previous article, my callipers output only one value, it is not 2's complement - but has a sign bit, and it changes if you switch between mm and inches on the scales - either hundredths of a mm or inch respectively. I've managed to solder some wires onto another defective set without breaking them, which has made figuring all this out easier. Perhaps just ESD damage to the other one? Since this isn't the set I'm actually going to use, and there's obviously some variation, I'm going to stop messing around with these, and start experimenting with the carbon fibre ones I'm actually going to use. The reason for using carbon fibre instead of stainless steel is just it should be easier to cut them up. I should be able to cut the jaws off with a diamond burr or similar, and people also seem to manage with a hacksaw. It turns out my carbon fibre callipers are slightly different. I tried out the logic analyser with my bitscope. He...

Pesky Digispark clones and stepper motors

Image
I'm building this cable car I found on Thingiverse. I actually started on this version , driven by a cheap stepper motor. Neither quite fits my needs: I want to mount it on the underside of a bunk bed. I settled on this idea of a usb stepper motor. I.e. a stepper motor powered and controlled via a USB connection. A Digispark ATTiny85 has 4 wires left over after USB. The stepper motor is a  28BYJ-48 . It's a unipolar stepper motor, and the driver board that came with it is enormous! I'm sure it's only economic because there's some enormous stockpile of ULN2003A chips somewhere that makes them basically free, or maybe a stockpile of actual boards. Anyway, This post explains quite well how to convert it to a bipolar stepper motor . Then I can use a DRV8835 driver carrier board, which will work at 5V and is really cheap (as low as $1.50). I've designed a mount/enclosure that looks like this: Unfortunately all I was getting the stepper motor to do was buz...