Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: Exact meaning of '5V tolerant' and abbillity to work with 5v LEDS

  1. #1
    Junior Member
    Join Date
    Feb 2018
    Posts
    2

    Exact meaning of '5V tolerant' and abbillity to work with 5v LEDS

    Hi,

    I started a project with an Arduino Nano and some 5v WS2812B 5050 RGB programmable LEDS's at 144LED/m only to realize I will need considerably more RAM than the Nano offers - integrated SD card slot and higher clock speeds would be a much appreciated bonus. Thus my consideration of the teensy 3.6 or thereabouts.

    Q1 - What does it mean that some models are '5v tolerant'? Will accept being powered by 5v, will accept a 5v signal on an input pin, can output a 5v signal, something else, tolerate happily or with reduced service life etc?

    Q2 - How will the teensy play with the above mentioned LED lights strip? What's the simplest way - with the fewest and cheapest parts - to get them to talk?

    Q3 - Are there commodity LED strips with the same performance and support as above that work on the same voltage as the teensy?

    Note - The project will entail the driving micro controller (be that a teensy, arduino or other), LED's and all associated components be battery powered and space confined. Therefore I was consider one or two 18650's and with the fewest number of components. I'm specifically hoping to reduce the number of transformers or buck converters as well as communication between controller and LED's to a minimum.

    Could anyone provide some advice on how these will play together?

    Thanks

  2. #2
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,021
    will accept up to 5v on a digitalpin, NOT analogpin (most if not all, at least)...
    a 5v tolerant micro which is running 3.3v native power, for digital, registers 1 for 5v, 0 for 0v
    the 5v wont kill the 3.3v pin (i also assume you know you should put series resister to protect the pin)
    for analog pins that do support tolerant 5v, the read value will be of 3.3v limit max, it wont calculate up to 5v
    so from 0-3.3v you get a reading of 0-1023 (depending on resolution)
    and from 0-5v you get a reading of 0-1023 also, but anything between 3.3-5v will always show as 1023...

  3. #3
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,070

    Cool

    Quote Originally Posted by chrisbay90 View Post
    Hi,

    I started a project with an Arduino Nano and some 5v WS2812B 5050 RGB programmable LEDS's at 144LED/m only to realize I will need considerably more RAM than the Nano offers - integrated SD card slot and higher clock speeds would be a much appreciated bonus. Thus my consideration of the teensy 3.6 or thereabouts.

    Q1 - What does it mean that some models are '5v tolerant'? Will accept being powered by 5v, will accept a 5v signal on an input pin, can output a 5v signal, something else, tolerate happily or with reduced service life etc?
    5v tolerant means that if you put 5v as input for one of the digital pins, it will not fry the Teensy. All outputs (except the one special port on the LC) are always 3.3v. So for your normal WS2812B LEDs, you will need to do voltage level shifting. However the WS2812B LEDs have strict timing windows, and the normal level shifter meant for i2c ports just will not do.

    Typically, the level shifter of choice is the 74AHCT125:


    Teensys can be powered by:
    • 5v via the USB port (assuming you have not cut the VIN/VUSB trace underneath the Teensy)
    • 3.7-6v via the VIN pin (do not connect the USB if you power the VIN pin without cutting the VIN/VUSB trace)
    • 3.3v via the 3.3v pin (do not connect other power sources if you use this)


    Here is an old post about cutting the VIN/VUSB trace:


    If you power the Teensy via USB or the VIN pin, the Teensy has a voltage regulator that converts the voltage to 3.3v to use.


    Quote Originally Posted by chrisbay90 View Post
    Q2 - How will the teensy play with the above mentioned LED lights strip? What's the simplest way - with the fewest and cheapest parts - to get them to talk?
    Note there is a difference between cheapest and simplest.

    If your memory requirements will fit into 8K, the simplest approach is to use the Teensy LC. The LC has one pin that is connected to a voltage level shifter that is fast enough to convert the 3.3v signal from the A3 pin to VIN/VUSB.

    Assuming the LC will not work for you, and you want to step up to the Teensy 3.2, and don't have thousands of lights, one approach is to use the prop shield to provide the level shifting. This is useful if you want to control lights and possibly have some sound. There is the low cost version without motion sensors, and the version with motion sensors:


    Or you can buy a 74AHCT125, and connect it up. At a few dollars, it is the cheapest approach.

    Adafruit has a howto guide for connecting WS2812B's (what they call neopixels):


    Typically, you want to power the LEDs from your power source, and connect the Teensy to that.

    If you have only a few LEDs, you can use USB power, and use the VIN pin to power the LEDs. However, you are limited to at most 500ma with this approach.

    If you are going to have hundreds of LEDs, you have to worry more about powering the LEDs.

    If you have thousands of LEDs, you probably should consider using the octows2811 board that will work with the 3.2/3.5/3.6. The octows2811 board allows you to connect up to 8 parallel streams of LEDs, and the accompanying library uses all of the special features of the Teensy to really pump out the lights:


    Quote Originally Posted by chrisbay90 View Post
    Q3 - Are there commodity LED strips with the same performance and support as above that work on the same voltage as the teensy?
    It really depends on the voltage rating of the chip. Some chips require 5v. The newer neopixels from Adafruit list the voltage spec as 3.5-5.5v. If you power the Teensy with 3.7v (maybe up to 4.1/4.2v), such as with a lipo battery, you don't need the voltage level shifter, as the 3.3v signal from the Teensy will be read by the LED strips. If you are powering the LED strips with 5v, then you cannot be guaranteed that the strips will see the signal. I have strips will not see 3.3v signals, and for the simple strips (1 or 2 16-LED rings) that are powered via VIN/USB, the strip will not work when I program the Teensy with USB, and I just program it, remove the USB power, and use a lipo battery to run the lights.

    Quote Originally Posted by chrisbay90 View Post
    Note - The project will entail the driving micro controller (be that a teensy, arduino or other), LED's and all associated components be battery powered and space confined. Therefore I was consider one or two 18650's and with the fewest number of components. I'm specifically hoping to reduce the number of transformers or buck converters as well as communication between controller and LED's to a minimum.

    Could anyone provide some advice on how these will play together?

    Thanks

  4. #4
    Junior Member
    Join Date
    Feb 2018
    Posts
    2
    Thank you both. That was extremly informative! Lots of very valuable breakdown. I think im going to go with singular 5v supply for teensy and lights (either to USB or VIN), ws2812b leds and a level shifter - probably 74AHCT125

    Theyre very cheap and compact, its just a shame the postage (to Australia from all sellers ive found) makes them rather pricey unless in bulk.

    Thanks again.

  5. #5
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,070
    Quote Originally Posted by chrisbay90 View Post
    Thank you both. That was extremly informative! Lots of very valuable breakdown. I think im going to go with singular 5v supply for teensy and lights (either to USB or VIN), ws2812b leds and a level shifter - probably 74AHCT125

    Theyre very cheap and compact, its just a shame the postage (to Australia from all sellers ive found) makes them rather pricey unless in bulk.

    Thanks again.
    Note, look for an non-Adafruit branded 74AHCT125 from an Australian seller. Even within the US, it wouldn't make sense to buy a single one from Adafruit due to the shipping cost. Typically when I buy from Adafruit, I try to buy several things (either different things or multiple of a component to have it on hand) at a time to reduce the impact of the shipping cost. Maybe some Australian users can pipe up with their favorite sellers.

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,311
    Almost any logic chip with a "T" in the letters after "74" can be used. For example, a 74VHCT04 would work. Usually the "T" means it runs on 5 volts but has "TTL level" input, so anything over 2.0 volts will be considered logic high and anything under 0.8V is logic low.

    However there are a few exceptions like "LVT" which only run from 3.3V power, so you do need to check the specs. Generally you're looking for a 5V power spec and VIH at 2.0V min and VIL at 0.8V max.

  7. #7
    Senior Member
    Join Date
    Sep 2015
    Location
    Taiwan, Asai. (Traditional Chinese)
    Posts
    154
    Hello, I had some try that didn't use a level shifter and uses things below,

    18650 Lithium Battery(4.2V) -> neopixel/dotstar's Vin & Teensy's Vin
    Battery Gnd -> neopixel/dotstar's Gnd & Teensy's Gnd
    Teensy -> Dout(&Cout if dotstar) -> neopixel/dotstar Din(Cin)

    did work pretty stable, however this is not a regular use and probably have hidden problem (hadn't occur to me anyway)
    My device also did fine with 5V, when using USB to upload&test code and that time the battery switch is off.
    I think changing the Power from 4.2V battery to 5V USB can work the same

    you can try if it is stable enough for your usage,
    and care, for LED strips over 30? LEDs
    it could possible overdrain currency from your USB and the LEDs wont lit properly (with more red, less blue and signs of insufficient power)

  8. #8
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,070
    Quote Originally Posted by Po Ting View Post
    did work pretty stable, however this is not a regular use and probably have hidden problem (hadn't occur to me anyway)
    My device also did fine with 5V, when using USB to upload&test code and that time the battery switch is off.
    I think changing the Power from 4.2V battery to 5V USB can work the same
    I have some WS2812B LEDs that will not work if they are fed 5v power (i.e. from USB) and I drive it with a 3.3v processor (such as Teensy, but also the Gemma/Trinket). Some will work fine. Mostly, the older neopixel rings I got from Adafruit a few years ago work fine, but newer rings/strips typically don't work. One work around is to program the chip with USB and then reboot it with battery power to test it.

    If yours works that's great. But now I tend to always include the level shifter just in case I need to replace the LEDs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •