Teensy 4.1 power issues

Status
Not open for further replies.

Marathonman

Well-known member
I have had a Teensy 4.0 running my SPI shift register code for many months now. problem is i decided to step up to the Teensy 4.1 forward thinking to adding external current, voltage, ethernet and display for monitoring. problem is the power i am getting from the Teensy 4.1 is severely lacking to say the least. the demo i have on youtube is made with a Teensy 4.0 and the LED's are very bright, almost to bright yet with the Teensy 4.1 i can barely see the LED's and can not run the whole set of 8 shift registers at the same time without the Teensy shutting down.

I am extremely upset to say the least that the 4.1 is so lacking in power, irregardless of whether i purchased from adifuit or not, (here no stock) it still should not be so lacking in power. the board i have is a custom 8 shift register board that will be tied to a high side transistor board but as of this moment i am stuck scratching my head.




Code;
Code:
// This sketch controls multiple 74HC595 shift registers in cascade to electronically control Figuera's active inductor

// controller by switching on taps located on part G connected to transistors in a "Make Before Break" scenario. by changing

// tap locations continuously changes inductance which controls current flow of the primaries.

// this sketch utilizes timing overlap to eliminate back Bemf or Cemf that would occur with single on off tap. it mimics

// the brush rotation of a mechanical rotating brush thus creates a continuous increase/decrease current through the primaries.

// this sketch is distributed freely but if you use this program then post build on line give credit where credit is

// due and not claim as your own design.

// to adapt to your build change pin numbers, delay time.

// developed for the electronic Figuera community by (DL)aka Marathonman with all technical help and coding of PaulRB on Arduiono.cc
// Forum.



// Mosi to DS in pin 14 on 74HC595

// SCK to Seial Clock SHCk Shift Clock pin 11 on 74HC595

// SS, CS or any latch pin declared output to STCK latch pin 12 on 74HC595





#include <SPI.h>



unsigned long long int registerBuffer = 0b11;

byte shiftPos = 0;

bool shiftingLeft = true;

unsigned long long int lastUpdate;

const unsigned long long updatePeriod = 100000ULL; // change this microseconds figure to what you need for speed.

const byte latchPin = 10; // this can be changed to what ever latch pin you want.



void setup() {
  Serial.begin(115200);    // use you SPI pins found on all Arduino's. coding will automatically take care of the rest if SPI0 pins
                           // used.Mosi0,SCk0 Ect...

  SPI.begin();

  SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));

  pinMode(latchPin, OUTPUT); // pinMode can be changed to direct port manipulation (Faster)if port is known then that of digital
                             // read/wright.

}



void loop() {

  if (micros() - lastUpdate > updatePeriod) { //Is it time to update the registers?

    lastUpdate = micros();

    //Shift the register left or right

    if (shiftingLeft) {

      registerBuffer <<= 1; //Shift 1 place to left

      if (++shiftPos == 62 // < add how ever many pins or taps on part G you have up to unsigned long long of 64 buffer minus 2.

         ) shiftingLeft = false; //Time to switch direction?

    }

    else {

      registerBuffer >>= 1; //Shift 1 place to right

      if (--shiftPos == 0) shiftingLeft = true; //Time to switch direction?

    }

    unsigned long long int temp = registerBuffer; //Take a copy of the buffer

    SPI.transfer(&temp, 8); //Send the buffer to the registers // This must match your Shift Register count 1 through 8

    digitalWrite(latchPin, HIGH); //Latch the updated values into the register's output pins

    delayMicroseconds(1);

    digitalWrite(latchPin, LOW);

  }

}


Thanks in advance,

Marathonman
 
A separate 3.3V regulator will be needed for the LED circuit - the T4.1 has more devices on it that
use power than the T4.0, so less is available for off-board use. One of the compromizes on a compact
board full of electronics is there is little area left over for a regulator or buck converter, so compromizes
are made to fit everything on. There's also the 0.5A limit for USB power to consider.
 
A separate 3.3V regulator will be needed for the LED circuit - the T4.1 has more devices on it that
use power than the T4.0, so less is available for off-board use. One of the compromizes on a compact
board full of electronics is there is little area left over for a regulator or buck converter, so compromizes
are made to fit everything on. There's also the 0.5A limit for USB power to consider.

I just can not relate that answer to being the reason for the massive drop. even with just one 8 bit shift register it is amazingly dim. not everything is activated so there should be no power draw from that. granted i need to check it attached to my breakout board which connects to the transistor high side driver board. this board has a 1 amp regulator connected to it so yes it will supply more then what is needed.

Regards,
Marathonman
 
It is always useful how much current is drawn. You can measure this and compare it with the value printed on the card. Without knowing how much current is needed, we can only look into the crystal ball.
 
I will get the specs of the shift register and the LED's used which both are very low, then post them. i designed the LED Shift Register breakout boards so i know they are low power.
 
