Dim single color LED strip not working at max brightness

Good evening Forum,

New to coding, writing code and building on boards. In the short time I've been working with Arduino I've been trying to get two single color LED strips with only a positive and negative connector to function like a regular LED.

Each individual strip will be controlled by a push button but once turned on one will be solid and the other will begin to blink in a sequence. This works with the two 3mm LEDs i've tested on but when I hooked up the LED strip the LED comes in very, very dim.

Currently the power is coming from my laptop, but I've also tried this on a 12v Talencell battery with the same results.

Im using pin ~9 and 8
and looking to have the LED at it's optimal brightness.

Is this even possible?



I'm using a Arduino Uno, Proto Shield and a single color LED strip with + and - connectors.

This is the code i've written:

int led = 12; //Red LED
int led2 = 11; //Yellow LED
int led3 = 10; //Green LED
int led4 = 9; //Red Light Bulb Switched (Blinking)
int led5 = 8; //Green Light Bulb Switched (Steady)

void setup() {
pinMode(led, OUTPUT); //Red LED
pinMode(led2, OUTPUT); //Yellow LED
pinMode(led3, OUTPUT); //Green LED
pinMode(led4, OUTPUT); //Red Light Bulb (Blinking)
pinMode(led5, OUTPUT); //Green Light Bulb (Steady)
}

void loop() {
digitalWrite(led, LOW); //Red LED OFF
delay(200);
digitalWrite(led, HIGH); //Red LED ON
delay(200);
digitalWrite(led, LOW); //RED LED OFF
delay(200);

digitalWrite(led2, LOW); //Yellow LED OFF
delay(200);
digitalWrite(led2, HIGH); //Yellow LED ON
delay(200);
digitalWrite(led2, LOW); //Yellow LED OFF
delay(200);

digitalWrite(led3, LOW); //Green LED OFF
delay(200);
digitalWrite(led3, HIGH); //Green LED ON
delay(200);
digitalWrite(led3, LOW); //Green LED OFF
delay(200);

digitalWrite(led, HIGH); //Red LED ON
digitalWrite(led2,HIGH); //Yellow LED ON
digitalWrite(led3,HIGH); //Green LED ON
delay(5000); //RYG LED ON for 5 seconds
digitalWrite(led, LOW); //Red LED OFF
digitalWrite(led2,LOW); //Yellow LED OFF
digitalWrite(led3,LOW); //Green LED OFF
delay(2000); //RYG LED OFF for two seconds

digitalWrite(led, HIGH); //Red LED ON
digitalWrite(led2,HIGH); //Yellow LED ON
digitalWrite(led3,HIGH); //Green LED ON
delay(100); //RYG LED ON for 10 seconds
digitalWrite(led, LOW); //Red LED OFF
digitalWrite(led2,LOW); //Yellow LED OFF
digitalWrite(led3,LOW); //Green LED OFF
delay(100); //RYG LED OFF for two seconds
digitalWrite(led, HIGH); //Red LED ON
digitalWrite(led2,HIGH); //Yellow LED ON
digitalWrite(led3,HIGH); //Green LED ON
delay(100); //RYG LED ON for 10 seconds
digitalWrite(led, LOW); //Red LED OFF
digitalWrite(led2,LOW); //Yellow LED OFF
digitalWrite(led3,LOW); //Green LED OFF
delay(100); //RYG LED OFF for two seconds
digitalWrite(led, HIGH); //Red LED ON
digitalWrite(led2,HIGH); //Yellow LED ON
digitalWrite(led3,HIGH); //Green LED ON
delay(100); //RYG LED ON for 10 seconds
digitalWrite(led, LOW); //Red LED OFF
digitalWrite(led2,LOW); //Yellow LED OFF
digitalWrite(led3,LOW); //Green LED OFF
delay(100); //RYG LED OFF for two seconds
digitalWrite(led, HIGH); //Red LED ON
digitalWrite(led2,HIGH); //Yellow LED ON
digitalWrite(led3,HIGH); //Green LED ON
delay(100); //RYG LED ON for 10 seconds
digitalWrite(led, LOW); //Red LED OFF
digitalWrite(led2,LOW); //Yellow LED OFF
digitalWrite(led3,LOW); //Green LED OFF
delay(100); //RYG LED OFF for two seconds

digitalWrite(led, LOW); //Red LED OFF
delay(500);
digitalWrite(led, HIGH); //Red LED ON
delay(500);
digitalWrite(led, LOW); //RED LED OFF
delay(500);

digitalWrite(led2, LOW); //Yellow LED OFF
delay(500);
digitalWrite(led2, HIGH); //Yellow LED ON
delay(500);
digitalWrite(led2, LOW); //Yellow LED OFF
delay(500);

digitalWrite(led3, LOW); //Green LED OFF
delay(500);
digitalWrite(led3, HIGH); //Green LED ON
delay(500);
digitalWrite(led3, LOW); //Green LED OFF
delay(500);

digitalWrite(led5, HIGH); //Green Light Bulb Switched (Steady)
delay(1000);

digitalWrite(led4,HIGH); //RED Led ON
delay(2000);
digitalWrite(led4,LOW); //RED Led OFF
delay(2000);
digitalWrite(led4,HIGH); //RED Led ON
delay(2000);
digitalWrite(led4,LOW); //RED Led OFF
delay(2000);
digitalWrite(led4,HIGH); //RED Led ON
delay(2000);
digitalWrite(led4,LOW); //RED Led OFF
delay(2000);
digitalWrite(led4,HIGH); //RED Led ON
delay(2000);
digitalWrite(led4,LOW); //RED Led OFF
delay(2000);
digitalWrite(led4,HIGH); //RED Led ON
delay(2000);
digitalWrite(led4,LOW); //RED Led OFF
delay(2000);
}

