Trying to figure out if it is possible to have the dimmer wire from an aftermarket radio in my vehicle trigger a preset brightness when I turn my headlights on. I am trying to make this an automated function and would prefer to not use a physical switch or potentiometer. I am using GLEDOPTO GL-C-015WL WLED ESP32 controller.
Conceptually, you should be able to connect the “Dimmer Wire” signal to a GPIO and fire a preset.
Bunch of possible issues:
-
The “dimmer wire” signal may not be a simple On/Off.
Some setups will send a PWM signal on those wires to drive/signal the backlighting. -
If it is a simple On/Off, it’s likely at 12V levels so you’ll either need to do some level converting or use the signal to drive a relay and feed the contacts to your GPIO as a button input.
-
You’ll need to find an available GPIO on your controller (if it exists).
-
Need to setup 2 different presets to be fired when your GPIO “button” is pressed/released (corresponding to wire signal present/removed).
The relay is probably the simplest thing to try 1st, especially as it may even work with a PWM output. Remember to put a reverse biased EMF diode across the relay coil to protect the dimmer circuits.