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

Thread: teensy 3.2/3.1 Problem...

  1. #1
    Junior Member
    Join Date
    Dec 2020
    Posts
    14

    teensy 3.2/3.1 Problem...

    Hello,
    i want to create this project.

    https://www.youtube.com/watch?v=oFEkNULnkzk

    A Teensy 3.2 / 3.1 is needed, for flashing I use the current Arduino IDE including the current Teensyduino.
    Compiling and then flashing runs without error messages. So everything seems to be fine.
    Unfortunately none of the connected LEDs light up.
    I tested it with three Teensy 3.2, but I don't think all three Teensy 3.2 are defective.
    Can someone help me?

    If more information is required, please write.

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,488
    Have the lights strings been tested to work?

    Double checked all the wiring ?

    Is the source code as published? Same library versions? No compile warnings or erros in Verbose mode?

  3. #3
    Junior Member
    Join Date
    Dec 2020
    Posts
    14
    I tested the LEDs on a similar project, they work there.

    All connections are ok.

    As I have already written, there are no error messages.
    I've attached a picture with the settings in the Arduino IDE.

    Click image for larger version. 

Name:	Teensy.jpg 
Views:	24 
Size:	43.1 KB 
ID:	22742

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,488
    Yes, no errors was apparent or it would not have loaded ... but once 'warnings' is typed the 'or errors' follows Although I sometimes jump to SerMon during compile and the prior sketch is running when there was an error and it isn't noticed when I have the sound off I don't hear the restart - but assume it did.

    Just because the LEDs worked before doesn't mean they are ready and able to work after being reconfigured - but not sure how to suggest testing them, unless there is a simple demo sketch that could be run, but without seeing posted code that can't be suggested.

  5. #5
    Junior Member
    Join Date
    Dec 2020
    Posts
    14
    I tested the LEDs with a similar project called "Plasma Lamp".
    This was done with an Arduino Nano. Everything works without problems here. The same LED arrangement is used for the current project.
    So I can say with certainty that the LEDs work.
    Please have a look at the link I gave above.
    The circuit is also shown there. There is also a link to the code.

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,764
    As a quick test, I programed that torchframe program onto a Teensy 3.2 and connected 8 WS2812B LEDs. The PCB I have here with 8 LEDs takes input from pin 1, so I just used a wire from pin 11 to 1 to make the connection. (fortunately, this program doesn't seem to do anything with pin 1, leaving the pin unconfigured, so wiring it to pin 11 isn't a conflict)

    The 8 LEDs all turn on bright white.

    Click image for larger version. 

