3689668851?profile=original

I had this idea in mind for a long time now, and when I heard about the Mimic from Freefly, I decided to do it for real. This is also part of some small projects I did about all the ways you can connect an Arduino to your radio transmitter to extend his capabilities.
So let's start with the Mimic, you can see here in action:



To do the same, I generate the gimbal movements based on a radio transmitter movement. On the transmitter side I use an IMU (which includes a gyro and accelerometer) to control a gimbal. For a single operator, this IMU could be located on the radio transmitter. Or you can put it on the FPV screen for a dual operator mode. Or you could even pilot your copter/plane with it !
 
The IMU output is converted into PPM signals by the Arduino and then sent to the transmitter through the trainer port.
 
Shopping list :
- An Arduino (Pro Mini 5V 16Mhz for small size)
- An IMU MPU6050, here I use a GY-521
- A connector for the trainer port, depending on you TX
- A battery and a 5V regulator
 
Warning : The Arduino Mini exists in 3V and 5V. I am using the 5V one. In theory, the MPU6050 (gyro and accelerometer?) has to be configured with 3V instead of 5V. But it working perfectly with 5V and the PPM signal is 5V.
And 5V version run at 16Mhz, twice the speed of the 3V version.

Connection

The only one difficult point here is that the Arduino Mini does not have SDA and SCL connectors, which are required for the I2C communication with the MPU6050. So you have to solder them by yourself.
 
Here is the cabling:
GY-521_MPU-6050_Arduino-Wiring-Diagram_Example.png
 
The Power and PPM signal are not visible here, for simplification purpose.
- the Power is 5V, depending on your Arduino Mini.
- The PPM signal is on the connector 3.
 
front.jpg
 
back.jpg
Source Code

 
The source code is a basic merge from Jeff Rowberg i2cdevlib code for the MPU6050 and the one from Hasi on RC Groups about the PPM signal.
 
I had put my sources on Github : diymimic.ino.
Feel free to improve it, it is just a quick and dirty proof of concept. Use at your own risk !
 
Let's try it !
 
Note : You have to wait a few seconds for the auto-calibration.
Here is the result, fisrt with a gimbal and second with a quadcopter !
 


 
Who am I : I used to be a computer engineer flying RC plane in the week-end since I was a kid. I have now co-funded a drone company in France, Neo-Robotix, where we do survey, 3D Reconstruction and other stuff with copter and airplane running APM. Thanks to the DIY Drones comunity to make it possible.


French version available on my french blog.

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Hi Ivan,

    Nice to hear that it is useful for you.

    This is not related to my code but to the parameter of the gimball. I don't know Ronin but in SimpleBGC there is a mode named "speed" and another "angle" that's what you have to look for in your Ronin tuning apps.

  • Hi Benoit!

    Thanks a lot fot your work ... I've downloades the code and conected one Gyro to my gimbal (a Ronin-M), and the Gyro is controlling the speed of the movement, not the position ... Any idea on haow to solve it and to be able to control the angle of the gimbal?

  • I'm happy to see your enthusiasm about the project !

    @Alex : My gimbal is configured to be very smooth so it is normal to see lag. With the quad it seems to have lag but he is not aggressively tuned.

    Technically there is no risk of lag because it use the TX transmitter and not MAVLink or slow link like this.

    But maybe you have to remove the debug serial output to be sure the code run as fast as he could. It was not the case when I test it.

  • Awesome !

  • Great project Benoit! Will try it my self :)

  • Do you know if the lag in the gimbal movement  compared to the IMU on the Tx due to the gimbal's smoothing of the movement or is it a limitation of the components/software ?

    I have considered building up a setup like this for headtracking but was hoping I could get close to real time/real scale movement from the gimbal. 

  • This is a good adaptation, nice work. Not sure if the community has ever seen Dennis Frie's work a few years back for his free opensource headtracker:
    Project page here

    Youtube video here

    I'm a huuuuge fan of what Dennis has done in the hobby, and he helped me advance very quickly with imu projects and code development, so I can't help but speak up about his work.

  • now that's DIY love it

  • MR60

    Genial !

  • 3D Robotics

    This is awesome! I was just thinking of doing this myself and you've already done the work. This will be my weekend project. 

    Thanks so much for posting it. Made my day

This reply was deleted.