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.
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.
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.
Arduino IDE from Arduino.cc
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!