|Jan Koppe 515af22c88 basic readme||1 year ago|
|firmware||1 year ago|
|hardware||1 year ago|
|README.md||1 year ago|
This repository holds a KiCAD design and the firmware that can control an ALPS motorized fader. The controller can communicate over I²C and report the current fader position, as well as accept a new target and move the fader to that target with a PID controlled h-bridge driver for the motor.
The controller that is being used is the
ATtiny 24, but switching to an
ATtiny 44 might be necessary in the future for more ROM and RAM (the firmware
is hitting these limits already).
Fader position is read out via the µC ADC using 10-bit resolution. The values
are pushed through a very simple digital low pass filter that will average the
last n samples (using the
ATtiny24 the buffer holds 32 samples).
The controller can report the fader position with that 10-bit resolution over I²C.
The controller can steer the motor via an
L9110S h-bridge driver. To give a
range of speeds the internal 8-bit timer is used to generate a PWM signal with
varying duty cycle.
To keep the fader from oscillating because of the mechanical lag, a simple PI(D)-controller is used. The derivative component is computationally intensive and probably not of much value in this scenario, so it was left out.