Sony alpha/nex wireless control with arduino

  • Thread starter Thread starter Alfonso B
  • Start date Start date
  • Replies Replies 0
  • Views Views 3K

Alfonso B

Established
Local time
8:13 PM
Joined
Mar 18, 2016
Messages
71
Recently I bought a Sony a57 with a stuck shut shutter. Turns out it had a small locking screw wedged in the mecanism, likely from a lens as the camera had none of such style screws. I am going to use it for video and timelapses, while both of these features are lacking in Sony's own wireless remotes.

So in comes the Arduino. I had almost all the hardware needed laying around so it was a logical choice. I used the Arduino-IRemote library to simplify the coding involved. You can download it here: https://github.com/z3t0/Arduino-IRremote

It has a function that's called irsend.sendsony that handles all the bureaucracy involved with Sony wireless infrared standard. The problem was that you can only input the ir data in a hexadecimal form and I could only find Nex button codes in raw data that was very corrupted, or some universal remote standards that were distantly related to raw standard. In this application, they both suck big time.

So I had to spend the whole weekend learning about infrared systems and converting that awful raw data into binary by hand and then to hex format to make programming these functions in Arduino very simple to me and hopefully others as well. Here are the codes in hex form, 20 bit:

Shutter: 0xb4b8f
(Alternative shutter: 0x00b8f)
Shutter, 2s. delay: 0xecb8f
(Alt. Shutter, 2s. delay: 0x36b8f)
Video on/off: 0x12b8f

+: 0x52b8f
-: 0xd2b8f
Disp: 0x28b8f
Hist: 0xd8b8f
Play: 0x3cb8f
Flag: 0x04b8f
Fn: 0x4cb8f
Print: 0x88b8f
Play2: 0xe2b8f
Menu: 0x1cb8f
Bin: 0xbcb8f

Left: 0x5cb8f
Up: 0x7cb8f
Down: 0xfcb8f
Right: 0xdcb8f
Enter: 0x9cb8f

If you are wondering why they all start and end the same, the end part is a device specific thingy so you don't fire your stereo system's shutter, and the 0x in the beginning is basically because computers are pretty stupid and would fail without it.

And here's an example timelapse program. This can be sent to Arduino as is, and will fire the shutter every 5 seconds. You need to have the library installed on your computer for this to work, and an infrared led in series with ~100 ohm resistor wired between digital pin 3 and ground. This kind of led can be stolen from any old remote control.





#include <IRremote.h>
IRsend irsend;
void setup()
{
}
void loop() {
for (int i=0; i < 3; i++){
irsend.sendSony(0xb4b8f, 20);
delay(40);
}
delay(5000);
}





My hardware will be on/off switch, a potentiometer to set timelapse interwall, a ir led to send the signal, a normal led to tell when the shutter is firing and 3 pushbuttons (movie on/off, timelapse on/off, shutter). It will have internal LiPo batteries and usb recharge capability to be a truely usable device. If I ever get it fully functional, I'll post the whole program and scematic.
 
Back
Top Bottom