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
- 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
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
- Arduino Duemilanove x 2
- Arduino UNO x 2
- Arduino ProtoShield Kit DEV-07914 x 4
- Reflective Photosensor Rohm RPR-359F x 2
- Resistance 510 ohm x 2, 47k ohm x 2
- 3-axis gyro ITG-3200
- Logicool HD Pro Webcam C910
Step 2: 4-Wheel-Steering Chassis Assemble
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)
Measure TR for each steval using the following Arduino and Processing codes.
Servo1(front) -- D9
Servo2(rear) -- D10
Motor Driver -- D11
Make a relationship table between steval and TR.
Step 4: Simulation Program
For confirmation, check by Excel Simulation Program2.
Draw the car trajectory with AutoCAD.
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 following 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
Check the Gyro Arduino functioning with the following Arduino and Processing codes.
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)
Step 7: Car Top PC With 4 Arduinos and Web Camera
Step 8: Car Own Position Adjusting System Using Web Camera
- 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.
Using the following Processing code, measure the actual X, Y coordinates and Webcam coordinates and make a conversion formula.
First, check Web Camera only.
Next, check the combination of Web Camera and 4 Arduinos.
Step 9: Test Run
The end part of automatic driving data is adjusted.
controls = new Control(1, 14, 183.8, 60, 75);
controls = new Control(2, 14, 178.9, 64, 75);
controls = new Control(1, 15, 181.4, 61, 75);
controls = new Control(2, 15, 179.0, 63, 75);
controls = new Control(1, 15, 179.0, 62, 75);
controls = new Control(3, 12, 137.2, 80, 74);
controls = 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 = new Serial(this,"COM7",115200);
port02 = new Serial(this,"COM9",115200);
port03 = new Serial(this,"COM10",115200);
port04 = new Serial(this,"COM8",115200);
Step 10: Further Consideration
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).