Advertisement

Quick Links

Product Reference Manual (V1.2)
Description
Unit DualMCU brings the Raspberry Pi
RP2040 microcontroller
ESP32 WROOM chip in a simple one
module, make the most of the dual core
32-bit Arm® Cortex®-M0+ to make Internet
of Things projects with Bluetooth® and
Wi-Fi connectivity.
DualMCU has been thought of as a mix
between two 32-bit microprocessors: a
Raspberry RP2040 cortex M0+ running at
133 Mhz and an Espressif ESP32 running
up to 240 MHz, in this way we implement all
the power of both microcontrollers in a
single development card. With a PCB size
of 36mm x 84mm and using surface mount
technology, four programmable cores with
wireless functions and features are found
with very low power consumption.
Both microcontrollers can communicate
via serial protocol by simply activating a
2-way DIP SWITCH, for example, we can
program
the
ESP32
co-processor
to
provide
microcontroller with WIFI or BLUETOOTH
communication. For programming, there is a
mechanical selector that allows us to select
which MCU connects using a single USB type
C connector.
Interconnect a large number of I2C
devices using its STEMMA, QWIIC and
GROVE compatible JST-SH I2C connectors
and dive into real-world projects with the
onboard RGB 2020 and WS2812B LED.
1
plus
an Espressif
as
a
wireless
the
RP2040
Unit Electronics ® DualMCU RP2040+ESP32
With over 46 general purpose pins
(GPIO), DualMCU exposes most output
ports of both microcontrollers via pin
headers
and
JST-SH
(STEMMA,
QWIIC
compatible).
It
has
peripherals such as: UART, I2C, SPI, PWM,
ADC, Touch and state machines. The
multiple forms of connection to sensors,
actuators
or
even
microcontrollers will only be limited by your
creativity.
DualMCU
RP2040 + ESP32
SKU: UE0002
connectors
and
GROVE
I2C
more
common
between
both
Modified: 26/06/2023

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DualMCU and is the answer not in the manual?

Questions and answers

