Using Arduino to Control a Blackmagic Cinema Camera

I looked forever for a first project but I found one that works to my needs and is interesting as well but ive run across a junction as of late.

For some odd reason the Arduino will only power on if the GND is disconnected and reconnected. Really not sure why it is doing that. If anyone has a specific solution to this that would be great but as is I have a few that seem to work its just deciding on which one to use.

Theres the flip switch on the GND so flip off and back on.
Always on button so just hit it and it starts up.
Theres steady on / off with a button I have.

I was also thinking maybe have a dedicated battery or standby battery and using an IC or something switch it so when signal is detected it automatically turns the ground on and off. Not sure about that.

Just wondering if anyone had any options here or could possibly figure out why its doing this. Quite weird thanks!
*** UPDATE ***

Fixed resistor placement and transister wiring

*** UPDATE ***

Also, updated findings, it seems with the resistors corrected the ground no longer is the problem.

Its D11 now, which when the camera is turned on outputs about 0.85v, when unplugged and plugged back in the arduino turns on and outputs 2.36v Not sure if the 0.85V is the problem or what not.

Also when the camera initially starts up and the D11 is plugged in, for some reason it doesnt output 5v it only outputs .25v

Im wondering if theres a problem with the Serial Plug im using for the connection to the camera. Maybe bad connections up top?

*** UPDATE ***

The power coming out of the camera itself is how it should be 2.36 on the signal and 5v on the power. Took readings on the explosed tip of the 2.5mm jack.

Also same readings only sightly reduced by .1v on the out cables to the Arduino.

Strange as well, plugged in D7 first and it started up with just D11 and VIN plugged in, not ground. Once ground was plugged in, the entire Arduino reset.

*** UPDATE ***

Found that when Arduino is hooked up to the board the 2.5mm jack reflects the same voltage values as the pins from the custom board.

*** UPDATE ***

It seems that the D11 input is pulling the power. When its all connected the D11 is .85 when the D11 is removed the arduino starts up normally. Plus it seems when the custom board is unplugged LANC V is .85 and the D11 .25v this switches when it is plugged into the Arduino. I have no idea where to start with this.

Actually nevermind I may have found the problem. Looks like I might have my Transistor flipped on the board v_v.....

I think it is possible to do LANC without external hardware, just by jiggling the data direction registers, and bit banging the serial.

The tutorial im basing this off seems to say there is authorization bits before and after lanc connection, that are needed in order for the camera to accept input bits. Based on that im not sure you can just send bits to it and expect it to perform.

Transistor fixed, resistors were on the wrong cables but the problem still persists.

It can also be fixed by taking the Digital 11 out and putting it back in. hm

Based on that im not sure you can just send bits to it and expect it to perform.

If I understand what your saying then all you have to do is send (bitbang) the right sequence and then send the data/command.

After all where else is this "magic" sequence to be received by your blackmagic cinema camera. It's always about setting the right pins to the right values in the right sequence - it can't be about anything else. If you thing it is then you need to perform a whole brain reset on your self.

Mark

holmes4:

Based on that im not sure you can just send bits to it and expect it to perform.

If I understand what your saying then all you have to do is send (bitbang) the right sequence and then send the data/command.

After all where else is this "magic" sequence to be received by your blackmagic cinema camera. It's always about setting the right pins to the right values in the right sequence - it can't be about anything else. If you thing it is then you need to perform a whole brain reset on your self.

Mark

Oh wait you mean without additional hardware, just the arduino? The arduino reads and writes to the same cable its only a 2.5mm jack. 3 lines GND, 5v Power and LANC input and output commands.

This is the tutorial im generally following. It works fine besides the small startup problem.

Theres a sync process as far as I can tell it needs to sync with the lanc in order to send it with the proper timing that the camera can understand. Not too sure about the specifics. The author of the article above used this article as his reference.

http://micro.arocholl.com/index.php?option=com_content&view=article&id=19:lanc&catid=35:arduino-article&Itemid=53

Im still learning here so a reset probably isnt a bad thing anyways :b

Also, updated findings, it seems with the resistors corrected the ground no longer is the problem.

Its D11 now, which when the camera is turned on outputs about 0.85v, when unplugged and plugged back in the arduino turns on and outputs 2.36v Not sure if the 0.85V is the problem or what not.

Also when the camera initially starts up and the D11 is plugged in, for some reason it doesnt output 5v it only outputs .25v

Im wondering if theres a problem with the Serial Plug im using for the connection to the camera. Maybe bad connections up top?

EDIT 2nd findings.

The power coming out of the camera itself is how it should be 2.36 on the signal and 5v on the power. Took readings on the explosed tip of the 2.5mm jack.

Also same readings only sightly reduced by .1v on the out cables to the Arduino.

Strange as well, plugged in D7 first and it started up with just D11 and VIN plugged in, not ground. Once ground was plugged in, the entire Arduino reset.

AWOL:
I think it is possible to do LANC without external hardware, just by jiggling the data direction registers, and bit banging the serial.

Ok still trying to figure this out. Alright, so instead of using pinMode() use a port register replacement in the code so

From this

#define cmdPin 7
#define lancPin 11
#define recButton 2
int cmdRepeatCount;
int bitDuration = 104;

void setup() {

  pinMode(lancPin, INPUT); //listens to the LANC line
  pinMode(cmdPin, OUTPUT); //writes to the LANC line
  digitalWrite(recButton, HIGH); //turn on an internal pull up resistor
  digitalWrite(cmdPin, LOW); //set LANC line to +5V
  delay(5000); //Wait for camera to power up completly
  bitDuration = bitDuration - 8; //Writing to the digital port takes about 8 microseconds so only 96 microseconds are left till the end of each bit
}

to this

#define recButton 2
int cmdRepeatCount;
int bitDuration = 104;

void setup() {
DDRB = DDRB | B00000000; //sets 11 as output


}

Could you even set the values to data values for quick placement?

such as

char inpin11 = 'B00000000';
char outpin11 = 'B00001000';

Well and id have to change the bitduration as well to compensate since port registration doesnt take 8 microseconds it seems to be much faster if i understand correctly?