Hacking a GoPro for Wired Remote Control

Hacking a GoPro for Wired Remote Control


Sometimes there are situations where it’s useful to control a GoPro by wired remote control and/or to integrate a GoPro into a DIY electronic project. This seems like it should be straight forward, but it’s not. I searched for a third party cable or module to plug into one of the GoPro’s ports, but as far as I can tell, there is nothing readily suitable on the market. So, in this post I describe how we hacked into a GoPro Hero 4 Black in order to integrate it into a robot we’re building.

First, we tried communicating through the Hero Port (the large port on the back of the camera). This seemed very promising. You can do some neat things with this port. But unfortunately, controlling the GoPro’s shutter button isn’t readily feasible because GoPro didn’t set it up as a simple digital pin. Instead, they created a proprietary communication protocol that they purposely do not publish. They don’t want people to hack into their cameras. Next we tried using the USB port, to no avail. Then we tried hacking into the wireless remote control, which we were able to do pretty easily, and it sort of worked, but it did not provide the speed and reliability we needed. So, in the end we went old school. We tore the GoPro apart, hacked into the case, and soldered wires to the button rings. It isn’t pretty or elegant, but it works. Here are the details of what we did:

1. First, we needed to integrate the GoPro’s power into our robot. We didn’t want to have a separate battery. So we removed the battery completely, plugged a mini USB cable into the USB port on the side of the GoPro, and hacked the other end. The Hero 4 will run entirely off a USB cable with no battery in it. If you cut open a USB cable, you’ll see four or five wires. Normally the red is positive voltage and the black is ground. If you don’t see a red and black, then Google USB wire color codes for further clues. We connected the red wire to the robot’s 5v regulated power rail. So now, when the robot has power, the GoPro has power. When the robot goes off, the GoPro goes off. Another option is to use a Switronix Battery Eliminator, if you would prefer to use the GoPro’s Hero Port.

2. Second, we needed to turn on and control the GoPro from the robot, specifically from an Arduino micorcontroller. Note: A GoPro does not turn on just because it has electrical power. In order to operate the camera, you need to press the Power/Mode button (on the front) and the Shutter/Select Button (on the top). The following instructions voids your warranty, causes irreversible damage to certain parts, and has an extremely high potential of turning your $500 GoPro into a mess of useless bits of metal, plastic, and electronics. Welcome to DIY hacking!

A.  Use your fingernail or a prying tool to remove the front facade. It’s stuck down with adhesive and two little plastic clips on each of the four sides. This takes time and patience. The front plate is thin aluminum. Unless you’re very careful, you’ll end up bending it. You will probably be wanting to put the plate back in place when you’re all done, so be careful.

B.  Next, use a small electronics screw driver to unscrew four screws to loosen the electronics.

C.  Separate the case from the electronics at the port end first, carefully prying and wiggling until you are able to pull out the electronics. Again, this will take time and patience. Be careful.

D. As the electronics come out, you’ll see there are two main sub-assemblies connected by a thin, delicate orange flat ribbon. Try to keep the sub-assemblies together. If you fail at this, you’ll pull out the ribbon connector. It’s a major pain and risk to put that tiny thing back into place. However, it is doable. It took twenty minutes of fussing, but we managed to do it.

E. Use big snippers and other tools to cut away the top part of the case to expose the Shutter/Select button on the top. I wish there was a better way, but we could not find one.

F. Use your fingernail to scrape off the little white touch area beneath the Shutter/Selection Button.. Solder a wire to the tiny central circle (be very careful not to connect the outer circle to the inner circle). Run the wire to a relay controlled by your Arduino. Use the relay to close the circuit to ground using a digitalWrite command.

G. Do the same thing on the Power/Mode Button, which is on the front of the camera.

H. Replace the case and physically integrate the camera into your project. In our situation, we have machined a special aluminum case that we designed specifically to meet the needs of our particular project. When it’s all done, the mangled plastic GoPro case will not be visible in any way.

After doing the steps above, we now have two wires coming out of our GoPro. We’ll attach each wire to a little relay module, which in turn we will control with two digital pins on our Arduino. We’ll then use simple digitalWrite commands to operate the two relays, giving us complete control of the GoPro.

