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

Thread: Teensy 3.6 with VIN

  1. #1
    Junior Member
    Join Date
    Jun 2019
    Posts
    4

    Teensy 3.6 with VIN

    Hi Everyone,

    I am having issues with a prototype project I am working on. I am using a Teensy 3.6's USB Host port and a MAX3232 RS232 converter to receive keys from a HID device and convert them to a RS232 serial control strings. Everything works fine while I am powering the Teensy via the micro USB port and I am able to use the micro USB to debug the serial output. The ultimate goal is to power the Teensy from a 5Vdc external DC supply that comes from the same device as the RS232 is being sent to.

    On the breadboard I have picked up the external 5Vdc feed (verified with a multi meter) and a common ground (into the ground beside pin 13) and feed this into the Teensy 3.6 on pin 1 (VIN). This does not seem to work for some reason. I cut the link between the VIN & VUSB pads and then the only way I can power the board is if I have both the VIN power input and the micro USB connected. I have confirmed that there is power on the VIN but the teensy is not running.

    I have worked through the circuit layout for the board and it all looks like it should work with the VIN power. I re-soldered the VIN & VUSB pads together and removed the VIN feed and I am back to being fully operational.

    Am I missing something ?

    This is my first project with a Teensy board but I have done lots with basic Arduino's etc in the past.

    Any assistance or direction would be greatly appreciated.

    Regards

  2. #2
    Senior Member
    Join Date
    Oct 2015
    Location
    Roma (IT, EU)
    Posts
    193
    Can we see your code?

    Often, somewhere in the setup() there's something like

    Code:
    while (!Serial)
    which of course stalls the program when there's no serial monitor connected to microUSB.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,344
    Are you using the latest Teensyduino? Version 1.46 has a fix for a startup issue many people experienced when using external power supplies with Teensy 3.6. Click Help > About (or Arduino > About if using Macintosh) to check the version.

    If you have 1.45 or older, simply installing the new version and uploading your code again (built by the newly installed software) may magically fix the problem.

  4. #4
    Junior Member
    Join Date
    Jun 2019
    Posts
    4
    Thanks for the suggestions, Yes I have the latest version of Teensyduino.

    But there is a "while (!Serial)" line in the code setup. The code was originally based on a example given with the USBHost_t36 library:

    void setup()
    {
    while (!Serial) ; // wait for Arduino Serial Monitor
    Serial.println("\n\nUSB Host Testing");
    Serial.println(sizeof(USBHub), DEC);
    myusb.begin();
    keyboard1.attachPress(OnPress);
    keyboard2.attachPress(OnPress);
    }


    I will remove the line and see what happens when I go back to the office on Monday.

    I found another thread talking about removing the serial monitor setup about 10 minutes after I had put my request in the forum.

  5. #5
    Junior Member
    Join Date
    Jun 2019
    Posts
    4
    Removing the "while (!Serial);" line fixed the issue with the Teensy not booting.

    Next issue is now that I can confirm the Teensy is booting (I have added a line to flash the onboard LED 2 times as part of the setup routine) it looks like the USB host port does not seem to provide power when the Teensy is powered from the VIN.

    Any suggestions?

  6. #6
    Junior Member
    Join Date
    Jun 2019
    Posts
    4
    So after a bit of playing around I have found that the 5VDC VIN I am using is only 4.5VDC by the time it get through the breadboard to the VIN pin, then when I measure the VCC on the USB host header it is only around 4VDC. It seems that the device I am plugging in does not work on 4VDC. I am going to look at the options for how I am powering the whole project now.

  7. #7
    Senior Member
    Join Date
    Oct 2015
    Location
    Roma (IT, EU)
    Posts
    193
    Quote Originally Posted by Racin View Post
    it looks like the USB host port does not seem to provide power when the Teensy is powered from the VIN.
    Are you saying you are, at the same time, powering the Teensy from Vin *and* connecting the microUSB to a PC?
    If you did not cut the tiny Vusb-Vin jumper on the back face of the board, you really risk damaging your PC and having your Teensy malfunctioning, because of backcurrent between Vusb and Vin.

    Please, never connect Vin and microUSB at the same time. Either you cut the Vusb-Vin jumper pad (so you will always have to power the Teensy from Vin, and optionally connect microUSB when needed), or you power the board from either Vin or microUSB.

Posting Permissions

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