Difference between revisions of "ECE497 Project Rover"
(→Modifying RC Truck/Car)
|Line 36:||Line 36:|
== Installation Instructions ==
== Installation Instructions ==
Revision as of 16:25, 11 November 2012
Embedded Linux Class by Mark A. Yoder
I'm using the following template to grade. Each slot is 10 points. 0 = Missing, 5=OK, 10=Wow!
05 Executive Summary 05 Installation Instructions (waiting details) 00 User Instructions 00 Highlights 00 Theory of Operation (Looking forward to more details) 00 Work Breakdown 00 Future Work 00 Conclusions 00 Demo 00 Late Comments: I'm looking forward to seeing this. Score: 10/100
This project is a BeagleBone implementation of a ground-based rover platform. Through a BeagleBone mounted on an RC car, the user will be able to control the car over WiFi - the user can give commands to drive forward, drive backward, turn left, and turn right. The BeagleBone will also send back helpful information to the user over Wifi, such as GPS location and compass heading. Development time permitting, the user will also be able to guide the rover along a path by defining waypoints for movement.
Currently, the project is well underway. The RC car has been acquired and reverse-engineered to gain access to the motor electronics, and the BeagleBone GPIO outputs have been interfaced to allow motor control. A WiFi module has been selected and a procedure has been developed to get it working on the BeagleBone (harder than it seems!). Libraries for the GPS sensor and compass have been written and tested. Code for the network communication to control the BeagleBone over WiFi has been written, and the protocol and libraries currently allow us to type line by line directions to move the rover.
Time permitting and by the end ECE497, the rover may not move autonomously. We are currently working on setting GPS waypoints for the rover to move autonomously so all we have to do is run the program and it will update real-time GPS as it is moving.
When completed, the project will serve as a neat demonstration of the capabilities of the BeagleBone as a robotics platform. The GPIO output, I2C and serial interfaces, WiFi dongle compatibility, and embedded Linux OS of the BeagleBone provide an excellent platform for mobile robotics development.
We bought an RC car from [Toy's R Us] and modified it to be completely autonomous. To successfully repeat our design, these certain skills will be needed: reverse engineering, soldering, experience with Beagle Bone or an equivalent Omap processor bases system, Linux and C programming languages, networking protocols as well as basic circuit knowledge such as power regulation from batteries.
Modifying RC Truck/Car
As shown in Figure 1, we removed the aesthetic cover form the truck. We also cut out most of the plastic with a Dremel tool. We did this to expose the circuity below. Cutting out most of the plastic is necessary unless you are skilled enough to drill only a small hole to feed the wires through and can replace the circuit board back into place without viewing it. Figure 1 also shows, four screw slots. In order to obtain access to the circuity, you must remove the screws from their sockets. Now turn the truck so that it's undercarriage is facing up, remove the housing unit of the battery. The battery unit should be loose and thus be removed since you already removed the four place holder screws. Be careful though to not pullout or detach any wires from the their respected places as you are pulling out the circuit board. Figure 2 shows the circuit board removed from it's housing with the wires exposed. The red and black wires you see are respectfully power and ground, the same for all electrical work. Figure 3 is focused on the specific connections that we soldered to the board. We choose the top left corner (where three of the connections are) because when we reverse engineered the board, this area is where the wireless signals are received and sent to the motor controllers. The fourth wire was supposed to be the pin on the right but as you can see by the picture, the circuit pad is burned off. We just followed the hard trace and soldered at the next available node. After testing, this improvised step seemed suitable for our needs.
If you want to reverse engineer this circuit board for yourself instead of just following this guide, you will need a separate 5V dc power supply as well as the 9V battery that was included, a 5V wall wart with stripped wires will be suffient for the extra power supply. Then you should look for the wireless adapter board. Most RC electronics will have a separate wireless circuit board. Ours happened to be already physically attached to the motor controllers. Find the output signals from the wireless adapter and test which signals control which motors and direction of motors. To test this just attach the 5V to the pin on the circuit board while the truck battery is installed and switched on. Also you will need to find a ground wire to attach for common ground. We just soldered directly to the terminal on the installed battery for our ground.
Through testing we found out the correct pinout for the motors. Starting from right to left (right being the re-soldered wire),
The work-in-progress code for the platform can be found on Jesse Brannon's Senior Design Repository. The drive base used for the platform was purchased from Toys R Us, and the modifications to access the motor electronics can be accomplished with a dremel tool. Pictures and a detailed explanation will be provided at the end of the project, when the procedure is finalized.
Currently, the WiFi dongle works best when Ubuntu is flashed to the Bone. Further investigation is underway into the problems present in certain images of Angstrom, and when that investigation is complete the team will decide on which BeagleBone OS to use. Detailed instructions to install the BeagleBone and setup the software will be provided at that time. In general, all of the software needed is provided on the github repository. All custom code is written in C and python, and a Makefile is provided on github.
(I look forward to seeing the details)
The rover will be able to be controlled using a simple browser based interface. Additionally, waypoints will be able to be selected in order by clicking on intended location on an Google map interface.
As the code is currently in development, UI details are not finalized. These instructions will be updated.
Theory of Operation
The BeagleBone is connected to the RC car via 4 GPIO pins and a ground wire. The four GPIO pins control left forward, left reverse, right forward, and right reverse on the tank-style drive base. (Tank-style means that each side is controlled independently, as opposed to a standard car where the user controls whether the car as a whole is moving forward or reverse and turns are accomplished by steering).
The motors are interfaced with GPIO controls in a C library. Movement, waypoint management, and sensor code are all also implemented as C libraries. Data is sent over WiFi to and from the Bone using TCP sockets in Python; the C libraries are accessed by the Bone in Python using the ctypes Python standard module. Browser controls are based on node.js and Google Maps API.
More detail regarding the interaction of different parts of the code and important interfaces will be provided as they are finalized.
A summary of the major development areas and the primary contributor(s) to each subsystem:
- RC car hardware interfacing and mounting: Michael Junge
- Power subsystem development: Michael Junge
- GPS and Compass sensor interfacing: Jesse Brannon
- Movement and navigation software development: Jesse Brannon, Ross Hansen
- Network communication software development: Ross Hansen
Tasks completed and in development by each team member:
- Constructed hardware interfaces to compass sensor and drive base electronics
- Investigated WiFi issues on Angstrom - determined that the Angstrom A5 image on BeagleBone A6 hardware is a known working configuration **still under invesgitation, completion TBD
- Soldered and interfaced battery subsystem to power BeagleBone
- Researched and purchased compass and GPS sensors
- Wrote libraries to interface to compass and GPS sensor
- Currently coo-developing movement and navigation software **to be completed 11/7; code to add waypoints complete as of 10/31
- Currently co-developing movement and navigation software **to be completed 11/7; code for basic movement complete as of 10/24
- Developed prototype software for network communication, currently developing more robust network protocol implementation **to be completed 11/3; basic prototype code completed 10/31
The major remaining tasks to be completed are
1) Solidify the interface from the networking code to the motor control
2) Code to manage waypoints and drive the motors based off of waypoint inputs
3) Improve GPS library to allow for update rate configuration
Task 1 is absolutely necessary to fulfilling the goals of the project, while tasks 2 and 3 are good features, but not core requirements.
This project has the possibility to branch into several interesting areas.
- The BeagleBone platform has the processing power for various interesting sensory systems, such as computer vision. The RC car interface and networking platform allows for a variety of interesting applications of sensor systems, where driving decisions are made based off of sensor inputs or sensor data is relayed remotely back to a powerful processing node.
- A GUI is being developed that could be used to send commands to control the rover. Work on it can be seen here: ECE497_Project_RoverGUI
Embedded Linux Class by Mark A. Yoder