loading

 

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 pass points were input, then from which steval and car direction were obtained as automatic driving data.

In Third Stage, I attached PC on car body, made Tachometers and automatic driving control system (plain-vanilla version) was tested.


In this Fourth Stage, further automatic driving system (strawberry version) is tested.

Direction measurement using censor is applied in this Strawberry version.

Various types of sensor are tested for direction measurement.

Code names of Tochiotome(gyro HS-EG3), Amaou(3-axis digital compass.HMC5843), Hinoshizuku1(3-axis gyro ITG-3200) and Hinoshizuku2(IMU Digital Combo Board - 6 DOF ITG3200/ADXL345) are tested.

Finally, Hinoshizuku1(3-axis gyro ITG-3200) is applied for Strawberry version.

 

Carefully check the picture, fourth Arduino is attached above central one.

 

Step 1: Sensors to Be Tested

Tochiotome

- gyro  HS-EG3 (+ Condenser 100uF, 0.10uF x 3, Resistance 100K ohm x 2)

 

Amaou

- 3-axis digital compass  HMC5843

 

Hinosizuku1

- 3-axis gyro  ITG-3200

 

Hinoshizuku2

- IMU Digital Combo Board - 6 DOF  ITG3200/ADXL345

 

Connection between Arduino and Desktop PC is by bluetooth. BlueSMiRF for Arduino side and Parani-UD100 for PC side are used.

 

Step 2: Tochiotome(gyro HS-EG3)

