r/WLED • • 11h ago

Using presets with input pins

Post image

Good afternoon. I am trying to set up the WLED program to use one of five presets based on the input pin going HIGH. After quite some time, I still cannot figure out how to assign the preset to a specific GPIO via the WLED web interface. FYI, all outputs are the same, just multiple 12v strips for the inside of my truck shell.

2 Upvotes

10 comments sorted by

1

u/Substantial_Goat6969 11h ago

You set presets are set with led numbers. If you have three outputs with 200 leds each, you would make one group 1 - 200, second group 200 - 400 third group 400 - 600. After you can make your groups, you can individually select those and change effects on just that section.

1

u/Embarrassed-Lab6622 11h ago

So the resistors are to pull down the input until the 3.3v signal is received, just a precaution to keep the GPIO from floating. I am not interested in groups as I want all the LEDS to do the same, based on my selection of the five different input pins going HIGH.

1

u/saratoga3 9h ago

Your resistors pull 5v down to ~2v, which is probably too low to trigger a GPIO pin. Try removing R11 so that you pull up to 2.5v and see if that works better.

1

u/Embarrassed-Lab6622 7h ago

Good catch. I will delete R11 and replace R1-5 with 5.56k

1

u/JamesM_007 7h ago

The circuit design is rather minimal, which could lead to unreliable hardware operation. There are no bulk filter capacitors on the DC-DC input and output. The LED data line is missing a buffer transceiver such as the SN74HC245 to increase signal drive strength. Robust hardware is essential for consistent firmware

1

u/Embarrassed-Lab6622 6h ago

Thanks for the comment. I am hoping you can explain why I would need bulk filter capacitor(s) for a 12v battery being dropped to 5v.
I also read where ESP32 can run up to 700 LEDs on a single output pin so I am not sure why I would need a buffer transceiver. Thoughts?

1

u/saratoga3 6h ago

Many ESP32 boards have poor regulation and have poor stability without bulk capacitance. If you aren't crashing however then you don't need to add any.

The ESP32 puts out 3.3V data but your LED strips expect 5V. They may or may not be ok with 3.3v. Similar to the bulk capacitance, my advice would be to check if you get glitching when running patterns, and if so fix the voltage levels. If you don't, it is probably ok to leave.

1

u/Embarrassed-Lab6622 6h ago

fair enough, thanks for the explanation. I am an ME, so this kinda of stuff is new to me and I am learning one project at a time. 😄
Once I get the single strip working, then I will expand to the 4 strips and keep you posted.

1

u/Individual_Nobody739 7h ago

You don’t need a separate LED segment for each input if all the strips should run the same effect. First, save one preset and select it manually to make sure it does what you want across all the outputs.

Then configure one GPIO as a Switch under Config → LED Preferences. The preset assignment is on a different page: Config → Time & Macros → Button Action Presets. A switch has separate actions for Off to On and On to Off. Test which action fires when your input goes HIGH, and assign the preset to that action. Test the return transition too: a value of 0 uses WLED’s default action, so don’t assume it means “do nothing.”

Once one input works, check that your installed build exposes five button slots before setting up the other four. If it doesn’t, check your WLED version and build first; creating more LED segments won’t add input slots.

1

u/Embarrassed-Lab6622 6h ago

Thanks for the response. I did all of that but could not get it to work. I had extra output pins so that I could reduce the load on a single output pin. My default action (ON to OFF) is supposed to be "OFF".
I will mess with the hardware tomorrow and see if anything changes.