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”

The UMPC powered up, case-less showing the black PCB, with the display standing upwards and showing a blue colour scheme desktop with a CLI terminal open. To the right of it is one of the UMPCs that served as an inspiration for this project.

Bringing The UMPCs Back With A Pi Zero

Miss PDAs and UMPCs? You wouldn’t be the only one, and it’s a joy to see someone take the future into their own hands. [Icepat]’s dream is reviving UMPCs as a concept, and he’s bringing forth a pretty convincing hardware-backed argument in form of the Pocket Z project. For the hardware design, he’s hired two engineers, [Adam Nowak] and [Marcin Turek], and the 7-inch Pocket Z7 version is coming up quite nicely!

The Hackaday.io project shows an impressive gallery of inspiration devices front and center, and with these in mind, the first version of the 7-inch UMPC sets the bar high. With a 1024×600 parallel RGB (DPI) touchscreen display, an ATMega32U4-controlled keyboard, battery-ready power circuitry, and a socketed Pi Zero for brains, this device shows a promising future for the project, and we can’t wait to see how it progresses.

While it’s not a finished project just yet, this effort brings enough inspiration all around, from past device highlights to technical choices, and it’s worth visiting it just for the sentiment alone. Looking at our own posts, UMPCs are indeed resurfacing, after a decade-long hiatus – here’s a Sidekick-like UMPC with a Raspberry Pi, that even got an impressive upgrade a year later! As for PDAs, the Sharp memory LCD and Blackberry keyboard combination has birthed a good few projects recently, and, who can forget about the last decade’s introductions to the scene.

D+ and D- wires from a USB cable connected to GPIO pins on the Pi Pico, using a female header plugged onto the jumper wires

Need A USB Sniffer? Use Your Pico!

Ever wanted to sniff USB device communications? The usual path was buying an expensive metal box with USB connectors, using logic analyzers, or wiring devboards together and hacking some software to make them forward USB data.

Now, thanks to [ataradov]’s work, you can simply use a Pi Pico – you only need to tap the D+ and D- pins, wire them to RP2040’s GPIOs, and you can sniff communication between your computer and any low-speed (1.5 Mbps) or full-speed (12 Mbps) devices. On the RP2040 side, plug the Pico into your computer, open the virtual serial port created, and witness the USB packets streaming in – for the price of a Pico, you get an elegant USB sniffer, only a little soldering required.

[ataradov] also offers us a complete board design with a RP2040 and a USB hub on it, equipped with USB sockets that completely free us from the soldering requirement; it’s an open-source KiCad design, so you can simply order someĀ  sniffers made from your favourite fab! This project is a great learning tool, it’s as cheap and easy to make as humanly possible, and it has big potential for things like reverse-engineering old and new systems alike. Just couple this hack with another Pico doing USB device or host duty, maybe get up to date with USB reverse-engineering fundamentals, and you could make a Facedancer-like tool with ease.

Need to reach 480 Mbit/s? [ataradov] has a wonderful board for you as well, that we have covered last year – it’s well worth it if a device of yours can only do the highest speed USB2 can offer, and, it offers WireShark support. Want WireShark support and to use a Pico? Here’s a GitHub project by another hacker, [tana]. By now, merely having a Pi Pico gives you so many tools, it’s not even funny.

We thank [Julianna] for sharing this with us!

Steamdeck motherboard standing upright propped onto a USB-C dock it's wired up to, showing just how little you need to make the steamdeck board work.

Steam Deck, Or Single Board Computer?

With a number of repair-friendly companies entering the scene, we have gained motivation to dig deeper into devices they build, repurpose them in ways yet unseen, and uncover their secrets. One such secret was recently discovered by [Ayeitsyaboii] on Reddit – turns out, you can use the Steam Deck mainboard as a standalone CPU board for your device, no other parts required aside from cooling.

All you need is a USB-C dock with charging input and USB/video outputs, and you’re set – it doesn’t even need a battery plugged in. In essence, a Steam Deck motherboard is a small computer module with a Ryzen CPU and a hefty GPU! Add a battery if you want it to work in UPS mode, put an SSD or even an external GPU into the M.2 port, attach WiFi antennas for wireless connectivity – there’s a wide range of projects you can build.

