This is an effort to create a lamp which consists of many different lights. Each light is either on or off and this is controlled by turning a potentiometer. The analog signal is converted to a number of output pins pulled high.
For this project I want to have created a lamp. This lamp consists of many different lights, between 8 and 32 (estimate). This lamp will be attached to the ceiling and the lights dangle down from cords of varying lengths, from 20 cm to 200 cm (estimate). The individual lights are LEDs. At the moment I’m looking at 2W 12V G4 fitting LEDs.
The lights will be either on or off. This is to be controlled with a dimmer switch. In my mind this is a simple hand twisted potentiometer. Twisting the potmeter all the way to the left turns off every light. Turning it to the right lights up an increasing number of lights until all lights are lit.
I’ve been exploring a solution involving an Arduino (or similar) in combination with one or more shift registers (for example https://www.arduino.cc/en/Tutorial/ShiftOut) and a MOSFET or transistor (for example https://itp.nyu.edu/physcomp/labs/motors-and-transistors/using-a-transistor-to-control-high-current-loads-with-an-arduino/) for each light. On an analog pin the potentiometer is read and it’s value mapped (https://www.arduino.cc/en/Reference/Map) to an array index containing the byte/int value to be send to the shift registers.
I’m confident I can make the code to work, I’m less so on the circuit itself.