Recently I've made a very simple remote trigger for Xiaomi Yi camera on my drone so I can take pictures using my RC transmitter.

I have Pixhack (a Pixhawk clone) flight controller which has not only servo outputs, but also "relay pins" which basically output 3.3v. Below is short version of what I've done. I decided to write this post after I already built the thing, so don't have nice step-by-step pictures.

You need:
* Xiaomi Yi Bluetooth shutter

* CPC1016N opto relay . Maybe you can use something else, but I just picked the one which was in closest DIY shop.

* 100 Ohm resistor. The idea here is that you have 3.3v input, 1.2v loss on opto relay LED, but you want current above opto trigger and below its max current. So (3.3v-1.2v)/100Ohm = 20mA looks ok.  

* two-wire servo cable (connect top and bottom pins)

* two small wires (~1-2 cm)


* pair bluetooth shutter with camera

* remove protected rubber case

* remove rubber push button, this wil open a small membrane-like trigger below it

* remove membrane from the trigger, this will open two contacts and the camera will trigger if you short-circuit them

* solder two small wires to those contacts

* solder opto relay LOAD pins to it (polarity doesn't matter)
* solder resistor to one of opto lelay INPUT pins

* solder servo cable wires to resitor and to the other opto relay pin
* connect to pixhawk relay pin, set RC channel action to "Relay On/Off"

* verify that it works, if not, you might need to reverse servo cable wires
* fill in Bluettoth shutter part where you did solreding with epoxy glue and sink wires, resistor and opto relay there

An alternative setup in Mission Planner is to assign camera shutter to that relay and use "Camera trigger" action instead of "Relay On/Off". 

I've attached schematics and how the end result looks like.

schemeit-project (1).png


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

Join diydrones

Email me when people reply –


  • Good afternoon,
    I'm developing my own UAV and when I found your post, a lot of questions were resolved.
    I used blutoth control to shutter my xiomi.
    Now I have one last problem, the camera start taking pictures and few moments before stops taking pictures during the mission and then returns to take pictures. Could you help me solve this problem?
    Best regards.
  • Great hack and post, thanks Konstantin.

    Just made your switch and It works great when I pass a 5v current through it, (My FC is a Navio2 based on a pixhawk and has RC out at 5v so I just added 200Ohm resistor). But I can't seem to get the FC to trigger it. I've set the camera trigger to RC8 but nothing happens any advice? How do I set it up for servo on off, I'm not seeing that in the RC_8 parameters. I'm also going to set up another relay on the video/camera button to switch between the two mid flight.

  • Hi, i have same problem Tobias.

    I need to use this method with Pixhawk.

    is there any other parts that can replace CPC1016N opto relay ?

    because that part is difficult to find in my country.


  • Hey! I just ordered a Bluetooth trigger for xiaomi yi. Planing on get this trigger hack working with pixhawk, I'm curious on the schematics you had for this, but I can't find it.
  • So I soldered 2-wires, 1-wire to GND, 1-wire to 'button 2' here:

    I measure constant 2.82v from this connection, it drops to 2.78v when any button is pressed, but no triggering. I might have to try your suggestion of opto-relay between button. 

    Things I have found:

    -Opening case is very tough, you have to pry & cut between the seal until you can get a blade into the gap and pry until the clips pop open. The case was designed very accurately, never to be opened easily.

    -Soldering to such small SMD area is a high chance of failure. You need a steady hand and maybe a magnifier to see. Also the soldering iron temperature needs to be not too hot or the heat spreads very quickly to other parts on the board, possibly desoldering them. Either be very quick & short with the iron, or, lower temps.

  • How to open remote without damage? Plastic is glued? 

    • 3691281325?profile=originalI haven't opened the case, look at my attached screenshot. I've removed the plastic shutter button instead.

  • This is a great hack, I was jaust having a brain fa&t and thought I would search for ideas. thanks for sharing, i'm gonna try this. 

    Just wondering if the opto-relay is necessary? I mean, if we're using the APM/Pixhawk to trigger/provide switch control, can't we just solder wires directly to the bluetooth remote switch?

    • You mean powering up bluetooth dongle from relay pin? I don't think it will work since relay is 3.3v but battery in bluetooth dongle is 3.7v.

      • No i mean, still powering bluetooth remote using it's battery, but using APM - servo wires - remote, to trigger?

This reply was deleted.


DIY Robocars via Twitter
RT @masato_ka: 距離センサを3つとESP32を付けたラジコンカーをDonkeyCarライクにNNで自動走行。3層FC極小モデルをTensorFlow Lite for microcontrollerで動かしてる。機体は借り物でRumiCarって言います。Tenso…
3 hours ago
DIY Robocars via Twitter
RT @SmallpixelCar: My car was able to go all the way autonomously until the crosswalk. It was only 100 yards from the target. What should b…
Liam left a comment on Agricultural UAVs
I'm Liam from T-MOTOR. I would like to reach out to see if there is any possibility for us to work together.
We are a propulsion system manufacturer who offers motors, propellers and ESCs for all kinds of drone applications which vary from secur…"
DIY Robocars via Twitter
RT @SmallpixelCar: Smart move. The car used the shadow to guide it through the bridge. This was never in the training samples. But it learn…
DIY Robocars via Twitter
RT @SmallpixelCar: Getting closer to the target. Single camera. Untrained road.
Jun 29
Richard Cox left a comment on Australia
"Anyone in the DIYDRONES Australian subgroup based in Alice Springs, NT?
I am experimenting with Ardupilot (standard Arduplane), Pixhawk 4 FC in a 4-ch
RC "AXN Floater Jet" foamy plane..."
Jun 29
Omar Sykes left a comment on Australia
"Hi everyone, I am looking for someone who is good at drone building, repair and software in Adelaide. Please give me a call on 0477 319 219."
Jun 29
DIY Robocars via Twitter
RT @RoboticMasters: #donkeycar
Jun 29
DIY Robocars via Twitter
Jun 29
DIY Robocars via Twitter
RT @RoboticMasters: Donkey car, car car car car car car; Donkey car, car car car car car car; Donkey Car. Anyone like our tiny tiny donkey…
Jun 29
DIY Robocars via Twitter
RT @SmallpixelCar: After improving DBSCAN speed, I can get 11 frame per second on @NVIDIAEmbedded Jerson Xavier MAXN mode and the autonomou…
Jun 26
DIY Robocars via Twitter
RT @Heavy02011: Join us at next Virtual Race League: ⁦@diyrobocars⁩ Race #4 - Parking Lot Nerds, August 1st
Jun 25
DIY Robocars via Twitter
RT @SmallpixelCar: #CUDA implementation should be easy, because most of the time is on distance calculations berween two points and if the…
Jun 25
DIY Robocars via Twitter
RT @SmallpixelCar: This is the view from the car. Even my lanenet inference is fast on @NVIDIAEmbedded Jerson Xavier, DBSCAN clustering tak…
Jun 25
DIY Robocars via Twitter
RT @SmallpixelCar: Ran my car in the park, with single camera and @sparkfun IMU. #TensorRT on @NVIDIAEmbedded Jetson Xavier. Lanenet one fr…
Jun 24
DIY Robocars via Twitter
RT @SmallpixelCar: Making progress on drive the car autonomously in my neighborhood. This run used single camera only. No other sensors. ht…
Jun 24