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

Thread: Ambient Lighting - Upgraded from UNO R3 to Teensy 4 and there are lots of issues.

  1. #1
    Junior Member
    Join Date
    Jan 2021
    Posts
    13

    Ambient Lighting - Upgraded from UNO R3 to Teensy 4 and there are lots of issues.

    Background:

    - This is for work.
    - I am using a custom three display Processing (v2.2.1) sketch on a Win 10 machine that connected to my UNO R3 via USB running 'LEDstream_FastLED' on the UNO.
    -When I inherited this program we were using [Adalight 36mm square digital RGB LEDs](https://www.adafruit.com/product/683)
    -I switched us to 5v 30 LED/m WS2812b (GRB), everything works wonderfully.
    -We are looking to move production of this solution in-house and as I need to teach others how to build the controller, it seemed smarter to move to the Teensy 4 as it is not only more powerful, it would only require soldering three wires as opposed to all of the pins on the ProtoShield and the three connector wires.

    Where I stand presently:

    - I have three Teensy 4s each with the data wire hooked up to a different pin. 11, 14, 15 due trying to get the pin to line up with the UNO (UNO Pin11 SPI Master our - T4 Pin 14)
    - When I run lighting tests, the color reproduction is spot on.
    - When I launch processing color is WAY off. A Red square will show Greenish-blue, if I switch the color from GRB to RGB Red shows as Pink.
    - With the UNO when the program launches all of the LEDs turn off until they are reproducing color. The Teensy goes pure white. With Red showing as Pink I am wondering of there is a command that is reversed, Red shows Green, Black is White....


    UNO R3

    Teensy 4


    I can post code if needed, however, I was hoping that there might be some other suggestions I could try first as I really want to do the leg work on this to improve my knowledge and troubleshooting skills.

    Thank you all in advance!

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,967
    Note, the Teensy 4 only has pin 11 being SPI MOSI, pin 12 being SPI MISO, and pin 13 being SPI SCLK. In particular, pin 14 is not the SPI MOSI pin. On the Teensy 3.x, pin 14 was an alternate for SPI SCLK (normally pin 13), but the Teensy 4 does not support this.

    Given you are going from a UNO to a Teensy, you may have voltage issues. The Teensy only runs at 3.3v while the UNO runs at 5v. Some devices that are 5v will not always recognize 3.3v signals. Depending on who made the WS2812B strands, there are so-called grumpy LED strips that just will not work if you don't shift the voltage. However, since WS2812B has fixed timing cycles, you would need to use a voltage level shifter that is fast enough. The 74AHCT125 tends to be the go-to device for doing the level shifting.

  3. #3
    Junior Member
    Join Date
    Jan 2021
    Posts
    13
    Saying that I am still testing with Pin 11, that shouldn't that cause the error in color reproduction, correct?

    If so, I may very well need to smack myself for my mistake.

    I use two 5v 10a PSUs to power the lights, so I am not sure if voltage would be an issue. Also, I am tied into the 5v pin on the Teensy.

  4. #4
    Junior Member
    Join Date
    Jan 2021
    Posts
    13

  5. #5
    Junior Member
    Join Date
    Jan 2021
    Posts
    13
    Also, if the LEDs are lighting without issue when running the Example "Teensy 4" -> Adafruit NeoPixel -> strandtest would I still need to be worried about voltage?

  6. #6
    Junior Member
    Join Date
    Jan 2021
    Posts
    13
    Good morning. I received my 74HCT125 and wired it up based on what others who are using a T4 and NeoPixels . I can no longer get anything to display, even the standard StrandTest.

    I am running

    T4 Pin11 to 1A
    1Y to NeoPixel Din

    Power Ground to Ground and 1OE
    Power 5v to VCC


    Help please.

    Click image for larger version. 

Name:	T4 and Level.jpg 
Views:	17 
Size:	127.1 KB 
ID:	23352

    Click image for larger version. 

Name:	Level.jpg 
Views:	12 
Size:	113.9 KB 
ID:	23353

  7. #7
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    7,955
    1) It does not work to just plug the pins into the teensy.
    They give no - or very bad - contact.

    You need to solder them.

    I see no solder on 3 (or is it 5?) Volt +

    If hope not both, USB AND external 5V are connected?

    2) Output-enable is not connected.
    Edit: Oh no, sorry, did not see the black wire.
    Last edited by Frank B; 01-19-2021 at 03:23 PM.

  8. #8
    Junior Member
    Join Date
    Jan 2021
    Posts
    13
    I soldered the pins I was using, GND and pin 11. The 5v was not soldered as I had read that I did not need it because I am using an external 5v source. I forgot to pull the lead before the photo. I'll solder the 5v just in case I need it.

  9. #9
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    7,955
    That's right. You should disconnect it. If the voltage comes from external.
    Are the wires OK? I had more than once problems with faulty, cheap china wires..

    If you have a DVM you can test if the pins on the 74 have the correct voltages.

    You can also write a short "Blink" program that should "Blink" on PIN11 - then you can measure the output on the 74x if it works.

    If the hardware is OK, and verifired that it works then, it might be a softwareproblem.

  10. #10
    Junior Member
    Join Date
    Jan 2021
    Posts
    13
    Sooooo...it turns out I did need the 5v pin.

    Click image for larger version. 

