Introduction: Car No. 05 Third Stage (Plain-vanilla Version)

Car No.05 is the project aiming to make a programmed automatic driving car.

In First Stage, I assembled a smaller turning radius R/C chassis and made a relationship table between steering servo value and turning radius.

In Second Stage, I made an Excel simulation program, to which car starting point, car starting direction and target pass points were input, then from which steval and car direction were obtained as automatic driving data.

In this Third Stage, attach PC on car body top, make Tachometers and attach them to both front tires. Utilizing the steval data obtained in Second Stage, automatic driving control system (plain-vanilla version) is tested.


Test result was so-so.

Car went to 5m away and successfully came back.

I have succeeded 3 times only.

Step 1: Procurement

Body

- Car BodyTamiya 8085258 Mini Cooper Monte Carlo 94 Finished Body

- Lubic

PC mounted on Car Body

- MotherboardZOTAC IONITX-C-J

- MemoryDDR2 2GB

- HDDSUPER TALENT FTM16GL25V

- Wireless LANIntel Wireless WiFi Link 4965AGN

- BatteryJTT Energizer XP8000

Arduino

- Arduino Duemilanove x 3

- Arduino ProtoShield KitDEV-07914 x 3

Webcam

- WebcamMicrosoft LifeCam Show RLA-00007

Tachometers

- Reflective PhotosensorRohm RPR-359F x 2

- Resistance510 ohm x 2, 47K ohm x 2

Download

- Arduino

- Processing

- VNC

Step 2: Attach PC on Car Body

Make holes and attach Lubic mount.

Assemble PC on acrylic plate and attach on Lubic mount.

Install MS Windows XP, MS Excel, VNC, Processing and etc.

Webcam is also attached in front window. (Webcam is not used in this Third Stage.)

Step 3: Make Tachometers

Solder cables to Reflective Photosensors and attach to front upright parts.


Cut out circular disc x 2 pcs from plastic plate (t=1mm), paint flat black, draw 6 silver lines for each disc, and attach into front tires inside. Set tires to front uprights.


Connect the cables from tachometer to Arduino and set resistances, and make 2 sets.


Wiring note

RPR-359F terminal1(Cathode) -–> GND
terminal2(Anode) -–> 510ohm -–> 5V
terminal3(Collector) -–> 47Kohm -–> 5V, also -–> D5
terminal4(Emitter) --> GND


Checking of tachometers operations

Upload the attached Arduino code.

   I got this code from
   http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1231326297


Arduino code

PulseCounter_A.pde

Run the attached Processing code.

Processing code

PulseCounter_P.pde


After the display window appears, rotate tire and confirm the figure appeared in the Processing lower black screen is number of rotation x 6(number of silver lines).

Check both right side and left side tachometer+Arduino sets.

Step 4: Code

Attach 2 Arduinos for tachometers on Car Top PC both right and left sides.

Upload the Arduino code in Car No.05 First Stage to another Arduino, attach on PC at center, and connect/wire to 2 servos and a speed controller.

(Servo1 front: D9, 5V, GND Servo2 rear: D10, 5V, GNDSpeed Controller: D11, 5V, GND)


Connect 3 Arduinos to Car Top PC with USB cables, connect battery to Car Top PC.

Connect monitor, keyboard and mouse to Car Top PC.

Switch on Car Top PC.

Open Processing, open the attached Processing code.

Processing code

CARNO05_VANILLA_P.pde

Open Excel Simulation Program 1 or 2, copy the pink hatched cells in “DrivingControl” Worksheet and special paste as value with conversion of row and column to “toProce55ing” Worksheet.

Copy J Column in “toProce55ing” Worksheet and paste into Processing code between line of “------ Data Quote ------“ and that of “------ Data Unquote ------“.

Adjust the numControls figure in the Processing code.

int numControls = N+1; //This figure shall be same as number of data lines.

..

void setup() {

// ------ Data Quote ------

controls[0] = ……

….

controls[N] =……

// ------ Data Unquote ------

..

Disconnect monitor, keyboard and mouse from Car Top PC.

Step 5: Trial Run

Set Car at starting point and direction as programmed.

Switch on R/C car battery.

Start another desktop PC.

Car Top PC is a server and desktop PC is a client.

From desktop PC, run VNC and establish VNC connection.

Run the Processing code on server from client using VNC.

Press ‘s’ key, then start automatic driving.


Car went to 5m away and successfully came back.

In this Car No.05 Plain-vanilla version, I have succeeded 3 times only and I took only 2 videos.

My program code may still have bug or this is the maximum limit of automatic driving by tachometers.

Anyway, I will proceed to next Strawberry version.

Step 6: Notes & to Be Continued

Notes:

In application of this kind of tachometers, tachometer shall be attached opposite side of motor, i.e. if motor is attached in back, tachometer shall be in front. Also, motor size shall be 380 or less. This is the countermeasure to avoid counting noise from motor.


“For” statement does not function in my Processing code for automatic driving, and I apply i=i+1 method.

Does anyone know why “for” statement does not function in my Processing code ? Yo Dareka Oshietekure!


To be continued

In Car No.05 Fourth Stage, strawberry version of automatic driving control system will be tested.

Strawberry version means the application of direction measurement using censor.

Various types of sensor will be tested for direction measurement.