Raspberry Pi 5 / Freenove 4WD Smart Car Kit

This page documents hands-on Raspberry 5 projects using the Freenove 4WD Smart Car kit.

Another Raspberry Pi 5 is hosting this website using NGINX and OTA DVR using Kodi/tvheadend.

3D Printer using Klipper running on Raspberry Pi under construction.

Raspberry Pi 5
Raspberry Pi 5

Raspberry Pi 5 Specifications

Processor Broadcom BCM2712 – Quad-core Arm Cortex-A76 (64-bit)
Clock Speed 2.4 GHz
GPU VideoCore VII
RAM Options 4GB or 8GB LPDDR4X
Networking Gigabit Ethernet
Wi-Fi 5 (802.11ac)
Bluetooth 5.0 / BLE
USB Ports 2 Γ— USB 3.0
2 Γ— USB 2.0
Video Output 2 Γ— micro-HDMI (up to 4Kp60)
Storage microSD card slot
PCIe 2.0 x1 (NVMe via HAT)
Camera/Display 2 Γ— 4-lane MIPI connectors (camera or display)
Power Requirement 5V / 5A via USB-C (27W recommended)
Release Year 2023

  • Raspberry Pi 5 (external link)
  • GPIO Pins
    Raspberry Pi GPIO Pins

    4WD Car Kit
    Freenove 4WD Smart Car Kit

  • Freenove 4WD Smart Kit (Freenove external link)
  • Freenove 4WD Smart Car Kit (Amazon external link)
  • Note: ChatGPT was used to assist with code development and Raspberry Pi setup.

    4WD Car Kit
    Freenove 4WD Smart Car Kit

    Car Wheels Raspberry
    Car assembly: Wheels and Raspberry Pi 5

    Car Undercarriage
    Car assembly: Undercarriage showing Wheels, Motors, Battery Pack and Infrared Tracking Module (right)

    4WD Car Kit
    Freenove 4WD Smart Car Kit Assembly Complete

    4WD Car Kit
    Freenove 4WD Smart Car Kit with camera, ultrasonic sensor and servors

    Motor Test

    Motor test using python script provided by Freenove in GitHub.

    Motor test
    Motor Test

    Connected to 4WD car using VNCviewer to run motor test.

    Servo Test

    Ultrasonic test
    Ultrasonic Test

    Ultrasonic test, calculates distance. Moving my hand away/close. 300CM when I moved my hand away, max when no objects in front of sensor. Ultrasonic sensors can be used for obstacle avoidance when self driving.

    Other tests performed and passed: voltage test, camera test, infrared line tracking, buzzer/horn.

    LED test failed. But LEDs are cosmetic. Does not affect functionality of the car.

    4WD Car LED Pico
    4WD Smart Car LED controlled by Pico

    Investigation into LED issue, I ran into an issue controlling the onboard WS2812 (NeoPixel) LEDs using a Raspberry Pi 5. The LEDs would partially light or behave unpredictably, suggesting a timing-related problem rather than a hardware fault.

    After learning more about how WS2812 LEDs work β€” specifically their strict 800 kHz pulse-width timing requirements β€” I experimented with using a Raspberry Pi Pico 2 W instead of the Raspberry Pi 5.

    I disconnected the Pi 5 from the LED data line (GPIO10 on PCB V2.0) and connected the Pico directly to the WS2812 data input. Using the Pico’s PIO (Programmable I/O) hardware, I was able to generate precise timing signals and successfully control all 8 LEDs, including smooth animations such as rainbow effects and a Knight Rider scanner pattern.

    This experiment proved that:

    • The LED hardware and wiring were functioning correctly.
    • The issue was not power-related.
    • The problem was due to timing sensitivity when generating the WS2812 signal from Linux on the Raspberry Pi 5.

    By offloading LED control to the Pico β€” a microcontroller designed for deterministic, real-time signal generation β€” the LEDs operated flawlessly.

    Use a microcontroller for precise timing tasks, and a Linux-based system for high-level control and networking.

    The Pico could be used as a dedicated LED coprocessor for the 4WD car.

    Freenove Server
    Freenove Server running on Raspberry Pi

    Freenove Server iPhone
    Freenove Client on iPhone

    Freenove Client on iPhone to control the car. Android client available.

    Freenove Client Linux
    Freenove Client running on Raspberry Pi

    Freenove Client running on Raspberry Pi (Raspberry Pi OS / Debian Linux) to control the car. Client available for Windows and macOS.

    Ultrasonic Obstacle Avoidance Car

    Autonomous Driving Experiment

    This version of the 4WD Smart Car uses an ultrasonic sensor for basic obstacle detection and autonomous driving. The car continuously measures distance to objects in front of it and attempts to stop or turn when an obstacle is detected.

    At the moment, the system still requires tuning. The car sometimes collides with walls before stopping and does not always turn far enough to fully avoid obstacles, which can cause it to become stuck (a classic robotics moment).

    Planned improvements include:

    • Reducing forward speed to improve stopping distance
    • Increasing turn angle or turn duration when obstacles are detected
    • Refining distance thresholds for earlier response

    This project highlights an important lesson in robotics: control logic, timing, and mechanical behavior must be tuned together to achieve reliable autonomous navigation.

    To be continued ...