Name:	5v soldered.jpg 
Views:	12 
Size:	118.5 KB 
ID:	23354


    If I unplug it, then the strip dies.

  11. #11
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    7,955
    That makes no sense.

    Be aware - you're feeding your mac with your PSU now.
    Not healthy.

  12. #12
    Junior Member
    Join Date
    Jan 2021
    Posts
    13
    What do you think would cause it? (Before I added the Level Shifter, the T4 would run without being plugged into USB, now it HAS to be plugged in)

    Also, not that I think it would matter, however, it is a Dell.

  13. #13
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    7,955
    Ok, Dell

    It is more likely a loose contact somewhere else.
    Remove the cable to Teensy 5v if you're using a PSU.

  14. #14
    Junior Member
    Join Date
    Jan 2021
    Posts
    13
    Ok. I'll start testing wires.

    Thank you sir.

  15. #15
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    7,955
    Or have you cut the contacts under the teensy?
    In this case the connection would be right...

  16. #16
    Junior Member
    Join Date
    Jan 2021
    Posts
    13
    Quote Originally Posted by Frank B View Post
    Or have you cut the contacts under the teensy?
    In this case the connection would be right...
    Connection has not been cut.

  17. #17
    Junior Member
    Join Date
    Jan 2021
    Posts
    13
    All wires test good. I cannot figure out why it needs its 5v connector energized.

  18. #18
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    7,955
    Can you measure the voltage there? (Without your wire connected)
    Take a look at the Teensy schematic. Vin (on the board it's called "5V") is directly connected to USB. So you connect the PSU with your Dell, if you use that wire..


    I don't know what the problem is.. it should work

  19. #19
    Junior Member
    Join Date
    Jan 2021
    Posts
    13
    Quote Originally Posted by Frank B View Post
    Can you measure the voltage there? (Without your wire connected)
    Take a look at the Teensy schematic. Vin (on the board it's called "5V") is directly connected to USB. So you connect the PSU with your Dell, if you use that wire..


    I don't know what the problem is.. it should work
    My digital meter is at home, however, with the analog one at the office, both the DC jack, and the 5v VIN so ~5v (wire from DC to Teensy disconnected)

    Click image for larger version. 

Name:	DC Jack.jpg 
Views:	10 
Size:	141.9 KB 
ID:	23370

    Click image for larger version. 

Name:	5v VIN.jpg 
Views:	10 
Size:	68.1 KB 
ID:	23371

    EDIT: The ground plugged into the Hot row was moved back to the Ground. The Hot row on that side was never energized so there was no chance of damaging the board.

  20. #20
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    7,955
    Quote Originally Posted by OGShua View Post
    My digital meter is at home, however, with the analog one at the office, both the DC jack, and the 5v VIN so ~5v (wire from DC to Teensy disconnected)

    Click image for larger version. 

Name:	DC Jack.jpg 
Views:	10 
Size:	141.9 KB 
ID:	23370

    Click image for larger version. 

Name:	5v VIN.jpg 
Views:	10 
Size:	68.1 KB 
ID:	23371
    So, both show ~5v.

    Exactly right.
    I have NO Idea why your LED only work with the PSU 5V line connected to the Teensy.
    A ground loop?

  21. #21
    Junior Member
    Join Date
    Jan 2021
    Posts
    13
    I have another Teensy. I'll wire it up this week and test...maybe I messed up this board somehow....

    Thank you for all of your input, honestly.

Posting Permissions

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