Teensy 3.2 Pin output voltage <1V, Broken?

Status
Not open for further replies.

xcruell

Member
Hey everyone,
i just recieved my teensy 3.2 to drive my 15m WS2811 12V (testing with 5meters) but after i upload the sketch, nothing happens.
after i measured the pins output voltage, i saw its only 0.8-0.9V max.
Shouldn't it be 3.3v on the data lines, since my esp8266 and arduino nano are both giving 3.3 on the pins.

Im currently using FastLED, but i get the same result with octoWS2811.
The current sketch is working on both the esp8266 and the arduino nano.
i will add my sketch to this post down below.

When i apply power to the led strip after the teensy started up, all leds are randomly colored.

The strip is powered by a 12v dc psu, the teensy by a powerbank, shared ground. (if everything is working, ill power the teensy from the 12v psu with a step down)
I also got a 100ohm resistor between the teensy pin and the din of the strip to reduce noise.

If you need any more info, i surely will supply them asap.

regards

Code:
#include "FastLED.h"

FASTLED_USING_NAMESPACE

// FastLED "100-lines-of-code" demo reel, showing just a few 
// of the kinds of animation patterns you can quickly and easily 
// compose using FastLED.  
//
// This example also shows one easy way to define multiple 
// animations patterns and have them automatically rotate.
//
// -Mark Kriegsman, December 2014

#if defined(FASTLED_VERSION) && (FASTLED_VERSION < 3001000)
#warning "Requires FastLED 3.1 or later; check github for latest code."
#endif

#define DATA_PIN    3
//#define CLK_PIN   4
#define LED_TYPE    WS2811
#define COLOR_ORDER GRB
#define NUM_LEDS    100
CRGB leds[NUM_LEDS];

#define BRIGHTNESS          96
#define FRAMES_PER_SECOND  120

void setup() {
  delay(3000); // 3 second delay for recovery
  
  // tell FastLED about the LED strip configuration
  FastLED.addLeds<LED_TYPE,DATA_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
  //FastLED.addLeds<LED_TYPE,DATA_PIN,CLK_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);

  // set master brightness control
  FastLED.setBrightness(BRIGHTNESS);
}


// List of patterns to cycle through.  Each is defined as a separate function below.
typedef void (*SimplePatternList[])();
SimplePatternList gPatterns = { rainbow, rainbowWithGlitter, confetti, sinelon, juggle, bpm };

uint8_t gCurrentPatternNumber = 0; // Index number of which pattern is current
uint8_t gHue = 0; // rotating "base color" used by many of the patterns
  
void loop()
{
  // Call the current pattern function once, updating the 'leds' array
  gPatterns[gCurrentPatternNumber]();

  // send the 'leds' array out to the actual LED strip
  FastLED.show();  
  // insert a delay to keep the framerate modest
  FastLED.delay(1000/FRAMES_PER_SECOND); 

  // do some periodic updates
  EVERY_N_MILLISECONDS( 20 ) { gHue++; } // slowly cycle the "base color" through the rainbow
  EVERY_N_SECONDS( 10 ) { nextPattern(); } // change patterns periodically
}

#define ARRAY_SIZE(A) (sizeof(A) / sizeof((A)[0]))

void nextPattern()
{
  // add one to the current pattern number, and wrap around at the end
  gCurrentPatternNumber = (gCurrentPatternNumber + 1) % ARRAY_SIZE( gPatterns);
}

void rainbow() 
{
  // FastLED's built-in rainbow generator
  fill_rainbow( leds, NUM_LEDS, gHue, 7);
}

void rainbowWithGlitter() 
{
  // built-in FastLED rainbow, plus some random sparkly glitter
  rainbow();
  addGlitter(80);
}

void addGlitter( fract8 chanceOfGlitter) 
{
  if( random8() < chanceOfGlitter) {
    leds[ random16(NUM_LEDS) ] += CRGB::White;
  }
}

void confetti() 
{
  // random colored speckles that blink in and fade smoothly
  fadeToBlackBy( leds, NUM_LEDS, 10);
  int pos = random16(NUM_LEDS);
  leds[pos] += CHSV( gHue + random8(64), 200, 255);
}

void sinelon()
{
  // a colored dot sweeping back and forth, with fading trails
  fadeToBlackBy( leds, NUM_LEDS, 20);
  int pos = beatsin16( 13, 0, NUM_LEDS-1 );
  leds[pos] += CHSV( gHue, 255, 192);
}

void bpm()
{
  // colored stripes pulsing at a defined Beats-Per-Minute (BPM)
  uint8_t BeatsPerMinute = 62;
  CRGBPalette16 palette = PartyColors_p;
  uint8_t beat = beatsin8( BeatsPerMinute, 64, 255);
  for( int i = 0; i < NUM_LEDS; i++) { //9948
    leds[i] = ColorFromPalette(palette, gHue+(i*2), beat-gHue+(i*10));
  }
}

