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

Thread: understanding current consumption on the teensy 4.0

  1. #1

    understanding current consumption on the teensy 4.0

    I have the teensy 4.0 as a flight controller on a quadcopter. i have a radio receiver, MPU-6050, and four motors that are being PWM controller and I plan to add a temperature sensor. bluetooth module and 4 ultrasonic sensors later. I wanna know if I can connect 3 regular LEDs using the digital pins of the teensy and a current limiting resistors in series.

    All these electronics are being powered by a 5V 3A power source from the drone, and so then the LEDs' 40mA current is trivial. but everything shares a common power source, so is it possible to control 3 LEDs while the teensy is receiving 5V 3A but also working with other electronics?

    I believe I heard the total current on a pin is 40mA, so does that mean I can 1.2A of powering from the teensy? (40mA x 30 pins). I think the max I heard was 200 or so mA

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,083
    The pins definitely can't source or sink 40 mA. If you have high power LEDs (most standard LEDs are 20 mA max), you'll need to have the Teensy pin turn on a transistor or other circuitry which can provide so much current.

  3. #3
    Quote Originally Posted by PaulStoffregen View Post
    The pins definitely can't source or sink 40 mA. If you have high power LEDs (most standard LEDs are 20 mA max), you'll need to have the Teensy pin turn on a transistor or other circuitry which can provide so much current.
    i plan to just use a standard 20mA LED. so i don't need a transistor right? i just thought the current limit for the teensy adds up, so if i have 20 pins each powering a 20mA LED, the 400mA would kill the teensy?

  4. #4
    Member
    Join Date
    Sep 2015
    Location
    Mechelen, Belgium
    Posts
    38
    I'm afraid you have an error in your calculations.
    If you look at the data on the PJRC site regarding teensy 4.0 than the max recommended current on a i/o pin is 4mA and not 40mA.

    Further is there a max current on the device which should be divided through all the pins which you will use

    Going over either limit would probably kill one or more of the pins or the teensy 4 itself. Using a driver should prevent this.

    Regards.
    Last edited by Hersoft; 09-11-2021 at 07:55 PM. Reason: grammar

  5. #5
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    1,075
    > connect 3 regular LEDs

    Of course application matters, but I have found 1mA to be plenty bright for generic indicator LEDs.

  6. #6
    Senior Member BriComp's Avatar
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    423
    Quote Originally Posted by Hersoft View Post
    I'm afraid you have an error in your calculations.
    If you look at the data on the PJRC site regarding teensy 4.0 than the max recommended current on a i/o pin is 4mA and not 40mA.

    Further is there a max current on the device which should be divided through all the pins which you will use

    Going over either limit would probably kill one or more of the pins or the teensy 4 itself. Using a driver should prevent this.

    Regards.
    Teensy' Tech Spec
    The above table from the PJRC web site lists the allowable current as 10mA per pin.
    Are you saying this is wrong?

  7. #7
    Member
    Join Date
    Sep 2015
    Location
    Mechelen, Belgium
    Posts
    38
    https://www.pjrc.com/store/teensy40....ent%20is%204mA.

    This is were I looked.

    So I would stay in the range of this but it does seems to be possible to go higher.

    Regards, Otto

  8. #8
    Senior Member BriComp's Avatar
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    423
    @Paul which is correct 10mA or 4mA?
    One or other of those pages needs changing, or a clarification made.

Posting Permissions

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