As computer programmers, our code runs on a wide variety of machines. From 2TB of RAM dual-EPYC servers with 128+ cores/256 hardware threads, to tiny single-core Arduinos running at 4MHz and 4kB of RAM.

While hobbyists and programmers around the world have become enamored with Arduinos, ESP32, STM32 Pills, and Rasp. Pi SBCs… there’s a noticeable gap in the typical hobbyist’s repertoire that should be looked at more carefully. This gap is the entry-level MPU market, perhaps best represented by Microchip’s SAM9x60, though STM’s STM32MP1, NXP i.MX ULL, and TI’s AM355x chips tightly compete in this space.

I hope to muse upon this category of processors, why its unpopular but… why maybe today, you should give it a closer look.

Impedance-controlled 6-layer PCBs USED to be too complex for a hobbyist… but they’re accessible today

This section’s title says it all. Typical MPUs require PCB complexity that… at least 10 years ago, was well beyond a hobbyist’s means. In the 2010-era of the fledgling “Maker” movement, 2-layer PCBs were the most complex you could hope for. Not just from a manufacturing perspective, but also from a software perspective. EagleCAD just didn’t support more layers, and no manufacturer catered to hobbyists to make anything more complex. Paying for $500 NRE fees each time you setup a board just wasn’t good on a hobbyist’s budget.

