×

Hello and Welcome! If you have a technical question please check out our Forums. If you have an order or shipping question please refer to our Customer Support page. Please see all COVID-19 updates here and thank you for your continued support.

Enginursday: When NOT to use a Raspberry Pi

Let's go over when something like an Arduino or Teensy is more appropriate than using a Raspberry Pi.

Favorited Favorite 1

This isn't a Pi bashing thread, I cannot stress that enough. It's a question I'm sure you've seen or potentially asked. We've answered the question in tech support and personal conversations, but it's never really been covered in our blog.

For those confused as to why this is an addressable topic, there's been a question as old as the Pi: Why should I buy 8-bit/32-bit boards when I can get a Raspberry Pi for $35? Why buy a microcontroller development board when you can have the power of a desktop computer for around the same price? And the answer is, when it's the right tool for the job. What you lose in features and performance, you're gaining in ease of use and a more application-appropriate processor.

How hardware intensive is this project?

The 40-pin connector on the Raspberry Pi is a solid option for working with hardware I/O, but if the majority of the project consists of talking to these devices, then the Pi is probably not needed. One could make the "better to have and not need" argument with respect to the extra performance and features, but with that comes extra work. Take a simple LED blinking - using something like the Arduino Uno can have your LED blinking in around five minutes. The Pi, on the other hand, requires importing libraries and a bit more code. Still not the end of the world, but definitely can be done easier with an Uno (even easier with a 555 timer).

However, the more a software "lift" is required, such as hosting data or hardware states on a server, the more a Pi makes sense. It's not a binary choice however, there are a number of products in between that hit benchmarks in terms of the balance of hardware and software accessibility.

Power requirements

The Pi is awesome when it comes to putting together sensor systems. The ability to use things like Jupyter Notebooks on the same processor you're reading data from is incredible! But what if this sensor system is remote? The power-hungry Pi means finding a power source that matches the remote nature can be difficult. If no local power is available, bulky batteries could be your only option.

SPLOT electronics in case

The SPLOT, a remote sensing project by Pete Marchetto (former SparkFun Hacker in Residence). A good example of a project where a Pi might fit, but without it, it works a lot better.

On the other end, a properly configured Teensy can provide a remote or edge sensor system that can run for months off of a smaller battery pack. It will require a separate device for processing data (and storing it, depending on the route). But in most cases the more remote your project, the more power efficient you want it to be. Thus the Pi often isn't going to be your first choice.

Your background

I don't like that I'm making this argument, but I think it's valid. It actually might point you back toward the Raspberry Pi.

If time is something you don't have a lot of, you might want to go with the platform (or programming language) you know best. I have plenty of EE friends who constantly complain about how much of a pain in the butt working with the Pi is. Alternatively, I have a lot of friends with a software background who love working with the Pi and its terminal. If the goal is quick and you're more versed in microcontrollers and programming in C, then it's probably better to stick with what you know. That being said, I'll always plug the enormous library of tutorials the internet has to offer for both the Pi and other platforms.

The right tool for the job

I often compare it to this situation: What would you deliver pizza in - a Honda Civic or a Ferrari? Of course you're choosing the Ferrari! It'd be so much fun! Imagine the look on people's faces when you roll up to their house with their large pepperoni pizza in a $200,000 car with the pizza delivery sign on top. It's everyone's choice! But when you factor in insurance, gas, and how it's not really practical for pizza delivery... suddenly the Civic seems more appealing (no, selling the Ferrari so you don't have to deliver pizzas isn't an option in this analogy).

The Pi has almost limitless uses, but so do the myriad other boards available, so don't always go to the performance-for-price metric when choosing the right board for your project.

As always, I love hearing the opinions of our customers. How do you feel about using other boards or the Pi. Is one a no-go due to a personal barrier?


