Hot answers tagged

39

I would suspect that it is a voltage drop in the power rails caused by the current draw. Probably cheap construction with copper tracks that are just too thin and so have too high a resistance. To combat it you will need to inject power into the strip at various points along it. Initially to prove the theory you can try connecting the power to both ends of ...


9

The WS2811 is the driver chip, that is embedded into the strip. In principle it is some kind of shift register, that outputs PWM values, and on the strip they are daisy-chained (data output of one is connected to data input of the next). With the Arduino you shift out a stream of bytes, when using a RGB strip 3 bytes per LED (1 byte per color). The first ...


7

Just as a complement to Paul's answer, I wrote a short program to show how to drive the 7-segment 4-digit display of his figure: This is actually a common cathode display, so the program assumes that, as well as the particular wiring of the figure. The interesting part is the refresh_display() function, which should be called periodically. The algorithm is ...


5

01) Is the above diagram safe and sound? It looks to be OK, except one thing: The current you can draw from the Arduino's VIN pin is limited to about 1A. That is a sixth of what your power supply can provide, and the LED strip when everything is on needs more than that (1.2A), so you could run into problems. The limit is threefold: The barrel jack itself ...


5

The problem with one resistor in common anode/cathode is that when you activate more than one colour of the RGB LED, you will have additional current flowing through the one resistor which will cause increased voltage drop across the one resistor due to ohms law which will cause less forward voltage across the LED and likely extinguish it or at least make it ...


5

I'll try and take you through the complete basics of LED's etc. As 4-digit 7-segment displays are a combination of multiple "LED techniques". Wiring LED's LED's, or Light Emitting Diodes, are one of the fun things of Arduino. Essentially, they're easy to use, power them up and they'll light up. They can be annoying, because they have some kind of ...


5

NeoPixels The strips based on the WS2812 / SK6812 and similar chips, known by some as NeoPixels, are clever ways of implementing fully-addressable 24-bit colour LEDs. One of the clever things is that they only require one data wire, plus power and Gnd, i.e. +5V Data Gnd The pixel information is sent by precisely timed sequences of 24 bits per pixel. The ...


5

When something works, but not completely, it's often due to power issues. Embedded things, microcontrollers/Arduino are fairly robust and "logical". Hence, if your Arduino program works today, it'll work tomorrow. Analog devices, or electricity is (in my eyes) often a bit vague. A chip can get enough power to run, but not enough to work properly. The ...


5

That's pretty simple: when you turn off all the colours you are actually turning off the entire strip with very minimum leakage current in each of the three FETs.


5

The LED units don't have any unique addresses of their own, instead they are indexed by their position in the string of LEDs. When you feed data into the first LED, you put the entire sequence of color values into the first one. It will then set its own color to the first one in the sequence, and then output all the rest to the next LED in the series. None ...


5

The description in the link of where you bought the strip says: Description: LED Type: 5050SMD with External IC WS2811 (1 IC control 3leds) So, this is probably as intended. Note the application circuits in the datasheet for the controller IC (WS2811) [Page 5] where, for 5V, you can address a single LED, but for a 12V configuration, you must ...


5

Majenko's answer is correct, and you could also verify it with the test performed. Since it is an issue I encountered myself in the past in a similar case, I want to share some measurements I took on the LED strip I have, in case it can be useful for you or other people. Premise: the tests were done with a 5m 60 leds/m RGBW strip (SK6812, natural white). ...


4

The only signal you need to worry about is DIN (data in) which is normally 5V from an Arduino. Use that to switch a MOSFET or transistor to convert the digital pulses to 12V. In other words, the Arduino switches the transistor, the transistor outputs 0 or 12 V. Judging by this link you still just send 5V digital switching to the strip. The data signal ...


4

You could look at this example, which fades an LED using PWM. https://www.arduino.cc/en/Tutorial/Fading Basically you use analogWrite to control the output of the pins with finer resolution, 0-255 rather than 0-1. Only certain pins support PWM, they should be marked on your board. You just need to extend the example to support your LED. (Put the ...


4

When powered through USB, the total current consumption is limited to 500mA by the USB interface. If you are using the power connector, the total current is limited by the on board 5V regulator to 1A. The board will also require some current, so you can draw around 400mA, if powered through USB or 900mA, if powered through the connector; from the 5V pin. ...


4

The errors are self-explanatory. You just have to read them carefully. ‘B54A3AC5’ was not declared in this scope The compiler doesn't know what "B54A3AC5" means. Nor do I, but I gess you may mean an hexadecimal 32-bit value. If that's the case, write it with the prefix "0x", as in 0xb54a3ac5. ‘redpin’ was not declared in this scope Same thing, it ...