void juggle() {
  // eight colored dots, weaving in and out of sync with each other
  fadeToBlackBy( leds, NUM_LEDS, 20);
  byte dothue = 0;
  for( int i = 0; i < 8; i++) {
    leds[beatsin16( i+7, 0, NUM_LEDS-1 )] |= CHSV(dothue, 200, 255);
    dothue += 32;
  }
}
 
Last edited:
I already tried that before, without success.

Why is it working with the esp and arduino, if its disabled by default? :eek:

regards
 
how do you expect to test the output pin with a voltage meter without it being an output? do you expect 400/800khz to register? lol
 
Well as i said, even after setting it to an output with "pinMode(3, OUTPUT);" doesnt make a change.

regards

edit: i got the latest fastled library from github, 3.1.6
 
pinMode(3,OUTPUT) and digitalWrite(3,1) doesnt work? teensy problem.
otherwise, update your fastled library which recently added teensy updates
 
yeah both dont work.
Thats odd, because i need an ic to drive my ws2811. my arduino nano, pro mini, esp8266 and 32 are too weak for this job.

thanks anyway.
regards
 
if the first wont work thats a priority
is it well soldered? you should get 3.3v after you set output and digitalwrite high
 
Yes it is. pretty similar to my esps.
interesting thing is, i get the same voltage on all pins i choose in the sketch.
3V and Vout both supply 3.3v.

regards
 
the teensy by a powerbank

T3.2 on powerbank?
there are only a few powerbanks that do not shutdown with the little current T3.2 draws.

can you simply try to download blink example and see if that is working? (with/without other HW), (with/without powerbank (i.e. from computer))
 
yeah both dont work.
Thats odd, because i need an ic to drive my ws2811.

Any chance you simply connected this IC incorrectly? Maybe show us some photos and we might be able to help?

Have you tried running the LED blink example set to pin 3, and then measure the DC voltage directly at pin 3 (not the output of your chip, but right at the Teensy pin)?

Or maybe first just upload the LED blink with the default pin 13, and observe whether the LED really blinks? That can at least check if your Teensy is still working.

When working with 12V LED strips, extreme caution is needed. If any 12V wire touches Teensy for even a brief moment, it will almost certainly destroy your Teensy. You can also damage your PC if plugged into the USB port, so please be extremely careful with those 12V wires!
 
youll know if you burnt it with a 12v signal, when you plug it in the chip will get very hot after a few secs
 
@PaulStoffregen
Thanks for your answer.
I uploaded the LED blink sketch and get 3.3v pulses, how it should work.

I know 12v will insta kill 3-5v ics. I burned one of my arduino nanos once. I can use that one as a hand heater now :D

So since the blink sketch works fine, the teensy is fine too.

i attached 3 pictures.
Is it normal that i get 2.2v from the data line of the strip?

regards
 

Attachments

  • IMG_20171226_203029.jpg
    IMG_20171226_203029.jpg
    128.7 KB · Views: 106
  • IMG_20171226_203109.jpg
    IMG_20171226_203109.jpg
    145.3 KB · Views: 116
  • IMG_20171226_203403.jpg
    IMG_20171226_203403.jpg
    135.9 KB · Views: 69
Last edited:
i swapped the teensy out for a arduino nano, i didnt know the nano was capable of driving 15m ws2811 :eek:
 
Last edited:
Is it normal that i get 2.2v from the data line of the strip?

If the program is continuously transmitting to the LEDs, then any voltage from 0.66 to 2.64 volts would be valid. Zero bits are a narrow pulse of approx 20% duty cycle, which would measure 3.3V * 0.20 = 0.66 volts, if repeating throughout the entire measurement time of your voltmeter. One bits are wider pulses, between 50% to 80% duty cycle. So if all 1s are being transmitted, you could expect a voltmeter to read between 1.65V to 2.64V.

Of course, if the program is transmitting bursts of data, which is pretty common if the code is written to update the LEDs at a particular frame rate like 30 or 50 or 60 Hz, then you'd expect to see lower numbers. If the bursts don't exactly align with the timing of your multimeter's measurement periods, you could also expect to see the number fluctuate quite a bit, as the meter sometimes measures more of the bursts and other times measures more of the gaps between them.

Most programs don't just send the exact same data over and over to the LEDs, because that's boring and useless. The LEDs retain the last setting, so there's no reason a program would send the same data repetitively unless it's specifically been designed for signal testing. Real programs do animations which change the colors rapidly. You can expect those sorts of programs to have a good mix of 0 and 1 pulses. Voltages between 0.66 and 2.64 would be "normal" when running normal LED animations. The specific voltage you should see depends on the mixtures of 0 and 1 pulses, and whether the program is waiting between transmissions.
 
Thanks for the good explanation.
But the thing is that i get the ~2.2v directly from the strip, without any ic connected
Just power and ground from the psu, measured the data line and ground.
 
Status
Not open for further replies.
Back
Top