I will get the specs of the shift register and the LED's used which both are very low, then post them. i designed the LED Shift Register breakout boards so i know they are low power.

As a point of reference for comparison, in the initial hardware version of my TeensyMIDIPolySynth, I used 74HC595 shift registers to drive 42 LEDs , as well as 2 x 7-segment LED displays (*all* of which could be on at the same time) as described <here>. You'll note from that post that, after incorporating the 74HC595 shift registers, I discovered that the LEDs were *too bright*, so I added the ability to control the brightness by modulating the Output Enable pin on the 74HC595s to tone them down !! The very next post in that series provides a link to a a folder which also includes the pseudo schematic showing the hardware hookup that I used.

Since you have not provided schematics (as previously requested by several others), we can only guess as to what the cause of your problem might actually be. I would guess that you very likely have some minor hardware design/implementation problem, rather than a problem with the T4.1. I can speak from first-hand experience that the T4.1 can be used with the 74HC595 to drive LEDs just fine (maybe even *too* fine as noted !!).

Again, since I cannot look at your actual hookup, I can only speculate. Using a bucket-brigade of the 74HC595s, there should be very few connections to the Teensy. However (again, just a guess), you should *not* be expecting the regulator on your Teensy to provide the current required to drive the LEDs. That power should come from your raw power input (3.3VDC, 5VDC, etc,) or from some external regulator (if your raw input power is something greater that 3.3VDC or 5VDC). The output pins on the 74HC595 are capable of sinking/sourcing *much* more current than the Teensy pins can by themselves, & collectively, that power is *much* more than the Teensy on-board 3.3VDC regulator can supply after just a few LEDs. Potentially poor design (just a guess) in your implementation should certainly not be blamed on the Teensy !!

Help us to help you: please post the schematic of your 74HC595 hookup (we have your original pictures, but those don't really show what is hooked to what) & we will all be better able to help out, rather than just having to guess (you see where guessing has gotten us so far) !!

Mark J Culross
KD5RXT
 
Yes i am working on it. i work on a ranch so my time is very limited and have been very busy this week.
i have an external power supply for my shift register board at 5 volts 1 amp supplying the Teensy and the shift registers so NO the problem is not my board because the 4.0 runs just perfect on and off the board. it is the 4.1 that is failing miserably in this aspect and can not run all 8 shift registers connected on my board.

I am in the lab today so i will gather all necessary items then post later today.

Regards,
Marathonman
 
If you are not even able to measure the current (and show some schematics) and only make wild guesses.... sorry, that makes no sense. It does not matter much how you supply the 5V.
It is more likely that you made a mistake.

Both, 4.0 and 4.1 can deliver 250mA (maybe more). There isn't a big difference. They use even the same parts. The voltage regulator is the same.
 
It is impossible for there not to be a mistake on the 4.1 or possibly a power issue when the same chip is swapped out with the 4.0 and it works fine. it is possible i just have gotten a lemon which does happen in mass production always.
6-shift-register.png

The shift registers are 74VHCT595PW-118 TSSOP, Nexperia.
LED's are 743-IN-S85AT5UW SMD LED's, VF 3.0 V IF 5 ma.
Resistors are 754-RR1200Q-60R4-D-M 60.4 ohm

on the brake out board they are the same with the addition of LDO which is MIC39100-5.0WS. the new breakout schematic is EXACTLY like the video at the start of this thread that shows the 4.0 glaringly bright LED's. with the addition of the 4.1 the LED's are almost not visible and when attached to my breakout timing board the Teensy 4.1 shuts down and the 4.0 DOES NOT. same program, same schematic, same voltage, same board.
as you can visibly see for yourself the program shifts to and fro with only a few LED's on at a time which again the 4.0 is blazing and the 4.1 is failing.

Regards,
Marathonman
 

Attachments

  • 6-shift-register.png
    6-shift-register.png
    79.5 KB · Views: 71
Last edited:
That's a generic schematic, not useful. It does not even tell us wether you connected the boards to 5V or 3v3.
Your video in post #1 has no schematic. Go and buy a multimeter...
Is the voltage regulator warm?

Sorry, too much guessing here.
 
I know this is a general schematic and yes i have a multimeter thank you. the video posted IS the general schematic posted as in one and the same. no the voltage reg is not warm when used on my breakout board because it shuts down unlike the Teensy 4.0 that runs like a scalded dog. i will test the voltage reg with the 4.1 with the above video setup and i will get back with you.

I have tested the 4.1 with both 5 volts Vin and 3.3 through USB and both are the same outcome unlike the 4.0 that is blazingly bright.
just so you know i have NOTHING else connected but power, ground and SPI pins on the 4.0 as well as the 4.1 and the 4.1 still fails.

maybe i need to send it back to Adefruit and get my money back

Regards,
Marathonman
 
Status
Not open for further replies.
Back
Top