Author Topic: Powering the Digispark  (Read 14626 times)

MichaelMeissner

  • Full Member
  • ***
  • Posts: 166
Powering the Digispark
« on: November 20, 2013, 08:56:42 am »
I am a software person, so sometimes my hardware knowledge is scattering bits of knowledge linked together with wild guesses.  So, I wanted to make sure I understood how to power the spark.  I tried looking at the wiki, and it only had basic information.

The Spark has 3 potential sources of power:
  • The USB tab providing regulated 5v input;
  • The 5v pin on the left side;
  • The VIN pin on the left side.

Now, I assume the 5v and the USB tab are logically connected.  As long as I provide regulated 5v power to either one its fine.  Presumably I should not connect live power sources to both at the same time.  Is this basically correct?

Now, VIN I assume is for connecting 7-35v.  There is a voltage comparison transistor that selects the VIN if it has voltage greater than the other inputs (5v).  This is like the Uno, in that you can feed it 7v externally, and it will use that instead of the USB power, when the spark is connected to the computer.  Is this correct?

If I connect the Digispark to USB power, and nothing to the VIN pin, it looks like it gives less than 5v on the VIN pin (3.8v by my measurements).  If I measure the 5v pin when the Spark is connected to USB, I get 4.6v, so it looks like the VIN pin is going through the regulator, and the 5v pin has some loss (diode maybe?).  Is this correct?

Basically, I'm trying to figure out the appropriate way to wire up Neopixels, which want 5v and higher amps if I light many lights.  For a small number of pixels (32 for 2 LED rings in a goggle setup), I want one power source.  On the Teensy 3.0, I can hook the Teensy up to USB power, and use the VIN pin to give me access to the 5v directly (Teensy 3.0 is an Arm processor running at 3.3v).  Should I hook the pixels power up to the 5v pin in the Spark, or do I need to create a regulated 5v support, and feed both the Spark and the Neopixels directly?

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Powering the Digispark
« Reply #1 on: November 20, 2013, 09:52:18 am »
Hello Michael,

look at the schematics for the digispark: https://s3.amazonaws.com/digistump-resources/files/97a1bb28_DigisparkSchematic.pdf

There is a power regulator (MC78M05BDTRKG) on the board, which reduces Vin to 5V (4.8-5.2).  When you connect the regulator on Vin with less than 5.1V, the output going to the digispark is less 5V!

There is a diode (D3) between USB-power and 5V. This is a safety device, which makes sure, that no power from another source will flow back to your PC.  However that diode reduces the power around 0.6-0.7 V.
This diode seems to be sensitive, as there are several reports, that a broken diode reduces the power ways more.

So in short:
  • Voltage higher than 5.2V on Vin, and you should have 4.8-5.2V. Voltages higher than 12V /see the 24 thread) may need additional cooling..
  • Power connected to 5V is the direct way
  • Power from USB is reduced around 0.7V from 5V USB current
If you connect e.g. 6V to Vin, you can connect 8 WS2812B LEDs without problems to 5V.
The best solution for larger strings is a stable 5V device, which powers the strip and the digispark over 5V


regards

  gogol



dougal

  • Sr. Member
  • ****
  • Posts: 289
Re: Powering the Digispark
« Reply #2 on: November 20, 2013, 10:27:16 am »
See also, these threads, which may be informative:

DigiSpark RGB LED Strip
  http://digistump.com/board/index.php/topic,1143.msg4877.html

Individually addressable RGB LED comparison?
  http://digistump.com/board/index.php/topic,991.msg4694.html

Project power question
  http://digistump.com/board/index.php/topic,1128.msg4763.html


MichaelMeissner

  • Full Member
  • ***
  • Posts: 166
Re: Powering the Digispark
« Reply #3 on: November 20, 2013, 11:18:23 am »
Thanks.  I have the Pololu adjustable step-up/step-down regulator (http://www.pololu.com/product/2118), and so I'll use that I guess.  I need to do timing runs to see how long my smallest LIPO battery will actually power the rings.  I want to do steampunk googles, but I want the microprocessor/battery to be as small as possible, but still give me a good runtime.

skwasha

  • Newbie
  • *
  • Posts: 1
Re: Powering the Digispark
« Reply #4 on: February 04, 2014, 11:42:19 pm »
Having read this leads me to a different question... What would be the ideal way to power the Digispark using a wall-wart but provide battery backup when not plugged in?

TIA for any advice.

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Powering the Digispark
« Reply #5 on: February 04, 2014, 11:53:52 pm »
The cheapest way from my point of view is using one of those cheap power-banks you can get between $5-$10:
e.g. http://www.amazon.com/2600mah-Portable-External-Battery-Smartphone/dp/B00GNNQRKU/
Connect the powerbank between wall-wart and digispark and you have a small UPS.