Author Topic: Fixing power usage, boot delay  (Read 3012 times)

benjamindees

  • Newbie
  • *
  • Posts: 1
Fixing power usage, boot delay
« on: April 18, 2017, 02:16:17 am »
So, I just spent an hour researching how to modify my Digispark for an extremely low-power application, and then playing with re-routing the circuit traces to make room for a switch to disable the pull-up resistor, only to search the forum and find that a few other people have already had similar thoughts:

http://digistump.com/board/index.php/topic,2601.0.html

Disabling the 5-sec boot delay seems essential for low-power applications, as well:

http://digistump.com/board/index.php/topic,320.0.html

Doesn't it seem like it might be possible to kill these two birds with one stone?  Could a layout modified like the one below enable the addition of a small dip switch on the *bottom* of the circuit board?

https://postimg.org/image/nz2odxt2z/
https://www.digikey.com/product-detail/en/copal-electronics-inc/CVS-01TB/563-1192-1-ND/1991515

Would it be possible to then modify the bootloader to detect the position of this switch, and skip the 5-sec delay?  I would really like to use the Digispark for a few low-power projects, but in its current iteration that means either changing a battery every *week* or mangling it beyond recognition with hardware hacks.

Please consider something like this for the next version.  Thanks!

keithspg

  • Newbie
  • *
  • Posts: 1
Re: Fixing power usage, boot delay
« Reply #1 on: June 18, 2017, 06:10:56 pm »
+1 Would be nice if it were a default in the bootloader. I need my project to immediately start and was wondering why there was a 5-8sec delay... I'd even give up a pin for this as the package is so nice! The onboard regulator is perfect for automotive projects.

gh057

  • Newbie
  • *
  • Posts: 1
Re: Fixing power usage, boot delay
« Reply #2 on: January 06, 2018, 04:38:42 pm »
Hey folks! I've spend several hours trying all of the different suggestions that are out there and to no avail. It seems that any of the custom bootloaders do not work, or at least in the way that I'm doing it. Does anyone have any suggestions on how they've done this *recently* (as it seems that things have changed between the time the suggestions were made and current) on Linux and maybe give some pointers?

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Fixing power usage, boot delay
« Reply #3 on: January 06, 2018, 07:25:57 pm »
There is an alternative bootloader that by default should work, the micronucleus-1.06-jumper-v2.hex from https://github.com/micronucleus/micronucleus/tree/v1.11/firmware/releases, which IIRC, used P5 as the 'enable bootloader/programming' jumper.

Otherwise, you could follow the instructions I loosely summarised in this post, and substitute t85 for any references to t167 (that's the attiny chip used in the Digispark Pro, the Digispark (original) uses the attiny85). Else, tell me which pin to you want to use as the jumper pin, and I should be able to compile a micronucleus v2 bootloader with the appropriate options.

Edit: I haven't tested this yet, but attached is a hex for what should be a P5 jumper only version of Micronucleus V2.03 for the digispark (original). I'm pretty sure you need to also update the micronucleus loaded used by the Arduino IDE to use the v2 micronucleus bootloader... i.e. the commandline tool.
« Last Edit: January 07, 2018, 12:18:29 am by PeterF »