Controlling an ‘Alpha’ Series Sony Camera through PWM

Controlling an ‘Alpha’ Series Sony Camera through PWM

After owning my DJI for a while I bought a Tarot T810 Hexcopter. Prop to Prop is 810mm making it massive compared to the little DJI. I purchased it as a base for a Sony NEX 5 I already owned. The Sensor in the Nex is much larger than the DJI giving much better photos.

There is an ‘off the shelf’ solution for controlling the NEX 5 which plugs into the MINI HDMI port to provide power and convert to analog AV video. It also has an IR Blaster to trigger the camera to take a photo/video.

After a while I wanted to experiment with zoom and had my eyes on a Sony Alpha A5000 with power zoom lens. I received the camera and realised to my horror that there are few products that do as I wanted and they were all £80+.

I had 2 Problems:

1)I needed HDMI out, the camera had a micro port not mini.

2) Needed to control the camera but no IR remote or receiver built in.

The first problem was solved using a Micro to mini HDMI Adapter. Very Hard to find and had to wait for it 20 days from China. and then using the same style small converter I used on the NEX.

The second was more challenging. Sony updated there protocol for remote use just before building the Alpha series and as such old wired remotes wouldn’t work. Also came the problem that the remote uses and micro USB style plug but there are extra pins deeper that give the trigger commands.

After Lots of research I found an accessory that would trigger the camera to:

Take A Photo

Take A Video

Zoom!

And trigger Focus.

The adapter was bought off ebay for £20 and tested. All Plugged in ok and worked as expecting, good start! An ‘RM-VPR1’

Next was controlling the physical remote through the RC of the drone. The TX and RX of the controller I was Using (Fs-i6s) used A RC Protocol called s-bus. A digital signal that transmits all 10 channels on a single cable. this feeds from the RX to the flightcontroller and through a Y adapter to the gimbal.

The gimbal (alexmos 32bit) has an on board decoder that converts from S-Bus to PWM on upto 3 channels. I decided to use a arduino nano to read the rc input and trigger the buttons on the remote. Mostly because I had one laying around.

Not being experienced with programming I wanted something easy that wold get the job done, no frills just what is needed.

Arduino has lots of libraries for PWM Input and Output but not alot of Information on decoding S-Bus. This lead me to choosing to have the sbus go into the gimbal controller and out as PWM. The PWM feeds into the Arduino and from there triggers the buttons.

Wiring is quite simple, the arduino needs 5v and GND, and the single feed from each PWM Channel (2 of them). However the wiring gets harder when you need to connect to the RM-VPR1. Lots of fiddly wiring that isn’t a good start if you’ve never soldered before.

Follow the pictures for wiring. I used a Standard 0.1″ pitch header to make it detachable. This is where you will need to note which pin goes where and change the pin assignments in the code.

 

Remember to connect all your grounds together. You will get problems if you dont.

 

Continue reading “Controlling an ‘Alpha’ Series Sony Camera through PWM”