Name:	leds.jpg 
Views:	23 
Size:	78.8 KB 
ID:	22743

    I have no idea what this program is supposed to do. (Sorry, I really don't have time to watch a youtube video) But hopefully this quick test with known-good LEDs can help.

    The 8 LEDs I connected definitely do light up, as you can see in this photo. So perhaps you have some sort of wiring or other hardware issue which is preventing your LEDs from working? Maybe we could help spot the problem is you showed pictures of your wiring?

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,764
    You might also have LEDs which can't accept a 3.3V signal. Most of the LEDs made in the last 2 years work fine with 3.3V signals. So do the very old ones from 2011-2013. Somewhere along the line, WS2812B LEDs were made which don't accept 3.3V signals. Those LEDs work with boards like Arduino Nano which have 5V signals, but they can't "see" the lower voltage signal from Teensy and all other modern boards which use 3.3V. With those LEDs, you need a buffer chip like 74HCT245 or 74AHCT125 to increase the signal voltage.

    But first, let us try to help you with the wiring. You might have a simple mistake or misunderstand which we can't guess from text. We can only see those sorts of things if you show photos of your wiring.

  8. #8
    Junior Member
    Join Date
    Dec 2020
    Posts
    14
    Well, the video only lasts 6 minutes. However thank you for your help.
    Can you please set the code here. Then I'll test with your code.

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,764
    Quote Originally Posted by minigl View Post
    Can you please set the code here. Then I'll test with your code.
    It's not my code. I ran the "torchframe" code linked from the youtube video's description.

    https://drive.google.com/file/d/1gsA...4zv-AsoM6/view

    That code has this on line 28, which is why I connected the LED signal wire to pin 11.

    Code:
    #define LED_PIN     11

  10. #10
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,764
    Looks like that code is also on github, perhaps a slightly newer version?

    https://github.com/evilgeniuslabs/torch

    But the copy I ran on the Teensy 3.2 you see in the photo was downloaded from the Google Drive link on the video description. It absolutely did turn the LEDs on very bright, as you can see in the photo.

    Not sure if that really helps you, but it's probably the best I can do. I've already given a couple blind guesses as to why your LEDs aren't turning on at all with Teensy 3.2. Really can't do anything more with so little info about how you're wiring the LEDs and which code you're actually running on Teensy.

  11. #11
    Junior Member
    Join Date
    Dec 2020
    Posts
    14
    Here the pictures of my wiring.
    Click image for larger version. 

Name:	Teensy1.jpg 
Views:	25 
Size:	33.8 KB 
ID:	22744Click image for larger version. 

Name:	Teensy2.jpg 
Views:	24 
Size:	30.7 KB 
ID:	22745Click image for larger version. 

Name:	Teensy3.jpg 
Views:	24 
Size:	35.4 KB 
ID:	22746Click image for larger version. 

Name:	Teensy4.jpg 
Views:	25 
Size:	36.1 KB 
ID:	22747

  12. #12
    Junior Member
    Join Date
    Dec 2020
    Posts
    14
    I also used the code from Github. It seems to be current.
    Did you also flash the code with the Arduino IDE?

  13. #13
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,615
    How about trying the simple FastLED bllink example, testing with various values for NUM_LEDS. Following works for me with 8-LED neopixel stick on pin 11 with 3.3v and GND from T3.2.
    Code:
    #include <FastLED.h>
    
    // How many leds in your strip?
    #define NUM_LEDS 4
    
    // For led chips like Neopixels, which have a data line, ground, and power, you just
    // need to define DATA_PIN.  For led chipsets that are SPI based (four wires - data, clock,
    // ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN
    #define DATA_PIN 11
    
    
    // Define the array of leds
    CRGB leds[NUM_LEDS];
    
    void setup() {
    
      FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
    }
    
    void loop() {
      // Turn the LEDs on, then pause
      for (int i = 0; i < NUM_LEDS; i++)leds[i] = CRGB::Red;
      FastLED.show();
      delay(500);
      // Now turn the LEDs off, then pause
      for (int i = 0; i < NUM_LEDS; i++)leds[i] = CRGB::Black;
      FastLED.show();
      delay(500);
    }
    also works with pin 11, 5V, GND
    Last edited by manitou; 12-05-2020 at 01:43 PM.

  14. #14
    Junior Member
    Join Date
    Dec 2020
    Posts
    14
    I'll test that later with the code shown. Then contact me.

  15. #15
    Junior Member
    Join Date
    Dec 2020
    Posts
    14
    Ok, I increased the number of LEDs to 60 and everything works.

  16. #16
    Junior Member
    Join Date
    Dec 2020
    Posts
    14
    Here an picture...Click image for larger version. 

Name:	20201205_155747.jpg 
Views:	21 
Size:	78.2 KB 
ID:	22749

  17. #17
    Junior Member
    Join Date
    Dec 2020
    Posts
    14
    So the "blink" code works. But why doesn't the code that I want to use in the project work? Does somebody still have an idea?

  18. #18
    Senior Member
    Join Date
    Dec 2013
    Location
    East Stroudsburg PA.
    Posts
    302
    So the "blink" code works. But why doesn't the code that I want to use in the project work?
    Who knows obviously seems like a code issue perhaps you should show us the full code.
    Look up ^^^^^^ Forum Rule: Always post complete source code & details to reproduce any issue!

  19. #19
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,764
    Quote Originally Posted by Chris O. View Post
    Forum Rule: Always post complete source code & details to reproduce any issue!
    I believe it's either the "torchframe.ino" code from the Google Drive link on the video description (from msg #1) or the somewhat newer "torch.ino" copy on github (from msg #10). But yeah, for anyone coming late to this thread, or even reading since the beginning, it's hard to follow which code is actually being used.


    Quote Originally Posted by minigl View Post
    So the "blink" code works. But why doesn't the code that I want to use in the project work?
    Can you be more specific about what is not working? In msg #1, you wrote "Unfortunately none of the connected LEDs light up". Is that still the case? In msg #6, I ran the "torchframe" code linked from msg #1 with 8 LEDs. You can see in my photo they definitely did light up.

    So are all the LEDs all staying unlit, or is something else about it not working?


    Does somebody still have an idea?
    I hope you can understand how the imprecise nature of your writing is making it very difficult for any of us to help you effectively. Still, we're trying. Please, be more specific in every message about exactly which code you are using and what you expected it to do and how the results you observed differed from those expectations

    Remember, we're all trying to help you troubleshoot an electronic project over the internet, where we can't see and experience what you're doing. The better you communicate which things you are actually trying, with which code, and what actually happens (photos are best), the easier and better we can help. As you can see from the many replies, we do want to help you. Please do yourself a huge favor and write more specific messages, so we can better help you.

  20. #20
    Junior Member
    Join Date
    Dec 2020
    Posts
    14
    @Chris O.
    At the moment I don't know how to set a code or file here.
    It is the code from the following link:

    https://www.youtube.com/watch?v=oFEkNULnkzk

  21. #21
    Junior Member
    Join Date
    Dec 2020
    Posts
    14
    @PaulStoffregen
    Sorry about the discrepancies.
    It is definitely the code from the following link: https://www.youtube.com/watch?v=oFEkNULnkzk
    So the Torchframe.ino code.


    All LEDs remain dark.
    And I've checked the wiring many times now.
    I don't see this as a problem because I'm a trained electronics technician. (Unfortunately no programmer, only Siemens S5 and S7)


    I also think it's nice that you want to help me.
    The one with the different code was my mistake.
    So it's the torchframe.ino code.

  22. #22
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,615
    I've run both the torchframe sketch and the torch sketch (github), with 8-LED stick on pin 11 of T3.2. I have nothing else connected (no buttons, no IR receiver, nothing on A0 and A1). The torch sketch dimly lights up LEDS 4-7 (red). The torchframe sketch has activity on LEDS 2-7 (dim red, some random flashing).

    Random data from analogRead() of unconnected A0 and A1 on T3.2
    Click image for larger version. 

Name:	a0a1.png 
Views:	15 
Size:	99.0 KB 
ID:	22783
    Last edited by manitou; 12-07-2020 at 04:17 PM.

  23. #23
    Junior Member
    Join Date
    Dec 2020
    Posts
    14
    @manitou
    8-LED stick?
    You mean an WS2812B Stripe with 8 LED`s?

  24. #24
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,615
    Quote Originally Posted by minigl View Post
    @manitou
    8-LED stick?
    You mean an WS2812B Stripe with 8 LED`s?
    yes, as referenced in post #13. I did not change NUM_LEDS in either torch.ino (240) or torchframe.ino (378)

  25. #25
    Junior Member
    Join Date
    Dec 2020
    Posts
    14
    ok, that was it then.
    thank you for your help.

Posting Permissions

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