measuring fast flash durations with 3.3V

Status
Not open for further replies.

AlainD

Well-known member
Hi

I want to measure (photo)flash durations. I know my way around software (also read most fast logging threads here) , but my hardware knowledge is very very little.
I have a question how to adapt a circuit from 5V to 3.3V :
http://www.vela.io/posts/how-fast-is-your-flash/

I would only use the right hand side of the schematic and would like to log at about 200K/s. The D7 would be a analog input port on the Teensy.

Is it Ok to just change the supply at right to 3.3V?

Is it useful to add a buffer capacitor on the measuring side (between "D7" and ground) and if yes, what value is suggested?

I also read that a BPX65 photodiode is used instead of a SFH 203, any useful difference? I didn't see one inside the datasheets.

I would like to assemble it on a breadboard with a Teensy 3.6.
 
I've been working on a similar issue measuring pulse width and delays. This is the scheme I'm currently using in connection with the Flex Timer to count the ticks. It gives either 100nS or 1uS resolution +/- a count or two. The comparitors set the threshold for the time to be measured. The ckt must be 'armed' before the event happens, started by trigger and stopped by out. The muxes switch between several of these timer units and share the same FTM on the teensy. There are also commercially available chips that use gated current ramps where the time is proportional to the end voltage on a capacitor.

View attachment Teensy_timer.pdf
 
Should be fine to connect the 1K and 15K resistors to 3.3V instead of 5V.

But what really matters here is using the analog comparator. Teensy 3.6 has several of these, but you'll need to connect to specific pins and use some direct register access to enable them.

The voltage on R2 (50 ohms) will normally be very close to zero volts. During a bright flash, it will rise to a small voltage. That's why R3 & R4 create a low voltage for the other side of the comparator. The analog comparator is needed to turn this tiny analog voltage into a proper signal the microcontroller can use.

To *really* do this well, you would use the analog comparator output to trigger the FTM timer input capture. Then you could set the FTM timer up to count at 60 MHz, for a measurement of the pulse to 16.7 ns resolution. Look at SIM_SOPT4 bits 18-19 or 20-21 on page 242 of the K66 reference manual for how to route the comparator output within the chip to the FTM timer input capture.

The timer input capture uses hardware to directly capture the rapid 60 MHz count value at the instant the signal changes, which avoids software overhead and variable latency due to interrupts and internal bus arbitration. It is by far the very best way. But fiddling with timers is needed...
 
Last edited:
I clearly was a bit unclear, but I also want to measure the brightness and would like to do that at 200K/s or every 5us (1000x slower than the photodiode)

Would simple ADC setup gine 8 or 7 bit precision with the small Voltage?
Teensy can do that, but you need an external amplifier. This thread is quite relevant:
https://forum.pjrc.com/threads/4400...ith-Teensy-3-2?p=143330&viewfull=1#post143330

One of those diodes with built-in pre-amp that were mentioned would probably work for you.
 
Last edited:
A probably very naive question from me: Is using multiple photodiode an alternative to an amplifier? (serial placement, I expect no benefit from a parallel placement)
 
A probably very naive question from me: Is using multiple photodiode an alternative to an amplifier?
I doubt it (but I'm just guessing at your light levels - maybe, if you are using a really large diode, fire the flash directly at the diode and the wind is blowing exactly right...). You are trying to measure extremely tiny currents in the uA range. Keep in mind, the flash pulse will look different at different flash power levels.

I have experimented with a solar cell (not much different from a photocell, but much larger - 1000mm2) and even with using the Teensy 3.2 PGA, results were pretty bad.

Low power level flashes are quite fast, you need quite a bit of measurement bandwidth. With high speed sync, the flash is actually pulsed at low power levels. Your 200kHz sampling rate sounds quite low, e.g. with a low power flash pulse that lasts 50us, you would have 10 samples.

You will want to run in photoconductive mode and use a fast, high quality op amp. Building an amp is not that difficult, it's just a handful of parts. If you do a search, you will find lots of info...

I would use a larger diode than your 1mm2 model, e.g. the BPW34 mentioned in the other thread (7mm2).

LED driven with 20kHz PWM square wave, 3000lux brightness, measured with Teensy 3.2 and solar cell (750kHz capture):
solar_pga.PNG
 
I doubt it (but I'm just guessing at your light levels - maybe, if you are using a really large diode, fire the flash directly at the diode and the wind is blowing exactly right...). You are trying to measure extremely tiny currents in the uA range. Keep in mind, the flash pulse will look different at different flash power levels.

I have experimented with a solar cell (not much different from a photocell, but much larger - 1000mm2) and even with using the Teensy 3.2 PGA, results were pretty bad.

Low power level flashes are quite fast, you need quite a bit of measurement bandwidth. With high speed sync, the flash is actually pulsed at low power levels. Your 200kHz sampling rate sounds quite low, e.g. with a low power flash pulse that lasts 50us, you would have 10 samples.

You will want to run in photoconductive mode and use a fast, high quality op amp. Building an amp is not that difficult, it's just a handful of parts. If you do a search, you will find lots of info...

I would use a larger diode than your 1mm2 model, e.g. the BPW34 mentioned in the other thread (7mm2).

LED driven with 20kHz PWM square wave, 3000lux brightness, measured with Teensy 3.2 and solar cell (750kHz capture):
View attachment 10644

Thanks, I won't measure HSS operation, but more from 1/250 second to 1/5000 second. (and the delay from trigger to start off the flash -with multiple flashes-.
I also can place the flashes close (50 cm or less).

The BPW34 is a good tip and it's cheap enough that I can use multiple ones at the same time.
 
Status
Not open for further replies.
Back
Top