Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Thank you @Edgar Bonet very much for the sample program and the suggestion. Will switch over to the AVR (currently using nRF52) and test it with your method. I am having a go at Dorian's recommendation on cleaning up the input signal to the OP AMP first that is better adopted to the current doppler sensor vs the single-shot inductive sensor I used it with previously. Commented Apr 4, 2021 at 9:17
  • I tested the code and worked as you posted it @Edgar Bonet (except overflowing over 65535 in my case) but could not get the readings to correlate. I spent a considerable time massaging the OP AMP signal by rearranging the resistors on both inputs, but I am constrained by the previous soldered PCB setup that was for the other sensor type. I need to setup a new clean OP AMP breadboard from scratch, along with a comparator example as also suggested by Dorian. Will report back. Commented Apr 6, 2021 at 2:32
  • @TommyS: The overflow of the timer is not an issue, as long as the burst fits in 16 bits, i.e. is shorter than 4.096 ms. For longer bursts, you can set the timer prescaler to 8, which will increase the max burst duration to 32.768 ms, at the cost of degraded resolution. Alternatively, you can count the overflows in TIMER1_OVF_vect, but then it is tricky to avoid a race condition when the overflow fires very close to the capture. Commented Apr 6, 2021 at 7:05
  • Updated status and identified most likely problem and work-around solution, Will open new Question on best path forward in squaring a sine wave. Commented May 27, 2021 at 14:52