Introduction: Car No. 06 Programmed Automatic Driving Car
Hi! Kaeru no Ojisan is back with Car No.06.
Car No.06 is a Programmed Automatic Driving Car with following procedure;
- Simulate the Car Trajectory based on the Target Passing Points.
- Drive automatically as simulated using Reflective Photosensor and Gyro Sensor .
- Adjust Car Position to the starting point using Web Camera, after coming back adjacent to the starting point.
Car No.06 is composed of 4-Wheel-Steering chassis, R/C Car body and Car Top PC with 4 Arduinos and Web Camera.
I made an explanation video.
Please watch it in full screen mode! And Car No.06 test run one is followed.
I have succeeded up to 18 rounds inCar No.05 Altered (Yogurt Version). Please watch this.
This explanation video is made using Car No.05 data. The detail values and figures in the video might be different from Car No.06 ones.
Step 1: Procurement
- Car BodyTamiya 8085282 Mini Cooper
- ChassisTamiya M-03R chassis x 2
- Motor380 motor x 2
- Attaching JigKawada B57 x 2
- ServoFutaba S3003 x 2
- Motor DriverSyRen 10A
- NI-Cd Battery for R/C Car1500mAh 7.2V
Car Top PC
- MotherboardIntel D510MO
- MemoryDDR2 2GB
- SSDSUPER TALENT FTM16GL25V
- Wireless LANPlanex GW-USHyper300
- BatteryJTT Energizer XP8000 + 12V/3A conversion cable type B
- Arduino Duemilanove x 2
- Arduino UNO x 2
- Arduino ProtoShield KitDEV-07914 x 4
- Reflective PhotosensorRohm RPR-359F x 2
- Resistance510 ohm x 2,47k ohm x 2
- 3-axis gyroITG-3200
- Logicool HD Pro Webcam C910
Step 2: 4-Wheel-Steering Chassis Assemble
2 sets of Tamiya M-03R chassis front unit shall be cut at the center of battery hold and glued together with plarepair.
(See above sequence pictures.)
Step 3: Relationship Table Between Steval(steering Servo Value) and TR(turning Radius)
Simulate the relationship between steval(steering servo value ) and TR(turning radius) in Excel.
(See attached Excel file.)
Measure TR for each steval using the attached Arduino and Processing codes.
Servo1(front) – D9
Servo2(rear) – D10
Motor Driver – D11
Make a relationship table between steval and TR.
(See above table.)
Step 4: Simulation Program
Utilize the relationship table in Step 3 and make a simulation program in Excel, to which car starting point, car starting direction and target passing points are input, then from which steval and car direction angles are provided as automatic driving data.
(See attached Excel file "SimulationProgram1_CN06.xls".)
For confirmation, check by Excel Simulation Program2.
(See attached Excel file "SimulationProgram2_CN06.xls".)
Draw the car trajectory with AutoCAD.
(See above figure.)
Obtain the Automatic Driving Data (steval and car direction angles for each steps).
(See above table.)
Step 5: Tachometers
Cut out circular discs from plastic plate, paint flat black, draw 6 silver lines for each disc, and attach them into front tire wheels inside.
Check the Tachometers functioning with the attached Arduino and Processing codes.
RPR-359F terminal1(Cathode) -–> GND
terminal2(Anode) -–> 510ohm -–> 5V
terminal3(Collector) -–> 47Kohm -–> 5V
also -–> D5
terminal4(Emitter) --> GND
Step 6: Gyro
Make Gyro Arduino with the use of 3-axis gyro ITG-3200 and Arduino.
Check the Gyro Arduino functioning with the attached Arduino and Processing codes.
SCL – A5
SDA – A4
CLK – GND
INT – No connect
GND – GND
VIO – 3.3
VDD – 3.3
Arduino and Processing codes (+ h, cpp, c files)
Make "FreeIMU1" and "DebugUtils" folders under …\arduino-0022\libraries\ and copy *.h, *.cpp and *.h files to these folders.
Step 7: Car Top PC With 4 Arduinos and Web Camera
Mount Car Top PC on R/C Car and Fix 4 Arduinos and Web Camera.
(Car Top PC's OS is Windows XP.)
To block off the noise from PC to Arduinos, thin aluminum plate is attached on the CAR Top PC top plate.
Step 8: Car Own Position Adjusting System Using Web Camera
Car Own Position Adjusting System is composed of 4 parts;
- Read the line on the floor using Web Camera.
- Convert the coordinates on Web Camera screen to the actual coordinates.
- Calculate Car position and direction.
- Move to the starting point.
(See attached Excel file "WebCamera_HDProWebcamC910.xls".)
Using the attached Processing code, measure the actual X, Y coordinates and Webcam coordinates and make a conversion formula.
First, check Web Camera only.
Video: Car Own Position Adjusting System using Web Camera
I recorded Web Camera line reading in ogg file, but it cannot be watched in YouTube.
Next, check the combination of Web Camera and 4 Arduinos.
This video shows Car Own Position Adjusting from Line Reading to Moving Back to the Stating Point".
VNC connection shall be established between Car Top PC and other PC. The above Processing codes shall be run on CAR TOP PC through other PC using VNC.
(I operate the Car Top PC in another way rather than VNC. But it is not relevant to the programmed automatic driving. I may reveal next time how to operate without VNC.)
Step 9: Test Run
Let's Automatic Drive from the beginning !
The end part of automatic driving data is adjusted.
controls = new Control(1, 12, 179.6, 179.6, 62, 67);
controls = new Control(1, 12, 179.6, 181.7, 61, 66);
controls = new Control(3, 12, 181.7, 140.3, 78, 65);
controls = new Control(2, 12, 140.3, 129.3, 65, 64);
controls = new Control(1, 1, 129.3, 131.4, 61, 64);
Number of lateral movement is adjusted as one cycle.
Car No.06 Another Test Run Video
I have succeeded three (3) rounds in this test run. But immediately after car came back to the starting point, the buttery had shut off in this test run.
I have made several trials after this, but no more success in the third round.
Step 10: Further Consideration
I don’t want to say “I have succeeded to make the Programmed Automatic Driving Car.” with only two and half (2.5) or three (3) rounds success.
I cannot specify the reason, but the car moves to left in the third round.
I have adjusted the car direction angle in Processing code, but not succeeded.
Also, I have deluded myself that every round the car must be set at the same starting point.
Further consideration, it is not necessary, since the car own position is calculated at every round.
The requirement is to feed back the car own position obtained to Excel Simulation Program, i.e., to convert Excel Simulation Program to Processing code.
Then, once setting car at the same starting point is not required, the backward movement is not required. So Speed Controller Tamiya TEU-104BK (which has problem in changing from forward to backward driving) can be used for the Programmed Automatic Driving.
I will reflect the above consideration and alter my Car No.05.
We have a be nice policy.
Please be positive and constructive.