Controlling a Xiaomi Yi camera from Solo

Aside from Thanksgiving, I had a fun weekend.

I've been using a Feiyu-Tech gimbal on my Solo (because I wanted to see if I could get it to work), and wanted to be able to control the camera from my Solo's transmitter. The camera is a Xiaomi Yi, which I like. It's a great little camera that does a ton of cool things for an impressive price. 

It turns out it wasn't hard to do at all. All I needed to do was get the camera onto the Solo's wifi network with a static IP address, and then detect when the camera button on the Solo's transmitter was clicked so I could send a command to the camera to start or stop video (or take a still picture).

Some Xiaomi-hacking geniuses have already figured how to set up the camera and what commands to send to it, and I built on that to control the camera. 

It's not the "Solo with 3DR gimbal and GoPro" setup that most people are using, which is kind of the point. "Solo with Feiyu-Tech gimbal and Xiaomi Yi" is harder to pronounce, and harder to implement. But it works pretty well, and putting it together has been fun.

Here's some details about the camera setup, for whoever's interested: 

https://github.com/kellyschrock/3drsolo_xiaomi

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

Join diydrones

Email me when people reply –

Replies

    • Developer

      It's a bit funny what happens at about 15 seconds into the video.  It does a little lean to the right.  I wonder if that's because of horizontal acceleration of the vehicle.

    • Well, that was before I had a gimbal, so there's a ton of leaning going on. This was just a demo of the camera. I picked it because it showed the camera in a favorable light (plus I thought it was funny how the cows seemed to want to be on camera).

      One thing I have noticed is that the gimbal-stabilized video seems to lean a bit when I'm coming out of a turn or something, and eventually levels off. The winds are high, and it's cold. I wonder if the gimbal gets a bit sluggish in low-temp situations. 

    • Developer

      ah right, well, not bad at all for a gimbal-less environment.  Re the leaning with the gimbal, I suspect it's because the gimbal is relying completely on it's internal accels and gyro for attitude estimation so centripetal force will confuse it during fast maneuvers.

    • I notice that if I line things up so I'm looking at something level (e.g. a house) and move aggressively to the left/right, I get predictable lean in the same direction as the copter's angle (although to a lesser degree). I assume it's caused by the copter's side-to-side acceleration.

      TBH, this is my first experience with a gimbal. I always assumed they worked by being connected to the copter's IMU and tilting/rolling/pitching in the opposite direction from the copter. Maybe that's how the more expensive ones work? In any case, this one requires only a power connection to operate.

      Overall, it's a big improvement over no gimbal at all. I have a bit of "shaking" in the video to deal with, then it will be pretty good!

    • Developer

      Great.  most of the brushless gimbals (AlexMos, SToRM32) have their own attitude estimation so they work even just being held in your hand.  The only ones that I know of that work in concert with the flight controller's IMU is the Solo gimbal and DJI gimbals.  It's not really that difficult for us to send down the centrifugal (or is it centripetal?) corrections to the gimbal and it's on the to-do list.  Once we do that the supported gimbals would all work a little better (probably) during high speed maneuvers.

    • Cool. I watched some footage from a Solo gimbal, and it's really smooth. I think I worked out what was causing the shaking. I had made a camera mount that offset the camera about 1 1/2" forward to help solve my "intimate portrait of Solo Leg when yawing right" issue. Bad idea! It's like mounting the camera on the end of a diving board. Putting it back in the normal position (and keeping my HDMI ribbon cable out of the prop wash) seems to make it much smoother. 

    • I've been thinking of running this exact same configuration, what adjustment are you using?

      How does it compare to the gopro+solo gimbal?

      Thanks :)

    • The main thing I did was the focus adjustment. The Yi is apparently calibrated for best focus when doing selfies, so it's optimized for stuff 3 feet from its lens. So what you do is take a screwdriver (or chisel, knife, or similar) and pull the front cover off (carefully, despite your use of a chisel on an action camera, ha ha!). There's a piece of hot glue holding the lens in place. Mark the lens's position with a sharpie, then break the hot glue off. Point the camera at an object at a distance you want it to focus on, and turn the lens until the image is sharper. (I just plugged my camera into my TV and focused on something outside about 100 ft. away.) Then pop the cover back on. 

      This sort of stuff is possible because I bought 2 Yi's for less than 0.5 the price of a GoPro Silver. :-)

      Another thing I did was turn the lens rectification on, which removes the fisheye effect from the output. Other than that, I haven't messed with it much. There's a ton of adjustments that can be done with color correction, sharpening, etc., but I haven't had time to mess with them. I honestly wasn't all that interested in aerial video in general until I started messing with a gimbal. Now I'm interested, but it's cold and windy outside, and gets dark at 4:30 PM! I need a Winter home in New Zealand. :-)

  • Very nice. I was thinking of making a Mapping adapter for the Yi. As as I have done for the Sj4000 for the Solo. I already have a SteadyGo3 Adapter for the Solos Gimbal Bay.

    I also have Canon S100 adapter too and a gimbal friendly Accessory bay Generic adapter. Plus various others for the Solo.

    IMG_5578 (Medium).JPG

    IMG_5581 (Medium).JPG

    IMG_5335 (Medium).JPG

    https://storage.ning.com/topology/rest/1.0/file/get/3702134946?profile=original
  • Excellent!

    How about a Zhiyun-Tech Z1 Tiny 2? Or SteadyGo3 (same thing)?

This reply was deleted.