Step up 3v3 to 5v to runws2812 leds using ws2812serial library on teensy 3.6

Status
Not open for further replies.

r00n

Member
Hello,
I am a learner, please be patient.

I am wanting to run 19 ws2812b leds from teensy 3.6 using the ws2812serial lib to get some visual feedback for an audio project.

I believe problems have arisen from different voltages of the 2 seperate systems so i am going to try to step up the voltage.

I have purchased a ic 74AHCT125 - Quad Level-Shifter (3V to 5V) - to do the job but I am failing to find a diagram of the required circuit to step up the volts. It's just the chip only, no shield.
Searching has unveiled a few circuit diagrams but I remain uncertain.
Would Yu please assist me to find a diagram that will show me how to integrate teensy, 74AHCT125, and ws2812 b leds?
 
It’s quite simple. Make sure your +3.3 and +5.0 supplies share a common ground. That happens automatically if you power the Teensy from 5.0 and let it provide regulation to 3.3V.

Then, power the ‘HCT125 between 5.0V (VCC) and ground. Run the Teensy’s output into one of the ‘HCT125’s buffer inputs. The output of that buffer goes the LED string. The ~OE input of that buffer gets grounded.
 
Did you buy the chip from Adafruit? If so, please also ask on their forum and give us a link, so we can see what they answer.

Quickly...

Pin 1 (1OE) - connect to GND
Pin 2 (1A) - connect to Teensy output
Pin 3 (1Y) - connect to WS2812 LED signal input
Pin 7 (GND) - connect to GND
Pin 14 (VCC) - connect to 5V

Might also be worth mentioning many of the modern WS2812B LEDs are able to use a 3.3V signal, even when running with 5V power. So as a first try, just connect Teensy's output right to the LED input. It might "just work". But be careful not to accidentally touch the 5V power line to the wire connected to Teensy 3.6. Even just a brief moment of touching 5V power to any digital pin on Teensy 3.6 could destroy the hardware, so be extra careful.
 
problem_schem.jpg

Adafruit forum has been of no assistance.

If you would be so kind as to take a look at my diagram.

I am supplying power to teensy via a wallwart with a USB cable. An old ATX computer power supply is being used to run the LEDS.

I have noticed that in all other circuit diagrams of microcontrollers running ws2812 leds, the ground of the 5v power supply from the LED chains is also tied to the ground of the microcontroller. ( i have not put that in this schematic), but i have tried to connect the grounds together. Ground Hum starts and other problems exist.

When connected, the problem i have is that when the LEDs switch current and change, i can hear the current switching with an audible pitch when i tie the grounds of the ATX power supply to the ground pin of the teensy 3.6 together. With the grounds tied the leds do run as programmed but without the grounds tied the LEDs can be unpredictable.

What can i do?
 
With the grounds disconnected check the voltage between Teensy gnd and the ATX power supply. If it is a cheap wallwart it may not be floating the supply, and the ATX supply is most likely using a true gnd. If the wallwart is problematic running grounded you may need to adjust the wiring for the ATX power supply to run the Teensy as well. Certainly nothing useful can be done with two different grounds in the system unless you start doing optoisolation, and that will not work well with WS2811 LEDs.

A possibly complicating factor may be the ATX power supply. They are intended to run with a fairly high and stable load and may not be handling the highly variable current from the LEDs well. If you got lucky with one then awesome, but it is a potential source of problems, especially when lightly loaded.
 
I'm a little confused by the signal names on the LEDs. The schematic has "VDD" connected to the power supply GND, and it has "VSS" connected to 5V on the power supply. That seems backwards. It's also not how any WS2812 LED strips I've every purchased are actually labeled, so maybe this is just a misunderstanding. But if you are working with just the 4 pin LED, you should know that "VSS" means GND and "VDD" means 5V on those LEDs. Getting the power backwards will (probably) damage the LED.

As previously mentioned, you also need a connection between Teensy's GND and the power supply GND. This is really important.

The 3rd point to consider is whether your PC power supply actually gives a clean and reliable 5V power when nothing is connected to the 12V power. Some power supplies do, but others behave very badly with no load on the 12V output. Check with a voltmeter. On DC volts mode, you should see 5V. On AC volts mode, you should see very close to 0 volts. The "bad" power supplies will have substantial AC voltage reading. Those can damage the LEDs and the 74ACHT125 chip, maybe even the Teensy in extreme cases.

A lesser concern is no ceramic capacitor close to pins 7 & 14 on the 74ACHT125. Normally a 0.1 uF capacitor is used, located physically close to those pins.
 
Thanks for all information Gremlin and Paul.
You are patient teachers.
Measurements taken across the atx power supply are 5.1v DC and 10.1 V AC which is nowhere near 0v. I shall invest in a regulated 5v power supply with a decent amp ratiing and power both teensy and liights with the same power supply. Once again i shouldnt have tried to cut corners.
 
Status
Not open for further replies.
Back
Top