Go Down

Topic: Lidar signal processor using Adafruit's M4 products (Read 937 times) previous topic - next topic


Hey folks!

I am very green to programming.  My experience is in optics - I've worked in the lidar industry for over a decade and looking to experiment with something.  I'm looking for an amendment to the current data acquisition, and I'm hoping the M4 based products from Adafruit might fit the bill.

Assume a lidar has a laser that pulses at 2.5kHz.  I wish to "cut" up the 400uS following the initial pulse (until the next pulse) into 500ns wide "bins", and perform a frequency count within each bin, returning a value of counts/bin.

The optical detector responsible for receiving the reflected signal is sending out a steam of pulses.  Each detector is a bit different, but the output pulses are TTL ~8ns in pulse width, and have a "dead time" between pulses of ~25ns.

I wish to use this signal to select a given bin range (say.... bins 70-80) and inspect the count rate within that selection, tweaking settings within the lidar to maximize the signal within that range.  I care more about maximizing the signal than the actual value of the signal itself, and I don't need to keep track of all the counts within all of the bins - only those of interest to me.  This would be something done initially one time and not continuous.  I would use the 2.5kHz as my clock and base time=0 from the rising edge of that signal.

I see that the "Adafruit Metro M4 feat. Microchip ATSAMD51" has a 120MHz processor, which corresponds to a period of 8.3ns.  Maybe if I sampled for enough time I could catch some of these 8ns pulses?

And no, before you ask, I don't have access to integrate with the existing signal processing.  This needs to be a standalone product.

If anyone is willing to provide some input I would be very appreciative!  Beers are on me if I can get this thing humming along!

Thanks !!!!!


Hi imsebastian,

Your project requirements would push the SAMD51 to its limit with absolutely no guarantee of success.

It's possible to run the SAMD51's timers up to 200MHz with a 5ns tick and remain within the processor specification, but this requires reconfiguring the SAMD51's second digital phase locked loop DPLL1 (currently at 100MHz) to run at this higher frequency. This 5ns timer tick creates an interval that neatly fits with your 500ns bins.

At the moment the only way I can see to implement your requirement, is to use the external interrupts to read in the pulses from your optical detectors and relay these signals to timers via the SAMD51's event system. The event system on the SAMD51 is a peripheral-to-peripheral highway that allows them to communicate without any CPU intervention. I imagine you'll need two timers, one configured to count the incoming pulses every 33ns (8ns pulse + 25ns dead time), the other to time the 500ns sample intervals.

The next issue is actually reading the results, which is probably best achieved using a Direct Memory Access (DMA) controller. The DMA can be used to read the counting timer's COUNT register and move the result to memory each time the sample interval timer overflows every 500ns. At these speeds calling an Interrupt Service Routine (ISR) would be far too slow.

My main concern would be, whether the event system can operate fast enough to read in 8ns pulses at 33ns intervals.

Go Up