I've got an ideal for an arduino project, but I'm trying not to let the smoke out of my camera, which cost more then the arduino. I've got 5 lines, 1 ground, and I was wondering how I can hook it up to the camera connector and "sniff" the traffic between the camera and flash. I've read elsewhere about using a diode and a transistor to electrically isolate the two circuits. They just didn't go into to much details on that. Can I do something like that for my circuit?
If your camera is 5V then you can connect it directly to the arduino's input pins. If not then put a transistor from input (collector) to ground (emitter) on the arduino and enable the internal pull up resistors (digital write to the pin HIGH).
Then put a 1K resistor from the base of the transistor to the camera signal and connect the ground to the arduino ground.
Ok, the ebay oscilloscope showed up so I've been learning it. I found the clk pin on my flash. It looks like the clk is high for 2.5 us, then low for 2.5 us, then it goes idle and starts up again. It looks like its one byte at a time. The voltage is below 5 v, but the low is like 2v, high is a tad under 4v. So I guess I have to use a comparator for that? Do I just need the comparator, or do I have to get anything else to get the arduino working at that speed? Or is that speed a piece of cake for the arduino?
A clock time of 5uS is 200KHz which is just about OK. Don't forget to common the grounds when using the comparator.
You could use a transistor with a potential divider on the base, make the resistors such that in the low state there is about 0.5V on the base. This is not enough to turn it on but when it goes high then it is above the 0.7V required to turn it on.
Are you using Canon Ex flashe? Here are some articles I have found hacking the connection.
http://photo.net/bboard/q-and-a-fetch-msg?topic_id=23&msg_id=004NYZ
http://eosdoc.com/manuals/?q=EX-M-TTL

http://kzar.net/wiki/Photo/CanonE-TTLProtocol
I found those two, and a strobist open source trigger. The open source trigger doesn't support e-ttl, so that was that issue with me.
It looks like the other links had slower clock rates, in the 100 khz all the way down to 50 khz. Since the clock is handled by the camera I can see it getting faster with the newer cameras.
Grumpy_Mike, what did you mean by "just about ok", do you think I might be on the border line for just using an arduino? I've read about the interrupts on the arduino, I would like to use those for the byte transfer, but with the speed I might have to use those direct port calls.
Oh and yes this is for the canon ex flash, I'm testing against a rebel t1i and a 430ex II.
Ok, I got everything hooked up and broke into the TTL cable. I'm using D2 for my clock coming off the camera, and D4 for the data feed coming off the camera.
From this site http://kzar.net/wiki/Photo/CanonE-TTLProtocol,
my data is looking right, but backwards. Instead of B7, I have 7B. Below is the code I'm using
while (byteCount<8) {
while( (PIND & 4) == 0 ){ //while at ground
}
//data is grabed on rising edge
//the pin for our data is d4
//shift all bits right, then tack our bit at the start
cmd = (cmd>>1);
if (PIND & 16 ) {
cmd = cmd | 128; //add our bit at the start if we are high on rising clock edge
}
while( PIND & 4 ){
}
byteCount++;
}
Serial.println(cmd,HEX);
So does anyone see anything wrong with this code?
I also had to turn on the internal pull up resistors since my LM339 didn't give me enough of a voltage bump between signals.