I need to build a pcb for backlighting a panel. The PCB will have about forty surface mounted LEDs. The LEDs must be dimmable, but they will all be one color and not individually controlled. One Leonardo would need to control about three of the backlighting PCBs , along with several switches and/or pots to interface with a flight simulator.
I want to power the backlighting PCBs with an external power source, but control the lighting with a PWM pin from the Leonardo. I understand how to build the LED circuit, but I have no idea how to effectively control it with the Arduino.
Yes , I’d agree with that . If you use an analog ( PWM) output to drive the FET , the the value you send to that analog output will vary the brightness .
I’d suggest googling FET as a switch plus start with the example in the IDE for analog output .