Hi, I have an idea for a project: dimmable light strip.
I started by taking a 2xAA battery operated light strip and switching the batteries for an arduino or something similar like an ESP32, for smart home integration.
The code for this is simple, but I am failing the electronics: How would I connect the light strip to the microcontroller PROPERLY? Since it is not recommended to attach "bigger" current loads directly to an IO pin, I wonder what the ideal method is!
Also, using a transistor, for example, would not work, because a transistor cannot forward PWM signals, which I need (?) for led dimming.
Or do I need PWM? Is there another way? What about a virtual potentiometer, for example, or a level translator...?
As you can see I am confused. Please make me smarter, or give me a source where I can easily research for this, without having an electrical engineering degree.
Thanks in advance!
Hi @magnuino0,
the good news: There are plenty of instructions available ...
Here is the first I found via Google:
https://www.makeuseof.com/tag/connect-led-light-strips-arduino/
then also
https://learn.adafruit.com/rgb-led-strips/usage
https://www.youtube.com/watch?v=rPvGLSuMaLA
https://randomnerdtutorials.com/guide-for-ws2812b-addressable-rgb-led-strip-with-arduino/
[Control six separate RGB LED strips with a single Arduino Nano | Arduino Blog](Control six separate RGB LED strips with a single Arduino Nano | Arduino Blog
Good luck and have fun!
ec2021
Welcome to the forum
What makes you think that a transistor (or MOSFET) would not work when driven by a PWM signal ? Such a signal is merely a digital signal being turned on and off. As long as the transistor can cope with the frequency and current that is being switched then it will work
Start by using a single LED attached to an Arduino PWM capable pin using a current limiting resistor. When you have that working add in the transistor/MOSFET and control the single LED using that. Next use an external power supply to power the LED and finally switch to using your string of LEDs powered externally and controlled via the transistor/MOSFET
When using an external power supply you need to ensure that its GND is connected to the Arduino GND to provide a common point of reference for signal levels