Comments 9 comments

  • There are a LOT of different factors that come into play when deciding which processor to use for a given project. "Power budget" is often at (or near) the top of the list -- if the project will be used near an electric outlet and cabling is OK, then it isn't an issue, but if it's a "wearable" you don't want to be tied to the local power grid. A few years ago I built a "gadget" that attached to a medical appliance and displayed an angle, which was obtained by monitoring two 3 axis accellerometers. (Basically it was to monitor the "twist angle" applied to my wrist, as part of the "occupational therapy" I was undergoing at the time.) A power cable was definitely out of the question, and weight was an issue. I used a MicroView, which talked to the accellerometers via I2C, and had plenty of compute power to calculate the angle, do some "smoothing" on the data, and had a nice built-in OLED display. It ran on 3 AAA alkaline batteries, and for the hour or so a day it was used, I had to replace them about every 3 weeks. (I eventually added an indication of how many minutes since I last turned it on to give me an idea of when to take the thing off -- didn't need tremendous accuracy so "millis()" was good enough.)

    One of my current projects is a "remote sensor" that's not close to an outlet. The RedBoard Artemis is an attractive solution, as it can communicate (I hope) to a Raspberry Pi 4B via BLE. The actual "event" needing to be sensed is a change-of-state on a magnetic reed switch, and alert the Pi when it happens. I've set a "power budget" for the Artemis end of 0.3 mA (average), which should give more than a year on two AA alkaline batteries. (The Pi end will probably increase the electric bill by about $1 a month.)

    Two other things that sometimes comes into play on this subject, which many folks don't think about: what happens at shutdown/power down. and how long does it take the system to boot? A Pi needs to be gracefully shutdown, while an Arduino can unceremoniously have the power cut (though I did do one project nearly a decade ago where I had to have this whopping capacitor to give the Arduino time to write some critical values to EEPROM). Unless you get "heroic" with the setup() section, an Arduino can be up & running in milliseconds, while it can take a Pi several seconds to be "ready to rumble".

  • I was at a hack-a-thon a few years back that was being run by Intel (I got a free Edison out of it). An Intel rep asked me a few questions about what I thought bout the Edison. I told him that it was cool but for the problem my team was trying to solve it was way too much; we could have done it faster and better with a simple Arduino. There is no "one fits all" tool.

    • That is definitely a sentiment I am constantly fighting, the one board to rule them all.

  • Where I'm going with this is that it speeds development if you are doing it on a platform you know. Where I'm going with this is that it speeds development if you are doing it on a platform that allows you to focus on the project goals and not have to spend time learning new tricks. For over 25 years, my small company has provided full time employment for a small group of people. Our business plan is to design and manufacture fully custom based microprocessor OEM boards. We ALWAYS save a few of every revision just to have around for the "next" project.
    If you're doing a project for "fun" or education or to expand your horizons learning a new board, new SW development tool(s), & possibly a new OS is fun from time to time. If you are doing it to "get the job done" and into production, there is no substitute for platform familiarity. If this is your goal, I recommend picking a couple "standard" platforms and learning them well.

  • I did some early projects on the Raspberry Pi, but lately I've been using various Arduino-compatibles, such as the Teensy or the Thing Plus. The two big dealbreakers for me are the Pi's boot time, and the fact that it (at least in theory) needs to be shut down properly. That makes the Pi mostly only suitable for always-on applications. But in always-on applications, the power becomes more of an issue. Last time I measured my Pi, I think it was drawing about 3 watts at idle. If I have a half-dozen Pi-based projects in my house, that's 18 watts, which is equivalent to leaving a couple LED light bulbs on all the time.

    The main problem I've found with Arduino-compatibles is that their network stacks and WiFi stacks are not nearly as full-featured and reliable as the Linux stacks. With Arduino, you can only have one TCP socket open at once, and my Arduino-based WiFi projects seem to be constantly disconnecting from my WiFI network, and not reconnecting automatically. (But the Raspberry Pi stays connected to my WiFi network indefinitely without any problem.)

    I wish there was an RTOS that ran on both Teensy and Raspberry Pi (and preferably also ESP32), that would boot quickly, wouldn't need a special shutdown procedure, and had a rock-solid TCP/IP stack and WiFi stack (and USB host stack, too).

    • You can get the idle power consumption on the Pi down quite a bit if you disable stuff you're not using -- HDMI if it's running headless, LEDs, etc. (Wireless and USB can be powered down as well, but that's probably not useful for you.)

      I've seen 0.4W cited for a Pi Zero with HDMI and LEDs disabled. That number doesn't include WiFi, but that's probably comparable across platforms.

      • I'll add on... (*but as we can all agree there is a time and place)

        • There are also ways to reduce the boot times; however, I've never tried speeding up the shutdown process.
        • Also, the shutdown "process" is important to prevent the SD card from corrupting the files system. You might be able to work around that with a cheap SSD, which would probably speed up your boot/shutdown times. The primary drawback is that is only a viable workaround for the Pi 4.

  • You know I have this same thought about some projects where maybe the Arduino is over kill. Is there a simpler circuit I could build that could perform the same task? I usually fall back to the Arduinos because I don't have as much confidence in my ability design and build a circuit.

Related Posts

Recent Posts

Snap Into a SHIM, Jim

Qwiic GPS Clock

Tags


All Tags