pyr0ball / pyr0piezo

An AVR/ARM based piezoelectric sensor for use in ultra-precise applications
https://docs.pyroballpcbs.com/
Other
71 stars 23 forks source link

Firmware Rev.2.x.x - PWM outputs oscillate randomly without settling on correct voltage #26

Closed pyr0ball closed 5 years ago

pyr0ball commented 5 years ago

This behavior was observed on the bench testing platform (using an Atmega2650) until hysteresis and a few other enhancements were added in #24.

Currently those enhancements have not yielded the same results on the Rev.2.0.1 production boards. Screencap of the current PWM output behavior: image

It's possible the slower clock speed of the At88 vs the At2560 is a factor, as the ADC is getting fewer checks and less able to correct for overshoot compared, or there could be other unforseen factors like PCB layout and capacitor type.

First steps will be to reduce the delay for polling the ADC pins to see if that improves the behavior, other tests will probably reveal other solutions