You can't power the LED strip directly from the arduino pins, you need to use a transistor or integrated circuit to handle the current the strip consumes.
An arduino pin can handle one or at most two LEDs, no more.
Luckily, you placed that resistor that prevented the arduino pin from "burning".

Regards

1 Like

And where did you put this battery into the Arduino?
If it was the Power Jack or the Vin pin then this just asks the internal regulator on the Arduino to burn off any excess power as heat. So it is more than likely you could damage the internal regulator.

You mention the word "Dim" in your title, but your code makes no attempt at all to dim the strip, it just turns things on and off.

Welcome to the forum, but it is worth reading this:-
How to get the best out of this forum before you proceed any further. Amongst other things it tells you how to post code correctly, which you are currently not doing.

you need no additional resistor, it is enough on the strip.
Arduino is not a power source, despite how big battery you attach. single pin can lite one LED with 20mA without taking damage and not more as 10 pro chip.

Hi, @csullivan1980
Welcome to the forum.

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Thanks... Tom... :grinning: :+1: :coffee: :australia:


The part I'm struggling to understand is why 3mm and 5mm LEDs function with no issue but when it comes to LED strips they don't behave the same. I assumed that seeing more complex projects online and other places lighting a strip wouldn't be a problem.

The Port Shield was the concept of the project and the goal is to fully power a 6 inch length of strip to put in a faux light bulb to blink in a sequence when powered on.

Hi,
The Fritzy doesn't tell me which LEDs are which, it would be better if you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Why do you have switches in the gnd wires of those LEDs?

Thanks.. Tom.. :grinning: :+1: :coffee: :australia:

And the part I am struggling with is why you are still struggling to understand this when you were told in Post#2, Post #3, Post#4.

Your strip needs way more current than an Arduino Pin can provide.

You need to understand the relationship between voltage and current. You are perhaps confusing the strip you have with other strips that run off 5V and are addressable.

You do not need that extra resistor on your strip if you power your strip with the appropriate voltage. You can't do this from an Arduino pin, you have to drive it through a FET like this:-

See this tutorial for the full story:-

While this is for strips with Red, Green and Blue LEDs on it. This also applies to strips like yours with only one colour.

That is an LED strip, not a WS2812. There is no dimming, no brightening, no color change. The reason you see red is "power failure." My guess is they are 12vdc or 24vdc, white, and a ten meter strip will want two to five amps.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.