0
\$\begingroup\$

I have a string of 50 LED lights; 25 of them are connected one way and 25 the other. So if I connect the string directly to the battery, one way round half of them light up and the other way the other half light up. I would like to make the lights flash 25 in one direction and then 25 in the other direction. I am very new to electronics and I am struggling to figure out how to wire up a circuit controlled by an ESP8266.

What I have:

  • Battery
  • ESP2666
  • String of LED lights
  • NPN Transistors
  • A range of resistors

Can someone point me to some reading material to get started on this or maybe give me a suggestion on how to get started powering the lights so they can flash alternately. At the moment I can get half of the lights to be either on or off using the ESP8266.

\$\endgroup\$
3
  • \$\begingroup\$ You can provide both polarities using a H-bridge as used in DC motor drivers. Do you also have PNP transistors? How much current do you need for the 25 LEDs? \$\endgroup\$
    – Jens
    Dec 24, 2022 at 1:45
  • \$\begingroup\$ use two batteries \$\endgroup\$
    – jsotola
    Dec 24, 2022 at 2:32
  • \$\begingroup\$ What is each of the LED lights - something with just two terminals? There are so many ways to connect asymmetrical dipoles that you need to narrow down just how they are connected beyond string, starting with how many terminals/wires to the lights there can be in the end. Mentioning the supply (battery) voltage welcome. Is it a single Lithium cell? \$\endgroup\$
    – greybeard
    Dec 24, 2022 at 8:01

1 Answer 1

2
\$\begingroup\$

I have done this many times. I use a H-Bridge with MOSFET outputs. The L298 looks nice but will drop 2.8 Volts before getting anything to the motor. As you change directions it will change to the other set of LEDs. You can PWM and control the brightness as well. The current depends on the LEDs and how they are wired and what color. Connect them to a 1 ohm resistor and measure the voltage, with this you can calculate the current. You may have to increase or decrease the resistor value. Using a variable output power supply so you can monitor the voltage on the LEDa helps a lot. Hopefully this gets you started, I have no clue as to what resources or experience you have. Most important have fun!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.