Home T.O.C. Previous step Next step


This page presents the electronics tests for my final project.
Arduino file:

gimbal_two_servo.ino (modified code, "arduinohocam" instructables user. Source code available for downlad on this Instructables page)



Servo test



Servo rotation test

Sensor and USART communication test



Read Pololu LSM303DLHC 3D Compass and print it on the screen

Compass application test





Moving the sensor to move the compass on screen

2 servo stabilized Gimbal

Arduino code

I modified the code from "arduinohocam" instructables user.

Source code available for downlad on this Instructables page

I change the pins for the servo to match the one I used in my board.

Flashing the code on my board

I use the programmer I made during Week 4 to program my board.

I don't have ISP cable at the moment of the test so I use six cables instead.

I used the following figures to match the cable on the programmer and on my board:


My board


Week 4 programmer
First in arduino I exported the compiled binary from the .ino file ("Sketch" -> Export compiled Binary).

I then paste the .hex in the folder where avrdude is installed.

I open the folder in a terminal and type the command :



avrdude -p m328p -c -usbtiny -U flash:w:gimbal_two_servo.hex



I used an arduino board to provide 5V input to my board as shown in the figure below.



My board
It supposed to be the radio receiver (it also provides currents for the wing servos) that power my board but I don't have it at the moment of the test...

The following video shows the successful flashing of the hex on my board





Flashing of the hex on my board

Testing stabilization of the gimbal

Set up

I lacked the Polulu sensor at the moment of the test. Instead I use an MPU6050 sensor.

I have fixed the sensor on the frame of the drone.

I have scratch my board near. The 5V is still provided by the arduino board.



Zoom on my board, the MPU6050 sensor

(and the arduino providing 5V to my board)


Overview of the test


Test





2 servo stabilized Gimbal
I used a piece of paper to simulated the embeded sensor.

The stabilization is not smooth enougth for a camera live feed but it is working.

For a smoother stabilization one should use brushless motors.