Each such finding brings us closer to the future of purple neon lights, where hackers spend their evenings rearranging off-the-shelf devices into gadgets yet unseen. Of course, there’s companies that explicitly want us to hack their devices in such a manner – it’s a bet that Framework made to gain a strong foothold in the hacker community, for instance. This degree of openness is becoming a welcome trend, and it feels like we’re only starting to explore everything we can build – for now, if your Framework’s or SteamDeck’s screen breaks, you always have the option to build something cool with it.

[Via Dexerto]

Hacker Tactic: Multi-Design Panels

Last time, we talked about single-PCB-design panels, all the cool aspects of it, including some cost savings and handling convenience. Naturally, you might wonder, and many did – can you put multiple different PCBs on a single panel? The answer is “yes, without a doubt!” The tool we used last time, KiKit, will not be as helpful here, so we’ll be looking elsewhere.

Making multi-PCB panels can help you save money, naturally, but it can also make your assembly a whole lot easier, and it can bring you hacking to a whole new level. It sure helped with mine! You might have already learned that some fabs scoff at multi-design panels and add surcharges. Well, you’ll be delighted to learn that there are more hacker-friendly fabs out there, too.

Developing PCBs In Bulk

So far, I’ve worked on about 300 different PCB designs, with half of them available in my monorepo. I’ve assembled and tested just about half of these. You might guess that this would cost a lot of money, and that assembly would take a fair bit of time, but I have some tricks up my sleeve. For a start, you can easily order PCBs 10-12 times more cheaply if you do multi-panel.

Continue reading “Hacker Tactic: Multi-Design Panels”

Hacker Tactic: Single-PCB Panels

Ordering a PCB? Two of them? Three? Five? For about eight years now, I’ve been regularly ordering large numbers of different PCBs, and, naturally, have developed a toolkit to make things smoother. One trick is PCB panelization, and you should really know about it.

You might’ve encountered PCB panels already. Perhaps, if you order PCBA at a fab, you will get your board returned in a whole new form-factor, with rails on the sides that you have to snap off before your PCB is usable. Those rails are used so that your PCBs are easier to handle during assembly, but that’s far from the only reason why you would make a panel.

If you need multiple pieces of a PCB, your fab may say that building 50 pcs is classified as “large batch” and that takes longer than 30 days, which delays your entire PCB order. I’ve been there, five years ago, running out of time right before Chinese New Year. The fix was simple – I made a 2×2 panel and ordered that in quantity of 10-15. Panelization might be a little more expensive, or maybe even cheaper, but, most importantly, it will be faster.

In a few hours’ time, I sat down, figured out that KiCad has built-in features for panelization, and ordered panels instead of separate PCBs. Thanks to that, I made the Chinese New Year deadline that year and could successfully restock my store, letting me earn a fair bit of money instead of keeping a popular product out-of-stock – ultimately, helping my family stay up on rent that month.

Panelization lets you hack around many PCB ordering and assembly limitations, and I’ve only gotten started – there’s way way more! For now, let’s sort out panelizing multiples of the same PCB. As long as your boards are using KiCad (or KiCad-converted from Eagle/EasyEDA/Altium/gerbers), there’s no better software than KiKit.

Continue reading “Hacker Tactic: Single-PCB Panels”

Embedded Python: MicroPython Is Amazing

In case you haven’t heard, about a month ago MicroPython has celebrated its 11th birthday. I was lucky that I was able to start hacking with it soon after pyboards have shipped – the first tech talk I remember giving was about MicroPython, and that talk was how I got into the hackerspace I subsequently spent years in. Since then, MicroPython been a staple in my projects, workshops, and hacking forays.

If you’re friends with Python or you’re willing to learn, you might just enjoy it a lot too. What’s more, MicroPython is an invaluable addition to a hacker’s toolkit, and I’d like to show you why. Continue reading “Embedded Python: MicroPython Is Amazing”