2019-02-26 12:43 AM
i have light detection sensor circuit , it will give 1v output and 10 microsecond time period signal.
this sensor gives voltage and time period varying depends on light intensity.
i wan to measure the amplitude and time period of the output signal using STM32F303K8.
sample image attached - red color spikes.
2019-02-26 07:33 AM
If the light sensor is commercially available, please provide a part number so we can more fully understand amplitude and time period significance.
Time period is measurable with a comparator feeding a timer input capture. Amplitude is measurable with an ADC channel at high speed. But, depending on the significance of the amplitude and period, some filter on the signal may result in a more manageable measure technique.
Cheers, Hal
2019-02-26 07:45 AM
You'll probably want your circuit to also create a 3V compatible signal you can feed into a TIM running at several MHz to time stamp with a useful resolution.
A 10us period is invariable, what specific range does your signal vary between, and what precision do you need to measure that with?
2019-02-26 07:48 AM
1V may not be detectable by GPIO, or at least Vdd dependent. You could use ADC injected channel with watchdog, possibly with ADC data cyclically filling a ram buffer. The time granularity will be the adc max sampling frequency, a few.MHz at best. Otherwise, shape the incoming signal with opamp and use comparator.