Weird low voltage issue

Hi, my spark core was working great until last night. I can still connect and push code as usual, but I’m having weird voltage output issues. I have the core isolated on a breadboard and the digital pins float at about 100mv when low and only go up to 1.6-2v when high (the onboard led on D7 doesn’t turn on either). I did a factory reset and am testing with tinker so it’s not my code. The usb jack is getting a lot hotter than I remember, whether I power it off of USB or the relay shield (wifi chip is hot too). I didn’t smoke the chip to my knowledge, what can I try? I’m in a middle of a big project, this is a huge bummer…

What does the 3V3 pin measure with respect to GND? The 3.3V LDO regulator is right under the USB jack, so if it’s running hotter than normal it may make the USB jack heat up. I think the Jack effectively functions as a heat sink for the LDO.

What kinds of loads to you have on your outputs?

The 3.3v pin is measuring ~3.3v as expected. That and my other measurements we done under no load, sitting alone on a breadboard.

ok, this might be a silly question… but I have to ask…

are you setting the pinMode(D7,OUTPUT); before you digitalWrite(D7,HIGH); ?

Thanks for checking but I checked that. I’ve been testing with the factory tinker app actually, I wanted to isolate it from being a bug in my code once things got weird.

Just as a sanity check did you try a different usb cable / power supply, and taking it out of the breadboard?

Missed that part… sorry. Hmm, you are setting the D7 pin to digitalWrite and then closing that menu… then when you click D7 is says HIGH, and the pin voltage goes from something low, up to 2V or so… but the LED doesn’t turn on… right?

Could you try powering from a USB wall charger? If it still doesn’t work with that… I’m going to say something’s busted.

Yeah, I tried powering it off of the relay shield using a 12v power brick on the barrel jack input. No dice. Something is definitely wrong, it’s just not the failure mode I’d expect if something smoked.

What does the VIN pin measure with respect to GND when you have it powered in your Relay Shield?

VIN is at 5V when powered by the relay shield. I’m pretty sure I’ve isolated this to be something wrong with the board itself. It’s a weird failure mode, not sure how to proceed. @Dave, thoughts?

Hmm, I think at this point I would need to defer to @mohit who knows the hardware side way better than I do. :smile:

Try this code… sets all digital pins ( D0 - D7 ) to digital outputs and sets them low. Then every 5 seconds it toggles them all to the opposite state. (fyi: I did not compile this, but it looks ok) Measure with a voltmeter from each of the outputs with respect to ground and see what they read.

#include <application.h>

uint32_t lastReset = 0; // last known reset time
bool s = false;

void setup()
{
  for(uint16_t x=0; x<8; x++) {
    pinMode(x, OUTPUT);
  }
  for(uint16_t x=0; x<8; x++) {
    digitalWrite(x,s);
  }
  lastReset = millis(); // We just powered up 
}

void loop() {
  // Take over control of the RGB
  RGB.control(true);
  // Green when outputs LOW, Red when outputs HIGH
  RGB.color(s ? 255 : 0, s ? 0 : 255, 0);

  // Wait 5 seconds before toggling outputs
  if( (millis()-lastReset) > (5*1000) ) {
    lastReset = millis();

    // After 5 seconds...
    s = !s; // toggle the state
    for(uint16_t x=0; x<8; x++) {
      digitalWrite(x,s);
    }
  }

  RGB.control(false); // Release control of the RGB
  // This is important to do before the end of loop() so if
  // we start a OTA update, we can see the LED flash magenta.
  // Worst case the LED is Cyan for 5ms while the background
  // tasks are processed... then we take control of it again.
  // You probably won't see it!
}
1 Like

@mohit, any thoughts here?

@numbakrrunch
The only way to destroy the I/O line of a Core is to feed it 5V on the line or short its output to GND when its outputting HIGH (or vice versa). But before we jump to that conclusion, did you happen to try out the above code suggested by @BDub ? Its looks like the outputs are floating, which means the I/O is must not have been initialized. Are you able to program the Core?

Hi @mohit, I am able to program the core. I ran @BDub’s code with the addition of “lastReset = millis();” inside the loop to make it work. Here is the voltage I measured at the each of the digital pins:

LOW / HIGH
D0: 0.11 / 1.96
D1: 0.12 / 1.94
D2: 0.12 / 3.05
D3: 0.13 / 1.87
D4: 0.14 / 1.83
D5: 0.25 / 0.37
D6: 0.18 / 1.41
D7: 0.79 / 2.06

The results are repeatable within 1% after de-powering the core and letting it cool off for a few mins. I don’t see how that was any different from testing through the tinker app if your concern is I/O initialization. Is there anything else you want me to try or can I swap it with a new core and you test in your lab?

Good catch, I edited my post above. Thanks for running the test. Sounds like your Core is dead :tired_face::dash:

@numbakrrunch
Yeah, that does not sound good. I’ll follow up with your email you sent @ hello

PS I also added “RGB.color(s ? 255 : 0, s ? 0 : 255, 0);” to turn the RGB LED red or green after the pins were set to make it more obvious whether they were supposed to be high or low. You may want to add that to your code example with “RGB.control(true);” initialization up top.

1 Like

G o o d i d e a, u p d a t e d !