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

Thread: T3.2 output 5v ?

  1. #1
    Senior Member
    Join Date
    Apr 2019
    Posts
    158

    T3.2 output 5v ?

    The 3.2 is 5v tolerant

    Is it possible to get the pwm channels to output 5v instead of 3.3v
    Last edited by Gadget999; 05-30-2019 at 06:06 PM.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,473
    Possible by adding a buffer chip, yes.

    Possible by only direct connection to Teensy 3.2's pins, no.

  3. #3
    Senior Member
    Join Date
    Apr 2019
    Posts
    158
    Hi Paul

    A logic level convertor should to the trick. Can they jump 3.3v up to 5v as well as 5v down to 3.3v

  4. #4
    Senior Member brtaylor's Avatar
    Join Date
    Mar 2016
    Location
    Portland, OR
    Posts
    538
    Are you asking because of servos? Anecdotally, all seem to be fine with 3.3V logic, even on high voltage supplies.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,473
    Depends on the type of level converter.

    Generally speaking, bidirectional converters can and they offer much more flexibility, but bidirectional circuits often have poor performance for PWM (and many other types of high speed signals). Unidirectional buffers usually offer better performance, with closely matched rise & fall times and propagation delays, which are highly desirable properties for preserving the PWM's duty cycle.

    Level conversion using transistors and pullup resistors tends to have vastly different properties for rising versus falling edges, which can distort or alter PWM signals, so you should probably avoid those types for converting PWM signals. Many companies marketing to makers sell cheap boards with these level converters, usually with descriptions that greatly over-promise the circuit's capabilities and usefulness. Truth is those transistor+resistors circuits have terrible performance for high speed signals and they badly corrupt signals like PWM and WS2812B (aka NeoPixel) data, where pulse widths matter.

    ....This is a question about PWM, right? Or maybe meant as a general conversation that just happened to mention PWM? Why you would need to "jump 3.3v up to 5v as well as 5v down to 3.3v" for PWM is something I'm having a hard time imagining.

  6. #6
    Senior Member
    Join Date
    Apr 2019
    Posts
    158
    Hi Paul, yes I am looking to raise the voltage of a pwm output so i can drive another device.

    Can you recommend a circuit or a transistor that will perform.

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,473
    How good & useful of a recommendation do you imagine I (or anyone) could give without knowing anything about the intended device you wish to use?

    For the common case of driving WS2812B LEDs, I usually recommend the 74HCT245 chip which we use on the Octo board.

    https://www.pjrc.com/store/octo28_adaptor.html

    100 ohm series resistors are used used for driving CAT5 or CAT6 cable, which has 100 ohm characteristic impedance. That combination works very well for that application.

    So if your device is a secret and you can't say anything at all, then there's my blind recommendation. Use 74HCT245.

  8. #8
    Junior Member
    Join Date
    Sep 2019
    Posts
    2

    Discrete level shifters?

    Quote Originally Posted by PaulStoffregen View Post
    Level conversion using transistors and pullup resistors tends to have vastly different properties for rising versus falling edges, which can distort or alter PWM signals, so you should probably avoid those types for converting PWM signals. Many companies marketing to makers sell cheap boards with these level converters, usually with descriptions that greatly over-promise the circuit's capabilities and usefulness. Truth is those transistor+resistors circuits have terrible performance for high speed signals and they badly corrupt signals like PWM and WS2812B (aka NeoPixel) data, where pulse widths matter.
    Thanks for the clarification. I had a CD74ACT14 available, and just connecting two inverters works fine to control a WS2812B. However, the ACT and HCT chips require at least 4.5V. I'm imagining that discrete circuits can go lower (e.g. when battery voltage drops -- teensy is fine down to 3.6V). I've tested two transistor inverters, an NPN/PNP circuit, and a TTL totem pole, with bad results as predicted. Is there really no way to construct a suitable discrete buffer?

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,473
    Quote Originally Posted by cbg View Post
    However, the ACT and HCT chips require at least 4.5V.
    While technically not within their specs, those chips will generally work at 3.6V. The voltage thresholds will scale with supply voltage, because the input circuits are just transistors where the effective logic threshold voltage is determined by the ratio of the transistor channel widths. Or really, it's their relative transimpedance, which depends on the size of the transistors. That's why 74HC and 74HCT are essentially the same chip... they just make the P-channel input transistors smaller.

    But if you want to be within specs, use SN74LV1T125. That's the buffer chip we use on Teensy LC. It's an amazing part, capable of running from 1.8V to 5V power, and doing both up and down level conversions within various ranges.

    http://www.ti.com/product/SN74LV1T125

  10. #10
    Junior Member
    Join Date
    Sep 2019
    Posts
    2
    Thanks Paul. I've settled on an 74ACT08 and will see how everything works out with batteries.

    I did test a TTL 7408, which works as well, but I'll not go into discrete buffers any further.

    The LV is SMD, which I'd prefer not to use right now. Maybe the CD series is worth a look in the future.

Posting Permissions

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