Wireless Audio Sync Module

Started by dpjpandone, May 18, 2014, 04:57:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dpjpandone

Hey guys,

I have been experimenting with arduino mini with built in wireless radio like this: http://www.dpvisualmedia.com/home/home-3/anarduino-low-cost-arduino-compatibles-from-usa-292

one of the projects that has been very useful is I made a wireless sync system for all our dslr's and ext. audio. Using the "start record from shutter half press" feature of ML, I press a button on my base unit, and all cameras + audio start simultaneously. There is a few frames of variance (delay) because the delay between triggering through shutter port and recording actually starting varies from take to take. What I would like to inspire is  a module that triggers shutter half-press when the first frame actually starts recording, so that a camera can be used as master and there will be no variance between the master camera and ext sound. I am currently working on encasing the wireless modules inside of one of the battery slots in a battery grip so the whole thing is self-contained and the arduino can draw power from the camera battery or ac adapter.

The biggest advantage would be for 50D users (I am one), since there is no reference sound for plural eyes, it is of the utmost importance that there is a predictable amount of delay (that I can compensate for on my dr-40 audio) This will also be useful for the other models. I plan to have some pcb's fabbed that fit inside of battery grip since I need several, I could offer a kit if anyone else is interested in building the wireless sync system I am using.

So the way it should work is like this: you press "set" to start recording, once the first frame actually starts recording, the camera pulls the halfshutter pin low, the arduino sees this event through digitalRead, and then transmits to the arduino connected to ext sound device, which triggers sound recording. This way, there is a predictable amount of delay (we can calc time for transmission and program this as pre-delay value on our ext sound recorder)

You can put as many transceivers on the network as you like, to trigger all the other cameras via shutter. The range of the RFM-69HW is well over 300meters. It's such a nice system to use for live events where you are using a lot of static cameras. I am also working on wireless video rx/tx (sadly only composite) but I'm testing some low cost transmitters because Ideally I'd like to have a wireless video feed from each camera and trigger each camera from buttons on a small 7" monitor. So I can enjoy most of the concert, and have visual feedback of battery and memory status so I know when to make my rounds.

What do you guys think? Can you help me get as far as a module that pulls halfshutter pin low on record? I already have everything after that working. I plan on getting into development on ML too, but I thought this would be really easy to implement for someone who is already experienced, and I could focus my efforts on the external hardware for now.

dpjpandone

OK! I started writing a blog post to show you guys how to modify the battery grip, complete with pics and arduino code:

http://www.dpvisualmedia.com/home/home-3/wireless-sync-for-dslr-video-conveniently-housed-in-battery-grip-447



I am so pleased with the result! I was thinking of a way to mount this for a while, initially I had the arduino in a small project box that I attached to the hotshoe, but this is so much cleaner, no wires attached to the shutterport, and arduino shares the camera's battery for power. It can be turned on and off with the battery grip switch if you follow my instructions for wiring!

So if anyone can help with the module I described earlier, I will happily send you a pre-modified battery grip for your camera so you can play with it!

dsManning

This is amazing.  Was just looking into picking up an audio recorder for my 50D this week. 

Would love to see that video you mentioned in your blog post.  I'd love a diy project like this.

dpjpandone

I was hoping someone could tell me if this is possible? To set the half-shutter pin to a logic state (LOW) from software? If not, is there some other place I could just send a logic signal out of the camera? preferably not audio since 50D has none...

a1ex

Try the sticky half-shutter feature and let us know if it helps.

If not, the LEDs are the easiest to toggle from software.

dpjpandone

I measured the half-shutter pin with a voltmeter. When I press the halfshutter button on the camera, the halfshutter pin goes from 3.3v to 0v, I was hoping that I would find the same behavior when starting the camera from the "set" button, with sticky-halfshutter enabled I expected to read 0v from halfshutter pin until recording stops and then back up to 3.3v, but it seems that the software is not changing the logic state at the shutter port, only the mechanical switch on the camera's shutter button does this.

So A1ex, can you think of a way to change this behavior, do you think it is possible to pull the physical pin low in software? I don't like the idea of using an LED because the camera will have to be modified. I think most people would be more comfortable hacking into a $30.00 battery grip or remote shutter cable.

if this is not possible, is there a way to ensure a constant delay between when the halfshutter button is pressed, and when the camera starts recording?




dmilligan

You don't have to mod the camera to use the LED, just tape an opto-coupler over it. There's also USB.

dpjpandone

Optocoupler? This is a component used to isolate two systems with two power supplies. I think you mean a photoresistor....

anyways, this would be a very poor solution, it would be unreliable. I would not trust it to trigger my audio, it the tape falls off your audio will get triggered by ambient light in the room. If I have to use LED, I will remove the LED and wire directly to the leads.

