So it might not be obvious why one might want to do such a thing – but it could come in useful. I have a Yongnuo YN560 “manual” flash (no TTL metering, so one had to set the flash power and focal length on the lens itself) which I wanted to control manually to generate multiple flashes – which could come in handy for strobe photography. I chose to use the Arduino, since I’m well familiar with it.
As this is a modern flash, the voltage on the hotshoe pin is about 3.0-3.3v with respect to the shoe itself which is ground. On older flashes, vintage ones especially, the voltage on the hotshoe pin can be hundreds of volts – be very careful. Once this pin is grounded, the flash fires. Simple.
The Yongnuo came with a stand, however, accessing the hotshoe terminal proved to be a bit of a pain. So came the Prontor-Compur port (PC Sync) on the side, which basically had the same characteristic as the hot shoe, but is accessible when the flash is mounted in its stand.
Someone who would do this properly would get a nice PC port plug and do some isolation of the flash signals from the Arduino – but I went cheap and nasty. I used a snippet of code like so (where x is the pin number that’s connected to the hotshoe pin):
pinMode(x,INPUT); digitalWrite(x,LOW); pinMode(x,OUTPUT); pinMode(x,INPUT);
Also noting that in setup(), I would have had at least pinMode(x,INPUT);
This is important – as this flash only puts out ~3.3v logic high, and expects it to be grounded (either current or voltage triggered). Applying a 5v logic high to the pin might hurt the flash! One could use some zener protection, a level-shifter or a MOSFET to try and isolate the logic output from the Arduino to the logic of the flash unit.
But lazy me decided to take another approach. By setting the pinMode to INPUT, this causes it to go Hi-Z, allowing the flash to pull the hotshoe pin up to 3-3.3v. Then I choose to write a LOW, and then toggle the pinMode which causes the hotshoe pin to briefly transition to ground, then back to Hi-Z – firing the flash. As long as the grounds were common, and we took some care – this arrangement shouldn’t hurt anything.
Indeed it didn’t. Using my spare DFRobot Arduino Mega 1280 clone, and some crappy solid core wire, contorted to fit loosely into the PC Sync port – we got it to fire.
A bit more code later – I had a program which could fire of x repetitions of flashes at y millisecond intervals – with the figures provided by a Bluetooth Serial Module (hence, I could type in the settings from a phone/tablet wirelessly). I’ll leave the coding to you guys though – there’s a joy to coding (as opposed to being given the solutions) which I think people should do.
One thing to note was that the YN-560 can only flash at 200ms intervals (5Hz) at powers 4/10ths or less. It won’t go faster than that. Above that, it will flash erratically if commanded to flash at 5Hz as it fails to recharge in time for the next flash, causing “missed flashes”. At full power, you will very quickly run into the overheat protection – locking out the flash entirely for a minute or two.