DotStar blinking randomly rather than a pattern

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
idajourney
 
Posts: 5
Joined: Mon Jun 11, 2018 12:17 pm

DotStar blinking randomly rather than a pattern

Post by idajourney »

Hello,
I'm having an issue with a recently purchased DotStar 30led/1m strip. I've got it set up using the recommended setup for a Raspberry Pi (using https://www.adafruit.com/product/735 (level shifter), the recommended 1uF/6.3V capacitor with an external 2A/5V power supply). When running the strandtest.py file which came with the software I'm using (https://github.com/adafruit/Adafruit_DotStar_Pi), rather than lighting up in the colors described in that file, the LEDs randomly switch colors at random times. I’ve tried swapping around the data and clock pins, and switching which pins are used, both with no effect.

Here is a video of the problem: https://giphy.com/gifs/oHv93RkEUl1KV3IqNj/html5
Attachments
IMG_20180619_181936_.jpg
IMG_20180619_181936_.jpg (958.96 KiB) Viewed 233 times

User avatar
Franklin97355
 
Posts: 23912
Joined: Mon Apr 21, 2008 2:33 pm

Re: DotStar blinking randomly rather than a pattern

Post by Franklin97355 »

Make sure you have a common ground between the pixels, the power supply and the Pi.

User avatar
idajourney
 
Posts: 5
Joined: Mon Jun 11, 2018 12:17 pm

Re: DotStar blinking randomly rather than a pattern

Post by idajourney »

What's the safest way to do that? Should I be using the ground from the power supply for everything?

User avatar
idajourney
 
Posts: 5
Joined: Mon Jun 11, 2018 12:17 pm

Re: DotStar blinking randomly rather than a pattern

Post by idajourney »

I tried this using the ground from the power supply for everything. It did a similar thing, except that most of the pixels were dark rather than light.

User avatar
ckscullion
 
Posts: 1
Joined: Sun Jun 24, 2018 4:45 pm

Re: DotStar blinking randomly rather than a pattern

Post by ckscullion »

*** This was my own stupid mistake and not really related to this thread. Please ignore. I don't see a way to delete posts, so I'll just leave this here as a monument to my stupidity :-). ***

I am seeing the same thing. I tried modifying the strandtest example to just turn the first pixel on and off, but it still appears random throughout the strip. I'm using a new Adafruit Metro. Here's the simplified code (i tried SW and HW SPI):

#include <Adafruit_DotStar.h>
// Because conditional #includes don't work w/Arduino sketches...
#include <SPI.h> // COMMENT OUT THIS LINE FOR GEMMA OR TRINKET
//#include <avr/power.h> // ENABLE THIS LINE FOR GEMMA OR TRINKET

#define NUMPIXELS 30

Adafruit_DotStar strip = Adafruit_DotStar(NUMPIXELS, DOTSTAR_BRG);

void setup() {

strip.begin(); // Initialize pins for output
strip.clear();
strip.show(); // Turn all LEDs off ASAP
}

uint32_t color = 0xFF0000; // 'On' color (starts red)
boolean LED_on = true;

void loop() {
int i = 0;

if (LED_on) {
color = 0xFF0000;
LED_on = false;
}
else {
color = 0;
LED_on = true;
}

strip.clear();
strip.setPixelColor(0, color);
strip.show();
delay(1000);

}
Last edited by ckscullion on Tue Jun 26, 2018 7:44 am, edited 1 time in total.

User avatar
coyote20000
 
Posts: 10
Joined: Sun Jan 12, 2014 2:59 pm

Re: DotStar blinking randomly rather than a pattern

Post by coyote20000 »

Hi,
First off, according to the 74LVC245 datasheet, it appears to convert 5v to 3.3 or lower. I could be wrong but that's what it appears to be able to do.

You need a shifter to go from 3.3 to 5. Please look in the neopixel guide as there is an IC that does just that..

Also, it is recommended that you use 1000uF cap across the power lines but I don't think that is whats causing your issue.

Hope all this helps.
Dave

User avatar
idajourney
 
Posts: 5
Joined: Mon Jun 11, 2018 12:17 pm

Re: DotStar blinking randomly rather than a pattern

Post by idajourney »

That's the recommended function listed in the datasheet, however the datasheet shows the Vcc input having a range including 5V, and I've manually checked that it's able to convert 3.3V signals to 5V. This is the converter originally listed in the NeoPixels guide.

Also, I do have the 1000 uF capacitor between the power lines (but agree that's probably not the problem)

User avatar
coyote20000
 
Posts: 10
Joined: Sun Jan 12, 2014 2:59 pm

Re: DotStar blinking randomly rather than a pattern

Post by coyote20000 »

ida,
I see what you mean in the data sheet table. I saw this line on the first page.. "This octal bus transceiver is designed for 1.65-V to
3.6-V VCC operation." so I figured it could only output up to 3.6..

Sorry man..

User avatar
idajourney
 
Posts: 5
Joined: Mon Jun 11, 2018 12:17 pm

Re: DotStar blinking randomly rather than a pattern

Post by idajourney »

After ensuring that the external power supply and the Pi are sharing a ground, this is the result: https://gfycat.com/EnergeticBrownIrishwolfhound

EDIT: as per this thread (viewtopic.php?f=47&t=89723&start=15) I've tried adjusting the bit rate, with no effect. I also tried using SPI mode, which set colors randomly once and didn't seem to change anything after that, regardless of clock rate.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”