I'm still hoping to get it through the shutter port so that the transmitter can stay in the battery grip.

USB is somewhat crippled during RAW capture...

This is not to discount your idea, I appreciate feedback. Please keep it coming.


dmilligan

Quote from: dpjpandone on May 22, 2014, 04:13:38 PM
I think you mean a photoresistor....
Right, you're basically making an optocoupler (not using one), which is just and LED and photoresistor/phototransistor in one package. Sometimes I get them confused, sorry.

Quoteanyways, this would be a very poor solution, it would be unreliable
Disagree, anyway, by using ML to begin with, there's going to be some amount of unreliability. How reliable and bug free is your code going to be that detects when the video starts? Plus, there are all sorts of fall backs you could easily add too, like detecting half shutter press and only triggering after one, or triggering off of a specific timed pattern (that would be unlikely to occur from just ambient light), or automatically starting after some amount of time after a shutter press if no trigger is detected (to make sure your audio starts, in the case of a missed trigger). Worst case scenario is that you have to slightly adjust the audio sync, which is no worse than where you are right now.

Here's something else you might consider that wouldn't even require any hardware differences to your current setup: simply time the difference in ML between the shutter press and when the video actually starts and log it to a file. Then make a script that reads this file and automatically add this offset to your video/audio sync. Boom! now you're in sync, no need to fool with communication between devices.

dpjpandone

Quote from: dmilligan on May 22, 2014, 07:27:17 PM


Here's something else you might consider that wouldn't even require any hardware differences to your current setup: simply time the difference in ML between the shutter press and when the video actually starts and log it to a file. Then make a script that reads this file and automatically add this offset to your video/audio sync. Boom! now you're in sync, no need to fool with communication between devices.

The problem is that the delay between pressing half-shutter and the first frame being captured, varies from take to take. So automation is not possible in the current state. You must manually nudge clips till they line up, each take is off by a few frames, and it's never the same amount of frames. I think it just varies depending on other stuff going on in the background.


dmilligan

I don't think you understand what I meant. You time it every time and use that to fix each clip individually. Perhaps just a script that adds the appropriate number of blank frames to the beginning if each clip

dpjpandone

ohhhh, so within the magic lantern firmware we measure delay between shutter half-press and start of recording, then write that into meta data so along with iso and shutter speed etc. we can also see how long delay was. This is a good idea if it's not possible to pull half-shutter low from ML, however, the audio recorder must be stopped manually, if buffer overrun, or card full, or any scenario where camera recording stops without user input, the ext recorder keeps rolling.  I think just changing logic state of half-shutter during recording is still most elegant solution, as the audio will only record when camera is rolling.

It seems that the "hold half-shutter during record for image stabilization" on 50D is close to what we need, just needs to add a few lines that change half shutter pin to output,low while this is happening. 


dmilligan

Quote from: dpjpandone on May 23, 2014, 07:37:33 PM
if it's not possible to pull half-shutter low from ML, ... just needs to add a few lines that change half shutter pin to output,low while this is happening.
It's probably not possible if sticky half shutter doesn't work. ML does not have low level control of IO pins like you do with an Arduino. ML mostly just calls functions we've found in the Canon firmware. All the hardware and software must be reverse engineered. Perhaps there is some register address that corresponds to this pin and we can write a 0 to it and pull it low, but we have no idea what that address might be (and if a1ex already knew of a way to do it, I would recon he would have told you). Additionally, it might not even be possible to pull it low at all from software.

Quotehowever, the audio recorder must be stopped manually
is that really a big deal?

dpjpandone

Quote from: dmilligan on May 23, 2014, 10:58:35 PM
ML does not have low level control of IO pins like you do with an Arduino. ML mostly just calls functions we've found in the Canon firmware. All the hardware and software must be reverse engineered. Perhaps there is some register address that corresponds to this pin and we can write a 0 to it and pull it low, but we have no idea what that address might be (and if a1ex already knew of a way to do it, I would recon he would have told you).

Thank You for explaining this to me. I had a feeling this may be the case. I appreciate the feedback, and the ideas you shared. I think we can close this thread now. Is it ok if I start a new thread about the wireless battery grips somewhere else on the forum when I make a DIY video? Or should I change the title of this thread and ask a moderator to move it to a different section of the forum?

Audionut


eduperez

I would guess that the shutter switch at the battery grip is connected in parallel with the shutter switch at the camera; then, that voltage drop you are measuring is probably just the input pin going down, and the only method to make it go down is to physically actuate on the shutter switch. I do not see any reason for Canon to implement an output pin there.