The process began with the slow deconstruction of the toy vehicle and the careful saving of all the screws, springs, and tiny structural pieces. It was soon found that this little vehicle employs just two small, low current, electric motors. One motor is used for driving the rear wheels and the other is used for steering the front end. Having just two motors is fortunate because the particular Arduino shield being used has the capacity to control precisely two motors of this type.
Also fortunate for this project, a single, small circuit board housing the original radio receiver and all of the motor control electronics was discovered. Conversion of this simple radio controlled toy vehicle into a programmable robotics platform could therefore be accomplished by simply removing this existing circuit board and replacing it with an Arduino and an attached motor shield.
Initially, there was no intention to preserve the vehicle's outer body or existing LED lighting. However, because the toy was easily disassembled, saving these pieces became an option. There are LED headlights on the front of the vehicle as well as very bright overhead spotlights on the roll bar. At this time, all of these LED's are connected in series to pin 13 of the Arduino. Simple digitalWrite() instructions in the Arduino code allow for versatile control of these surprisingly bright LED's. In the future, the overhead spotlights and the front headlights may be given their own separate control lines so they can be used independently. There are also red LED's that serve as backup lights but those are not connected at this time.
Conveniently, the toy vehicle also contains a battery compartment that holds five AA batteries. This 7.5 volt battery pack supplies plenty of current to the motors while also providing power to the platform's electronics payload. There is even a small slide switch on this built-in battery box that helps to give the entire package a more professional look and feel. While very handy at this stage of development, future experiments may test the limits this single source power supply.
The software currently loops through a familiar design pattern which can be described as "scan/plan/animate". At this time, the data gathered during the "scan" phase is actually simulated by generating random values for the sensor readings. This allows the "plan" and "animate" phases to be developed in the absence of real sensors. As can be expected, the resulting behavior can be rather chaotic but it certainly provides for a lively demonstration!
In future posts I will be adding a set of ultrasonic and infrared distance rangers that will be used to sense the environment and provide the feedback required to support autonomous and intelligent behavior.
Reproducing this project can be a great way to get started on your own autonomous rover designs. Follow the links below for hardware resources, the Arduino IDE, and the source code used in this project.
SOFTWARE RESOURCES
ArduinoSafari_X1_Instrumented.ino
ArduinoSafari_X1_Instrumented.txt
Arduino IDE from Arduino.cc
HARDWARE RESOURCES
Arduino UNO R3
DFRobot L298P Motor Shield
RC Safari Vehicles
Please feel free to post comments, questions, suggestions and concerns in the space provided.
Thanks for visiting!
Build something! You can do it!
Awesome lamp. : )
ReplyDelete