HomeRaspberry PiSunFounder's PiCar-X for Raspberry Pi 4

SunFounder’s PiCar-X for Raspberry Pi 4

Have you got a Raspberry Pi 4 board spare?

This review couldn’t come at the worst possible time. Offering fancy robotic kits in the time of the global shortages affecting Raspberry Pi board availability almost feels like a tease. If you do own a spare Raspberry Pi 4 board and want to try something new, SunFounder’s PiCar-X (Amazon, SunFounder) might be the next robotic kit to look at. It’s not the first kit from SunFounder opened either – I know we are in for a treat.

PiCar-X

The Internet has a fair selection of wheeled-based robots for Raspberry Pi 4, so let’s talk about what makes the SunFounder’s PiCar-X a better choice than the competition. It’s a 4-wheel platform with a steering axis, a dedicated camera module for vision projects mounted on 2-axis “head” and some sensors attached to a 18650 driven body.

The steering axis is a big advantage here. Many other kits simply use independent wheel control to achieve steering, but these kits are much harder to drive as the wheels never turn left or right. An argument could be made for the turning radius, but there is a reason we build our cars the way we are.

The presence of the camera and additional sensors is another advantage, as this opens up a lot of possibilities. Lastly, the motor controller board comes with more inputs and outputs than the kit requires – opening it up to further upgrades and modifications. To tinker with, PiCar-X has a proximity sensor, line follow/cliff detection sensor and speakers built into the motor board.

Assembly

SunFounder’s PiCar-X comes in a relatively big box filled with metal parts (nice) and fittings to assemble the car. At first, all looked quite intimidating but the manual is good, and you should accomplish your task in approx 1-2h based on your skills.

The manual illustrates each step very well, so the building process is actually relaxing and fun. My only constructive criticism refers to a wiring guide that could be done a little better. It takes a moment to figure out all connections.

Getting Started

SunFounder has a special documentation page that covers everything you need to know about the PiCar-X kit on this page: http://picar-x.rtfd.io. It will walk you through the basic of installing RaspberryPi OS (legacy for camera support) and setting everything up including servo calibration.

The process takes around 30 min and it’s relatively to follow. Once set, you are given 2 ways to interact with the robot. For best control, it’s good to calibrate and zero your servos. Run scripts provided and physically align servos where needed.

Be sure to use the legacy Raspberry Pi OS system with a desktop environment as otherwise your camera-based project will error out and you will spend extra time figuring out what libraries are missing.

Ezblock: level easy

If this is your 1st time, using Ezblock is a perfect gateway drug that will take you through the joys of visual programming to create and execute your robotic logic. In line with many similar code editors, Ezblock comes as an installer or web interface which you can use to program your PiCar-X.

The visual IDE has typical logic programming nodes available in environments like Scratch and comes with PiCar-X specific blocks that are responsible for car functions. A nice addition to the IDE is the ability to create web dashboards with charts, interactive controllers and various GUI elements.

Unfortunately, you can’t switch between the visual code and underlying Python code. You can access examples and open them as Python samples, but switching between your live ezblock code and Python isn’t supported.

Python: level hard

Python is where the whole challenge is. Thanks to complex libraries for camera and AI processing, PiCar-X can bring unlimited challenges for anyone familiar with Python. It’s the first programming language I tried, so it’s close to my heart.

SunFounder provides the documentation and examples covering the following topics:

  • obstacle detection
  • edge detection and line following
  • text to speech tasks
  • computer vision with AI and face recognition
  • remote control and video feed

Obviously, you are only limited by your creativity and skill as the motor controller board has plenty of outputs to expand the robot further.

Samples only

While examples are working – as in the robot does everything as instructed, these are far from complete scrips and these examples merely give you an idea of how to use components to achieve certain behaviours. For example, an obstacle-avoiding script works, but it’s nowhere sensitive or clever enough to handle a typical scenario – this task is left to you and your ability to figure out how to build on the existing project.

Mobile app

A great way to test if everything is connected correctly and working – is to give a mobile app a go. Instructions are clear, and you will have your PiCar-X working with a mobile phone in no time. Apart from basic controls, the app also features toggles for behaviours like object & face detection, colour recognition and enabling other sensors on the car.

The controller layout is displayed over the real-time stream from the PiCar-X camera so you can drive the robot remotely. It takes some practice to get used to controls like this as there is a latency to each move. But if you want to check if the subsystems are operational this is the best way to test things.

Improvements?

Not everything worked the first time for me. I had issues with the camera module, which were solved by installing libraries on the RasperryPi OS with the desktop environment. The included speakers are temperamental and require the sound script to be run several times to actually make it work and scripts on occasion (especially remote control) becomes unresponsive.

Nothing that restarts of the script wouldn’t fix, so these are not major issues. From a mechanical standpoint, servo control over the camera and steering is very harsh, but that’s due to the nature of how servos work, rather than issues with the kit. You could program a better way of moving it and dampen the sudden responses.

Just remember not to be me and triple-check the battery orientation. 18650 LiPo cells are very dangerous and while I didn’t damage the board by accidental reverse polarity insertion, battery tabs heated up enough to give it a red glow in a matter of seconds. Don’t be me and take extra care.

Final thoughts

PiCar-X (Amazon, SunFounder) is a fun kit to play with, providing you have a spare Raspberry Pi 4 laying around. This is going to be the biggest challenge for anyone selling RPI-based kits right now. These are incredibly hard to find at times, and often at prices that are unreasonable. Fortunately, PiCar-X isn’t that expensive and as long as you are happy to source your Raspberry Pi board and 18650 batteries (with charger), you won’t spend a fortune. It’s currently priced at $109.99 on the SunFounder website and it is in stock! Feel free to ask any questions about the kit in this Reddit thread.

🆓📈💵 – See the transparency note for details.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

M5Paper

Programable, ESP32 based awesome dev platform with 4.7 e-ink display by M5Stack

More HATs

client-image
client-image

Argon One M.2

Enclose Raspberry Pi 4 inside this great case with custom I/O, cooling and GPIO and M.2 SSD support

More cases on

client-image
client-image

Best Raspberry Pi Projects

How to use Raspberry PI as WOL (wake on lan) server

0
While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

Slow Internet Warning

0
From time to time my Internet grinds to a stop. Since Raspberry Pi 4 comes with a 1Gbps Ethernet, I decided to take advantage of it and create a reporting system in NodeRED that will monitor and report when the ISP is not keeping the contractual agreements. Works with Alexa, Google Home, Android and Windows 10.

How fast Raspberry Pi NAS is?

0
Let's see how fast Raspberry Pi NAS really is?

Argon18: Argon ONE SSD modification

0
Argon One case just got better - now you can boot it from USB without ruining the design thanks to Argon 18: Argon One SSD modification

HOW TO...

It took me 2 months to boot CM4 from NVMe

0
Complete beginners guide to Compute Module 4 boot from NVMe.

Raspberry Pi Zero 2 W vs other Zero boards

0
It's time to test the Raspberry Pi Zero 2 W against other Raspberry Pi boards from Zero series: power, WiFi, temperature and core performance

C/C++ and MicroPython SDK for Raspberry Pi Pico on Windows

0
A guide to SDK toolchain for Raspberry Pi Pico and C/C++ , Micropython on Windows.

A comprehensive guide to Grafana & InfluxDB

0
How to use Grafana and InfluxDB on Raspberry Pi for IoT sensors in home automation

How to boot Raspberry Pi 4 from USB

0
How to set up and boot Raspberry Pi 4 from USB drive - headless guide.