Posts

Showing posts from 2018

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

RIOT-OS

I've just stumbled on RIOT-OS , because it claims to run on an STM32F030, and I have one of those minimum system boards you can get for £1 on eBay, and I was wondering what open source support there was for it. It has a design principle I'm keen on: it's batteries included. I has a micro kernel, but also provides consistent APIs for a number of platforms. The list is impressive. Anyway - time will tell: MBED tries to do this too, but it's resource requirements are too great for many of the platforms listed by RIOT-OS, which suggests it's a lot leaner than MBED.

Current limiting for battery protection

Having figured out how to add under voltage shutdown, and reverse voltage protection for lithium battery powered modules, I obviously also need to look at over-current protection: I don't want a motor stall to set a battery on fire. Current limiting with discrete components isn't that hard, but it involves lots of components and lots of testing. The result is probably just too big. I wanted to see if there was a reasonably priced integrated solution. Anyway, it's worth observing that accuracy of a simple transistor pair is ±30%, just to set expectations on accuracy. These turn out to be called smart switches, or current limit switches. It's not easy to do parametric search on these: they have different features, as well as basics like current, voltage handling and Rds(on). Some searches: Farnell Some of these have current feedback. I.e. they have a pin which is a current source that's some fraction of the output current. They all have thermal shutdown to

VSCode

I've been trying out VSCode for golang at work. It's super fast, and gives the same experience on Mac and Linux, so I'm going to try adopting it for a few different purposes. I'm pretty unhappy with Eclipse CDT for Chibios development: I want to index to be separate for each project. Without that, it doesn't work out any of the conditional compilation, and reports lots of spurious errors. No problem doing that in VSCode, so I decided to try that first. You do seem to be expected to write a JSON config file with the include path by hand, however. Rather than do that, I wrote a little script which parses the build output and generates the file. Once that's done, IntelliSense works perfectly.