Debugging a Teensy 3.6 - Funny things happening with the built-in LED

Status
Not open for further replies.
So, I've been developing an audio installation with the teensy, using motion sensors and creating a responsive real-time audio engine..

I use the analog inputs to read the state of a few potentiometers plus a rotary switch.
Another few analog inputs to read sensor data.
And 4 PWM slots for controlling a 4 module relay board (for controlling AC lights)


I'm using Teensy 3.6 with the audio shield.
I'm powering the teensy with a 5V DC adapter which also feeds the relay with its operating 5V , and draw 3.3V to the other rail, which in turn feeds the sensors and potentiometers with voltage.

A while ago, I started seeing some weird functionality with the LED.
It seems to just not work, yet I was able to upload new code and run it without any seeming problems....
I further noticed that when I connect the audio shield to the Teensy, the LED suddenly turned on...

Anyhow, now it stopped turning on whatsoever, and I cannot upload code as well*
I'm wondering if this could be somehow related to relay module , or using an incorrect setup to power the board.

Is there any document describing how to go about debugging a unit?
I would very much like to know what functionality of the Teensy was lost and how , so as to avoid this pitfall again.

Any info would be greatly appreciated.

Thanks,
Ari
 
Any info category:
I'm too lazy to look but I think the audio sheild may use a led pin so the led may come on and off depending on what the audio is doing.
 
IIRC, pin 13 is used by the audio shield and the audio library for data transfers, thus, it is normal that the LED starts lighting. A quick look into the audio shield‘s circuit diagram and/or a quick check of the signal @pin13 would have given you that information.

Relays are inductive loads which can create ugly voltage spikes. You didn’t respect the forum rule by publishing all needed information (schematics in this case), so nobody can guess if you had a protection diode in parallel with the relay coil or if you simply killed your Teensy.

That‘s perhaps a good moment to re-iterate my recommendation: Never buy a single Teensy, buy them in batches of at least 3, so that you have always a few spares in the drawer for a differential diagnose, especially if you aren‘t sure if the source of problems is software, the Teensy, or peripheral circuitry.
 
Thanks Theremingenieur! And Gibbedy ..

First off - Yes, it seems I've killed my Teensy.... That is - I'm not getting 3.3V between the 3.3V & GND pins, while feeding Vin & Analog GND 5V from the adapter.

Second - the question re: the LED was why it didn't light up when the shield was not connected? As far as I recall, it lights up whenever the teensy is connected and running a sketch? I didn't seem to see any activity on the LED while uploading nor while running the sketch until I connected the shield, so I thought this could help diagnose the issue.

Lastly, I will of course get another Teensy and retry the project, but I would very much like to know what I did wrong to avoid frying the board again. Do I need a protection diode between the relay Vin? I thought the whole purpose of a relay is that it prevents voltage from leaking back into the controller. Do you mean schematics of my circuit?

Here's a quick drawing... Sorry it's not professional but I think you get the gist. The 4 relay modules is connected normally to 4 lights using a normal 220V power supply .
 
'' Schematics ''
Screen Shot 2018-04-09 at 1.22.17 AM.jpg
 
The LED lights up only if either your code drives the pin high via a GPIO command or an internal peripheral like the SPI or the I2S engines are multiplexed to pin 13 and send data over this pin.
By default, the LED is always off.

Your « schematics » are not useful. One can not see which driver electronics are between the Teensy pins and the relay coils, if there are current limiting resistors and if the relay coils have fly back diodes to protect the circuit from inductive spikes. What I see is that the relay board seems to be operated with 5V. Imagine(can only guess without more detailed schematics) that the inputs have pull-up resistors or optocouplers towards 5V, then these would kill the Teensy through its connected output pins, these are only 3.3V tolerant.
 
The LED lights up only if either your code drives the pin high via a GPIO command or an internal peripheral like the SPI or the I2S engines are multiplexed to pin 13 and send data over this pin.
By default, the LED is always off.

Your « schematics » are not useful. One can not see which driver electronics are between the Teensy pins and the relay coils, if there are current limiting resistors and if the relay coils have fly back diodes to protect the circuit from inductive spikes. What I see is that the relay board seems to be operated with 5V. Imagine(can only guess without more detailed schematics) that the inputs have pull-up resistors or optocouplers towards 5V, then these would kill the Teensy through its connected output pins, these are only 3.3V tolerant.

Well, I couldn't really find professional schematics online...
However, I'm attaching a picture of the relay module RL2576-5V-4B.jpg
, and what seems like someone's illustrated schematics. Screen Shot 2018-04-09 at 2.04.17 PM.jpg


Intuitively, what you suggest with the pins being pulled up to 5V makes sense to me, I was surprised it even worked with the Teensy pins being limited to 3.3V...
In this case, could I use a logic level converter to solve the issue?

Thanks so much for all the help, (also for clarifying about the LED)....
!!!!!

Best,
Ari
 
You could also remove the jumper and power the relays with 5V and the VCC side with only 3.3V. But be extremely careful. If 5V power touches Teensy's 3.3V power line for even a split second, your Teensy will be destroyed.
 
You could also remove the jumper and power the relays with 5V and the VCC side with only 3.3V. But be extremely careful. If 5V power touches Teensy's 3.3V power line for even a split second, your Teensy will be destroyed.

Hey! thanks a lot for your input Paul.
Though I’m not entirely sure what you mean ... which jumper could i remove? what is the VCC side? there is a second input power to the relay? ...
anyhow thanks
i think ill go for the level shifter
 
Status
Not open for further replies.
Back
Top