The goal of this project is to build a remote-controlled car which can be toggled to home to a stationary base. This project is the spiritual first step to creating a network of remote-controlled vehicles which can also autonomously move and do specific work. The base car of this project is a Pi Car, an open source remote controlled car project developed by Prof. Xuan Zhang and her lab. The Pi Car platform, which is a remote-controllable car chassis with power and steering that can be connected to an Arduino/Raspberry Pi in order to complete complex objectives. For our modification, we installed an Arduino Uno and an IR beacon (and other auxiliary sensors) then wrote code to enable the homing functionality. As part of our stretch goals, we decided to add an additional line following function as well as enabling a toggle to control the car via a standard 2.4 GHz RC Controller.
Home to IR Beacon
This is the default mode. When the car is in line of sight of the IR "Home" beacon it will automatically drive towards the beacon until it reaches the approved parking zone (as indicated by black floor markings). It is also capable of following a dynamic target.
- Alternatively, with the simple repositioning of the sensors tracking the floor markings, the car can be modified to park based on object collision detection. Instead of looking for black floor markings, the car would instead look for a solid object in its path, then stop accordingly once in range.
Once toggled to RC Mode, the car is able to receive radio from a 2.4 GHz controller and act as a traditional remote-controlled car.
- With a slight modification to the code, the RC Mode can also be enabled to have collision or floor sensors although we chose to disable them for ease-of-use.
Without any additional hardware, the car is capable of basic line following. The turning radius and reliability of the following is limited by the turn radius of the car (Most line following robots are driven by two separate servo motors, allowing 90-degree turns). In order to compensate for the disadvantage of a 4 wheel design, additional sensors can be easily added and calibrated to enhance the car's following precision and reliability.
- This functionality becomes even more useful when it is used to designate allowed areas, and with a change from simple IR to a color sensor, this could be used to designate multiple different zones beyond black and white.
Andrew O'Sullivan (TA)
- Design sensor system to communicate relative location between two objects.
- Integrate sensors in order to allow Pi Car to interpret signals into usable commands.
- Assemble Pi Car Chassis with Arduino and all required sensors mounted.
- Build install killswitch mechanisms for safety.
- Add code to enable the car to toggle back and forth from being remotely controlled to autonomously run.
- Assemble the sensors and code into an easily scalable package that can be modified and enhanced upon with the addition of hardware or straightforward coding.
DC Motor Accelerates and Drives too Quickly
- Program the ESC to artificially limit the speed and acceleration of the DC motor
- Create a manual override killswitch, so a human operator can stop the car remotely with the RC Controller
Ease of Use
Implement Reliable Communication with the Pi Car
- Program the ESC throttle, neutral, and brake functions with the RC Controller
- Use the RC Controller and receiver to communicate with the Arduino, and Interpret inputs as commands.
- Interpret PWM output from the receiver, and remap the outputs to a value that can be used by the ESC.
- Add a toggle function between remote control and homing modes, create a switch condition that can be sent from the RC Controller.
- Optimize killswitch and toggle to work reliably and quickly at any time
Form and Function
Not All Components are Properly Powered
- DC Motor and ESC are on a separate battery than the Arduino and connected sensors.
- Switched 9V battery with a LiPo battery for better capacity and amperage (The Arduino would occasionally lose power when too many actions were called simultaneously).
- Limited the number of sensors we used on the car to help regulate the power use.
Implement Homing Function
- Mount IR Sensor above the car with line of sight in all directions. Route wires so there are no obstructions to the sensors.
- Solder all connections to IR sensor, and make secure to reduce any chance for interference or jitter.
- Add real-time direction sensing and direction adjustments.
- Add IR Sensors to bottom of chassis to use as black line sensors, then marked the "home zone" with black tape.
- Pi Car Hardware - Provided by Dpt.
- 3D Printed Chassis
- Wheel Assemblies and Axels
- Trackstar 1/18th Scale 12T Brushless power System (5050kv) - $43.77
- HOBBYMATE 180Pcs Assorted Nylon Standoff Spacers - $7.90
- GoolRC TG3 2.4GHz 3CH Digital Radio Remote Control Transmitter with Receiver - $28.99
- 2 Turnigy 1000 mAh LiPo Batteries - $9.06
- Pololu IR Beacon Transceiver - $27.95
- Osoyoo IR Infrared Obstacle Avoidance Module - $9.99
- Arduino Uno - $29.95
- Adafruit Proto Shield for Arduino Kit - Stackable Version R3 - $10.45
Total Cost: $168.06