KB2040 and Neopixel

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ktd70124
 
Posts: 2
Joined: Fri Oct 14, 2022 1:34 am

KB2040 and Neopixel

Post by ktd70124 »

Hello,

I was reading up about the KB2040 and its schematic, and UberGuide for Neopixel; but I was confused with what the guide said and what's done for the neopixel onboard. I'm new to EE so I might not be aware of the differences of the onboard direct pin and the GPIO.

- In the UberGuide, a level shifter is needed for 3.3V logic data pin to 5V, and the power should go into the +5V (RAW)
- But on the KB2040 and its schematic, the Neopixel's Vdd attached to +3.3V and the pin is connected directly to the pin on the controller without a logic level shifter.

So do I follow the UberGuide or just replicate what's on KB2040 for external Neopixels chain?

Hope the team can help me clear my confusions.

Thanks!

User avatar
dastels
 
Posts: 15655
Joined: Tue Oct 20, 2015 3:22 pm

Re: KB2040 and Neopixel

Post by dastels »

A couple things:

1) The level of the data signal to NeoPixels (i.e. 3.3v or 5v) has to match the power voltage to the NeoPixels for best success. A 3.3v signal to 5v powered NeoPixels is just under the threshold for a High/True/1 value. It might work, but isn't guaranteed to... thus the level shifter to drive 5v powered NeoPixels from a 3.3v MCU (i.e. most modern MCUs).

2) While NeoPixels are specced to be powered with 5v, they will work fine when powered by 3.3v, though won't be as bright. Generally if you have a reasonably large number of NeoPixels you will need an external power supply for them and it's easiest for that to be 5v (so a level shifter is suggested/needed). However, in the case of the single onboard NeoPixel being powered at 3.3v from the onboard voltage regulator is fine, and so driving the NeoPixel directly works great.

If you are attaching/driving more than a handful of external NeoPixels, you should have a separate 5v power supply for them and use a level shifter. If you have a small number (mostly limited by the required current so it really depends on how you're using them) you can power them from the MCU board's 3.3v output and drive them directly from a GPIO pin. A while ago I made some D&D dungeon terrain props (magic circle that flickered/pulsed white, a fire that flickered blue/purple and a pulsing red light in a statute. In all it was a couple dozen or so NeoPixels. It worked fine powered from an ItsyBitsy M4's 3.3v output, driven directly, and powered by a moderately large LiPo.

What you can get away with really depends on what you're doing.

Dave

User avatar
ktd70124
 
Posts: 2
Joined: Fri Oct 14, 2022 1:34 am

Re: KB2040 and Neopixel

Post by ktd70124 »

Hey Dave, thank you so much for detailed response! That definitely cleared up my understanding as well as learning a bit on running out of specs is still acceptable (under specific circumstances).

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

Return to “Microcontrollers”