Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Dotstar and flora odd behavior
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Dotstar and flora odd behavior

by eluke66 on Thu Dec 05, 2019 7:47 pm

Hi all - I'm trying to connect a DotStar black 60 LED/m strip to a Flora, and am at a bit of a loss as to where to go next.

I've attached a pic of the setup (sorry for the extensive use of alligator clips), but the general idea is this:
Flora is connected to a 3.3-5V level shifter via pins 9 and 10. Output of those pins is connected to clk and data on the dotstar strip. Dotstar strip is connected to +5V and the grounds of the power supply, the flora, and the dotstar are connected. The power source is a battery that I've used for other projects (using flora and NeoPixels).

The code is the example DotStar strandtest updated to point to the appropriate pins on the flora. I can attach that if it's useful.

The behavior I'm seeing is that the strand lights up and just flickers (i.e., doesn't do the pattern expected in the strandtest example).

Things I've tried that didn't change the behavior:
1. Using different pins on the Flora.
2. Using different pins on the level shifter.
3. Using a different dotstar strip (same model and length)
4. Using a different battery.

Things I've re-verified:
1. There is connectivity between the dotstar ground and flora ground
2. That the battery output is 5V (but see below)
3. There's connectivity between the clock and data lines on the strip and the outputs of the level shifter.

Things that I swapped (cuz, you know, I could have it backwards) that caused things to stop working at all:
1. Swapping the data and clock lines.
2. Using the other side of the dotstar strip
3. Switching the battery to force 3.3V output
4. Connecting the flora's outputs directly to the dotstar (no level shifting).
5. Adding resistors between the outputs of the level shifter and the inputs of the dotstar

One curious thing that I noted that could be a clue is that the common ground would smell a bit when the power was on. When the dotstar ground was connected to the battery and flora ground, the voltage between battery out and ground would drop from 5V to 3.5V.

At this point, I don't know how to even continue debugging. I've worked with flora and neopixels before successfully, but this has me stumped. Ideas?
Attachments
connection.jpg
connection.jpg (332.81 KiB) Viewed 124 times

eluke66
 
Posts: 4
Joined: Sun Dec 01, 2019 1:51 am

Re: Dotstar and flora odd behavior

by dastels on Thu Dec 05, 2019 10:16 pm

