Raspberry Pi VS Arduino VS ESP32
If you’re a tech nerd like me I’m sure you’ve heard people like me talk about Raspberry Pis, Arduinos and ESP32s – but what’s the difference? Why would you pick one over the other for a project? Those are the questions I hope to answer in this very video, so strap in and let’s get into it! Let’s start with explaining what each of those categories even means – because none of those three titles are one specific product. I’ll start with the Pis. Originally the Raspberry Pi name was just a single product, a single board computer (SBC) that took the maker world kind of by storm. Especially with the B+ revision, and even more so with the Pi 3 B which added WiFi, they are what they say on the tin – single board computers. They take an SD card as their boot drive, boot their ARM CPU up, and away you go. The key thing the Pi offered from the get-go was these pins. These are the GPIO headers – that’s general purpose input output – and these are what let the Pi communicate with all the sensors, hats, mics, and all the wonderful modules people have made for these over the years. This is the magic that made them sell 100,000 preorders on day one – and what differentiates these from other small computers like Intel NUC style machines. Those GPIO headers are also the reason a lot of people compare Pis to Arduinos.
The Pis diversified though, mostly in form-factor. The two newer form factors are the Pi Zero (W), which is a paired down version of the Pi that keeps the GPIO but drops all the other IO, save for a mini HDMI port, two USB ports, the SD card reader and a camera/display connector. These are lower power, as in CPU horsepower, with the original only getting 512MB of RAM, so it’s much more for displayless use, built into other hardware. The other form factor is even more expressly designed to be used with other hardware, the Raspberry Pi Compute Modules. The first mainstream one, CM3, used a SODIMM type socket, whereas the newer CM4 and CM5 use two surface mount connectors that mean the compute module can just clip straight onto the board. These forgo all IO, save for those two board-to-board connectors, although these also add optional onboard storage, specifically eMMc storage.
The newer Pis – the Pi 4 and 5, including their compute module versions – have taken steps towards being more powerful computers. While they still don’t really compare to a more ‘fully fledged’ system like an Intel N300, or even N100, there is a lot more horsepower available on these boards. For some that’s a bit of a shame as it’s driven the price of these boards up from $35 initially to over $100 for the higher end versions of the Pi 5 and CM5 today. Luckily the lower end options, including the Pi Zero 2 W, are still readily available for much less. Interestingly though, the Pi 5 in particular has started introducing PCI express connectivity. Most boards offer that for an M.2 SSD – there’s only I think two lanes of Gen 3 but still – but some, like Sanctuary System’s Sentinel Core board offer a full PCIe slot, meaning that yes, with the right drivers, you can use an external graphics card with a Raspberry Pi now!
Raspberry Pis have an absolutely incredible ecosystem of supporting boards, modules and components – not to mention the software side of things. There are also imitators – especially of the compute modules – which people like Jeff Geerling have tested out to varying success levels. The key thing to know about all Raspberry Pis (and we’ll get onto the Pico in a moment, but consider that NOT a ‘real’ Pi for the purposes of this explanation) is that they are actual computers. You install an operating system on them – normally Linux – and use them like a computer. Be that with a mouse, keyboard and display or a headless server. The point is they are full computers that happen to have an accessible way to control other devices over the GPIO pins.
Arduinos, by comparison, are not full computers. They don’t run an operating system, they really only run a single thing at a time – a single bit of code you’ll write and install on them. The specs are generally more meager – kilobytes of RAM instead of megabytes or gigabytes – lower power cores, often single core, but for the right project they are often a much better fit than a Pi. So much so that Raspberry Pi, the company, created their own Arduino compatible board, the Pico. They did go all out and design their own damn chip for it, but still, it’s a microcontroller board with a bunch of IO pins, it runs whatever code you put on it, and that’s it. There’s no display outputs, no USB ports – besides the programming/serial port – everything is done through the IO pins. This is pretty typical for an Arduino compatible board – although that phrase, “Arduino Compatible”, is an important distinction. See Arduino do make their own boards, the original UNO and its many revisions, the Nano, MKR, Mega, and the bunch of other now deprecated boards like the Leonardo, Pro Mini and LilyPad, and many people make clones of their boards too, but thanks to Arduino opening up their ecosystem, there are thousands of different board options for you to choose from. Adafruit and Sparkfun are two of the most popular makers, with Adafruit in particular making their Feather, ItsyBitsy and Metro boards.
Arduino as a platform simplifies the development experience, abstracting and automating away the insane amount of hassle that comes with trying to write code for a microcontroller. It abstracts the commands needed to interact with the IO pins into standardised functions so that no matter what actual microcontroller you’re using, running “digitalWrite” will toggle the given IO pin high or low. That level of ease of use means people heavily gravitate towards Arduino compatible boards – in fact people like me. My own hardware, the open source response time and latency testing tools, are both Arduino compatible boards. The former uses a SAMD51 microcontroller found in Adafruit’s M4 lineup, namely the ItsyBitsy M4, and the latter is a SAMD21 which again Adafruit uses with their M0 line, namely the Feather M0 Basic. These chips – especially the ARM ones I use – are still remarkably powerful and versatile. They have a whole bunch of digital interfaces, like SPI and I2C, and there are plenty that can do CANBUS, ethernet, I2S and more. These are the sorts of chips you’d want to use if you were making an embedded device. Like, your car has a whole bunch of these microcontrollers in it – when you press a window switch, the microcontroller in your door module takes that signal and outputs a command to the window motor to move it. You wouldn’t want an entire operating system running just to do that, you have relatively simple inputs and outputs you want to control with logic. That’s it. There are also plenty of these boards that support WiFi, or similar wireless protocols – the Pi Pico W can run a simple web server, send MQTT data over WiFi and so much more all from a little microcontroller. It’s really cool.
Oh, and there are still “hats” for Arduinos, although they call them “Shields” instead. Those are modules that clip into the headers, or for some board designs like Seeed Studio’s XIAO line the board clips into them, to add functionality. Things like motor controllers, sensor arrays, or even basic displays. You don’t have to have it on a shield to use it though, there are countless modules available to connect with wires instead, including ecosystems of options like STEMMA/QT and Grove, or you can just design your own circuits and wire them up yourself, like I do for my tools.
As for ESP32s, that’s where it gets interesting, because ESP32s ARE Arduino compatible boards – in fact Arduino THEMSELVES make an Arduino ESP32. ESP32 is just the chip (or more commonly the module) that you’re using. They are a bit of a standalone platform too though – most of these boards you really will only ever use them with the Arduino IDE, but with ESP32s you might run ESP home, or make them a Zigbee or Matter device (which you can do via Arduino, video in the cards above if you’re interested), or program them directly with the ESP-IDF. They are arguably the most common WiFi microcontroller – like if a product you buy offers WiFi and app connectivity – like a fridge or an air conditioner – odds are it has an ESP32, or a clone, likely a Tuya module actually. They are a Chinese smart tech maker, and besides the big name brands like Samsung and Philips, basically any other smart home tech you buy Tuya probably designed or at least supplies the microcontroller module for. I should also mention that much like “Arduino”, “ESP32” is actually a family of chips, all with different features. Some of the sub variants are really cool, the S3 is a dual core version, and the C6 is the one that can do Zigbee and Thread, or the new P4 that is insanely powerful.
When trying to choose a microcontroller, it can be a little complicated and daunting as between the myriad of chip options and board designs, there are thousands of boards to choose from, all with different features and benefits. As a simple example, while the ESP32 is an amazing chip, if you want to be able to capture analog voltages – say from a light sensor to measure response time or latency – it sucks. It’s slow, low resolution and not entirely useful for that. Whereas the SAMD51 I use can do a million samples per second at 12 bit accuracy, or 67,500 samples per second at 16 bit accuracy. That’s much better! What you’ll need to do is work out what requirements you have for your microcontroller based on your project, and then go from there. Although if you are just starting out, an Arduino UNO R3 or Nano is a fantastic shout. If you decide your project is a little more complex, like you want a display output for something like a Magic Mirror, or need more processing power, then a Raspberry Pi might be a better fit, but if you just want to make das blinken lightzen, Arduino, or Arduino compatible, boards are for you.
