Introduction: Car No. 05 Altered Programmed Automatic Driving Car (Full Chocolate Version)
Hi! This is Kaeru no Ojisan.
I have altered Car No.05 by lowering total car height and replacing Web Camera.
Now I can manage Tamiya TEU-104BK Speed Controller for backward driving.
Also I have solved the problem in continuous rounds driving.
The general outline of Car No.05 Altered (Full Chocolate Version) is same as that of Car No.06, but detail contents are different from that of Car No.06.
Car No.05 Altered (Full Chocolate Version) is a programmed automatic driving car using Reflective Photosensor, Gyro Sensor and Web Camera, which is composed of 4-Wheel-Steering chassis, R/C Car body and Car Top PC with 4 Arduinos and Web Camera.
I have solved the problem of Car No.06 in continuous rounds driving with revising Processing codes.
Please watch the following Car No.05 Altered test run video.
Car No.06 had failed at 3rd round. But this Car No.05 Altered has succeeded up to 11 rounds!
This video is too long, I will edit it later on.
I have altered Car No.05 by lowering total car height and replacing Web Camera.
Now I can manage Tamiya TEU-104BK Speed Controller for backward driving.
Also I have solved the problem in continuous rounds driving.
The general outline of Car No.05 Altered (Full Chocolate Version) is same as that of Car No.06, but detail contents are different from that of Car No.06.
Car No.05 Altered (Full Chocolate Version) is a programmed automatic driving car using Reflective Photosensor, Gyro Sensor and Web Camera, which is composed of 4-Wheel-Steering chassis, R/C Car body and Car Top PC with 4 Arduinos and Web Camera.
I have solved the problem of Car No.06 in continuous rounds driving with revising Processing codes.
Please watch the following Car No.05 Altered test run video.
Car No.06 had failed at 3rd round. But this Car No.05 Altered has succeeded up to 11 rounds!
This video is too long, I will edit it later on.
Step 1: Material
R/C Car
- Car Body Tamiya 8085258 Mini Cooper Monte Carlo 94 Finished Body
- Chassis Tamiya M-03R chassis x 2
- Motor 380 motor x 2
- Attaching Jig Kawada B57 x 2
- Servo Futaba S3003 x 2
- Speed Controller Tamiya TEU-104BK
- NI-Cd Battery for R/C Car 1500mAh 7.2V
- Lubic
- Plarepair
Car Top PC
- Motherboard ZOTAC IONITX-C-J
- Memory DDR2 2GB
- HDD SUPER TALENT FTM16GL25V
- Wireless LAN Intel Wireless WiFi Link 4965AGN
- Battery JTT Energizer XP8000
Arduinos
- Arduino Duemilanove x 2
- Arduino UNO x 2
- Arduino ProtoShield Kit DEV-07914 x 4
Tachometers
- Reflective Photosensor Rohm RPR-359F x 2
- Resistance 510 ohm x 2, 47k ohm x 2
Gyro
- 3-axis gyro ITG-3200
Web Camera
- Logicool HD Pro Webcam C910
- Car Body Tamiya 8085258 Mini Cooper Monte Carlo 94 Finished Body
- Chassis Tamiya M-03R chassis x 2
- Motor 380 motor x 2
- Attaching Jig Kawada B57 x 2
- Servo Futaba S3003 x 2
- Speed Controller Tamiya TEU-104BK
- NI-Cd Battery for R/C Car 1500mAh 7.2V
- Lubic
- Plarepair
Car Top PC
- Motherboard ZOTAC IONITX-C-J
- Memory DDR2 2GB
- HDD SUPER TALENT FTM16GL25V
- Wireless LAN Intel Wireless WiFi Link 4965AGN
- Battery JTT Energizer XP8000
Arduinos
- Arduino Duemilanove x 2
- Arduino UNO x 2
- Arduino ProtoShield Kit DEV-07914 x 4
Tachometers
- Reflective Photosensor Rohm RPR-359F x 2
- Resistance 510 ohm x 2, 47k ohm x 2
Gyro
- 3-axis gyro ITG-3200
Web Camera
- 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.
Sorry, Step 2 to Step 8 is same as that of Car No.06.
Sorry, Step 2 to Step 8 is same as that of Car No.06.
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.
M03Rx2_CN05_TR.xls
Measure TR for each steval using the following Arduino and Processing codes.
Wiring note
Servo1(front) -- D9
Servo2(rear) -- D10
Motor Driver -- D11
Arduino code
SWSVSC_A.pde
Processing code
TurningRadius_P2.pde
Make a relationship table between steval and TR.
M03Rx2_CN05_TR.xls
Measure TR for each steval using the following Arduino and Processing codes.
Wiring note
Servo1(front) -- D9
Servo2(rear) -- D10
Motor Driver -- D11
Arduino code
SWSVSC_A.pde
Processing code
TurningRadius_P2.pde
Make a relationship table between steval and TR.
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.
SimulationProgram1_CN05.xls
For confirmation, check by Excel Simulation Program2.
SimulationProgram2_CN05.xls
Draw the car trajectory with AutoCAD.
SimulationProgram1_CN05.xls
For confirmation, check by Excel Simulation Program2.
SimulationProgram2_CN05.xls
Draw the car trajectory with AutoCAD.
Step 5: Tachometers
Make Tachometers for right and left side tires with the use of Reflective Photosensor(Rohm RPR-359F) and Arduino.
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 following Arduino and Processing codes.
Wiring note
RPR-359F terminal1(Cathode) -- GND
terminal2(Anode) -- 510ohm -- 5V
terminal3(Collector) -- 47Kohm -- 5V
also -- D5
terminal4(Emitter) -- GND
Arduino code
PulseCounter_A.pde
Processing code
PulseCounter_P.pde
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 following Arduino and Processing codes.
Wiring note
RPR-359F terminal1(Cathode) -- GND
terminal2(Anode) -- 510ohm -- 5V
terminal3(Collector) -- 47Kohm -- 5V
also -- D5
terminal4(Emitter) -- GND
Arduino code
PulseCounter_A.pde
Processing code
PulseCounter_P.pde
Step 6: Gyro
Make Gyro Arduino with the use of 3-axis gyro ITG-3200 and Arduino.
Check the Gyro Arduino functioning with the following Arduino and Processing codes.
Wiring note
SCL -- A5
SDA -- A4
CLK -- GND
INT -- No connect
GND -- GND
VIO -- 3.3V
VDD -- 3.3V
Arduino and Processing codes (+ h, cpp, c files)
FreeIMU1.zip
Check the Gyro Arduino functioning with the following Arduino and Processing codes.
Wiring note
SCL -- A5
SDA -- A4
CLK -- GND
INT -- No connect
GND -- GND
VIO -- 3.3V
VDD -- 3.3V
Arduino and Processing codes (+ h, cpp, c files)
FreeIMU1.zip
Attachments
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.
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.
WebCamera_HDProWebcamC910_CN05.xls
Using the following Processing code, measure the actual X, Y coordinates and Webcam coordinates and make a conversion formula.
Processing code
WebcamPointIndicator.pde
First, check Web Camera only.
Processing code
Chocolate01_CN05.pde
Next, check the combination of Web Camera and 4 Arduinos.
Processing code
Chocolate02_CN05.pde
- 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.
WebCamera_HDProWebcamC910_CN05.xls
Using the following Processing code, measure the actual X, Y coordinates and Webcam coordinates and make a conversion formula.
Processing code
WebcamPointIndicator.pde
First, check Web Camera only.
Processing code
Chocolate01_CN05.pde
Next, check the combination of Web Camera and 4 Arduinos.
Processing code
Chocolate02_CN05.pde
Step 9: Test Run
Processing code
CARNO05_06.pde
Note:
The end part of automatic driving data is adjusted.
controls[26] = new Control(1, 14, 183.8, 60, 75);
controls[27] = new Control(2, 14, 178.9, 64, 75);
controls[28] = new Control(1, 15, 181.4, 61, 75);
controls[29] = new Control(2, 15, 179.0, 63, 75);
controls[30] = new Control(1, 15, 179.0, 62, 75);
controls[31] = new Control(3, 12, 137.2, 80, 74);
controls[32] = new Control(2, 6, 122.4, 68, 74);
Number of lateral movement is adjusted as one cycle.
The problem of Car No.06 in continuous rounds driving seems to be caused by the different sampling period from Tachometers and Gyro.
It is better to alter both sampling time to same, but I amended the processing code to terminate and start again the serial communication every round, i.e.
port01.stop();
port02.stop();
port03.stop();
port04.stop();
delay(100);
port01 = new Serial(this,"COM7",115200);
port02 = new Serial(this,"COM9",115200);
port03 = new Serial(this,"COM10",115200);
port04 = new Serial(this,"COM8",115200);
delay(100);
CARNO05_06.pde
Note:
The end part of automatic driving data is adjusted.
controls[26] = new Control(1, 14, 183.8, 60, 75);
controls[27] = new Control(2, 14, 178.9, 64, 75);
controls[28] = new Control(1, 15, 181.4, 61, 75);
controls[29] = new Control(2, 15, 179.0, 63, 75);
controls[30] = new Control(1, 15, 179.0, 62, 75);
controls[31] = new Control(3, 12, 137.2, 80, 74);
controls[32] = new Control(2, 6, 122.4, 68, 74);
Number of lateral movement is adjusted as one cycle.
The problem of Car No.06 in continuous rounds driving seems to be caused by the different sampling period from Tachometers and Gyro.
It is better to alter both sampling time to same, but I amended the processing code to terminate and start again the serial communication every round, i.e.
port01.stop();
port02.stop();
port03.stop();
port04.stop();
delay(100);
port01 = new Serial(this,"COM7",115200);
port02 = new Serial(this,"COM9",115200);
port03 = new Serial(this,"COM10",115200);
port04 = new Serial(this,"COM8",115200);
delay(100);
Attachments
Step 10: Further Consideration
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.
All that’s required is to feed back the car own position obtained to Simulation Program, i.e., to convert Excel Simulation Program to Processing code.
I will reflect the above consideration and revise the Processing code.
Next one is Car No. 05 Altered (Yogurt Version).
Further consideration, it is not necessary, since the car own position is calculated at every round.
All that’s required is to feed back the car own position obtained to Simulation Program, i.e., to convert Excel Simulation Program to Processing code.
I will reflect the above consideration and revise the Processing code.
Next one is Car No. 05 Altered (Yogurt Version).