But today, OSHPark offers 6-layer boards (https://docs.oshpark.com/services/six-layer/) at reasonable prices, with tolerances specified for their dielectric (and therefore, impedance-controlled boards are a thing). Furthermore, KiCAD 7+ is more than usable today, meaning we have free OSS software that can lay out delay-matched PCB traces, with online libraries like UltraLibrarian, offering KiCAD Footprints and Symbols sponsored by Microchip/Ti/etc. etc. There’s also DKRed’s 4-layer service, JLCPCB’s services from China and plenty of competitors around the world that can take your 6-layer+ gerbers and give you a good board.

We live in a new era where hobbyists have access to far more complexity and can feasibly build a bigger electronics project than you ever dreamed before.

The classic team: Arduino and Rasp. Pi…

Arduino and Rasp. Pi stick together like peanut butter and jelly. They’re a barbell strategy providing the user with a low-cost, cheap, easy-to-customize chip (ATMega328p and other Arduino-level chips) operating at single-digit mW of power… with a large suite of analog-sensors and low latency and simplicity.

While Rasp. Pi offers Linux-level compute solutions, “grown up” C++ programs, Python, server-level compute. Albeit at the 6W (for Rasp. Pi 4) or beyond, so pushing the laptop-level power consumption. But… that gives us a good team that handles a lot of problems cheaply and effectively.

Or… is it? This barbell strategy is popular for good reasons from a problem-solving perspective, but as soon as any power and/or energy constraint comes up, its hopelessly defeated. Intermediate devices, such as the ESP32 have popped up as a “more powerful Arduino”, so to speak, providing more services (WiFi / Bluetooth, RAM and compute-power) than an Arduino can deliver, but is still far less than what Rasp. Pi programmers are used to.

What does a typical programmer want?

SAM9x60: ARMv5 at 600MHz, 128MB DDR2, Linux 6.1.x, dual-Ethernet 10/100, USB in 30mm x 30mm

When Rasp. Pi launched a bit over 10 years ago with 256 MB and a 700MHz processor and full Linux support, it set off a wave of hobbyists to experiment with the platform. Unfortunately, Rasp. Pi has left this “tier” of compute power, chasing the impossible dream of competing with Laptops / Desktops. IMO, the original Rasp. Pi 1 hit a niche and should have stuck with that platform. Fortunately, alternatives exist today.

Though the SAM9x60D1G-i/lzb SOM Module above is far more complex than a Rasp. Pi, its a good representation of what’s possible with a modern entry-level MPU. Yeah yeah yeah, its $60 but stick with me a bit longer. The SOM module is a bad value, but it shows the minimal system that it takes to boot this chip. This is very different from Rasp. Pi indeed.

SAM9x60 chip is fully open source, and fully documented at https://linux4sam.org. You get a full builtroot environment, a fully documented stage1, stage2, and stage3 (UBoot) bootloader. You get all 2000+ pages of documentation. You get PCB layouts, you get fully open source Linux drivers and kernel modules. You get the full “make” available from Microchip’s github. The openness to this chip is insane, especially if you’re used to Rasp. Pi.

And perhaps most importantly: SAM9x60’s reference design fits on 4-layer boards. (This is an INCREDIBLE feat of engineering. Microchip has spent a lot of effort simplifying this 233-BGA chip and trying to get it onto the simplest means possible). Note however, that I’d personally only be comfortable with a 6-layer design here. (SAM9x60’s reference design is signal/ground/power/signal stackup, which is frowned upon by modern PCB theory. signal/ground/power/signal/ground/signal would be a superior stackup… and 6-layers is cheap/available today anyway, so might as well go for 6-layers). In any case, the 4-layer demonstration reference board (https://ww1.microchip.com/downloads/en/Appnotes/AN_3310_Connecting-SDR-and-DDR-Memories-to-SAM9X60_00003310a.pdf) is far more documentation and discussion than you’d ever hope to be released by the Rasp. Pi group. The openness to this platform is like night-and-day.

At $8 per SAM9x60 and at $3 to $5 for 128MB DDR2 (depending on vendor), and at $3 to $5 for the power-chip, you’ll get a minimal booting Linux box with a fully custom PCB design doing whatever you want… with a fully customized motherboard / PCB doing whatever you want.

Cool… but why would I need this?

Well, to tell you the truth… I don’t know yet. Power-constraints are the obvious benefit to running with these chips (SAM9x60 + LPDDR RAM will use 1/10th the power of a Rasp-Pi4, while still delivering a full Linux environment). But beyond that I’m still thinking in the abstract here.

I’m mostly writing this post because I’ve suddenly realized that a full custom MPU comparable to first-generation Rasp. Pi is doable by a modern hobbyist. Albeit a well studied hobbyist comfortable with trace-matched impedance controlled transmission line theory on PCBs, but I took those college-classes for a reason damn it and maybe I can actually do this.

Its a niche that 10 years ago was unthinkable for hobbyists to cheaply make their own SBCs from scratch. But today, not only is it possible, but there’s 4 or 5 different vendors (Microchip’s SAM9x60, TI’s AM355x, STM32’s STM32MP1, etc. etc.) that are catering to hobbyists with full documentation, BSPs and more. We’re no longer constrained to the designs that Rasp. Pi decides to release, we can have those 2x Ethernet ports we’ve always wanted for example (for… some reason), or build a bare-metal OS free design using only 8MB of SRAM, or use LPDDR2 low-power RAM and build a battery-operated portable device.

Full customization costs money. Whatever hobby project we do with this will cost far more than a RP4 or even RP5’s base price. But… full custom means we can build new solutions that never existed before. And the possibilities intrigue me. Full control over the full motherboard means we have absolute assurances of our power-constraints, our size, the capabilities, supporting chips and other decisions. Do you want LoRA (long-range radio?). Bam, just a module.

And you might be surprised at how much cheaper this is today than its ever been before.

Conclusion

Thanks for hearing my rant today.

This form factor is really intriguing to me and I’ll definitely be studying it moving forward as a hobby. Hopefully I’ve manage to inspire someone else out there!

  • litchralee@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 year ago

    This was an interesting read, so thanks for writing!

    My background: I am an embedded software engineer by trade, and a tinkerer as one of my hobbies. I’ve played around with microcontrollers (MSP430, AtMega328p on the Arduino) and microprocessors (STM32, ARM64 on RPi) and have done a small amount of board design with KiCAD.

    After reading your post, I thought about what platform is my “go to” for particular applications, and why. And what I arrived at is that it’s not as important what each platform offers, but how it fits into what I want to build. That is, how integrable it is.

    When I have a hobby project that just needs a SPI bus and a programmed sequence, I might reach for an MSP430 in DIP form-factor, or the Arduino with the intent to program the 328p and then extricate it to use alone for my project. The DIP format is what makes me lump these two chips together, as both are reasonably comparable but have their own unique features, like low power consumption or 5v input.

    Similarly, if my project needs networking, I would definitely lean into microprocessors, but now I have to settle on the format before proceeding. Specifically, if I want to use the RPi, then perhaps my design will take the shape of a Hat. If instead I want to build around an STM32 chip, then I need to provision its support hardware. The latter is fine, but I don’t exactly trust my EE skills to do this every time lol

    As a result, what I would like – as an embedded engineer – is a common microprocessor platform which can be swapped out, with a common pinout and connector. I know in the industrial space, they have standards like COM Express to do exactly this, but I’m not sure if that’s exactly the right direction to go, since those tend to be x86 based. Maybe something like the RPi Compute Module, but FOSS.

    To go with it, I’d also want a common module format, same as how RPi has Hats and Arduino has Shields. Again, industry has the OCP Standard, which conveniently breaks out a PCIe interface, but there isn’t a lot of PCIe used in hobbyist work. But maybe it’s time to change that? IDK

    Thanks again for writing this; it’s given me a chance to think about what I’d really like to have in the proverbial toolbox.