Author Topic: What have I done? (have I bricked them)  (Read 7126 times)

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: What have I done? (have I bricked them)
« Reply #15 on: March 05, 2017, 12:43:35 am »
That question probably fits in the same category as "Will it blend?" :-P

urbanmania will have to confirm to be certain, but I believe it was regulator failure due to overcurrent, hence absolutely no sign of life from the digisparks post-'failure mode'.

Hm, I just re-read the earlier post... urbanmania, you can also power the digispark via a usb power bank just like you were thinking with the Metro Mini, and tap into the powerbank for 5v power via the VCC pin. As long as the powerbank can provide the current for the neopixels, no extra regulator is needed... maybe just a capacitor to help smooth things out. Something like a 100uF electrolytic?

Shaker

  • Newbie
  • *
  • Posts: 23
Re: What have I done? (have I bricked them)
« Reply #16 on: April 06, 2017, 08:17:42 am »
Maybe I can hijack the topic for a short while with a question targetting the maximum power output of the DS pins. It's just a question about understanding the Spark better.

I am wondering:
You should use a resistor when taking current from an output pin of the Spark, right? What if I don't? What if I short the pins to ground? Does this result in a current that damages at least this pin?

I built a USB volume control, using a rotary encoder with the help of several descriptions in the net. This was my first microcontroller project ever. Thing is: This rotary encoder pulls 2 pins LOW in a certain order that depends on the turning direction.
Here comes the question: "Pulling LOW" means shorting them to GND, while they have been set to output and pulled up in the sketch. Why isn't that a problem here? No resistors are used in any of the schematics I've encountered.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: What have I done? (have I bricked them)
« Reply #17 on: April 06, 2017, 08:06:49 pm »
Ah, but is that just with the internal pullups? As if that is the case, you are enabling the internal pullup resistors on the digispark, so that's where your resistors are. In other words, if you did a pinMode of INPUT_PULLUP, or setting it as an input and then doing a digitalWrite HIGH (I think I got the order of the second case right... has been a while since I did that particular one).

The answer is yes, basically setting a pin to OUTPUT and HIGH, and then connecting it to GND will damange that pin. Momentary contacts like those of switches or rotary encoder might be fine, but no longer. Doing something like a INPUT_PULLUP actually connects the pin internally to VCC through an internal resistors, hence why that is safe.

I'm of course assuming you did something like the Trinket USB Volume control, but with a digispark instead ;)

Doe that answer your question?


Shaker

  • Newbie
  • *
  • Posts: 23
Re: What have I done? (have I bricked them)
« Reply #18 on: April 06, 2017, 11:48:07 pm »
Yes exactly! And while reading your answer, I came across a stupid mistake of mine. Of course the pins are set as INPUT, not OUTPUT as I wrote... Being an INPUT set to HIGH, they have resistors. Being an OUTPUT and set to HIGH they are directly connected to the 5V source. My bad, that's totally logical now ::)

Thank you!