The Right Tools For The Job

We’re knee-deep in new microcontrollers over here, from the new Raspberry Pi Pico to an engineering sample from Espressif that’s right now on our desk. (Spoiler alert, review coming out Monday.) And microcontroller peripherals are a little bit like Pokemon — you’ve just got to catch them all. If a microcontroller doesn’t have 23 UARTS, WiFi, Bluetooth, IR/DA, and a 16-channel 48 MHz ADC, it’s hardly worth considering. More is always better, right?

No, it’s not. Chip design is always a compromise, and who says you’re limited to one microcontroller per project anyway? [Francesco] built a gas-meter reader that reminded to think outside of the single-microcontroller design paradigm. It uses an ATtiny13 for its low power sleep mode, ease of wakeup, and decent ADCs. Pairing this with an ESP8266 that’s turned off except when the ATtiny wants to send data to the network results in a lower power budget than would be achievable with the ESP alone, but still gets his data up into his home-grown cloud.

Of course, there’s more complexity here than a single-micro solution, but the I2C lines between the two chips actually form a natural division of work — each unit can be tested separately. And it’s using each chip for what it’s best at: simple, low-power tasks for the Tiny and wrangling WiFi on the ESP.

Once you’ve moved past the “more is better” mindset, you’ll start to make a mental map of which chips are best for what. The obvious next step is combination designs like this one.

Run The Math, Or Try It Out?

I was reading Sonya Vasquez’s marvelous piece on the capstan equation this week. It’s a short, practical introduction to a single equation that, unless you’re doing something very strange, covers everything you need to know about friction when designing something with a rope or a cable that has to turn a corner or navigate a wiggle. Think of a bike cable or, in Sonya’s case, a moveable dragon-head Chomper. Turns out, there’s math for that! Continue reading “Run The Math, Or Try It Out?”

Death Of The Serial Squid: When Do You Give Up?

While searching for a connector recently, I revisited an old project of mine called the Serial Squid. This was to have been my first open-source hardware design. After completing the entire design, PCB, BOM, and preparing for a crowd-funded campaign, I eventually gave up for reasons discussed below, I’ve always thought of this as a failure, but on further reflection I see it in a new light. There were some good lessons learned along the path to abandonment.

When do you let go?  When should you push through? Continue reading “Death Of The Serial Squid: When Do You Give Up?”

Label Your Shtuff!

Joshua Vasquez wrote a piece a couple of weeks ago about how his open source machine benefits greatly from having part numbers integrated into all of the 3D printed parts. It lets people talk exactly about which widget, and which revision of that widget, they have in front of them.

Along the way, he mentions that it’s also a good idea to have labels as an integrated part of the machine anywhere you have signals or connectors. That way, you never have to ask yourself which side is positive, or how many volts this port is specced for. It’s the “knowledge in the head” versus “knowledge in the world” distinction — if you have to remember it, you’ll forget it, but if it’s printed on the very item, you’ll just read it.

I mention this because I was beaten twice in the last week by this phenomenon, once by my own hand costing an hour’s extra work, and once by the hand of others, releasing the magic smoke and sending me crawling back to eBay.

The first case is a 3D-printed data and power port, mounted on the underside of a converted hoverboard-transporter thing that I put together for last year’s Chaos Communication Congress. I was actually pretty proud of the design, until I wanted to reflash the firmware a year later.

I knew that I had broken out not just the serial lines and power rails (labelled!) but also the STM32 SWD programming headers and I2C. I vaguely remember having a mnemonic that explained how TX and RX were related to SCK and SDA, but I can’t remember it for the life of me. And the wires snake up under a heatsink where I can’t even trace them out to the chip. “Knowledge in the world”? I failed that, so I spent an hour looking for my build notes. (At least I had them.)

Then the smoke came out of an Arduino Mega that I was using with a RAMPS 1.4 board to drive a hot-wire cutting CNC machine. I’ve been playing around with this for a month now, and it was gratifying to see it all up and running, until something smelled funny, and took out a wall-wart power supply in addition to the Mega.

All of the parts on the RAMPS board are good to 36 V or so, so it shouldn’t have been a problem, and the power input is only labelled “5 A” and “GND”, so you’d figure it wasn’t voltage-sensitive and 18 V would be just fine. Of course, you can read online the tales of woe as people smoke their Mega boards, which have a voltage regulator that’s only good to 12 V and is powered for some reason through the RAMPS board even though it’s connected via USB to a computer. To be honest, if the power input were labelled 12 V, I still might have chanced it with 18 V, but at least I would have only myself to blame.

Part numbers are a great idea, and I’ll put that on my list of New Year’s resolutions for 2021. But better labels, on the device in question, for any connections, isn’t even going to wait the couple weeks until January. I’m changing that right now.

Diaphragm Air Engine

