Issue Teensy 3.2 + audio shield on USB power adapter

Status
Not open for further replies.

Menne

Member
Hi,

I have a question on using my Teensy 3.2 with audio shield on an external power USB adapter. Basically my code is working fine when connected to the computer but the moment I connect my Teensy to an external adapter nothing happens. I used different USB cables and different adapters (e.g. a large Iphone adapter 5V 2,1A or a 2,5A adapter used for my RPI). I also connected an external power supply to the Vin (5V) directly, but the same thing, nothing works.

What do I do wrong?

Background infor: I developed and tested succesfully my code (based on library code) where I can read and write my voice audio on a SDcard. Next to that I included a LED on port 18 (to test if my Teensy is working on a external adapter) and an external hardware serial1 to send some bytes to an ESP board. This ESP board is not yet connected, so I connected the RX and TX together. During development I, did had some issues with the pin selection for the 4 buttons, led and potential meter (for example, I used pin 7, that is used for i2s1 Tx and I used pin 10 that is occupied for the SDcard) but after switching pins the code is working.

Any suggestions?

Menne
 

Attachments

  • SD_readwrite.ino
    7 KB · Views: 40
Thanks Michael for your response. I created some pictures in the hope you can find a possible reason?
IMG_4760.jpgIMG_4761.jpgIMG_4762.jpgIMG_4763.jpgIMG_4764.jpg
 
Hi Michael, I took to Teensy out of the breadboard and measured the voltage on the Vin and Ground pin on the Teensyboard and Audio shield. In all cases I measured 5V, so no soldering issues.
 
Hi Michael, I used some new code from the Tutorial "Blink_When _Playing" and that code worked on computer USB and USB adapter. Any idea how software can create this issue?
 
The reason nothing happens is this line in the code (in the setup function):

Code:
  while (!Serial) {  ;  }

The Teensy will hang forever waiting for the USB Serial to be connected. A better way to do this is limit the timeout to something like 3 seconds:

Code:
  // Wait for up to 3 seconds for the USB serial to be connected
  while (!Serial () && (mills () < 3000))
    ;
 
Status
Not open for further replies.
Back
Top