Pi Zero Power Optimization Leaves No Stone Unturned

If you’ve ever designed a battery-powered device with a Pi Zero, you have no doubt looked into decreasing its power consumption. Generic advice, like disabling the HDMI interface and the onboard LED, is omnipresent, but [Manawyrm] from [Kittenlabs] goes beyond the surface-level, and gifts us an extensive write-up where every recommendation is backed with measurements. Armed with the Nordic Power Profiler kit and an SD card mux for quick experimentation, she aimed at two factors, boot time and power consumed while booting, and made sure to get all the debug information we could use.

Thanks to fast experimentation cycles and immediate feedback, we learn plenty of new things about what a Pi Zero does and when, and how we can tame various power-hungry aspects of its behavior. Disabling the GPU or its aspects like HDMI output, tweaking features like HAT and other peripheral probing, and even tactical overclocking during boot – it’s an extensive look at what makes a Pi Zero tick, and no chance for spreading baseless advice or myths.

All in all, this write-up helps you decrease the boot time from twelve seconds to just three seconds, and slash the power budget of the boot process by 80%. Some recommendations are as simple as config.txt entries, while others require you to recompile the kernel. No matter the amount of effort you can put into power optimization, you’ll certainly find things worth learning while following along, and [Manawyrm]’s effort in building her solar-powered Pi setup will help us all build better Pi-Zero-powered solar devices and handhelds.

Switching Regulators: Mistake Fixing For Dummies

Some time ago, while designing the PCB for the Sony Vaio replacement motherboard, I went on a quest to find a perfect 5 V boost regulator. Requirements are simple – output 5 V at about 2A , with input ranging from 3 V to 5 V, and when the input is 5 V, go into “100% duty” (“pass-through”/”bypass”) mode where the output is directly powered from the input, saving me from any conversion inefficiencies for USB port power when a charger is connected. Plus, a single EN pin, no digital configuration, small footprint, no BGA, no unsolicited services or offers – what more could one ask for.

As usual, I go to an online shop, set the parameters: single channel, all topologies that say “boost” in the name, output range, sort by price, download datasheets one by one and see what kind of nice chips I can find. Eventually, I found the holy grail chip for me, the MIC2876, originally from Micrel, now made by Microchip.

MIC2876 is a 5 V regulator with the exact features I describe above – to a T! It also comes with cool features, like a PG “Power good” output, bidirectional load disconnect (voltage applied to output won’t leak into input), EMI reduction and efficiency modes, and it’s decently cheap. I put it on the Sony Vaio board among five other regulators, ordered the board, assembled it, powered it up, and applied a positive logic level onto the regulator’s EN pin.

Immediately, I saw the regulator producing 3 V output accompanied by loud buzzing noise – as opposed to producing 5 V output without any audible noise. Here’s how the regulator ended up failing, how exactly I screwed up the design, and how I’m creating a mod board to fix it – so that the boards I meticulously assembled, don’t go to waste.

Some Background… Noise

Continue reading “Switching Regulators: Mistake Fixing For Dummies”

Where Do You Connect The Shield?

When it comes to polarizing and confusing questions in electronics, wiring up shields is on the top-10 list when sorted by popularity. It’s a question most of us need to figure out at some point – when you place a USB socket symbol on your schematic, where do you wire up the SHIELD and MP pins?

Once you look it up, you will find Eevblog forum threads with dozens of conflicting replies, Stackexchange posts with seven different responses plus a few downvoted ones, none of them accepted, and if you try to consult the literature, the answer will invariably be “it depends”.

I’m not a connector-ground expert, I just do a fair bit of both reading and hacking. Still, I’ve been trying to figure out this debate, for a couple years now, re-reading the forum posts each time I started a new schematic with a yet-unfamiliar connector. Now, of course, coming to this question with my own bias, here’s a summary you can fall back on.

Consumer Ports

Putting HDMI on your board? First of all, good luck. Then, consider – do you have a reason to avoid connecting the shield? If not, certainly connect the shield to ground, use jumpers if that’s what makes you comfortable, though there’s a good argument that you should just connect directly, too. The reason is simple: a fair few HDMI cables omit GND pin connections, fully relying on the shield for return currents. When your HDMI connection misfires, you don’t want to be debugging your HDMI transmitter settings when the actual No Signal problem, as unintuitive as it sounds, will be simply your shield not being grounded – like BeagleBone and Odroid didn’t in the early days. By the way, is a DVI-D to HDMI adapter not working for you? Well, it might just be that it’s built in a cheap way and doesn’t connect the shields of the two sockets together – which is fixable.

