The Accelero car is a cutting-edge vehicle with a three-wheel drive system. It has two BO motors in the back and a caster wheel up front. If you like constructing stuff and programming, this automobile is a great option. The Accelero car may be designed to move in a square pattern with the aid of a CPU and a motor driver. We will go over the parts of the Accelero car and how to put it together in this blog. Also, we’ll go over how to program the car to drive in a square pattern.
Materials Needed
CPU: A microprocessor board used as the robot’s brain that may be programmed or Bluetooth-controlled to do a variety of tasks. We have four ports on this board, and they are each used for various input and output tasks by connecting to various electronic parts.
Motor Driver: A circuit that allows the robot to control the speed and direction of the motors. It provides the necessary current and voltage to the motors. We need a motor driver to drive motors because the voltage and current requirements of a motor are usually higher than what a microcontroller can handle directly. A motor driver acts as an interface between the microcontroller and the motor, allowing the microcontroller to control the motor’s speed and direction while also providing sufficient power to drive the motor. In summary, a motor driver is necessary for the efficient and safe operation of a motor in a microcontroller-based system.
Battery-operated (BO) motors: These are DC (direct current) motors that have a gearbox attached to them, allowing them to operate at lower speeds and with more torque. In robotics and other electrical tasks, they are frequently employed.
9V Battery: A common battery used in electronic projects, which provides 9 Volts of power for motor driving.
Micro USB Cable: A cable used to connect the CPU to a computer for programming or to power the CPU with a power bank.
Power Bank: A portable battery pack is used to power the robot.
Caster Wheel: A wheel that supports the front of the robot and allows it to turn easily.
Snap Wires: Wires with pre-attached connectors that can be easily snapped on and off the components, making it easy to connect and disconnect components.
Battery to Snap Connector: A connector that allows the 9V battery to be easily connected to the motor driver.
Wheels: Two wheels that drive the robot forward and backward.
Accelero Body Sheet (C1 and C2): A sheet of MDF material that is used to create the body of the robot.
Rubber Bands: Rubber bands are used to attach the body parts to each other.
Screwdriver and Screw Fasteners: Used to attach components to the body of the robot.
Building the Chassis
The accelero car’s chassis should initially be constructed using the MDF sheet. Rubber bands can offer a versatile and customizable way to assemble pieces. Use the caster wheel at the front of the chassis and mount the two BO motors on the back two wheels. Mount all the electronics at their place.
Wiring the Circuit
- According to the diagram please connect all the wires.
- Use snap wires of different lengths to connect circuit blocks.
- Use long snap wires for circuit blocks that are farther apart.
Download Arduino IDE
You can take the following actions to download the Arduino IDE:
- Go to the official Arduino website at: www.arduino.cc
- Click on the “Software” menu item in the top navigation bar.
- Select the “Downloads” option from the drop-down menu.
- Scroll down to find the section for the Arduino IDE and select the appropriate version for your operating system (Windows, Mac, or Linux).
- Click on the download link for the selected version to start the download.
- Once the download is complete, run the installation file and follow the instructions to install the Arduino IDE on your computer.
You can launch the Arduino IDE and begin configuring your Arduino board after installation.
Writing the Code
The first line of the code includes the header file “modular.h,” which contains the code for the modular system. The next line creates an object called “mybot” from the Modular class.
In the setup function, mybot is initialized using the steerBotBegin function, which is connected to port 4. This function sets up the car to use the modular system and configures the pins for motor control.
In the loop function, the car is programmed to move forward for 5 seconds using the steerBotForward function with an argument of 4 (port 4). This function controls the speed and direction of the car’s motors to make it move forward.
After the car has moved forward for 5 seconds, there is a delay of 800 milliseconds, and then the steerBotRightAxial function is called. This function controls the car’s motors to make it turn to the right.
The loop function repeats these steps continuously, making the car move forward for 5 seconds and then turn to the right for 800 milliseconds.
Overall, this code is a basic example of how to control the movements of a robotic car using the Modular system and Arduino IDE to move the bot in square pattern.
Accelero Car (Hardware ) Code
Uploading Code
After downloading the .ino file to your computer, you need to open it in the Arduino IDE and upload it to the CPU. Here are the steps to do so:
- Open the Arduino IDE software on your computer.
- Connect your CPU to the computer using a USB cable.
- In the Arduino IDE, click on “File” and then “Open“.
- Browse and select the .ino file that you downloaded.
- The code will open in a new window in the Arduino IDE.
- Before uploading the code to the CPU, make sure that the correct board type and serial port are selected from the “Tools” menu.
- To upload the code, click on the “Upload” button (right-pointing arrow) in the Arduino IDE toolbar. The IDE will compile the code, and if there are no errors, it will upload the code to the CPU.
- After uploading the code, the Arduino board will start running the program automatically.
Note: During the upload process, you may see some messages in the bottom section of the Arduino IDE. If the upload is successful, you will see a “Done uploading” message.
In summary, after downloading the .ino file, you need to open it in the Arduino IDE, select the correct board type and serial port, and then upload the code to the CPU. Once the upload is successful, the code will start running on the CPU.
Conclusion
The Accelero Car is an excellent product for those who enjoy building things and programming. With the help of a CPU, a motor driver, and two BO motors, the car can be programmed to move in a square pattern. The car is easy to assemble, and the programming can be done using the Arduino IDE software.
Leave A Comment