Last updated on March 15th, 2024 at 12:05 pm
Tiny 2040 is a small size development board based on the RP2040 microcontroller, a dual-core Arm cortex M0+ that runs on 133 MHz clock frequency. Due to its compact size, it is getting attention in many ambitious projects where space is the main constraint.
Tiny2040 has a total of 16 pins(3 additional pins are for debugging) out of which 12 are General purpose I/O pins: 8 digital, 4 analog(12 bit). The remaining pins are 2X Ground, 1X 5V, and 1X 3.3V. Bord supports 2X UART(UART0 and UART1), 1X SPI, and 2X I2C(I2C0 and I2C1) interfaces. Board supports 3.3V logic.
Table of Contents
Introduction to Tiny 2040
Tiny 2040 board from Pimoroni resembles a postage stamp size having dimensions 22.9mm x 18.2mm x 6mm typically. This allows Tiny 2040 to be used in embedded applications e.g. wearable projects.
Note: The microcontroller RP2040 is manufactured by the Raspberry Pi foundation which they first used in their first microcontroller board, Rpi Pico.
Unlike the RPI pico, Tiny 2040 has additional features such as a dedicated reset button, a fourth ADC pin, and an RGB LED & saves a considerable amount of space.
Tiny 2040 can handle projects small and large, easily as it is equipped with 8MB of QSPI flash on board.
It can be programmed with C/C++ or Micro Python just like in Raspberry Pi Pico.
Specifications
Technical specifications of Tiny 2040 is given below in the tabular form:
Specs | Detail |
---|---|
Microcontroller | RP2040 |
Processor | Dual-core ARM Cortex M0+ running up to 133 MHz |
SRAM | 264 kB |
FLASH Memory | 2MB or 8MB of QSPI (supporting XiP) |
USB | USB Type-C connector for power, data, and programming |
Digital Pins | 12 |
Analog Pins | 4 |
Communication | • 2 X UART • 2 X I2C • 1 X SPI |
Power Supply | 3V to 5.5 V through VBUS(5V) pin OR USB-C |
Debugging | 3-pin SWD interface |
Board Dimensions | 22.9mm x 18.2mm x 6 mm |
Voltage Regulator | On-board 3V3 regulator (max regulator current output 300mA) |
To download the schematic of Tiny2040, click here.
Tiny 2040 VS Raspberry Pi Pico
Tiny 2040 from Pimoroni is compatible with firmware designed for the Raspberry Pi Pico.
It is one-third of the size of a Raspberry Pi Pico & has 16 GPIO pins while Raspberry Pi Pico has 40 pins. With proper orientations & mapping of the pins, there is no loss of functionality despite lesser pins.
Board has some unique features that Raspberry Pi Pico does not have, such as a dedicated reset button, a fourth ADC pin, RGB LED & USB C port.
Board layout
RP2040 microcontroller
RP2040 is a custom-designed processor chip by the Raspberry Pi. It is a powerful but cost-effective processor, featuring a dual-core Arm Cortex-M0+ processor running at 133Mhz.
It has 264KB of internal RAM and support for up to 16MB of onboard flash memory.
A wide range of flexible I/O operations is possible including I2C, SPI, and Programmable general purpose I/O (GPIO).
Flash memory
Board has an external Flash memory and you have the option to choose from two different variants based on it. 8MB( four times more than Raspberry Pi Pico) and 2MB of FLASH memory.
12 MHz crystal oscillator
Just like Pico, the 12 MHz crystal oscillator is installed on Tiny 2040 also.
3.3V voltage regulator
Since the board supports 3.3V logic, it has an onboard 3V3 regulator. It has a maximum current output of 300mA.
Reset button
Often there is a need to reset Raspberry Pi Pico. Without this button, we have to unplug the Pico and plug it back in which results in wear and tear to its micro USB port.
By pressing the reset button, it first turns off the board and then turns it on again. It only stops the program which is going through and starts from the starting point of the program and runs the program again.
Boot button
It plays an important role in Tiny 2040. Through it, we can also give input and it will upload a UF2 file image. It is simply applying power to the system.
RGB LED
There is an RGB LED that lies between the Boot button & Reset button & addressed by pins 18, 19 & 20 respectively.
Controlling these pins is easy by simply using the on/off command. We can also create a different set of colors with the help of PWM.
USB connector
It has a USB C port while the Raspberry Pi Pico has a micro USB connector.
Pin numbers
Pin numbers are available on top of the board. These are numbered as logically &, these relate to GPIO pin number as per the Pico pinout reference.
Pinout
Pinout of the Tiny 2040 shows that it has a total of 16 pins(3 additional pins are for debugging) out of which 12 are I/O pins: 8 digital, 4 analog(12 bit).
The remaining pins are 2X Ground, 1X 5V, and 1X 3.3V. Bord supports 2X UART(UART0 and UART1), 1X SPI, and 2X I2C(I2C0 and I2C1) interfaces.
ADC or Analog pins
There are 4 ADC pins in Tiny 2040(A0, A1, A2, A3) while there are 3 pins in Raspberry Pi Pico. Since each joystick requires two ADC ports, with this fourth ADC in Tiny 2040, now we can attach two analog joysticks while in Raspberry Pi Pico only one analog joystick is connected.
It is also suitable for those applications of controller or control box where there is a requirement of 4 potentiometers.
Digital I/O pins
There are 12 digital pins: D0 to D7.
UART pins
Board can support two UART interface; UART 0 and UART 1.
- UART 0: D0(TX), D1(RX)
- UART 1: D4(DX), D5(RX)
I2C pins
Board can support two I2C interfaces; SPI 0 and SPI 1.
- I2C 0: D0(SDA), D1(SCL) OR D4(SDA), D5(SCL)
- I2C 1: D2(SDA), D3(SCL) OR D6(SDA), D7(SCL) OR A0(SDA), A1(SCL)
SPI pins
Board can support only 1 SPI interface; SPI 0.
- SPI 0: D0(MISO), D4(MOSI), D1(CS), D2(CLK)
Ground pins
Total 3 Ground pins are there. At pin 2 & pin 8, and between SWC and SWD of the debugging pins.
Programming the Tiny 2040
All the programmable codes for Raspberry Pi Pico work with Tiny 2040 too. But there are some variations in functionality i.e, you may have to change the pin number in your program accordingly.
Tiny 2040 can be programmed with C/C++ or Micro Python just like in Raspberry Pi Pico For uploading programs to memory can be done through USB interface or via debugging interface & SWD programming
CircuitPython can also be used on Tiny 2040. It is user-friendly having lots of example codes and drivers for interfacing with different kinds of hardware.
Dimensions or Form factor
The dimensions of the Tiny 2040 are 22.9mm x 18.2mm x 6 mm which is perfect for portable projects like wearable devices.
Price
Tiny 2040 is available in three variants:
- 8 MB of Flash memory(no headers) priced at $11.50
- 8 MB of Flash memory with pin header priced at $14.50
- 2 MB of Flash memory(no headers) priced at $ 9.00
Conclusion
Although Tiny 2040 has several advantages over Raspberry Pi Pico, still it is not suitable for all projects. Its bottom-facing SoC is a challenge for placing it in projects and its distinctive pin layout feature does not work with those projects where there are add-on boards/packs, that are designed only for original Raspberry Pi Pico.
However, if the project doesn’t require these add-ons and there is a requirement for a compact board, the Tiny 2040 is a great choice then.