In the next post, I’ll provide some photos and explanation of the new case we machined for our wired GoPro. In the post after that, I’ll describe how we are using the GoPro on the robot to wirelessly stream HD 1080p/60 video to a monitor and a HD Goggles.

GoPro Hero 4 Wired Remote Control

Snailbot Work-in-process

Snailbot Work-in-process

Snailbot is one of my favorite pet projects. 🙂 The idea is to build a robot inspired from a biological creature, in this case, a snail. The first challenge was to design and wire-up the electronics so that they would fit inside the limited space of the snail shell. The electronics include an Arduino Nano microcontroller, a motor controller, two tiny gear motors with wheels, a lithium-polymer battery, an xbee radio for data transmission and remote control, an SD card and sound module, a tiny speaker for sound effects, and two ultrasonic sensors that will serve as Snailbot’s eyes.







Snailbot isn’t done yet, but I’ve made good progress.

Centurion Paintball Sentry Gun

Centurion Paintball Sentry Gun

The Centurion is an automatic-targeting paintball sentry gun. Its purpose is to guard a doorway, alleyway, or any open space. It watches an area with its camera. If it sees movement, it aims its guns at it and shoots at a high rate of fire until the target leaves the field of view or stops moving. As long as the target keeps moving, the guns track the movement and keep shooting. It can also differentiate color. So, for example, team members with blue sweat shirts could be allowed to pass, but enemies with red sweatshirts will be dealt with severely. The main components are:

  • Motherboard with a Corei5-4570S Quad Core 2.9Ghz, 8GB RAM, 120GB SSD, & WiFi module
  • Arduino Leonardo
  • Wide-angle HD webcam
  • 8-Channel Relay Board
  • 12v 7,000mAh Lithium-Ion battery
  • Actobotics Pan-Tilt Turret
  • Actobotics tubes, channel, brackets, clamps, shafts, ball bearings, gears, and other components
  • Actobotics Hitec Servos
  • Maxbotix ultrasonic range finder
  • (2) high-performance paintball guns (Dye Proto Reflex 14’s with custom modified barrels)
  • (2) targeting lasers
  • (2) electric ammunition hoppers (not shown)
  • (2) air tanks (not shown)
  • Portable keyboard, mouse, and keyboard (not shown)(not necessary for operation)


We started out with the code from the open source Project Sentry Gun, which is written in Processing, and then went from there.

The Centurion is one of several projects that we work on just for fun when we aren’t working other projects. The whole system isn’t done yet, but we’ve made good progress on it. We are currently working on two new projects for the New York Hall of Science, so we won’t be getting back to this one for a while, but we thought we would share our work-in-progress.

We hacked into the circuit board of the paintball guns in order to load and fire the guns electronically.


We reverse engineered the gun’s circuit board to figure out where we needed to hack into it in order to control the firing sequence.


We built an aluminum enclosure for the electronics and the base of the pan-tilt turret, which is made with Actobotics hardware and servos:


Genevieve wiring up the relay board, which will control the firing of the paintball guns. Is that a gentle smile or a devilish grin? Is she thinking about paint balls flying at anyone in particular?


Genevieve soldering the power distribution board.


Genevieve wiring up the control switches and buttons on the back of the electronics enclosure.


Back view of the Centurion Sentry Gun, including multiple jacks and push buttons:


Front View, including the front port that the camera looks out of. When we are done, the port will be covered in glass.


Side View:


Metalbot – Work-in-Process

Metalbot – Work-in-Process

We’ve been working on a fun new robot we call Metalbot. Our goal was to build an autonomous rover with a unibody design that was machined out of a single block of metal. We started with this 13” x 9” x 1.75” block of 6061 aluminum:


When the machining was done, the robot’s body looked like this. It’s a hollowed-out shell that is about 1/8” thick with holes, slots, and pockets for the motors, LEDs, sensors, and other  electronics.


Once Metalbot was assembled with the internal components, it looked like this:
What do you think? We think it’s pretty cool looking. Do you like it?



Work-in-Process Pics

In this first picture (which was taken through the polycarbonate enclosure), we clamped the part vertically in the vise and we’re using an 1/8″ end mill to machine the detail on the front of the nose. In a previous operation we clamped the stock flat and machined the top of the robot, so that work is already done. Because this part has features on every side, machining it required us to clamp the stock in the vise in 8 different orientations: top, left side, right side, back, front, 45-degree left nose, 45-degree right nose, and bottom.