Set HS-EG3, condensers and resistances on Arduino. (Refer to the product spec. http://www.mecharoboshop.com/Products/STLJapan/Tsukasa21-Tsukasa41-Specific%281-2%29.pdf,  Vout --> A5)

 

Processing and Arduino codes

HS_EG3_P.pde

HS_EG3_A.pde

 

Upload Arduino code and run Processing code.

 

Rotate and move Arduino, and check azimuth shown in Processing screen.



 

It seems OK for slow movement, but for quick movement, this sensor cannot follow with.

 

 

Step 3: Amaou(3-axis Digital Compass HMC5843)

Set HMC5843 on Arduino and connect.

(GND – GND, VCC – 3.3, SDA – A4, SCL – A5)

 

Processing and Arduino codes

HMC5843_P.pde

HMC5843_A.pde

 

Upload Arduino code and run Processing code.

 

Rotate and move Arduino, and check azimuth shown in Processing screen.



This is no good! This censor is well functioning at same location, but once moved to 1-2m away, incorrect azimuth is shown.

 

Compass module cannot be applied inside the reinforced concrete structure.

 

Step 4: Hinoshizuku1(3-axis Gyro ITG-3200)

Set ITG-3200 on Arduino and connect.

SCL – A5
SDA – A4
CLK – GND
INT – No connect
GND – GND
VIO – 3.3
VDD – 3.3

 

Processing and Arduino codes

ITG3200_P.pde

ITG3200_A.pde

 

Upload Arduino code and run Processing code.


 

This seems OK for yaw rotation, but once roll or pitch rotation worked, it goes out of order.

 

Apply another Processing and Arduino codes (+ h, cpp, c files).

FreeIMU1.lzh

I got the code from varesano.net and modified.

(http://www.varesano.net/blog/fabio/initial-implementation-9-domdof-marg-imu-orientation-filter-adxl345-itg3200-and-hmc5843-a)

 


This is quite OK!

 

Thank you very much, Fabio!

 

Step 5: Hinoshizuku2(IMU Digital Combo Board - 6 DOF ITG3200/ADXL345)OF ITG3200/ADXL345)

Set ITG3200/ADXL345 on Arduino and connect.

INT0 – No connect
INT1 – D2
SCL – A5
SDA – A4
GND – GND
3.3V – 3.3

 

Processing and Arduino codes  (+ h, cpp, c files)

FreeIMU2.lzh

I also got the code from varesano.net and modified.

(http://www.varesano.net/blog/fabio/initial-implementation-9-domdof-marg-imu-orientation-filter-adxl345-itg3200-and-hmc5843-a)
 

 

This is also quite OK! Effect of Kalman filter is great!


But the requirement for Strawberry version is a correct measurement of Yaw angle.

Hinoshizuku2 will be applied for Roll+Pitch+Yaw measurement system (in another car project).

 

Step 6: Code

Finally, Hinoshizuku1(3-axis gyro ITG-3200) is applied for Strawberry version.

In Strawberry version, combination of Tachometers and azimuth measurement is applied.

 

Fourth Arduino is attached above central Arduino.

 

I applied Low Dropout Voltage Regulator NJM2845DL1-33 to supply accurate 3.3V to ITG-3200.


Fourth Arduino code is same as Hinoshizuku1. (FreeIMU_A.pde)

 

Processing code

CARNO05_STRAWBERRY_P.pde

 

 

I choose Turning Radius (RC Car Center) of 500mm for the interface between tachometers and azimuth measurement.

Tachometer data is used for more than 500mm turning radius turn, and azimuth data is used for less than 500mm one.

 

Adjust the figure of C162 (C88) Cell to 15 in Excel Simulation Program 1 (2), copy the pink hatched cells in “DrivingControl” Worksheet and special paste as value with conversion of row and column in “toProce55ing” Worksheet.

Copy J Column in “toProce55ing” Worksheet and paste into Processing code.

Adjust the numControls figure.

 

Step 7: Trial Run

Set Car at starting point and direction as programmed.

Switch on R/C car battery.

Start another desktop PC.

From desktop PC, run VNC and establish VNC connection.

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

Run the Processing on server from client using VNC.



 

It is much improved compared with Plain-vanilla version. The success rate of coming back to starting point is nearly 100%. But car goes further point compared with the Excel simulation. This might be caused by the incorrect tire diameter input. But once I changed tire diameter figure, the car could not come back!

I intended the continuous driving after first circuit to second circuit, but with this result I cannot proceed with continuous driving to second circuit.


Anyway, I will proceed to next chocolate version.

 

Step 8: To Be Continued

In Car No.05 Fifth Stage, chocolate version of automatic driving control system will be tested. Chocolate version is the car own position adjusting system using web camera.

However, adjusting car own position system requires backward driving. Since the speed controller Tamiya TEU-104BK does not function well for the change from forward to backward.

Prior be understood that I cannot complete full Chocolate version with this Car No.05.

 

Can I run your code directly from Arduino while I don't have a C compiler with me?<br><br>I tried to, but it gave me an error that &quot;FreeIMU1.cpp&quot; was not found.
Hi! <br>Depress the above FreeIMU1.lzh and paste all files (except *.pde) in ../arduino-022/libraries/FreeIMU1 folder. (Make FreeIMU1 folder under libraries folder in arduino program folder.) <br>DebugUtils.h shall be in ../arduino-022/libraries/DebugUtils folder. <br>After that upload FreeIMU1_A.pde to your Arduino, <br> <br>I got these files from the below site and modified for only ITG3200 use. <br>http://www.varesano.net/blog/fabio/initial-implementation-9-domdof-marg-imu-orientation-filter-adxl345-itg3200-and-hmc5843-a <br> <br>If you are using Arduino UNO, kindly advise me whether this Hinoshizuku1 works or not in your UNO. <br>In my case, this Hinoshizuku1 works very well on Arduino Duemilanove, but NOT on Arduino UNO. <br> <br>Good Luck! <br>
Thanx, I downloaded your files + DebugUtils from the link you mentioned, everything compiled and uploaded now but it doesn't seem to work as the values on Serial monitor are not changing.<br><br>I am using Arduino Duemilanove and a 6DOF IMU which uses IT3200 as its gyro.<br><br>I have also changed Gyro address to 0x68 (at which normally my gyro reponds) in the respective header file but no luck.
HI!<br>I am afraid it seems beyond my control.<br>Just try varesano.net code and my Hinoshizuku2 code.<br>If both do not work, I have know idea.<br>

About This Instructable

3,937views

3favorites

License:

More by Kaeru no Ojisan:R/C Car Balancing Robot Hyakunin Isshu (Japanese Carta Game) Practice Machine Car No.05 Altered  Programmed Automatic Driving Car (Yogurt Version) 
Add instructable to: