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

Thread: No communication with teensy 4.1

  1. #1
    Junior Member
    Join Date
    Nov 2020
    Posts
    3

    No communication with teensy 4.1

    Hi I am new here and in the world of teensy's. I have no background in electrical engineering or programming, I have programmed with an arduino a few times. This is the first time with a teensy mircocontroller.


    Problem:
    After receiving the teensy I soldered the headers at home. The teensy connected to the PC. With the teensy.exe demo blink hex file uploaded first the fast blink then the slow one.
    Then uploaded with the teensyduino blink sketch. Everything went great. Then uploaded my custom MIDI code (see project / background below) without LED code added. The code worked (at least the pc saw the teensy as a midi controller).
    Then I uploaded the full code. With LED-strip WS2812b (72 leds) connected to digital output 6 and the ground. 5v for the leds came from an atx power supply. Furthermore, nothing was connected.

    Click image for larger version. 

Name:	Schematic.png 
Views:	18 
Size:	505.4 KB 
ID:	22340

    After upload nothing happened. No lights or errors. But the Pc did not recognize teensy as a midi controller.

    Click image for larger version. 

Name:	Win.JPG 
Views:	13 
Size:	76.2 KB 
ID:	22341

    Settings:
    Board “teensy 4.1”
    USB type "serial + midi"
    CPU-speed “600 Mhz”
    Optimalize "faster"
    Keyboard layout “US”

    After everything disconnected the teensy did nothing. The pc does not recognize the teensy and neither the teensy.exe, windows and teensyduino. Only the red LED at the USB port flickers. When I press the reset button for 10 seconds, the red LED goes out and quickly turns on after 10 seconds. When I release the reset button the orange led starts blinking.

    But the PC does not recognize the teensy even now. Press the reset button again (briefly) and the red LED will light up again. The PC gives after 27 sec. (See the video https://youtu.be/dlO-4SaiVPU) a Windows error code 43.

    When I try to upload something with aruino ide the teensy is not in the list if the COM ports. And gives the error that no teensy was found.

    Later I also tried to upload code from a raspberry pi model 3 B. Here the teensy is between the ports. But when I try to upload code the arduino ide gives the error message that I have to press the reset button, but when I do that nothing changes. The ide keeps telling me to press the reset button.

    Since the teeny is still doing something, I don't feel like he's completely dead, and I hope he can still be saved.


    What I already have done:
    • Tried several USB cables that I know have a data cable.
    • All cables disconnected from the teensy.
    • Windows restarted (several times).
    • Serial driver reinstalled.
    • Used different USB ports.
    • Reset button pressed for 10 sec.
    • Try to upload via raspberry pi.
    • Only connect Teensy to the USB when the reset button has been pressed and then release.
    • USB solder connections on the teensy look good.

    Project / background:
    I am modifying a MIDI controller. This midi controller operates lighting software. The problem I wanted to solve is, when fader on the board is at an value and the fader in the software is at a diffrent value, the value in the software jumps direct tot he value of the fader on the board if you move it slightly. I want the microcontroller to do a soft take over so that the value in the software only changes when the physical fader is in the same place. Meanwhile, the mirocontroller must indicate the value of the software by means of led strips WS2812b next to the physical fader. The mircocontroller does this by storing midi messages in variable.

    The midi controller is connected to the micro controller by a mid host that sends the MIDI messages via serial to the micro controller. This is again connected to the PC via MIDI via USB.

    The original plan was to do this with an arduino leonardo. The code works if I only upload the MIDI part. And if I upload the code of the LED-strip only. But when they combine together and MIDI messages come in, the leonardo freezes. That's why I thought maybe I just need a faster microcontroller so I modified the code for teensy. I have not saved the code that I tried to upload last, so I cannot show it.

    I hope there is still a way out of driving the teesny. I would be very sorry if my teensy adventure already ends here.


    Thanks in advance,

    Tim

    Setup:
    Windows PC
    -Win 10 pro 64 bit Hp desktop.
    -Teensy 4.1
    -Arduino IDE 1.8.13
    -Teensyduino 1.53
    -Teensy loader 1.52

    Raspberry pi
    -Model 3 B
    -Arduino IDE 1.8.13
    -Teensyduino 1.53

  2. #2
    Member
    Join Date
    May 2019
    Location
    Colorado, USA
    Posts
    66
    Hi Tim, The Teensy is not 5V tolerant. The I/O pins must never see more than 3.3V. You are powering the LED strip from 5V which is only OK if 3.3V or less is present on the Din pin of the LED strip (pin 6 of the Teensy). I would disconnect the LED strip from the Teensy, power up the LEDs and measure the voltage on Din. If it is 5V, you may have damaged the Teensy. My experience with other boards is that sometimes you just kill one I/O pin with overvoltage, and sometimes you kill the whole thing. Try the Teensy with the LED strip disconnected to see if it behaves normally again. If it does, put a scope on pin 6 to see if you can still control it. Hopefully, just one pin will be affected. On the bright side, the Teensy boards are way cheaper to replace than the Arduinos.
    Len

  3. #3
    Junior Member
    Join Date
    Nov 2020
    Posts
    3
    Tanks for the quick repley. Measering the Din pin of the LED strip I wil do. Is it possible to measure with a multimeter? I don't have a digital osiloscope.
    I have already disconnected the led strip and connected the teensy 4.1 to the usb. But the pc (windows) does not recognize the teensy (code 43). I have filmed what the teensy does when I connect it to the pc:

    https://youtu.be/dlO-4SaiVPU

    It seems that none of my own code is running on the teensy.
    Because I didn't do anything with the onboard LED. This will now flash when you connect the teensy to the PC. If you then press the reset button, windows will give error messages and a red LED will flash. But there is no way to get new code uploaded on the teensy.
    If you press the reset button for 10 seconds, the red LED will go out and the onboard orange LED will flash.

  4. #4
    Member
    Join Date
    May 2019
    Location
    Colorado, USA
    Posts
    66
    Hi Tim, yes, you can measure the Din voltage with a multimeter. I saw your video, and it looks like your Teensy is working properly. The ten second reset reloads the demo blink program, so you are right - it is not your code running. Now that you have done the reset, you should be able to load your program again.
    Len

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,141
    The Teensy Restore [3.5, 3.6, 4.0, 4.1] is with a 15 second hold of the Button while powered - that should restore a factory Blink.

    Just posted these steps: Teensy-3-6-stops-working-and-Orange-Led-glows-up

    That was with a T_3.6 with no RED LED - on T_4.1 the RED LED will rapid FLASH at the point Restore is ready when button released - and then the RED LED will stay on for the many seconds of the Restore process as the FLASH is formatted.

  6. #6
    Junior Member
    Join Date
    Nov 2020
    Posts
    3
    Hmm, that's the crazy thing I have done a few times the trick with 15 sec pressing the reset button and connected the usb. The blink code works fine (1 sec on 1 sec off) but my pc keeps giving the same error code. That there is a problem with the teensy.

    I am not getting any code uploaded to the teensy board. Not through the Arduino IDE with teensyduino or the Teensy Loader. They all pretend nothing has been connected.

    Error code teensyduino IDE:
    No Teensy boards were found on any USB ports of your computer.
    Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.

    Pressing the PROGRAM MODE BUTTON has no effect.
    The only thing the teensy does is run the blink sketch and if the program button is pressed (short) 30 seconds later gives the pc an error code. This is where the teensy stays in.
    If you press the program button again briefly, it does not go back to the blink sketch but gives error code on the pc after another 30 sec. To get out of this I can only press the program button for 15 seconds. Then the blink sketch runs again.

    Could it be that the chip that communicates with the PC is broken? And can that chip be reset.

Posting Permissions

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