Digispark not working properly if battery powered

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi there

 

 

I'm new to programming and a few days ago I decided to try my luck with a digispark BUT....

 

.....i have a problem when i'm trying to power it up with batteries (i tried with common AA batteries and one 18650 with booster).

The green led lights up, the red blinks (i think that means that the bootloader is starting), but my code doesn't seems to be working.

The strange thing is that when i power it up with my bench power supply all works perfect.

 

The circuit is very simple.... It's just an IR beam breaker sensor. I'm using PIN0 for detection, the internal LED(PIN1) and pin4 to send a simple pulse (to light another led for example).

 

 

Any suggestions???

 

 

Thanks in advance!!!

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Get a multimeter and measure the voltage. If you can’t measure then you’re just guessing.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Orion312 wrote:
Any suggestions???

  • Replace primary cells with secondary cells (reduces internal resistance)
  • Add bulk capacitance (cell inductance)

A bench supply's internal impedance is a few or several orders of magnitude less than a battery or cell.

 

1215.pdf (AA, primary, 500m ohm at room temperture)

l91.pdf (AA, primary, 120m ohm)

re15-1300.pdf (AA, secondary, 30m ohm)

all via https://data.energizer.com/#search

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Actually i did that. The voltage is stable and the consumption is 17mA.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Orion312 wrote:

Actually i did that. The voltage is stable and the consumption is 17mA.

Post a schematic of your circuit, or at least a clear picture, as we can not see what you see.

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Orion312 wrote:
a digispark

You mean this: http://digistump.com/products/1 ?

 

Orion312 wrote:
i'm trying to power it up with batteries (i tried with common AA batteries and one 18650 with booster)

before doing that, have you tried powering it "conventionally" - from the USB ?

 

Digistump wrote:
  Power via USB or External Source - 5v or 7-35v (12v or less recommended, automatic selection)

So what voltage are you feeding it?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you power the device from your battery, and you then use a normally open, push button switch, from the Micro Pin 1 to Ground, (or Header JP3 Pin 6 to Ground), does the micro then start up correctly?

 

If you don't have a PB Switch, you can just use a wire and tap it to Ground.

 

In addition to the battery's ability to supply an adequate current for the micro/PCB, it also has to power up "cleanly", to insure that the Power On Reset circuitry enables the remainder of the micro.

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Any suggestions???

Did you try using the octobean setup? I won't provide a link to that either, but it would almost surely solve your issue.  

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

awneil wrote:

You mean this: http://digistump.com/products/1 ?

 

Yes

 

awneil wrote:

...have you tried powering it "conventionally" - from the USB ?

 

Yes i did. Actually i powered it up with my bench power supply with usb adaptor, with a cable attached to my pc and a common usb charger. It works  fine.

But when i'm trying to power it with batteries the bootloader seems to be starting but not my code. I used VIN pin with 2x18650 = 7.5-8V and with 3xAA or 1x18650 batteries attached to booster with usb plug.

 

awneil wrote:

So what voltage are you feeding it?

 

I used VIN pin with 2x18650 = 7.5-8V and with AA  or 1x18650 batteries attached to booster with usb plug.

Last Edited: Fri. Sep 25, 2020 - 09:22 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Most regulators are conditionally stable usually on the output capacitor though some also on the input capacitor.

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So it works properly when powered "normally" - it's just your battery setup(s) that fail.

 

As  ki0bk said back in #5, we really need to see a schematic and some good, clear, in-focus photos to see what you're actually doing.

 

Also full details of this "booster" thing.

 

See Tip #1 in my signature, below, for instructions on how to post pictures:

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Let's try something simple, try powering it with four alkaline AAA batteries.

 

Jim

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:
four (sic?) alkaline AAA batteries.

The Digistump spec says, "7-35v" - so six would be better ... ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
The Digistump spec says, "7-35v" - so six would be better ... ?

Ah, yes it would, now that I've had enough caffeine for the brain cells to do math!  yes

 

Jim

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Craig.Peacock, beyondlogic, wrote:
  Low power bus powered functions must also be designed to work down to a VBUS voltage of 4.40V and up to a maximum voltage of 5.25V measured at the upsteam plug of the device.

 

https://www.beyondlogic.org/usbnutshell/usb2.shtml#PowerVbus 

 

See also Table 1 in: https://www.ti.com/lit/an/slyt11...

 

So it might actually be possible to power from 3 fresh alkaline cells (4.5V) on the USB ... ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Fri. Sep 25, 2020 - 02:17 PM