Summary of Contents for UNIT ELECTRONICS DualMCU

  • Page 1 32-bit Arm® Cortex®-M0+ to make Internet of Things projects with Bluetooth® and Wi-Fi connectivity. DualMCU has been thought of as a mix between two 32-bit microprocessors: a Raspberry RP2040 cortex M0+ running at 133 Mhz and an Espressif ESP32 running...
  • Page 2 Python Integrated Development Environment The DualMCU also features a 3.7V LiPO (IDE) such as Thonny via an interactive battery charging system making it ideal for prompt (REPL) to execute commands applications that require a portable and immediately...
  • Page 3 ● Connected to ESP32 GPIO ● 66MB/S continuous data transfer rate ● 100K program/erase cycles Builtin LED ● More than 20-year data retention ● LED for general purpose blinking, connected to RP2040 GPIO25 Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 4 ● ESP32 CAN 2.0 Power ● 3.3 v LDO 600 mA ● 3.3V Power/enable pin ● VUSB Output /VIN (3.2 - 6 V) Pin ● Built in 200mA+ lipoly charger with charging status indicator LED Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 5: Table Of Contents

    5.2 Installing the micropython interpreter on the RP2040 5.3 Examples (Micropython) 5.4 Micropython hello world on the RP2040 5.5 Getting Started - Arduino IDE 5.6 Hello world on the ESP32 from Arduino IDE Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 6: The Board

    Current at VSS+0.4v, output set low OL Max (RP2040) Output high voltage, 8 mA 2.62 (RP2040) Output low voltage. 8 mA (RP2040) Pull-Up Resistance kΩ (RP2040) Pull-Down Resistance kΩ (RP2040) Maximum Total IOVDD current* IOVDD_MAX (RP2040) Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 7 **Sum of all current being sunk into GPIO and QSPI pins ***Per-pin current sourced in the same domain is gradually reduced from around 40 mA to around 29 mA, VOH>=2.64 V, as the number of current-source pins increases Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 8: Functional Overview

    Internet of Things (IoT) development and whatever your microcontroller application, from motor control to machine learning, from digital audio to automotive, the DualMCU RP2040 & ESP32 has the performance, feature set, and support to make your product fly.
  • Page 9: Board Topology

    DualMCU RP2040 + ESP32 SKU: UE0002 3.2 Board Topology Front View Front View of DualMCU RP2040 + ESP32 Topology Ref. Description Ref. Description Raspberry pi RP2040 Microcontroller CH340C USB bus convert IC Espressif ESP32 WROOM Wi-Fi/Bluetooth® MCP73831 Battery Charge Management IC...
  • Page 10: Processor

    (disconnected) 3.3 Processor The DualMCU is powered by a revolution of the Raspberry Pi RP2040 silicon microcontroller (U1) manufactured on a modern 40nm process node is the debut microcontroller from Raspberry Pi and it brings signature values of high performance and ease of use to the microcontroller space.
  • Page 11: Wi-Fi/Bluetooth® Connectivity

    The common anode RGB LED (L5) is also controlled by the ESP32 module such that the LED is on when the digital state is LOW and off when the digital state is HIGH. Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 12: Ws2812B Led

    ESP32. 3.10 Power Switch The toggle power switch (SW1) provides the utility to turn the DualMCU ON or OFF and allows battery charging even when the power switch is in the off position. 3.11 Mechanical selector for the USB Communication The mechanical USB selector (SW2) allows the programming and serial USB communication from one MCU at the time with only one USB Type-C connector.
  • Page 13: Dip Switch For Uart Communication

    3.13 Power Tree The DualMCU can be powered by either the USB-C port (J1) or alternatively via VIN on JP1. The VIN pin also delivers the USB voltage from J1 (approx 4.8 V) when the external power supply on the VIN does not exist. An AP2112K LDO Voltage Regulator provides 3V3 to the RP2040 and ESP32 microcontrollers and all other peripherals.
  • Page 14: Connector Pinouts

    4.1 J1 USB-C Function Type Description 2 , 11 VBUS Power 5V USB Power A7 , B7 Differential USB differential data- A6 , A6 Differential USB differential data+ 1 , 12 Power Ground Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 15: Jp1

    4.2 JP1 Function Type Description Power 3.3V Power Power 3.3V Power Analog ESP32 Sense Vp, ADC1-CH3, RTC_GPIO3, GPIO39 Analog ESP32 Sense Vn, ADC1-CH0 RTC_GPIO0, GPIO36 IO25 Analog, RTC, Digital ESP32: DAC1/ ADC2-CH8/ RTC_GPIO6/ GPIO25 Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 16 Digital RP2040: digital pin GPIO02/SDA_1 MOSI Digital RP2040: digital pin GPIO19/SPI Digital RP2040: digital pin GPIO18/SPI Digital RP2040: digital pin GPIO21/SPI MISO Digital RP2040: digital pin GPIO20/SPI IO23 Digital RP2040: digital pin GPIO23 Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 17 VUSB: Output Pin / Input Pin Each UART can be connected to a number of GPIO pins as defined in the GPIO muxing table in Section 2.19.2 of RP2040 official datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf . Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 18: Jp2

    RP2040 + ESP32 SKU: UE0002 DualMCU RP2040&ESP32 JP2 Pinout 4.3 JP2 Function Type Description Power 3.3V Power Digital ESP32: Reset Analog, Digital ESP32: ADC2-CH2, GPIO2, TOUCH T2, RTC_GPIO12 Digital ESP32:DTR, GPIO0 Power Ground Power Ground Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 19 Digital ESP32: SPI-MOSI, GPIO23 MISO Digital ESP32: SPI-MISO, GPIO19 Digital ESP32: I2C-SDA, GPIO21 Digital ESP32: UART0 - RXD, GPIO1 Digital ESP32: I2C-SCL, GPIO22 Digital ESP32: UART0 - TXD, GPIO3 Power Ground Power Ground Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 20: Rp2040 Swd Jp3

    DualMCU RP2040&ESP32 JP3 Pinout 4.4 RP2040 SWD JP3 Function Type Description Power 3.3V Power RUN/RESET Digital RP2040: Reset SWDIO Digital Serial Wire Debug SWCLK Digital Serial Wire Debug QSPI_SS Digital Bootsel Power Ground Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 21: Rp2040 I2C Jst1

    DualMCU RP2040 + ESP32 SKU: UE0002 DualMCU RP2040&ESP32 I2C and Battery Connectors Pinout 4.5 RP2040 I2C JST1 Function Type Description Power Ground Power 3.3V Power Digital RP2040: digital pin GPIO12/SDA_0 Digital RP2040: digital pin GPIO13/SCL_0 Unit Electronics ® DualMCU RP2040+ESP32...
  • Page 22: Esp32 I2C Jst2

    Type Description Power Ground Power 3.3V Power Digital ESP32: I2C-SDA, GPIO21 Digital ESP32: I2C-SCL, GPIO22 4.7 JST3 Battery Connector Function Type Description VBAT Power Positive voltage for the optional lipoly battery Power Ground Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 23: Board Operation

    SKU: UE0002 5 Board Operation If you want to program your UNIT® DualMCU while offline you need to install the Thonny[1] or Arduino[2] IDE. To connect the DualMCU to your computer, you’ll need a USB-C cable. This also provides power to the board, as indicated by the Power On LED.
  • Page 24 Thonny options. In the Interpreter tab, select MicroPython (Raspberry Pi Pico) as the interpreter. 2) To download the Micropython firmware on the RP2040, plug the USB-C cable into the DualMCU, move the mechanical USB selector to the “A” position (see section: 3.11 Mechanical selector for the USB Communication) and press and hold the RP2040 reset button (PB1), you can find it onboard with the label “RST”.
  • Page 25 With the other hand, press and hold the RP2040 boot button (PB2) labeled “BOOT” and release the reset button (PB1) “RST”. Press and hold the RP2040 “Boot and Reset buttons” to enter bootloader mode The board should appear as a removable drive called RPI-RP2. Removable drive called RPI-RP2 Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 26 SKU: UE0002 3) Go to Thonny IDE and click on “Install or Update firmware” to start the firmware download from Raspberry Pi Pico. The following window should appear: 4) Then, click on “install”. Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 27: Examples (Micropython)

    RP2040 + ESP32 SKU: UE0002 Once the micropython firmware download is finished, the message “Done!” will appear, indicating that the firmware load was done correctly, click on "Close" and the DualMCU ready to start loading our programs on the RP2040 chip. Note: You can also download the micropython firmware UF2 file from Raspberry pi source and then drag and drop into the removable drive “RPI-RP2”.
  • Page 28: Micropython Hello World On The Rp2040

    Thonny options. In the Interpreter tab, select MicroPython (Raspberry Pi Pico) as the interpreter and select the COM port with which your system recognizes the DualMCU for RP2040 (please make sure that the USB selector switch is in position “A”, see section 3.11). Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 29 DualMCU RP2040 + ESP32 SKU: UE0002 3) Head to the menu and select: File -> Save and choose “Raspberry Pi Pico” 4) Save the script with the name: “HelloWorld.py” Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 30 The first thing is to have the Arduino environment installed. 1) Open the IDE and go to File -> Preferences: Into “Additional Board Manager URLs” field, add a coma and write the next URL: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index. json Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 31 2) Head to the menu and select: Tools -> Board -> Boards Manager and type “ESP32” in the blank field, select the option “esp32 by Espressif Systems” and press “Install”: Wait a moment while the package should be installed and press “Close” Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 32: Hello World On The Esp32 From Arduino Ide

    1) In the “Tools” menu, select: Board -> ESP32 Arduino -> ESP32 Dev Module 2) Connect the Dual MCU to your computer and go to the “Tools” menu and select the COM port for the DualMCU: (if you do not see the COM Port in your Arduino IDE, you need to install the...
  • Page 33 { // initialize digital pin LED_BUILTIN as an output. pinMode(LED_G, OUTPUT); Serial.begin(115200); void loop() { Serial.println(“Hello World! This is the ESP32 MCU from DualMCU - Blinking a LED”); digitalWrite(LED_G, LOW); // turn the BLUE LED on delay(1000); // wait for a second digitalWrite(LED_G, HIGH);...
  • Page 34 DualMCU RP2040 + ESP32 SKU: UE0002 5) Finally, open the arduino serial monitor, you will see a message printing every second and the BLUE LED on the DualMCU blinking! Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 35 DualMCU RP2040 + ESP32 SKU: UE0002 Important!: Sometimes it is necessary to press the “Flash Button (PB3)” on the DualMCU during code upload. Press the ESP32 “Flash button” to start flashing the Arduino sketch Note: The RP2040 MCU can also be programmed from Arduino IDE, if you want to know how to do it, please visit the following repository: https://github.com/UNIT-Electronics/DualMCU-RP2040&ESP32-Arduino Programming...
  • Page 36: Mechanical Information

    DualMCU RP2040 + ESP32 SKU: UE0002 6 Mechanical Information Mechanical dimensions of DualMCU RP2040 + ESP32 7 Company Information Company name UNIT Electronics Company website https://uelectronics.com/ Company Address Salvador 19, Cuauhtémoc, 06000 Mexico City, CDMX 8 Reference Documentation Link UNIT DualMCU https://github.com/UNIT-Electronics/DualMCU...
  • Page 37 Raspberry Pi Pico https://www.raspberrypi.com/documentation/microcontrollers/ RP2040 Documentation Raspberry Pi Pico https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-python- Python SDK sdk.pdf raspberrypi/pico-micro https://github.com/raspberrypi/pico-micropython-examples python-examples Raspberry Pi Pico https://www.raspberrypi.com/documentation/microcontrollers/c_s C/C++ SDK dk.html raspberrypi/pico-C/C+ https://github.com/raspberrypi/pico-examples -examples RP2040 Datasheet https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf ESP32 WROOM 8MB https://www.espressif.com/sites/default/files/documentation/esp3 2-wroom-32e_esp32-wroom-32ue_datasheet_en.pdf Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 38: Appendix

    DualMCU RP2040 + ESP32 SKU: UE0002 9 Appendix 9.1 Schematic ( https://github.com/UNIT-Electronics/DualMCU/blob/main/Hardware/UE0002_DualMCUv30_Schematic.pdf Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 39 DualMCU RP2040 + ESP32 SKU: UE0002 Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...
  • Page 40 DualMCU RP2040 + ESP32 SKU: UE0002 Unit Electronics ® DualMCU RP2040+ESP32 Modified: 26/06/2023...

This manual is also suitable for:

Ue0002

Table of Contents