Continue reading “Where Do You Connect The Shield?”

PCB data sheet of a custom 4-bit microcontroller

Building A Microcontroller From Scratch: The B4 Thinker Project

[Marius Taciuc’s] latest endeavor, the B4 Thinker, offers a captivating glimpse into microcontroller architecture through a modular approach. This proof-of-concept project is meticulously documented, with a detailed, step-by-step guide to each component and its function.

Launched in 2014, the B4 Thinker project began with the ambitious goal of building a microcontroller from scratch. The resulting design features a modular CPU architecture, including a base motherboard that can be expanded with various functional modules, such as an 8-LED port card. This setup enables practical experimentation, such as writing simple assembly programs to control dynamic light patterns. Each instruction within this system requires four clock pulses to execute, and the modular design allows for ongoing development and troubleshooting.

Continue reading “Building A Microcontroller From Scratch: The B4 Thinker Project”

A 3D-printed 8-Shaft Table Loom

Simple 3D-Printed Table Loom For Complex Weavings

The loom has been a transformative invention throughout history, shaping the textile industry from simple hand looms to complex, fully automated machines. Now, thanks to advancements in 3D printing, this age-old craft is being revitalized by modern makers. One such creator, [Fraens], has recently designed a unique 3D-printed table loom with eight shafts, offering a simpler yet innovative approach to weaving. This project is a fresh take on traditional looms, blending centuries of design knowledge with contemporary technology.

[Fraens], a longtime enthusiast of looms, has spent considerable time studying the countless designs that have evolved over more than 200 years. Drawing inspiration from these, he has crafted a more accessible version—a table loom that can be operated using levers to control the warp threads. Unlike larger, more complex looms, this 3D-printed model allows users to experiment with various weaving patterns easily, using different colors and sequences to create beautiful, intricate designs. [Fraens] provides guidance on how to adapt patterns meant for larger looms to this compact, lever-operated version on his website and in a detailed video tutorial.

This project is perfect for anyone interested in weaving or DIY technology. [Fraens]’ 3D-printed loom offers a new way to explore textile creation, making it both approachable and rewarding. To see this innovative loom in action and learn how to build your own, check out the video below.

Continue reading “Simple 3D-Printed Table Loom For Complex Weavings”

Audio On Pi: Here Are Your Options

There are a ton of fun Raspberry Pi and Linux projects that require audio output – music players, talking robots, game consoles and arcades, intelligent assistants, mesh network walkie-talkies, and much more! There’s no shortage of Pi-based iPods out there, and my humble opinion is that we still could use more of them.

To help you in figuring out your projects, let’s talk about all the ways you can use to get audio out of a Pi or a similar SBC. Not all of them are immediately obvious and you ought to know the ropes before you implement one of them and get unpleasantly surprised by a problem you didn’t foresee. I can count at least five ways, and they don’t even include a GPIO-connected buzzer!

Let’s rank the different audio output methods, zoning in on things like their power consumption, and sort them by ease of implementation, and we’ll talk a bit about audio input options while we’re at it.

Continue reading “Audio On Pi: Here Are Your Options”

Embedded Python: MicroPython Toolkits

Last time, I talked about how MicroPython is powerful and deserving of a place in your toolkit, and it made for a lively discussion. I’m glad to see that overall, MicroPython has indeed been getting the recognition it deserves – I’ve built a large number of wonderful projects with it, and so have people I’ve shown it to!

Sometimes I see newcomers dissatisfied with MicroPython, because the helper tools they initially pick don’t suit it well. For instance, they try and start out with a regular serial terminal application that doesn’t fit the MicroPython constraints, or a general IDE that requires a fair bit of clicking around every time you need to run your code. In particular, I’d make sure that you know your options no matter whether you prefer GUI or commandline – both have seriously nice tools for MicroPython use!

The main problem to be solved with MicroPython is that you have a single serial port that everything happens through – both file upload and also debugging. For ESP8266/32-based boards, it’s a physical serial port, and for chips like RP2040 and ESP32-S* where a hardware USB peripheral is available, it’s a virtual one – which makes things harder because the virtual port might get re-enumerated every now and then, possibly surprising your terminal application. If you want to upload a program of yours, you need to free up the serial port, and to see the program’s output, you will need to reopen that port immediately after – not a convenient thing to do if you’re using something like PuTTy.

So, using MicroPython-friendly software is a must for a comfortable hacking experience. What are your options? Continue reading “Embedded Python: MicroPython Toolkits”