4

You could use chainable RGB drivers like these: They are based on the P9813 chip and can be used with the FastLED library. You can find them on Aliexpress or eBay, if you search for "STM32 rgb". Wiring: Example code: #include <FastLED.h> #define NUM_LEDS 10 #define DATA_PIN 3 #define CLOCK_PIN 2 CRGB leds[NUM_LEDS]; void setup() { FastLED....


4

100 Meters of 5050 SMD strip LEDs will require roughly 120-200 amps. However, you cannot drive a 100 meter strip from a single power supply. The thin copper traces in the LED strip can only handle so many amps before they become too hot (your LED strip would melt like ice cream on a hot summer day). This is why led strips are usually limited to 5 meters (~5A)...


4

As Majenko already mention, use a separate power supply. Use that power to power the LED strip(s). Use the MCU to control the data and clock lines. Connect grounds together.


4

There are 3 LEDS on the Nano 33 BLE: A power LED on pin 25 (yes, you can turn off the power LED programatically); A built-in LED on pin 13; An RGB LED with red on pin 22, green on pin 23, and blue on pin 24. In the variant file, they are given names: #define PIN_LED (13u) #define LED_BUILTIN PIN_LED #define LEDR (22u) #define LEDG (23u) #...


3

I like the ws2812 RGB LEDs with integrated controller. They can be found on adafruit.com, e.g. here: Adafruit NeoPixel NeoMatrix 8x8. There are some good tutorials on adafruit.com: https://learn.adafruit.com/adafruit-neopixel-uberguide/overview https://learn.adafruit.com/adafruit-neopixel-uberguide/best-practices https://learn.adafruit.com/adafruit-...


3

Try changing rgbIndex++; to rgbIndex=(rgbIndex+1)%numRGBleds;. I thing the problem is the int rgbIndex rollover, which occurs after about 9 hours. Also try changing delay(1000) to delay(1). That way the problem might pop up a lot faster.


3

You don't modify the library at all. The page refers to the constructor which is the last line here: #include <Adafruit_NeoPixel.h> #define PIN 6 Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800); So that would send to 60 NeoPixels. Change the 60 to however-many you have. To compare, try running my library here. That doesn'...


3

Depending on how loud your audio signal is, you may be able to do it with just one capacitor and two resistors: If your signal is quite quiet, though, you may need to amplify it using an op-amp. For instance: That arrangement would double the volume of the audio. It also has the effect of inverting it, so you will need to invert your readings in software. ...


3

There are three factors to consider when driving strings of these LEDs from an Arduino: How much memory the Arduino has - each LED takes at least 3 bytes of RAM (possibly more depending on the library implementation). (An Uno could probably just manage 500 at most) How long it takes to send the data over the wire - the more LEDs you have in a chain the ...


3

Check your spelling Intensity instead of Intesity. Consider using switch instead of if-then-else. Define left, right and middle as [integer] constants somewhere (and probably something more descriptive like rightLED, leftLED and middleLED) because your code is looking for an int, instead you give it something undefined like left, right and middle (and all)...


3

I think others have addressed the need for you to modify the strip colors based on distance or bearing or... whatever you want to show. Here's a NeoGPS version of that sketch. I think it may be easier to understand what's going on, and where you need to focus: // Flora GPS + LED Pixel Code // Modified to use NeoGPS library. // // Adafruit Flora GPS ...


3

The concepts of HIGH and LOW, and thus the voltages associated with those concepts, apply only to logic signals. LED drivers are not logic signals - they are constant current sinks. The voltages you are measuring are the forward voltages of the LEDs.


3

Consider the sequence of values of "fadeIn". It starts at 8 and in incremented by 16. So: 8, 24, ... 248, 264, ... . It is never exactly 255. So you never break out of your "for" loop. There is only 1 delay in your example code. It is difficult to associate the described behavior in your question and the location of the delay. Arduino programming is ...


3

Here: CRGB leds[NUM_LEDS]; you are defining an array of NUM_LEDS objects of the CRGB type. Valid indices for this array range from 0 to NUM_LEDS-1. Here: for (int i = 0; i <= NUM_LEDS; i++) { leds[i].setRGB( r, g, b ); } you are accessing the array elements at indices 0 to NUM_LEDS. The last iteration is an out-of-bounds access, which is causing ...


Only top voted, non community-wiki answers of a minimum length are eligible