Ever dreamed of commanding your own Formula 1 team, right in your living room? With LEGO MINDSTORMS EV3, that dream can become a reality! Imagine the thrill of building and racing your very own voice-controlled, paddle-shifting F1 car. No need for expensive simulators – just pure LEGO engineering fun. Even without a first-person view (FPV) camera, this project offers hours of entertainment. This guide will show you how to construct and program this incredible machine using Pybricks MicroPython, and where to find your Formula Ev3 Race Car Program Download.
Want a sneak peek of the adrenaline-pumping action? Check out this video capturing the excitement of racing this voice-activated marvel:
For those who prefer traditional gamepad control, we’ve also explored connecting a PS4 DualShock 4 controller to your MINDSTORMS EV3 brick via Bluetooth. But for now, let’s dive into the voice-commanded world of EV3 racing!
How the Voice-Controlled EV3 Race Car Works
This project utilizes a clever two-script system. One script acts as the “server,” residing on the race car itself. It patiently awaits a signal from the steering wheel controller and then translates those commands into precise motor actions. The second script, the “client,” runs on the steering wheel unit. It establishes a Bluetooth connection to the car and continuously transmits steering and throttle data based on your inputs.
The steering mechanism is ingeniously designed around a gyro sensor. This sensor detects the rotation of the steering wheel, allowing for intuitive control of the car’s direction. However, gyro sensors can sometimes lose their sense of center, especially with rapid movements. To counter this, a button on the steering wheel is programmed to recalibrate the center point. Simply press this button when the steering wheel is in its neutral position to ensure your car’s wheels are perfectly aligned.
Throttle control takes a unique approach – voice activation! A sound sensor on the steering wheel listens to your commands. The louder you speak (or shout!), the faster the car accelerates. For navigating corners or tighter turns, simply modulate your voice to slow down for more precise steering. Need to reverse? Holding down a flappy paddle button while making a distinct motor noise at the sound sensor will send your EV3 race car into reverse.
Estimated Build and Setup Time: Approximately 10 minutes
Step-by-Step Guide: Building Your Voice-Controlled Race Car Remote
Follow these steps to connect your two EV3 bricks and create your voice-controlled racing setup using MicroPython:
-
Prepare Your EV3 Bricks with ev3dev:
Ensure both your MINDSTORMS EV3 bricks are running the latest version of ev3dev. Flash ev3dev onto separate MicroSD cards for each brick. This operating system is crucial for running the necessary programs. -
Enable Bluetooth on Both Bricks:
On each EV3 brick, navigate to ‘Wireless and Networks’ > ‘Bluetooth’. Select ‘Powered’ to activate Bluetooth and then ‘Visible’ to make the brick discoverable. -
Pair the EV3 Bricks:
On the brick designated as the steering wheel, select ‘Start Scan’. Wait for your other brick (the car brick) to appear in the list. It will likely be named ‘ev3dev’. Select the car brick from the list. You’ll be presented with a Bluetooth address – a series of letters and numbers separated by colons (e.g., xx:xx:xx:xx:xx:xx). Crucially, write this number down! You will need it in a later step. Press the ‘Pair’ button on the steering wheel brick, and then ‘Accept’ on the car brick, followed by ‘Accept’ again on the steering wheel brick to finalize the pairing process. Congratulations, your EV3 bricks are now linked! -
Download and Install the Car Program:
Access your computer with VS Code installed and the LEGO MINDSTORMS extension configured (refer to this guide for setup). Create a new project using the LEGO extension. Replace the defaultmain.py
file content with the “car” program code. [Find the formula ev3 race car program download code snippet at the end of this article.] Connect your car brick to your computer via USB (instructions for USB connection are available here). For macOS users, enabling Internet Sharing might be necessary as described in the guide. Press F5 to download and run the code on the car brick. Once complete, disconnect the brick. -
Download and Install the Steering Wheel Program:
Repeat step 4 for the steering wheel brick. The process is identical, but with one critical difference: you must insert the Bluetooth address of the car brick into the steering wheel program code. Locate line 24 in the code (car_2 = “00:17:E7:AD:B2:8F”
) and replace the example address with the Bluetooth address you recorded in step 3. [Find the formula ev3 race car program download code snippet for the steering wheel at the end of this article.] Download and run the code on the steering wheel brick, and then disconnect the USB cable. -
Race Time!
Both EV3 bricks should now display a Play icon, indicating the programs are ready. Start the program on the car brick first (the server-side script). The car should now respond to steering wheel movements and voice commands. If it doesn’t, double-check the Bluetooth address in the steering wheel program for any typos. With the programs loaded, you no longer need your computer for racing. You can launch the programs directly from the File Browser on your MINDSTORMS bricks.
Required Tools
- Computer with VS Code and LEGO MINDSTORMS extension installed
- MicroSD card reader
Materials List
- 2 MINDSTORMS EV3 Bricks
- 1 NXT Sound Sensor
- 1 EV3 Gyro Sensor
- 2 EV3 Touch Sensors
- 3 Large EV3 Motors
- 2 Micro SD Cards with the latest EV3dev image
- FPV Camera (optional for first-person view racing)
- FPV Goggles (optional, required for FPV camera)
- Modified MINDSTORMS wire (optional, for powering FPV camera at 5V)
Formula EV3 Race Car Program Download: MicroPython Code
The easiest way to get the program onto your MINDSTORMS EV3 is using VS Code and the MINDSTORMS extension. Simply create two new projects using the extension. Load the “car” program onto the car brick and the “steering wheel” program onto the steering wheel brick.
[Insert Car Program Code Snippet Here] – Example: You would paste the MicroPython code for the car program here.
[Insert Steering Wheel Program Code Snippet Here] – Example: You would paste the MicroPython code for the steering wheel program here.
If you enjoy this project and want to support future creations, consider supporting me on Patreon or purchasing a fun T-Shirt!
Enhance the Experience: Optional FPV Camera Integration
For an even more immersive racing experience, consider installing an off-the-shelf 5.8GHz analog video camera onto your LEGO MINDSTORMS car. Thanks to the popularity of drone racing, these cameras are now incredibly affordable, often under €15. You can also find good quality video goggles for under €100.
Attaching the camera with rubber bands provides effective shock absorption. The LEGO MINDSTORMS EV3 Intelligent Brick conveniently outputs 5V on all its ports, perfectly suited for powering these cameras. By modifying a MINDSTORMS wire and soldering connectors, you can easily connect the camera for power. For the precise pinout details, feel free to reach out on Facebook or contact me directly.
Building Instructions: EV3 VR Race Car and F1 Steering Wheel
For a basic race car, simply attaching three motors to the EV3 brick will suffice. However, for optimized speed and performance, download detailed building instructions for a geared-up race car.
Similarly, a simple steering wheel can be created with an EV3 brick, two touch sensors, a sound sensor, and a gyro sensor. But for a truly authentic Formula 1 feel, download building instructions for a flappy paddle-equipped racing steering wheel.
[Link to Building Instructions Download Here] – Example: You would insert a link to downloadable building instructions for both the car and steering wheel here.
Get ready to experience the thrill of LEGO Formula 1 racing! Download the formula ev3 race car program, build your car and steering wheel, and prepare for some voice-controlled, high-speed action!