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

Thread: Teensy 4.1 TX pin max current sink

  1. #1
    Junior Member
    Join Date
    Apr 2021
    Posts
    8

    Teensy 4.1 TX pin max current sink

    Is it possible to use the Teensy 4.1 TX pins to sink 10mA, coming from an optocoupler's LED? And doing this on all 8 TX pins?
    I found a post on the forum mentioning a 4ma max current/pin, is this correct?
    The TX pins are used for DMX data (250 kbps baud rate). What would be the recommanded way of avoiding the TX pins for sinking the current?
    Thanks.

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    2,018
    I think the 4mA is the max nominal output drive current setting for a pin - not the abs max current you can actually draw - I can't
    remember seeing that in the datasheet when I was looking.

  3. #3
    A couple of questions:

    Does the optocoupler really require 10mA?

    Do you really need optical isolation? (This implies that the receiver doesn't work well with others.)

  4. #4
    Member
    Join Date
    Apr 2021
    Location
    Finland
    Posts
    30
    To avoid sinking current with pins, you can use a driver IC, or suitable high-drive opamp, or, like the pin seems to be used to just pull down, drive a transistor with the pin, transistor driving that LED.

    I would also take a look at other options than opto-isolators. (Just a quick search lead to RS485 and found hits among Maxim, TI, Analog Devices, ...)

  5. #5
    Junior Member
    Join Date
    Apr 2021
    Posts
    8
    Quote Originally Posted by UhClem View Post
    A couple of questions:

    Does the optocoupler really require 10mA?

    Do you really need optical isolation? (This implies that the receiver doesn't work well with others.)
    The optocoupler (ON HCPL2630) sheet states between 6.3 and 15mA for the high level input current.
    I see optical isolation recommended for use in theaters, with the high voltage equipment there ("protect the device from damage in the event of dimmer failure, the Opto Isolator may also be used to eliminate ground loops").

    Quote Originally Posted by bugi74 View Post
    To avoid sinking current with pins, you can use a driver IC, or suitable high-drive opamp, or, like the pin seems to be used to just pull down, drive a transistor with the pin, transistor driving that LED.

    I would also take a look at other options than opto-isolators. (Just a quick search lead to RS485 and found hits among Maxim, TI, Analog Devices, ...)
    Yes the optocoupler would feed into a Maxim MAX485 transceiver. I guess a transistor between the teensy and the optocoupler's LED input is a standard way to relieve the Teensy of source/sink duties.

  6. #6
    Member
    Join Date
    Apr 2021
    Location
    Finland
    Posts
    30
    Quote Originally Posted by DGK View Post
    Yes the optocoupler would feed into a Maxim MAX485 transceiver. I guess a transistor between the teensy and the optocoupler's LED input is a standard way to relieve the Teensy of source/sink duties.
    Search with "RS485 isolator"; the point is, there are other types of isolation than optical. I.e. the opto-isolator can be replaced with something that requires much less driving current from the IO-pins. Nice solutions include also the transceiver in the same chip. And do voltage shifting (MCU side can work at its safe 3V, while the DMX side can have e.g. 5V).

    For example (and just as an example, don't want to push towards choosing a particular brand/solution), ... oh oops.. almost tripped here; the first example was claiming to eliminate the need for optocouplers, but actually had some inside :P Okay, second hit:
    https://www.ti.com/lit/an/slla416b/slla416b.pdf
    ... from which to ...
    https://www.ti.com/product/ISO1410

    See its datasheet and first application note for reference design. And then note that there are competing products, possibly cheaper.

  7. #7
    Quote Originally Posted by DGK View Post
    The optocoupler (ON HCPL2630) sheet states between 6.3 and 15mA for the high level input current.
    That current is required to meet all specifications for that very high speed part. What is really required for your low speed application? And high impedance load? See Fig. 6 which plots output voltage vs. input current with several loads.

    When I worry about high voltages and ESD, the MAX485 is not my first choice. MAXIM has plenty of drivers that are much more rugged.

    Oh, since you are isolating the Teensy from the drivers, are you using a single supply for all of the drivers? That would make the isolation from the Teensy pretty useless. Perhaps one of the isolated drivers that MAXIM makes would be more appropriate. Or perhaps end equipment that had better failure modes.

  8. #8
    Junior Member
    Join Date
    Apr 2021
    Posts
    8
    That's a great find, down the part search rabbit hole I go :-) thanks!

    Quote Originally Posted by bugi74 View Post
    Search with "RS485 isolator"; the point is, there are other types of isolation than optical. I.e. the opto-isolator can be replaced with something that requires much less driving current from the IO-pins. Nice solutions include also the transceiver in the same chip. And do voltage shifting (MCU side can work at its safe 3V, while the DMX side can have e.g. 5V).

    For example (and just as an example, don't want to push towards choosing a particular brand/solution), ... oh oops.. almost tripped here; the first example was claiming to eliminate the need for optocouplers, but actually had some inside :P Okay, second hit:
    https://www.ti.com/lit/an/slla416b/slla416b.pdf
    ... from which to ...
    https://www.ti.com/product/ISO1410

    See its datasheet and first application note for reference design. And then note that there are competing products, possibly cheaper.

Posting Permissions

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