This application demonstrates a comprehensive system for controlling and autonomously navigating a 4WD RC car. The vehicle can be operated manually via an RC receiver or can navigate autonomously using data from a 360-degree LiDAR sensor, which enables real-time obstacle detection and path planning. The car is also equipped with an Serial Peripheral Interface (SPI) based ArduCAM® MEGA camera module for image capture and a 9DOF 3 Click board™ used as an Inertial Measurement Unit (IMU) for collecting motion and orientation data.
All sensor data—including live images from the camera, LiDAR readings, and IMU data—are transmitted wirelessly to a PC using a TCP server-client communication protocol. This allows the PC to receive and process real-time visual, spatial, and motion information from the vehicle. The system provides a robust platform for developing and testing advanced navigation algorithms, remote control solutions, sensor integration, and wireless data transmission techniques in mobile robotics applications.
Figure 2. System Block Diagram
-
Peripheral modules
- PORT
- SYSTICK
- SERCOM1 - UART
- SERCOM2 - SPI
- SERCOM3 - SPI
- SERCOM4 - UART
- SERCOM5 - I2C
- TCC0
- TCC9
- EIC
- EVSYS
-
Drivers
- I2C
- SPI
- USART
-
Wireless
- WINCS02
- RNWF WINCS Wi-Fi Service
- RNWF WINCS NET Service
-
System Services
- Time
- CONSOLE
- DEBUG
-
Middleware libraries
- Harmony Core
- PIC32CZ8110CA90208 Product Page
- PIC32CZ8110CA90208 Code Examples on Discover
- PIC32CZ8110CA90208 Code Examples on Github
- Online Documentation of this Demo
- MPLAB® X IDE v6.30 or newer
- MPLAB® XC32 Compiler v5.00 or newer
- MPLAB® Harmony v5.8.4
- MPLAB® Code Configurator (MCC) v5.6.4 or newer
- Microchip PIC32CZ-CA90 Series Device Support v1.7.168 or newer
- CSP v3.25.1
- CORE v3.16.0
- CMSIS_5 v5.9.0
- Wireless System RNWF v3.1.0
- Wireless WiFi v3.12.2
- MCC Core v5.8.4
- Smart RC Car GUI
- Python® v3.7.9 or newer
- PIC32CZ CA90 Curiosity Ultra Development Board
- WINCS02 Add-on Board
- 4WD RC car chassis (RBC1063A)
- 360-degree LiDAR sensor
- ArduCAM® Camera Module (B0401)
- 9DOF 3 Click
- RC transmitter and receiver
- Cytron 3Amp Motor Driver MDD3A (381249)
- OLED Display (ELC2065-2)
- 4400 mAh Battery (1212508)
Run the requirements Python file in the command prompt to install the required packages needed for the Graphical User Interface.
Remove the Universal Asynchronous Receiver and Transmitter (UART) series resistors (R215 and R220) on the WINCS02 Add-on Board.
-
Attach the WINCS02 Add-on Board to the mikroBUS™ Extension of the PIC32CZ CA90 Curiosity Ultra development board.
-
Place the custom Arduino® shield board onto the Arduino® extension of the PIC32CZ CA90 Curiosity Ultra development board.
Figure 7. Custom Arduino® Shield Board MountingNote: The Gerber file and schematic for the custom Arduino® shield are available in the
design_filesfolder. -
Attach the 9DOF 3 Click to the mikroBUS™ Extension of the Arduino® shield board.
-
Feed the PWM signals from the board to the Motor Driver as per the following table:
Table 1. Motor Driver Pinouts
Output Pin Motor Driver Pin OUT0 M1A and M2A OUT1 M1B and M2B GND GND -
Connect the Steering Servo motor to the PWM output (OUT2) as per the following table:
Table 2. Servo Motor Pinouts
Output Pin Servo Motor Pin OUT2 PWM VCC VCC GND GND -
Use 5V via the excess power header in the PWPulse-Width Modulation (PWM) outputs.
-
Attach the LiDAR module to the PIC32CZ CA90 Curiosity Ultra development board using the LiDAR connector.
-
Use the PPM Input connector (fourth header) for the RC receiver Pulse Position Modulation (PPM) output as per the following table:
Table 3. RC Receiver Pinouts
Input Pin RC Receiver Pin PIN 4 PPM VCC VCC GND GND -
Attach the OLED display to the PIC32CZ CA90 Curiosity Ultra development board using the GFX connector.
-
Connect the ArduCAM® MEGA camera module to Extension 1 of the PIC32CZ CA90 Curiosity Ultra development board using the GFX connector as per the following table:
Table 4. ArduCAM® Camera Module Pinouts
EXT1 Pin ArduCAM® Camera PIN16 MOSI PIN18 SCK PIN15 CS PIN17 MISO PIN20 VCC PIN19 GND
The pre-built hex file can be programmed by following the below steps:
- Open MPLAB® X IDE.
- Close all existing projects in IDE, if any project is opened.
- Go to File>Import>Hex/ELF File.
- In the Import Image File window, in the Step 1 - Create Prebuilt Project section, click the Browse button to select the prebuilt hex file.
- Choose PIC32CZ8110CA90208 under Select Device.
- Ensure the proper tool is selected under Hardware Tool.
- Click on Next button.
- In the "Import Image File" window, Step 2 - Select Project Name and Folder, select appropriate project name and folder.
- Click the Finish button.
- In MPLAB® X IDE, click the Make and Program Device button to program the device.
- Follow the steps in the Running the Demo section below.
- Before running the GUI application, ensure the steps Software Setup section have been executed.
- Run the
Smart_RC_Car_GUIapplication in thescriptsfolder and the GUI application will open as shown below.
- Get the IP address of the RC car from the OLED display and enter it in the TCP Server Details. Make sure the RC car and PC are in the same network.
Figure 18. Wi-Fi Connection Setup
- Make sure the RC transmitter's joysticks and switches are in the default position, as below.
Figure 19. RC Transmitter Default Position
- Turn on the RC transmitter by flipping the power switch as shown below.
Figure 20. RC Transmitter Power Up
- Power on the RC car by flipping the toggle switch on the right side of the RC car. Make sure the battery voltage is above 9V.
- Wait for the status message of the RC car on the OLED display (left side of the RC car).
Figure 22. RC Car Start-up Status
- The connection status will show in the OLED display.
Figure 23. Connection Status (Not Connected)
- Once it is connected, use the Connect button for receiving the telemetry data of the Smart RC Car.
Figure 24. Telemetry Data Connection
- The telemetry connection status will be displayed in the OLED display and the RC car will be ready once the system goes online.
Figure 25. Connection Status (Connected)
- The OLED display also shows the disconnection of the telemetry data.
Figure 26. Telemetry Disconnection Status
- Select the Lidar option in the drop-down menu of the TCP Client Details section, and the IMU, Motor and LiDAR data will appear after the Receive command from the GUI.
Figure 27. Image Preview in GUI
Note: Use the Stop button to stop the data transfer.
- Select the Lidar option in the drop-down menu in the TCP Client Details, and the IMU, Motor and LiDAR data will appear after the Receive command from the GUI.
Note: Use the Stop button to stop the data transfer.
- The user can control the RC car manually by moving the joysticks in the RC transmitter.
Figure 29. Manual RC Car Control
- User can view the LiDAR data in real time as a 360° map while the RC car is in motion.
Figure 30. Real-Time LiDAR Map
- The user can choose between Manual or Autonomous modes by flipping the channel 7 toggle switch in the RC transmitter.
Figure 31. Mode Selection (Manual/Autonomous)
Note: User can remotely RESET the RC Car by moving the joysticks to the specified location on the RC transmitter as shown below.
Figure 32. Remote Reset via RC Transmitter
-
OLED display I/Os:
Table 6. OLED I2C Pins
Port Pin Shield Pin Pin Functionality Peripheral Used PC25 D14 SDA SERCOM5-PAD0 PC26 D15 SCL SERCOM5-PAD1 -
WINCS02 Add-on Board I/Os:
Table 7. WINCS02 Module SPI and I/O Pins
Port Pin mikroBUS™ Pin Pin Functionality Peripheral Used PC12 MOSI MOSI SERCOM3-PAD0 PC13 SCK SCK SERCOM3-PAD1 PC14 CS CS SERCOM3-PAD2 PC15 MIS0 MIS0 SERCOM3-PAD3 PA08 INT IRQ EIC-EXTINT8 PB27 RST RESET GPIO -
LiDAR module I/Os:
Table 8. LiDAR Module UART and I/O Pins
Port Pin Shield Pin Pin Functionality Peripheral Used PG10 D8 ENABLE GPIO PC21 D1 TXD SERCOM4-PAD0 PC22 D0 RXD SERCOM4-PAD1 -
Motor control I/Os:
Table 9. Motor Control PMW Pins
Port Pin Shield Pin Pin Functionality Peripheral Used PG05 D3 PWM TCC9_WO0 PG06 D2 PWM TCC9_WO1 PG07 D4 PWM TCC9_WO2 PG09 D7 PWM TCC9_WO3 -
RC Receiver Pulse Position Modulation (PPM) I/O:
Table 10. RC Receiver Pulse Position Modulation (PPM) Pin
Port Pin Shield Pin Pin Functionality Peripheral Used PB11 D9 IRQ TCC0 and EXTINT11 -
Camera module I/Os:
Table 11. Camera Module SPI Pins
Port Pin EXT1 Pin Pin Functionality Peripheral Used PC08 PIN16 MOSI SERCOM2-PAD0 PC09 PIN18 SCK SERCOM2-PAD1 PC10 PIN15 CS GPIO PC11 PIN17 MISO SERCOM2-PAD3 -
Serial console I/Os:
Table 12. Serial Console UART Pins
Port Pin Pin Functionality Peripheral Used PC04 TX SERCOM1-PAD0 PC07 RX SERCOM1-PAD3
The Smart RC Car with Autonomous Navigation and Obstacle Avoidance integrates advanced sensors, wireless communication, and real-time control on Microchip’s PIC32CZ CA90 platform. Featuring LiDAR, camera, IMU, and wireless telemetry, this project establishes a robust foundation for research and development in autonomous vehicles, robotics, and sensor fusion. Its modular hardware and software architecture enables straightforward customization and expansion, making it well-suited for mobile robotics and autonomous vehicles. This flexibility supports complex navigation and controls challenges in real-world environments.














