Closed pyr0ball closed 5 years ago
Original resistor ladder functionality has been verified working. Possibly will still move to pwm/dac for more grainular control
Possible code for 10-bit pwm DAC: https://www.avdweb.nl/arduino/adc-dac/fast-pwm-dac
After testing, no need for 10-bit, analog write works just fine with proper filtering.
Testing (experimentation) shows best frequency response and smoothing (+7mV / -12mV) is achieved with:
10k resistor 3.3uF + 10uF SMD ceramic capacitors
Auto-Adjust reconfiguration can be enhanced using these topologies:
Implementation fixed in https://github.com/pyr0ball/pyr0piezo/commit/2297f152071bde9b9c72eb6032e626e3b168ec5c
Current code for adjusting the comparator stage voltage reference is broken. Need to rework the code for adjusting the resistor ladder, or switch to using PWM + LPF