Single-board microcomputers such as the Raspberry Pi and Beaglebone Black have made waves in recent years, and microcontrollers have firmly retained their place in electronic designs. Why? After all, the Raspberry Pi has significantly more processing power than nearly all microcontrollers. The 1.2 GHZ quad-core processor in the Raspberry Pi 3 Model B makes it fit to run Ubuntu, Windows 10, and for use as a budget media center. It is also a hell of a bargain. It has GPIO pins, but it lacks the hardware control and other peripherals found in a number of microcontrollers.
The Texas Instruments RM57L microcontroller has a number of peripherals for reading sensors, controlling hardware, and facilitating low-power communication, including but not limited to:
- Four CAN controller modules with 64 mailboxes.
- Two analog to digital converters.
- Real-Time Interrupt timer.
- Two HET timer modules (can be used for PWM).
- 7 ePWM modules.
- 145 GPIO pins.
- Quadrature encoder.
- I2C Interface.
- SCI interface for serial communication.
- Multi-buffered serial peripheral interface (MibSPI).
- 330 MHZ Cortex R5F lockstep CPU.
- 32KB ECC-protected instruction cache.
- 4MB of ECC program flash.
Bear in mind that not all microcontrollers have ECC-protected memory. Many don’t, and this is just a comparison of two similarly-priced kits.
Of course, the Raspberry Pi 3 Model B has a number of capabilities and ports not found on microcontrollers, including but not limited to:
- A GPU.
- An audio adapter.
- Audio output.
- 4 USB ports.
- Far more RAM (1 GB).
- Bluetooth and BLE.
- Basic GPIO ports for turning things on and off.
- Serial communication.
- A 1.2 GHZ quad-core processor vs the RM57Ls 330MHZ dual-core (but this is lockstep, so you’re getting the performance that you would from 1 core). To be fair, the lockstep CPU cores are for safety-critical applications, as they reduce the likelihood of errors.
Power Consumption Of A Raspberry Pi Vs A Microcontroller
There is a spectacular difference in power consumption between a Raspberry PI and a microcontroller. The Raspberry Pi 3: Model B averages 2.5 watts, which would last only 4.8 hours on a Samsung Galaxy S7 battery (if it’s idle). The Raspberry Pi can consume up to 2.1 amps (only under some circumstances, which amounts to 10.5 watts), resulting in a battery life of only 1 hour.
A typical mid-range microcontroller could easily consume 1 thousandth of that (microwatts), and therefore last an eternity on the same battery (or even a coin cell), all while costing only $1 to $6. In the case of the RM57L used for this comparison (which is a high-end microcontroller), the power consumption is 0.5 Watts. That’s 1/5th of what the Raspberry Pi consumes, and the battery life would be 5 times longer. The RM57L microcontroller can also be put into sleep mode while some peripherals are running, reducing the power consumption further (as is the case with many other microcontrollers).
After considering all that, you can decide which is best for your project easily. The Raspberry Pi is the clear choice for a media center, and the RM57L is the clear choice for a heart monitor.
No microcontroller can do what a Raspberry Pi can do, and the inverse is also true if comparing the Raspberry Pi to an advanced microcontroller, so they are not interchangeable. They can, however complement each other beautifully.
Start-Up And Wake-Up Times Of Microcontrollers And The Raspberry Pi
The start-up time of even a 40 MHZ microcontroller (like the EFM8UB1 used in my plug and play solar system) is typically in the millisecond range, so you don’t have to wait when activating a low-power transmitter like a remote control or RFID card which is unable to stay on for long due to limited battery capacity.
A Raspberry Pi can take more than 15 seconds to boot. Imagine waiting for an RFID card to boot while at a cashier.