In this next picture, we’re on the last setup, machining out the large pocket on the underside of the robot. This turned the aluminum block into a 1/8” thick shell. The large pocket appears to be glowing because the ring of LEDs we installed around the mill’s spindle are shining into the coolant that has filled the pocket. We’re using a 25mm (.98”) modular end mill here, which is designed to remove material fast. Of course, there were a lot of metal chips, but it’s important to remember that aluminum is easy and efficient to recycle.


In this picture we’re half way done digging the pocket and we have the machine take a break from the hard work to chamfer the outside contour:


Once the body is machined, we screwed in the wheels, motors, and electronics, which are screwed upside down on the underside, where they are easy to access when the robot is turned over. We will install a bottom plate later.


Then we did the wiring and soldering:


Here is the underside of the robot with most of the electronics installed. We’re using an Arduino Mega and a 4-channel Motor Controller, along with 4 Pololu gear motors to drive the mecanum wheels, which will allow the robot to strafe. The robot is also equipped with 6 Ping ultrasonic sensors for autonomous object detection, a LIPO battery, a main power switch, 6 NeoPixel RGB LEDs to indicate the state of each sensor, an Xbee Radio, and a panning servo (black thing in the middle). The robot will also be equipped with an MP3 module and speaker for sound, but those haven’t been installed yet.


The robot’s finished body is 8” wide and 12” long. The rover can be fitted with either the mecanum wheels shown or CNC-machined conventional wheels (not shown). Our original goal was just to machine a cool looking rover out of a single piece of metal, but as we went along, we decided to add some flexibility into the design for future enhancements in case we wanted to do more with it. The robot has been designed with a central spine of holes and ridges for attaching future add-ons, including a servo mounted in the center, which will support a pan-tilt turret for a camera, gun, or arm. We have designed the pan-tilt turret to utilize the Actobotics ecosystem, but other pan-tilt mechanisms could also be used. There are also holes on the front and rear of the top deck that are compatible with the full range of Actobotics components such as brackets, hubs, and channels, which really adds a lot of flexibility.

The next step is to work on the sensors and software programming. With its mecanum wheels, it should be able strafe like a champ very soon.

Here are a few more pictures of Metalbot so far. Let us know what you think. Do you like the overall design?



Kuala Lumpur Mini Mars Rovers

Kuala Lumpur Mini Mars Rovers

We have just completed and shipped two new Mini Mars Rover exhibits to Petrosains, The Discovery Centre in Kuala Lumpur City Centre.

Although very small in size, these little robots pack some excellent features. They have a simplified, CNC-machined rocker-bogie suspension system, thin film solar panels, LED indicator lights, six small but powerful gear motors, an Arduino Nano microcontroller, front and rear sonars for object avoidance, a voltage sensor for battery charge monitoring, an audible battery alarm, an on-board battery charge jack, an Xbee radio, and a high-resolution infrared camera. They operate via real-time Remote Control and/or autonomously in conjunction with our “Mars Rover Controller” software. These two robots will be used as functional hands-on exhibits at two different locations. The exhibits are scheduled to open in November, 2014. So, the next time you’re in Malaysia, go check it out.






With the top removed, you can see the inside of the robot. We crammed the camera and a sonar sensor at the front. The wifi module (not visible) is attached to the side. The Arduino microcontroller, rear sonar, voltage sensor, motor controller, fuse, battery alarm, xbee radio, two antennas, and power switch are all crammed in the back section. This leaves the center area for a huge 10,400 mAh 7.4V Lithium-Ion battery (black square in center), which will allow the robot to last a long time on one charge.


This is the back of the robot, where you can see the sonar, battery alarm LED, battery alarm speaker, charge jack, main power switch, and fuse.




We would like to thank our contacts in Malaysia for their excellent work on this project so far. They have been very good to work with. We look forward to helping them (from a distance) to get their robots setup and working at their location. We would also like to thank our part suppliers from servocity.com (hardware components), sparkfun.com (electronics), pololu.com (motors), dimensionengineering.com (motor controller), maxbotix.com (sonars), robotshop.com (electronics), all-battery.com, and mcmaster.com (metal and hardware), to name a few.