TL;DR: I converted my Anycubic Linear Kossel to Klipper. Using a hacked Chromebook as the host, which is great and I recommend hacking surplus education market Chromebooks for many of hobby projects usually done with an SBC. Running in containers as a docker-compose project, which works but is dumb and wasteful. Next I’m going to try to do some systematic performance experiments to it, but that’s for a later post. Details below.
Between having more disposable income and the potential for upcoming trade weirdness, I’ve been pretty fast-and-loose about buying random bullshit that catches my fancy from China of late.
A recent Aliexpress order consists mostly of USB tampering supplies, like an exhaustive set of breakouts for all the common USB connectors, including a couple extra type C breakout boards because I’ve been doing a bit of Chromebook abuse recently and a SuzyQ cable is likely to come in handy.
In that batch, I also picked up a 10 pack of these little HW-398 USB C PD trigger boards (aka Decoy boards). They have a USB C Female connector on one end, + and – pads on the other, and a series of little pads marked with voltages that you can solder bridge to an adjacent resistor to have it negotiate that mode – apparently via any of the PD/QC/AFC protocols for doing so. They seem like they should be useful for powering projects from easily obtained junk, but merit investigation because they also seem a little sketchy and were a whopping $0.63/each.
A couple of the behaviors and design decisions are interesting:
The USB C connector is slightly inset on the PCB, which is probably good for strength, but rather unfortunate for mounting it into a project.
They DO supply 5V when none of the higher values are selected, which is both reasonable and desirable.
There is a little blue indicator LED next to the plug, and it’s marginal at lower voltage.
It appears if you set a voltage not supported by a supply, you get the next voltage down, which I gather is suggested by the standard. This is not unreasonable but has real potential for unwelcome surprises if you don’t protect your design. The most likely issue seems to be a lot of supplies don’t support the optional 12V mode: I didn’t thoroughly test, but I popped one strapped for 12V onto a little Anker 313 whose label says 5V@3A,9V@3A,15V@2A,20V@1.5A and it delivered 9V.
The IC is conspicuously unlabeled. It’s an SOP10 package, and is smart enough to do to necessary USB negotiations (which are actual USB protocol traffic performing a handshake to read and write some control registers at either end). A little googling seems to imply the chip is a Fastsoc FS312 – It’s in the right package, supports PD,PPS, and QC negotiations, which lines up with the product description, and the setting straps are connecting resistors of values 184(180kΩ)=20V, 140(14Ω)=15V, 104(100kΩ)=12V, 513(51kΩ)=9V which matches the datasheet.
I haven’t done any load testing, but I don’t see any sign of regulation on the board, so I suspect the regulation will depend entirely on the supply.
I have no idea if the USB IF considers these legitimate.
It certainly seems like a useful gadget for the parts bin. LCSC doesn’t seem to stock the FS312 IC, which is a shame since now that I know they seem to just work with the very minimal suggested circuit in the datasheet that requires only a capacitor and resistor beyond the chip and connector, I’d start designing them into boards if I could get them stuffed by the usual scumbags.
Since finally being rid of my PhD work, I’ve been hitting a bunch of projects that have been on my TODO list for ages. The oldest so far is this PSU which has been sitting for …decades… in my parts pile with some compatible machines, and I’ve always intended to try rebuilding it. It died with a “ticking” symptom some time in the mid-00s.
I finally got around to it this week, and it wasn’t a bad job. About $10 of parts, a few hours of work, and it’s back in action. Rebuild details below.
If you have an OG Xbox sitting on a shelf somewhere, this is your reminder to pull the clock capacitor and clean up whatever corrosive goo it has already vomited out. I was talking old video games with a student in one of my labs this week and it reminded me that this is one of the many projects I’ve been meaning to get to but haven’t had time for for the last several years.
Microsoft used some cheap 2.5V 1F early super caps which will inevitably fail and spray electrolyte on your motherboard, because they made some cost-cutting choices about the RTC, so now everyone with an old Xbox has to fix it.
A buddy of mine dropped me a link to TI’s new brushed DC motor driver with sensorless speed control, the DRV8214. I spent a few minutes trying to hunt down the mechanism they use to derive speed from back EMF … Continue reading →
Input conditioning is one of those things that snares novice designers, causes late-process changes that overrun expectations on cost and board area, and traditionally isn’t terribly well taught to EE/CPE students.
It’s on my mind because next week is the point in the semester where I drag UK’s current crop of EE/CPE sophomores through a lab exercise I designed about 5 years ago to drive home gate delays, static hazards, switch bounce, etc.
While I was thinking about it, an upperclassman who regularly digs up neat stuff sent me the cleverest input conditioning circuit I’ve ever encountered.
The circuit comes from the late, great Don Lancaster of TV Typewriter fame, who in addition to his published designs, wrote and self-published a number of instructional/reference books. He had a well-deserved reputation for clever, cheap, robust circuit designs, and this particular trick is the highest wizardry.
Here’s the whole circuit diagram from the text:
The design comes from his CMOS Cookbook (PDF, link to his own hosted copy of the 2nd ED), on p.317 amid a discussion of Flip-Flops and Clocks. It is presented as “An Alternate-Action Push Button” which is entirely correct but really undersells how clever it is, and has apparently been in there since the 1st edition in 1977.
The fundamental trick is that it’s a master-slave Flip-Flop where the capacitor is the master storage element, and the pair of feedback-coupled inverters is the slave. The cap tanks the next state based on the output of the first inverter when the switch is open, and induces it on the inverters on switch close. This means, in addition to latching/toggling, it de-bounces, because the capacitor sets the time constant for hysteresis. It conditions, because the load sees the output of the second inverter. No race conditions or potential oscillations, because the cap can’t charge/discharge while the switch is held. No charge is moving inside the mechanism at steady state, so it’s not leaking power. It’s brilliant.
It is only suitable for relatively slow human-scale edges, so probably not a good method for encoders or the like. You can manipulate the time constant for the de-bounce by changing the value of the capacitor, but only down to a few 10s of nF (depending on what kind of inverter you use) before it gets marginal because it doesn’t have the charge to reliably throw the input of the first inverter.
Not only is it ridiculously cheap and simple as presented, which I think intends a 4067 or 74HC04, you can built it out of anything. Any inverting CMOS gate will work. Any inverting TTL gate will work. Ridiculous old RTL or DTL inverters work. A pair of N-Channel FETs (another CircuitJS link, has an extra transistor on the output for integrity reasons) with pullups to build your own cruddy NMOS inverters works. As would P-channels with pull-downs, or BJTs with resistors for constructed RTL (though doing it that way is leaky), or various other assemblages of tiny mass produced minimum cost components to make it even more minimal (though maybe not cheaper in a modern context).
I appreciate a clever domain-crossing design, and this is the highest form.
I’ve had an Anbernic RG351P for roughly 2 years now, and it’s an absolutely delightful object.
For those unfamiliar: the RG351 is an example of a class of little gaming emulation handhelds that started back in the mid-to-late 2000s with things like the Dingoo A330. They are, essentially, a tiny ARM (+ usually Linux) machine the size and shape of a handheld gaming device, set up with a built-in controller specifically to run games in emulation. The stock firmware on the RG351 is an ancient EmulationStation/RetroArch/Linux stack, but there are better alternatives – IMO, throwing in a decent SD card loaded with AmberElec is the first thing to do when you get one. It will play essentially everything from the dawn of gaming through the PlayStation and some (but not all) of the Nintendo 64 library, and has limited/marginal support for PSP and DS. It is …straightforward but not the sort of thing I’ll link… to obtain the full ROMsets for these platforms, they are frankly not that large. I paid about $90 for mine, I think they’ve gone up a bit, but there are a whole range of similar options at different price points, build qualities, and platform support.
The build quality, however, isn’t perfect. It’s small-brand China-export hardware. You know you have to be a little careful with it just from handling (I keep mine in a fitted case when throwing it in a bag). I’ve been through a screen (I got red lines in my original after about a year), re-gluing the back rubber pads (original glue melted), and now after two years I wore through the membrane behind the “A” button, and that’s actually what this post is about.
I opened it up, found the worn though button, looked around online, couldn’t any in stock, contacted Anbernic through their AliExpress store front (none available), asked the subreddit (no leads), and couldn’t come up with any exact replacement membranes.
HOWEVER on inspection, the membranes from the similar Powkiddy RBG10 appeared extremely similar, and those are readily available (as a $12ish pack of all the membranes and button caps to refit an RGB10, which includes two of the 4x membranes). I ordered this set via Aliexpress, and ~16 days later when it showed up, can confirm the membranes are slightly different, but drop-in compatible.
As you can see from the photos, the Powkiddy membranes have a bit more flat area, and the bottoms of the mounting holes are filled in rather than fully punched through, but the dimensions are exactly right. The height and force of the domes is even almost identical to the originals, and at effectively $6/membrane it’s a very reasonable repair.
Last summer I posted about some tiny stepper motors from the internet, thinking about them as an alternative to mechatronic standbys like those terrible SG90 type servos or larger and differently terrible 28BYJ-48 geared steppers driven through a ULN2003.
At the time, I tried one with an A4988 stepstick from the top of my parts bin, and it didn’t work, so I figured there was some limitation and stuck to directly driving with H-bridges. …it turns out the “limitation” was that the cheap current-setting potentiometer on that particular stepstick was broken so it was driving no output current.
Discoveries:
Those little bipolar stepper motors work fine with bipolar stepper drivers.
Generational gains in bipolar stepper driver ICs are substantial (eg. A4988 -> TMC2208).
The venerable 28BYJ-48 unipolar stepper motor is easily modified to run from bipolar drivers.
I have an Onn Surf 8 (One of the surprisingly-not-that-shitty ultra-cheap Walmart tablets) that my research group bought a couple of to use as Android dev testbeds. I’ve been occasionally using it as a normal tablet since I have it around, and have been consistently irritated by the collection of bloatware it comes with…. so I decided to hack it. To tl;dr this whole thing, ignore the collection of typically scammy Android dev forum and blogspam crud, and use the open-source mtkclient for your MediaTek Android device hackin’ needs.
I’ve wanted a hard-copy terminal for a while – both to play with and to use for explaining why serial works the way it does, but they tend to be expensive. Most of the common hard-copy terminals also aren’t really convenient objects to own: loud desk-sized machines (Teletype 33 family, most DECWriters), additionally clockwork nightmares (IBM 2741, earlier Teletype devices), which speak ridiculous protocols (…ditto). This only leaves a handful of reasonable options, the most common of which are portables like TI Silent 700s and DEC LA12s, or one of the dasiywheel-printer based terminals (which are often non-period-correct things like a WheelWriter with a modern serial interface card in it).
So, of course, I’ve been idly keeping an eye out for a deal on one on the auction sites, and mid-October last year I got lucky: I scored a TI Silent 700 Mod. 745 for $34.00+S&H (about $47 all in) from a Shopgoodwill auction, and got it working.