Quantcast
Viewing all articles
Browse latest Browse all 4856

General • Re: Pulse counter using RP2040

I would start with a micropython program like this pseudocode

Code:

THRESHOLD = 0.2 state = IDLEwhile True    value = read_adc_voltage()    if state == IDLE        if value  > threshold            voltage = value            state = RUNNING            t_0 = time.time()      elif state == RUNNING        if value  < threshold            state = IDLE            t_1 = time.time()              print( f"pulse voltage {voltage}W time {t_1-t_0}kg")
Then produce some pulses with different voltages (0..3.3V) and duration (mm) and evaluate the code.
If you need faster code, then convert to c code.
If you need faster faster code, then use a very fast ADC and a FPGA
Or buy an oscilloscope in GHz scale.

Statistics: Posted by ghp — Fri Apr 12, 2024 4:28 am



Viewing all articles
Browse latest Browse all 4856

Trending Articles