Plenty of solutions have been proposed and a number of circuits were published in the electronics monthly 'Elektor' but frankly, generally these proved not to work or at least cause problems with a lot of people trying to build them.
I managed to build a working unit with a minimum of parts that I have build several times and they all work, so it is certainly 'reproducable'. The picture shows two finished units: one with a fototransistor and one with a fotodiode
One thing though. The circuit I am proposing is for a camera with 1 preflash. Also, it is not an original circuit. I first found something like it on foto website Flickr that had a working version and a non working version and after some digging i came on a russian website (!) that gave me a lot of useful information as well.
The circuit is pretty sensitive: I got it to react inside with a distance of 5 meters and an indirect flash
Let's start with the Bill of materials:
Phototransistor (e.g. BPW 40) or photodiode (e.g. BP104)
CD4001 quadruple NANDgate
R 220k 3x
R 120 K
R 620 k
R 27 k
R 10 k
C 1uF (elco)
C 10uF (elco)
perfboard (18x12 holes) (I did build one on a 9x10 holes but you dont want to torture yourself)
9V battery clip
14 pin IC foot
small bridge rectifier
switch 1 x make
switch 1x switch
The circuit is pretty straightforward: The photo transistor/-diode picks up a pulse that gets filtered and amplified in the circuit around the BC547.
I will not go into detail in the exact signals on the various nandgates but what happens is that the first pulse of the flash opens the nandgates for about 100ms, waiting for a second puls if that comes the final nand gate becomes high, opening the Thyristor T3.
T3 can be used to directly trigger a flash, if you are sure about the polarity (most likely the center pin is the positive and should go to the anode) but one could add 4 diodes or a small bridge rectifier (make that a couple of 100 Volt unless you are sure about the voltage on the flash shoe) to make the polarity unimportant.
If you are using a photodiode make sure the kathode is connected to the '+' and the anode is connected to the junction of R1 and C6, as is shown in the second figure.
If you are pretty sure about what the + and the - of your sync jack are, then you can leave out the bridge diodes as in figure 3
If you want to feed the circuit from your flash rather than from a battery, figure 4 is for you. Realise though that not all flashes will work with that so if you are building it, I suggest you wait with soldering the 4M7 in place and test the circuit first with a battery, so if things dont work you will know it is the circuit and not your flash having a bad reaction.