Hardware reference, component architecture, pinout, and configuration guide for the Uno+WiFi R3 hybrid development board (commonly marketed as TZT Uno WiFi R3, RobotDyn Uno+WiFi, or WeMos Uno WiFi R3 ATmega328P+ESP8266) used as the main controller in the tracked_bot platform.
This board integrates both a Microchip ATmega328P primary motion microcontroller and an Espressif ESP8266EX (32Mb flash) wireless communications coprocessor, alongside a CH340G USB-to-UART bridge on a single standard Arduino Uno R3 footprint.
The TZT Uno WiFi R3 replaces a multi-board stack with a dual-processor architecture:
Original manufacturer datasheets for all core integrated circuits on this board are preserved in the repository:
| Feature | Primary Controller (ATmega328P) | Wi-Fi Coprocessor (ESP8266EX) |
|---|---|---|
| Architecture | 8-bit AVR RISC | 32-bit Tensilica Xtensa L106 |
| Clock Frequency | 16 MHz (external crystal) | 80 MHz / 160 MHz |
| Operating Voltage | 5.0 V DC | 3.3 V DC (onboard LDO regulator) |
| Flash Memory | 32 KB (0.5 KB used by bootloader) | 4 MB (32 Mbit SPI Flash) |
| SRAM | 2 KB internal SRAM | ~50 KB usable RAM |
| EEPROM | 1 KB internal EEPROM | None (emulated in SPI flash sector) |
| Timers | 2x 8-bit (Timer0, Timer2), 1x 16-bit (Timer1) | System timers, Software PWM |
| Hardware Serial (UART) | 1x USART (PD0/RX, PD1/TX) |
1x Full UART (UART0), 1x TX-only (UART1) |
| I/O Logic Levels | 5 V TTL/CMOS | 3.3 V LVTTL (tolerant on UART via dividers) |
The onboard 8-position DIP switch physically routes the UART TX/RX lines between the CH340G USB converter, the ATmega328P microcontroller, and the ESP8266 Wi-Fi SoC:
| Mode / Functionality | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | SW7 | SW8 |
|---|---|---|---|---|---|---|---|---|
Mode 1: Flash ATmega328P (make flash) |
OFF | OFF | ON | ON | OFF | OFF | OFF | N/U |
| Mode 2: Normal Robot Operation (ATmega328P ↔ ESP8266) | ON | ON | OFF | OFF | OFF | OFF | OFF | N/U |
| Mode 3: Flash ESP8266 Firmware | OFF | OFF | OFF | OFF | ON | ON | ON | N/U |
| Mode 4: ESP8266 Serial Monitor Debug | OFF | OFF | OFF | OFF | ON | ON | OFF | N/U |
| Mode 5: All Modules Disconnected / Isolated | OFF | OFF | OFF | OFF | OFF | OFF | OFF | N/U |
[!NOTE]
- Switch SW8 is unused on this board revision (labeled No Use / N/U).
- Switch SW7 controls ESP8266
GPIO0boot mode:ONpullsGPIO0LOW into UART download/flashing mode;OFFpullsGPIO0HIGH for normal flash boot.
The headers on the TZT Uno WiFi R3 follow the standard Arduino Uno R3 footprint. The table below details the signal routing, onboard connections, and usage within tracked_bot:
| Pin | AVR Port | Onboard Connection | Role in tracked_bot |
|---|---|---|---|
| D0 (RX) | PD0 |
ATmega328P USART RX (DIP SW1/SW4) | USART0 RX: Serial command stream from ESP8266 |
| D1 (TX) | PD1 |
ATmega328P USART TX (DIP SW2/SW3) | USART0 TX: Serial telemetry stream to ESP8266 |
| D2 | PD2 |
Header pin | FREE GPIO: External Interrupt 0 (INT0), sensors, encoders |
| D3 | PD3 |
Header pin / L293D PWM2B |
Reserved (Timer2 OC2B for Motor 2 PWM on shield) |
| D4 | PD4 |
Header pin / L293D DIR_CLK |
74HC595 Shift Clock: Clock line for direction register |
| D5 | PD5 |
Header pin / L293D PWM0B |
Right Track PWM Speed: Timer0 OC0B Fast PWM |
| D6 | PD6 |
Header pin / L293D PWM0A |
Left Track PWM Speed: Timer0 OC0A Fast PWM |
| D7 | PD7 |
Header pin / L293D DIR_EN |
74HC595 Output Enable: Active-low output buffer enable (~OE) |
| D8 | PB0 |
Header pin / L293D DIR_SER |
74HC595 Serial Data: Direction bit data line (SER) |
| D9 | PB1 |
Header pin / L293D PWM1A |
Reserved for Pan-Tilt Servo 2 (Timer1 OC1A) |
| D10 | PB2 |
Header pin / L293D PWM1B |
Reserved for Pan-Tilt Servo 1 (Timer1 OC1B) |
| D11 | PB3 |
Header pin / L293D PWM2A |
Reserved (Timer2 OC2A for Motor 1 PWM on shield) |
| D12 | PB4 |
Header pin / L293D DIR_LATCH |
74HC595 Storage Latch: Latches direction bits to outputs (RCLK) |
| D13 | PB5 |
Header pin / Onboard SCK LED | FREE GPIO: SPI SCK / Built-in indicator LED |
All analog pins are uncommitted by the L293D motor shield and are available on the top header breakout:
| Pin | AVR Port | Alternative Functions | Dedicated Purpose in tracked_bot |
|---|---|---|---|
| A0 | PC0 |
ADC0 / PCINT8 | Battery Voltage Sense: 10:1 resistor divider to ADC0 |
| A1 | PC1 |
ADC1 / PCINT9 | HC-SR04 Ultrasonic Trigger: Pulse generator |
| A2 | PC2 |
ADC2 / PCINT10 | HC-SR04 Ultrasonic Echo: Pulse duration measurement |
| A3 | PC3 |
ADC3 / PCINT11 | Auxiliary GPIO / Analog Input |
| A4 | PC4 |
ADC4 / I2C SDA | I2C Bus SDA: IMU gyroscope/accelerometer (MPU-6050) / OLED |
| A5 | PC5 |
ADC5 / I2C SCL | I2C Bus SCL: IMU gyroscope/accelerometer (MPU-6050) / OLED |
To flash the bare-metal AVR C hex firmware onto the ATmega328P:
make -C sw/trackedbot/build flash PORT=/dev/ttyUSB0
avrdude will synchronize with the optiboot / STK500v1 bootloader over /dev/ttyUSB0 at 115200 baud and flash the firmware image.After flashing the firmware:
D0 (RX) and D1 (TX) communicate directly with the ESP8266 UART at 9600 baud. The ESP8266 listens to Wi-Fi control packets and streams motion commands to the AVR core.When flashing an updated Wi-Fi firmware image or Arduino ESP8266 sketch:
esptool.py (or Arduino IDE with board set to Generic ESP8266 Module). +------------------------------------------------+
| TZT Uno WiFi R3 Main Board |
| |
| +------------+ +---------------+ |
[USB to PC] ======> | CH340G | | ESP8266 | |
| | USB-UART | | Wi-Fi SoC | <===> [Wi-Fi 802.11 b/g/n]
| +-----+------+ +-------+-------+ |
| | | |
| +----[ 8-Position DIP ]----+ |
| | |
| (Serial D0/RX, D1/TX) |
| | |
| +-------v-------+ |
| | ATmega328P | |
| | Primary MCU | |
| +-------+-------+ |
+----------------------|-------------------------+
|
(PWM D5/D6, Shift Reg D4/D7/D8/D12, ADC A0..A5)
|
+----------------------v-------------------------+
| L293D Motor Driver Shield |
| (IC1, IC2 H-Bridges + 74HC595 Shift Register) |
+------------------------------------------------+
For the motor shield driver circuits and register assignments, refer to motor_shield.md. For power rail wiring and battery safety, refer to power_supply.md.
The hybrid Uno+WiFi R3 board is manufactured and distributed under several commercial brand names across various suppliers:
These are identical physical and electrical implementations of the same dual-processor architecture:
sw/trackedbot), while the ESP8266 handles Wi-Fi networking and streams commands over hardware UART.