jueves, 6 de enero de 2011

High speed flash (part 2)

Continued from Part I.

I thought that with light I could anticipate the moment of impact and take the picture in time. I went to the Don Electrón store again, where I had bought the relay and the microphone, and I explained to Juan (the shopkeeper) what I wanted to do. "I need it to be fast" -I said. He's a really nice guy, always giving advice and great explanations to his customers (almost any college student from my university that has ever had to build an electronic circuit knows him).
He just said "you need an LDR". After showing me how an LDR works (he took out a meter and a battery), he drew a little circuit for me and told me that it was probably the fastest circuit I could build.
I first tried building it with only one resistor, because I thought I didn't need the second one, but that didn't work, so I built the circuit the way the guy told me. I played with the resistors to make the LDR sensitive enough to see my laser, but not be bothered by ambient light.
It sure was the fastest circuit I could build, but it was too fast for the relay! Holding my hand to block the laser would trigger the relay (and the flash), but waving fast it didn't do anything. I needed 5V delivered to the relay for at least 0.5 milliseconds, and stay there enough time so that the flash reacts. So anything that interrupted the laser under 1 or 2 ms didn't do anything.

I had in mind putting a PIC processor in the circuit later, to insert programmable delays, but I thought I could also use it to detect the LDR output. I set my PIC to detect really small voltage changes in analog mode (again, digital didn't do anything, since I wasn't generating a real complete pulse).

Click on the above diagram to see it bigger. I found the hotshoe diagram here. Below is a simple code for the PIC to get this thing to work:


By the way, I found how to display code in this blog here.

Continue reading in part 3.

No hay comentarios:

Publicar un comentario