The smell and the voltage drop make me think short. Does the strip work with other hardware (ideally a 5v board so that you don't need a level shifter... removing variables & all)?

The "light up and flicker" symptom might point to the level shifter not being fast enough... but I'd look into a possible short first.

dastels
 
Posts: 3401
Joined: Tue Oct 20, 2015 3:22 pm

Re: Dotstar and flora odd behavior

by eluke66 on Fri Dec 06, 2019 1:08 pm

Great idea, and one I (stupidly) hadn't thought of before. I'll see if I can swap that one out and report back.
(The level shifter is a SN74AHCT125, which hopefully should be fast enough?)

eluke66
 
Posts: 4
Joined: Sun Dec 01, 2019 1:51 am

Re: Dotstar and flora odd behavior

by eluke66 on Sun Dec 08, 2019 12:53 pm

Just to follow up for the benefit of others:

I swapped out the Flora for an Uno that didn't require a level shifter. After connecting things back up (using SPI), the lights worked perfectly.

Thanks for the help!

eluke66
 
Posts: 4
Joined: Sun Dec 01, 2019 1:51 am

Re: Dotstar and flora odd behavior

by dastels on Sun Dec 08, 2019 4:40 pm

Something to keep in mind is that for Neopixels having the power match the data signal makes a huge difference to stability and operation: i.e. use a 5v signal if you power it with 5v (so either a level shifter of a 5v MCU). If you use 3.3v logic, power it with 3.3v. That'll generally work well. I suspect the same will work for dotstars.

dastels
 
Posts: 3401
Joined: Tue Oct 20, 2015 3:22 pm

Re: Dotstar and flora odd behavior

by bcochran1 on Fri Dec 20, 2019 8:53 pm

Hi,

I received a 1 meter DotStar strip with 144 pixels. I'm using an ItsyBitsy M4 Express to drive the strip with. Like the Flora, this micro accepts 5v input but all logic is 3.3v. I level shift my clock and data signals to 5v logic for the Dotstars. The power source is a 10 amp, 5v power brick purchased from Adafruit. The 'strandtest' code works fine.

It helps to go slowly and to use color coded wires. It can take a few hours. Read the tutorial documentation. Adafruit has the best "learning" guides around in my opinion. The DotStar tutorial is a huge help. So is the pinout explanation for the Flora. Refer to it again and again. Have it on your screen as you wire. Check your wiring again and again to make sure you aren't shorting out your power. Those alligator clips are just begging to touch each other; I suggest putting things like plastic glass or plastic vitamin containers in between the power and ground wires to make sure they don't touch each other. Consider using the snap-action 5 wire block connector which is product #874. It is rated to 32 amps and you can use one block for 5v and one for ground.

Are you using a 1000 microFarad electrolytic capacitor across your 5V power source? If not you really should be. Adafruit doesn't sell the 1000 mfd electrolytics but they might be available on Amazon and certainly at Mouser.

Also, you should be using the SN74AHCT125N level shifter for the Flora or other 3.3v logic devices. I say this only because the Dotstar learning guide suggests it so that is what I use. I've had great success with it. You need to read the datasheet for whatever device you use for level shifting. I'm wondering if you connected 5v and ground to your level shifter -- I can't see the circuit clearly from the photo you provided but it looks as if you might not have connected GND to your level shifter. I checked the dataset for the 74AHCT125N several times and compared it to my actual wiring to make sure I got it right. (I tied the unused OE pins to ground as well.)

By the way I have at least 3 Floras in my parts bin, I bet I can drive my DotStars with them plus a level shifter. I'll have to go slowly but it can be done.

Thanks so much

Bob


bcochran1
 
Posts: 474
Joined: Mon Jan 21, 2013 10:46 pm

Re: Dotstar and flora odd behavior

by bcochran1 on Sat Dec 21, 2019 5:59 pm

Hi,

I did get this working with my own Flora device. I do have an issue with the 36th pixel in the strand being blue in color, but the red, green and blue color sequences do generate and move as expected.

In my test setup, I completely disconnected an ItsyBitsy M4 Express that I have on a breadboard. I substituted my Flora device instead. I made this choice in order to take advantage of a hardware setup that I already have and know is working for a 144-pixel DotStar strip. As you can see from the photos, I'm powering the Flora from a 3.7v lipo battery. Pin D9 (#9) is the clock signal, D10 (#10) is the data signal, and ground from the Flora goes to a common ground on the breadboard.

I am level shifting the clock and data signals from the Flora to 5v. Look how the SN74AHCT125N level shifter is wired. The level shifted outputs from the 1Y (clock) and 2Y (data) pins are going to the respective clock and data inputs on the Dotstar.

I only wanted to do 35 LEDs on the Dotstar strip because this is just a demo. As mentioned above, I also seem to have made a software mistake by turning the 36th LED blue. That is a coding error that I can fix later.

One thing I can say -- depending on your application, Flora may not be a good choice for driving DotStars. Yes, it can be done. However Flora is hard to work with for this purpose -- you are pretty much forced to use alligator clips or solder wires to the device. It doesn't expose a lot of pins and there are some memory limitations. It might be easier to use something like a Circuit Playground Express if you want the Flora form factor. That will still be a challenge depending on your application. Or use an ItsyBitsy M0 or M4 Express.

I hope this helps you out!

Bob

General view of Flora driving Dotstars.

flora_driving_dotstars_v2_small.jpg
flora_driving_dotstars_v2_small.jpg (202.23 KiB) Viewed 50 times


Pins used on the Flora.

flora_d9_d10_gnd_for_dotstars_small.jpg
flora_d9_d10_gnd_for_dotstars_small.jpg (258.66 KiB) Viewed 50 times


Level shifter wiring.

level_shifting_for_flora_small.jpg
level_shifting_for_flora_small.jpg (249.87 KiB) Viewed 50 times



bcochran1
 
Posts: 474
Joined: Mon Jan 21, 2013 10:46 pm

Re: Dotstar and flora odd behavior

by eluke66 on Sun Dec 22, 2019 5:12 pm

Thanks Bob, this is great. I ended up going with an Arduino Uno for some of the reasons you mentioned (like more I/O), but I wish I'd had your posts handy when I started. This will be a great resource for others who have the same question - thanks again for posting it!

eluke66
 
Posts: 4
Joined: Sun Dec 01, 2019 1:51 am

Please be positive and constructive with your questions and comments.


cron