In this article, we will compare Raspberry Pi Pico and Arduino Uno, the two best powerful and cheap microcontrollers all around the world.
Are you a Techno geek and stuck with the question in your mind which to choose Raspberry Pi’s latest microcontroller, “Raspberry Pi Pico” or Arduino?
Then go through these posts. I hope that you will get a clear solution on your next microcontroller choice and have no more doubt.
With its latest release this year Raspberry Pi has also entered the world of microcontroller and cleared its vision.
What is Arduino?
If you are a beginner and don’t know about Arduino, here is a short description.
Arduino is an open-source electronics platform based on easy-to-use hardware and software.
Over the years Arduino has been the brain of thousands of projects, from everyday objects to complex scientific instruments.
There are many different types of Arduino microcontroller boards to choose from. Almost all the Arduino boards have ATmega microcontrollers as a control unit.
With Arduino’s easy-to-use IDE software for beginners, the Arduino is easier to learn to program as it uses a simplified version of C++ compared to other programming software. Arduino software runs on cross-platforms such as Linux, Windows, Macintosh OS, and other platforms.
What is Raspberry Pi?
Raspberry Pi is a single-board credit card-sized computer that plugs into your TV or display, and a keyboard and mouse.
You can use it to learn to code, build electronics & robotics projects, learn and connect with the IoT world, and in addition many of the things that your desktop PC does, like spreadsheets, word processing, browsing the internet, and playing games. It also plays high-definition video.
The Raspberry Pi is being used by adults and children all over the world to learn programming and digital making.
What is Raspberry Pi Pico?
Raspberry Pi Pico is the first-ever microcontroller board from the Raspberry Pi foundation. It is a low-cost, high-performance microcontroller board with flexible digital interfaces.
Pico is designed on a powerful RP2040 microcontroller chip. The RP2040 features a dual-core ARM Cortex M0+ processor, flexible clock running up to 133 MHz.
It has a simple design so that more people can understand hardware and software easily that helps them to create gadgets and products more frequently. The Pico board features a multi-purpose castled hole/pad design, allowing headers to be soldered onto the pads as commonly seen on development boards, or the entire board can be treated as a surface-mountable module.
Pico also has the power and flexibility to serve professional users, whatever your application from machine learning, smart homes, wearables, to robotics.
Functionality and uses of GPIO
Raspberry Pi Pico
Raspberry Pi Pico has 40 pins as previous boards but they are way more different than the previous one. Out of 40 pins, there are 26 multi-function GPIO pins operating at 3.3V. The remaining pins are Ground and Power pins.
GPIO pins support specialist communication protocols such as I2C, SPI, and UART serial ports also 12-bit ADC and controllable PWM channels.
- 26 × multi-function 3.3V GPIO pins
- 2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 16 × controllable PWM channels
- 8 × Programmable I/O (PIO) state machines for custom peripheral support.
- The castellated module allows soldering directly to carrier boards.
|Pin Category||Pin Name||Details|
|Power||VBUS, VSYS, 3V3(OUT), GND||VBUS: USB input voltage, typically 5V. VSYS: Main system input voltage pin and can be varied in range 1.8V to 5.5V. 3V3 (OUT): main 3.3V supply to RP2040 and its I/O, generated by the onboard SMPS. GND: Ground pins.|
|System Control||3V3 (EN), Run||3V3 (EN): Onboard SMPS enable pin, pulled high (to VSYS) via a 100K resistor. Run: RP2040 enable pin, and has an internal (on-chip) pull-up resistor to 3.3V of about ~50K Ohms.|
|Analog Pins||ADC_VREF, AGND||ADC_VREF: ADC power supply (and reference) voltage, generated on Pico by filtering the 3.3V supply. AGND: Ground reference for GPIO26-29, ADC performance is not critical, this pin can be connected to digital ground.|
|Inbuilt LED||GP25||To turn on the inbuilt LED.|
|Programming||BOOTSEL||To mount the Pico board as a mass storage volume.|
|General Purpose IO||GPIO 0 – GPIO 22, GPIO 26 – 28||GPIO0 to GPIO22 are digital-only. GPIO 26-28: Can be used either as digital GPIO or as ADC inputs|
Arduino Uno has 14 digital I/O pins, 6 analog input pins, Power pins, Ground pins, IOREF pins, AREF pin.
Out of 14 digital pins, 6 are PWM pins.
|Pin Category||Pin Name||Details|
|Power||Vin, 5V, 3.3V, GND||Vin: Input voltage to Arduino when using an external power source. 5V: Regulated power supply used to power microcontroller and other components on the board. 3.3V: 3.3V supply generated by the onboard voltage regulator. The maximum current drawn is 50mA. GND: ground pins.|
|Reset||Reset||Resets the microcontroller.|
|Analog Pins||A0 – A5||Used to provide analog input in the range of 0-5V|
|Input/Output Pins||Digital Pins 0 – 13||Can be used as input or output pins.|
|Serial||0(Rx), 1(Tx)||Used to receive and transmit TTL serial data.|
|External Interrupts||2, 3||To trigger an interrupt.|
|PWM||3, 5, 6, 9, 11||Provides 8-bit PWM output.|
|SPI||10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK)||Used for SPI communication.|
|Inbuilt LED||13||To turn on the inbuilt LED.|
|TWI||A4 (SDA), A5 (SCL)||Used for TWI communication.|
|AREF||AREF||To provide a reference voltage for input voltage.|
These 14 digital I/O pins are used as input or output pins by having different modes and functions such as pinMode(), digitalRead(), and digitalWrite() in Arduino programming.
Each pin operates at 5V and can provide or receive a maximum of 40mA current, and has an internal pull-up resistor of 20-50 kOhms which are disconnected by default.
Out of these 14 pins, some pins have specific functions as listed below:
- Serial Pins 0 (Rx) and 1 (Tx): Rx and Tx pins are used to receive and transmit TTL serial data. They are connected with the corresponding ATmega328P USB to TTL serial chip.
- External Interrupt Pins 2 and 3: These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value.
- PWM Pins 3, 5, 6, 9, and 11: These pins provide an 8-bit PWM output by using the analogWrite() function.
- SPI Pins 10, 11, 12, 13: These pins are used for SPI (Serial peripheral interface) communication. SPI is a synchronous serial communication i.e. the clock is a must for communication purposes.
- Pin 10 is SS i.e. Slave Select. Master can use this pin to enable and disable specific devices
- Pin 11 is MOSI i.e. Master Out Slave In. This is the Master line for sending data to peripherals.
- Pin 12 is MISO i.e. Master In Slave Out. This is the Slave line for sending data to Master.
- Pin 13 is SCK i.e. Serial Clock. The clock pulses synchronize data transmission generated by Master.
- In-built LED Pin 13: This pin is connected with a built-in LED, when pin 13 is HIGH – the LED is on and when pin13 is LOW, it’s off.
Along with 14 Digital pins, there are 6 analog input pins, each of which provides 10 bits of resolution, i.e. 1024 different values. They measure from 0 to 5 volts but this limit can be increased by using the AREF pin with the analogReference() function.
- AREF: Used to provide reference voltage for analog inputs with analogReference() function.
- Reset Pin: Making this pin LOW, resets the microcontroller.
Analog pin 4 (SDA) and pin 5 (SCL) also used for TWI (Two-wire interface) communication using the Wire library.
With a Castellated module and 40 GPIO pins which include I2C, SPI, UART communication protocols, and PIO, three analog input pins the Pico offers a large variety of connecting and interfacing options.
While Arduino Uno lacks some of these features thus making Raspberry Pi Pico a great choice to go with.
Whereas on the other hand, Arduino Uno comes with ATmega328P an 8-bit AVR family microcontroller, with a clock speed of 16 MHz, 2kB of SRAM, and 32kB of flash memory.
Dual-core processors behave like two single-core processors running on a single chip. Dual-core processors are able to divide information for processing by multiple units. Each processor core has its own cache and an interface that connects to the system bus. This type of processor executes two complete instructions at the same time. This enables the processors to share the workload between the two cores and enhance processing capacity.
ATmega328P is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the ATmega328P achieves throughputs approaching 1MIPS per MHz allowing the system designed to optimize power consumption versus processing speed.
Clock speed is the rate at which a microcontroller CPU executes instructions. The Higher the clock speed, the more instructions the CPU can execute per second.
With a 133 MHz clock rate, we can say that RP2040 executes all instructions at a very high speed than ATmeg328P.
SRAM is a type of Random access memory used to store each binary logic ‘1’ and ‘0’ bit. It is a volatile type of memory and the data is lost when no power is provided. SRAM is generally used for high-speed registers, caches, and relatively small memory banks.
With 264 kB of SRAM memory RP2040 again wins the race and is the best option to go rather than ATmega328P with just 2 kB of SRAM memory.
Flash memory is a non-volatile memory chip used for storage and for transferring data. Its non-volatile meaning it can hold data even without the presence of power. Thus higher the flash memory, the more will be data stored.
Here you need to know that RP2040 is such a powerful microcontroller that even Arduino has officially announced to use it in their upcoming Arduino Nano RP2040 connect board. Arduino and Raspberry Pi have collaborated and planning something great ahead in the field of microcontrollers.
Raspberry Pi Pico
Raspberry Pi Pico comes with two different platforms for programming and also two different programming languages support i.e. “C/C++ or MicroPython”.
For programming Pico, we can use Serial Wire Debug Port or the Special USB Mass Storage Device Mode.
I would recommend you to program it through the Special USB Mode, in this mode you just need to press and hold the BOOTSEL button on the board, it will pop up as USB mass storage on the screen now drag the special UF2 file and drop it onto the USB mass storage device option on the screen the disc will write the file to flash and restart the Pico board.
If you are a beginner then MicroPython is best suited for you and if you are an advanced user you can go for any of the suitable languages.
Pico provides two choices for programming software in both languages.
For programming MicroPython you can use either ThonnyIDE with version 3.3.0 and above or any comfortable Python Shell. I would suggest you use Python ThonnyIDE.
As now we have seen the complete description and specs of both the boards, we can say that when it comes to the perspective of the cost we get Official Raspberry Pi Pico board just at INR. 350/- whereas if we want the original Arduino Uno board it costs approx. INR 1500/- although there are many clone Arduino Uno boards within INR 500/- that work the same as well with no difference.
Practically, if you are a beginner in the world of microcontroller, Arduino Uno is the best suitable board to learn. There are no. of pre-installed libraries, examples available in Arduino IDE and the Arduino community to help you out. In the past 15 years, Arduino is the biggest community, since Raspberry Pi Pico is the latest there is not a bigger family to help you out but it gives you a golden chance to grab the opportunity of becoming one of the experts.
On Arduino Uno you can learn, create several projects based on IoT, Artificial Intelligence (AI), Machine Learning (ML), Security systems, motion detectors, Industrial and home automation, etc. with the help of very low-cost sensors readily available in the market and several links to help you out with, in case of Raspberry Pi Pico it is said to perform the same level of projects but there are not as many links readily available to help you.