I have repeatedly heard that control of Neopixel LEDs running at 5v requires special voltage conversion when using a 3.3v processor, as the 3.3v control input is actually out of spec for the WS2812B LED control chip. I've not personally had problems, but as I'd eventually like to sell my device as a product that may use user-supplied Neopixels, I'd like to do a proper conversion.
The protocol is quite fast - The data rate is 800Kbps, although I've heard it referred to as 1MHz at times. I've tried basic logic level converters like the Sparkfun one, but they don't work at these speeds and are additionally large and expensive (plus I don't need all the channels).
Does anyone have a simple, cheap solution that uses a minumum level of components? Somewhere I was referred to an op-amp based solution, but that also has cost and complexity issues. Ideally I'd like a transistor-based version, and I may have found one, but I need help figuring out what it's doing. Here's the link: https://www.instructables.com/RGB-Circuit-Sculpture-Lamp/
It would seem to be using a MOSFET to switch power to the Neopixel strand, but I can't figure out where the 0v(low) half of the logic is coming from and the connections are very strange. One of the larger puzzling bits is the fact that it uses two data pins. The pin 0 marked in the schematic is set to a constant logic high (so, 3.3v) while pin 3 appears to do the actual controlling.
I then went to look up the transistor to determine what the pin connections are, but the datasheet is peculiar: https://www.onsemi.com/pdf/datasheet/nds7002a-d.pdf
The schematic listing gives the usual gate/source/emitter pinout, but this is not mapped to the device's package, which is listed with pin 1, 2, and 3. This is something I see in datasheets all the time, and while I understand the use of a transistor (except for cases like this one, where I can't find the ground connection), I still can never figure out how to wire one up.
TL;DR:
- Does a cheap, small, single-channel solution exist to megahertz-level signal level conversion exist?
- Does the example given actually work, and if so, what is the principle of operation?
- What pins of the transistor are connected here, and how? What is the secret to the pin mapping between the package and the schematic that I clearly don't know?