One of the tricky parts of engineering in the physical world is making machines work with the available resources and manufacturing technologies. [Tom Stanton] has designed and made a couple of air-powered 3D printed engines but always struggled with the problem of air leaking past the 3D-printed pistons. Instead of trying to make an air-tight piston, he added a rubber membrane and a clever valve system to create a diaphragm air engine.

This GIF is worth 115 words

A round rubber diaphragm with a hole in the center creates a seal with the piston at the top of its stroke. A brass sleeve and pin protrude through the diaphragm, and the sleeve seals create a plug with an o-ring, while the pin pushes open a ball which acts as the inlet valve to pressurize an intermediate chamber. As the piston retracts, the ball closes the inlet valve, the outlet valve of the intermediate chamber is opened, forcing the diaphragm to push against the piston. The seal between the piston and diaphragm holds until the piston reaches its bottom position, where the pressurized air is vented past the piston and out through the gearbox. For full details see the video after the break.

It took a few iterations to get the engine to run. The volume of the intermediate chamber had to increase and [Tom] had to try a few different combinations of the sleeve and pin lengths to get the inlet timing right. Since he wanted to use the motor on a plane, he compared the thrust of the latest design with that of the previous version. The latest design improved efficiency by 366%. We look forward to seeing it fly! Continue reading “Diaphragm Air Engine”

Simple Tips For Better 3D-Printed Enclosures

3D printing can be great for making enclosures, and following some simple guidelines can help the whole process go much smoother. 3D Hubs has an article on designing printed enclosures that has clear steps and tips to get enclosures coming out right the first time. 3D Hubs offers 3D printing and other services, and the article starts with a short roundup of fabrication methods but the rest is a solid set of tips applicable to anyone.

The first recommendation is to model the contents of the enclosure as a way to help ensure everything fits as it should, and try to discover problems as early as possible during the design phase, before anything gets actually printed. We’ve seen how a PCB that doesn’t take the enclosure into account risks needing a redesign, because there are some issues an enclosure just can’t fix.

The rest of their advice boils down to concrete design guidelines about wall thickness (they recommend 2 mm or more), clearances (allow a minimum of 0.5 mm between internal components and enclosure), and how to size holes for fasteners, clips, or ports. These numbers aren’t absolute minimums, but good baseline values to avoid surprises.

One final useful tip is that using a uniform wall thickness throughout the enclosure is general good practice. While this isn’t strictly necessary for successful 3D printing, it will make life easier if the enclosure ever moves to injection molding. Want to know more? Our own Bob Baddeley has an excellent primer on injection molding, and his been-there-done-that perspective is invaluable.

Get Over Your Fears

Some projects are just too complex, that’s for sure. But I’d be willing to bet that some things you think are too difficult actually aren’t, and it may be that all you need to get over your personal hurdle is a good demonstration. Here come three cases in point.

I was looking at the new Raspberry Pi Compute Module last weekend. They have a whole bunch of high-speed traces: things like Gigabit Ethernet, HDMI, and those crazy-fast SDI serial camera interfaces. I have no experience in high-speed design and layout at all, and frankly it gives me the willies. But the Raspberries also shipped me an IO demo board, and concomitant KiCAD design files, with the review board. Looking at it, they were just wires — maybe pairwise length-matched and impedance controlled — but also just wires. Opening up the KiCAD board file and clicking on the traces just like I do with my own designs, I’m a lot less scared. That was a revelation for me.

In a great writeup of his experience building ten different Linux single-board-computers from scratch, Jay Carlson had a similar effect on me. I would never have considered breaking out the hotplate for some CPU-and-DRAM action, and I’ve never had to lay out a PCB with a high density BGA chip before either. I’m not quite into Dunning-Kruger territory yet; I still have a healthy respect for the layout intricacies in fanning out a tight BGA CPU into a DRAM. But Jay’s frank assessments of what is easy and what is hard make it all seem within the realm of the doable.

As Mike and I were talking on the podcast about Jay’s work, Mike came clean about his fear of BGAs. I’ve done enough reflow-plate soldering, with parts that have a lead pitch that’s a factor of two finer than the 0.8 mm pitch BGAs in question, so it doesn’t seem implausible to me. And I’m 100% sure Mike could pull it off too, but he is in need of a BGA guru. Any good hobbyist videos out there?

Being a nerdy type, I’m much more focused on the knowledge and the inspiration, but maybe the courage is equally important — at least I think I undervalue it. I don’t need to lay out HDMI lines, or build a from-scratch Linux box, but I am no longer afraid that I couldn’t, and that’s because I’ve seen detailed examples of fellow hackers who’ve done the same. I might not get it right on the first shot, but I’m not afraid to try, and I wouldn’t have said the same before looking over other folks’ shoulders. Forza e corragio!