5. Hardware
Pieter PTable of Contents list
Motorized fader
I used an ALPS Alpine 100mm, 10kΩ motorized fader, part number RSA0N11M9A0K. These are not cheap, I paid around €30 for it. The knob I used is a chromed FK13x25 by albs. Although I cannot seem find the exact part number on https://www.albs.de/schieb1.htm, I think this is the part I ordered. It is important to use a knob with a metal finish, it needs to be conductive for the touch sensitivity to work.
I used a 100nF capacitor to filter some of the noise on the potentiometer.
Motor driver
I used an L293D double H-bridge. It is an absolutely terrible motor driver by today's standards, with bipolar output transistors and a voltage drop of up to 3.6V. While there are much better drivers available, this one is cheap, popular, easy to use, and good enough to drive the small motor of the fader. It includes flyback diodes on the outputs, so you don't have to provide those externally.
If you want something a bit more modern, you could look at the TB6612FNG, for example.
Power supply
The motor I used is rated for 10V. I used a 10V supply rated for 1A, which results in about 8V across the motor (taking into account the voltage drop of the L293). In my experiments, the motor used around 100mA during normal tracking, and up to 350mA when stalling the motor on purpose. According to the spec sheet, they can draw up to 800mA each at 10V, so you have to take this into account when selecting a power supply.
Capacitive touch sensing
You just need an external pull-up resistor of around 500kΩ to 1MΩ. The exact value isn't critical, but it should be high enough to be able to measure the small capacitance of the touch sensitive knob.
Connections
// -------------------------------- Hardware -------------------------------- //
// Fader 0:
// - A0: wiper of the potentiometer (ADC0)
// - D8: touch pin of the knob (PB0)
// - D2: input 1A of L293D dual H-bridge 1 (PD2)
// - D3: input 2A of L293D dual H-bridge 1 (OC2B)
//
// Fader 1:
// - A1: wiper of the potentiometer (ADC1)
// - D9: touch pin of the knob (PB1)
// - D7: input 3A of L293D dual H-bridge 1 (PD7)
// - D11: input 4A of L293D dual H-bridge 1 (OC2A)
//
// Fader 2:
// - A2: wiper of the potentiometer (ADC2)
// - D10: touch pin of the knob (PB2)
// - D4: input 1A of L293D dual H-bridge 2 (PD4)
// - D5: input 2A of L293D dual H-bridge 2 (OC0B)
//
// Fader 3:
// - A3: wiper of the potentiometer (ADC3)
// - D12: touch pin of the knob (PB4)
// - D13: input 3A of L293D dual H-bridge 2 (PB5)
// - D6: input 4A of L293D dual H-bridge 2 (OC0A)
//
// If fader 1 is unused:
// - D13: LED or scope as overrun indicator (PB5)
//
// For communication:
// - D0: UART TX (TXD)
// - D1: UART RX (RXD)
// - A4: I²C data (SDA)
// - A5: I²C clock (SCL)
//
// Connect the outer connections of the potentiometers to ground and Vcc, it's
// recommended to add a 100 nF capacitor between each wiper and ground.
// Connect the 1,2EN and 3,4EN enable pins of the L293D chips to Vcc.
// Connect a 500kΩ pull-up resistor between each touch pin and Vcc.
// On an Arduino Nano, you can set an option to use pins A6/A7 instead of A2/A3.
// Note that D13 is often pulsed by the bootloader, which might cause the fader
// to move when resetting the Arduino. You can either disable this behavior in
// the bootloader, or use a different pin (e.g. A2 or A3 on an Arduino Nano).
// The overrun indicator is only enabled if the number of faders is less than 4,
// because it conflicts with the motor driver pin of Fader 1. You can choose a
// different pin instead.