GlassKnees
Well-Known Member
I have a hexcopter that uses an APM 2.6 flight controller/autopilot and Tarot 2 axis gimbal/GoPro Hero4 camera. I can shoot nice aerial video when I remember to press the record button prior to takeoff, but I've wanted to shoot still photos. Unfortunately, the APM cannot control the shutter like it can with a Canon or similar cameras.
Then I found a solution on the DIYDrones.com website - Patrick Duffy posted the article, "How to control a GoPro Camera on APM/Pixhawk with a Raspberry Pi using WiFi". Basically, the idea is to put the camera into WiFi mode, where you can then control the camera remotely, such as by using an app on an iPhone or similar device. The phone is paired to the camera and you can send commands, such as change mode and trigger the shutter or start/stop video recording. Patrick's solution involves using a Rapsberry Pi board with a WiFi dongle attached to it on a USB port, establishing a WiFi connection between the Raspberry Pi and the camera. Then hooking up a wire from pin 9 on the API servo rail to a GPIO pin on the R.P. board, you can trigger the camera using your transmitter.
Of course, you can bypass using the R.P. board and directly control the camera via your phone, but it can get awkward trying to fly the aircraft and handling your iPhone at the same time. Also, the range is limited - I just tried flying my quadcopter while controlling the camera via my iPhone and I lost the WiFi connection at only about 100 feet or so.
Here is a block diagram of the set up:
I modified Patrick's diagram slightly in that I want to toggle between "photo" and "video" camera modes as well as trigger the shutter or record/stop videos. For changing the mode, I can run a wire directly from my receiver to the R.P. board. For triggering the shutter, I need to go through the APM because there will be times, when I want to shoot a series of overlapping stills for creating 3D models of the terrain I'm overflying.
Besides, the hardware above, you need a Python script to run on the R.P. to listen in on the GPIO pins and send the appropriate http commands to the camera. To see what the script would look like, see: https://www.dropbox.com/s/xffbtvl94zizxcn/MyGoPro.py?dl=0
I haven't received my R.P. board yet, so I haven't implemented the solution, but I expect to have it working in a day or two after it arrives.
Then I found a solution on the DIYDrones.com website - Patrick Duffy posted the article, "How to control a GoPro Camera on APM/Pixhawk with a Raspberry Pi using WiFi". Basically, the idea is to put the camera into WiFi mode, where you can then control the camera remotely, such as by using an app on an iPhone or similar device. The phone is paired to the camera and you can send commands, such as change mode and trigger the shutter or start/stop video recording. Patrick's solution involves using a Rapsberry Pi board with a WiFi dongle attached to it on a USB port, establishing a WiFi connection between the Raspberry Pi and the camera. Then hooking up a wire from pin 9 on the API servo rail to a GPIO pin on the R.P. board, you can trigger the camera using your transmitter.
Of course, you can bypass using the R.P. board and directly control the camera via your phone, but it can get awkward trying to fly the aircraft and handling your iPhone at the same time. Also, the range is limited - I just tried flying my quadcopter while controlling the camera via my iPhone and I lost the WiFi connection at only about 100 feet or so.
Here is a block diagram of the set up:
I modified Patrick's diagram slightly in that I want to toggle between "photo" and "video" camera modes as well as trigger the shutter or record/stop videos. For changing the mode, I can run a wire directly from my receiver to the R.P. board. For triggering the shutter, I need to go through the APM because there will be times, when I want to shoot a series of overlapping stills for creating 3D models of the terrain I'm overflying.
Besides, the hardware above, you need a Python script to run on the R.P. to listen in on the GPIO pins and send the appropriate http commands to the camera. To see what the script would look like, see: https://www.dropbox.com/s/xffbtvl94zizxcn/MyGoPro.py?dl=0
I haven't received my R.P. board yet, so I haven't implemented the solution, but I expect to have it working in a day or two after it arrives.
Last edited: