Car No. 05 Fourth Stage (Strawberry 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 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


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



- 3-axis digital compass  HMC5843



- 3-axis gyro  ITG-3200



- 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.,  Vout --> A5)


Processing and Arduino codes




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




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
INT – No connect
VIO – 3.3
VDD – 3.3


Processing and Arduino codes




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).


I got the code from and modified.



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
3.3V – 3.3


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


I also got the code from and modified.



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




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.




    • Remix Contest

      Remix Contest
    • Epilog X Contest

      Epilog X Contest
    • Pie Contest

      Pie Contest

    4 Discussions


    7 years ago on Step 4

    Can I run your code directly from Arduino while I don't have a C compiler with me?

    I tried to, but it gave me an error that "FreeIMU1.cpp" was not found.

    3 replies
    Kaeru no Ojisansmartlogix

    Reply 7 years ago on Step 4

    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.)
    DebugUtils.h shall be in ../arduino-022/libraries/DebugUtils folder.
    After that upload FreeIMU1_A.pde to your Arduino,

    I got these files from the below site and modified for only ITG3200 use.

    If you are using Arduino UNO, kindly advise me whether this Hinoshizuku1 works or not in your UNO.
    In my case, this Hinoshizuku1 works very well on Arduino Duemilanove, but NOT on Arduino UNO.

    Good Luck!

    smartlogixKaeru no Ojisan

    Reply 7 years ago on Step 4

    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.

    I am using Arduino Duemilanove and a 6DOF IMU which uses IT3200 as its gyro.

    I have also changed Gyro address to 0x68 (at which normally my gyro reponds) in the respective header file but no luck.

    Kaeru no Ojisansmartlogix

    Reply 7 years ago on Step 4

    I am afraid it seems beyond my control.
    Just try code and my Hinoshizuku2 code.
    If both do not work, I have know idea.