Battery power and USB

Interfacing to the codebug
mikerr
Posts: 83
Joined: Fri Jul 31, 2015 10:37 am
Contact:

Battery power and USB

Post by mikerr » Thu Aug 27, 2015 1:43 pm

Leave the battery in while connecting to usb or not ?

The website mentions using it this way:

http://www.codebug.co.uk/learn/course/g ... g-codebug/

but the leaflet supplied with the farnell codebug says otherwise:

Image

I'm a bit confused as to whether it's "safe" to leave the battery in while connected via USB or not.
Twitter @mikered codebug profile mikerr

pigraham
Posts: 65
Joined: Sat Aug 15, 2015 1:41 pm

Re: Battery power and USB

Post by pigraham » Thu Aug 27, 2015 2:07 pm

That is curious. Obviously the original idea was that it was OK and they provided a way to upload like that.
Presumably someone has spotted problem could occur.

I have had no problem using USB and battery, so far.

BMS Doug
Posts: 61
Joined: Wed Aug 26, 2015 8:54 am
Contact:

Re: Battery power and USB

Post by BMS Doug » Thu Aug 27, 2015 2:16 pm

pigraham wrote:That is curious. Obviously the original idea was that it was OK and they provided a way to upload like that.
Presumably someone has spotted problem could occur.

I have had no problem using USB and battery, so far.
Except for the dodgy USB cable after you removed the battery...


I don't have my own codebugs yet (still waiting, Grrr) so I can't comment but I guess I'll get some thin strips of rigid plastic to act as an impromptu off switch for the battery.

pigraham
Posts: 65
Joined: Sat Aug 15, 2015 1:41 pm

Re: Battery power and USB

Post by pigraham » Thu Aug 27, 2015 2:32 pm

BMS Doug wrote:
pigraham wrote:That is curious. Obviously the original idea was that it was OK and they provided a way to upload like that.
Presumably someone has spotted problem could occur.

I have had no problem using USB and battery, so far.
Except for the dodgy USB cable after you removed the battery...
I don't think that is related. That lead seems to have an intermittent fault and it's replacement has worked OK with or without the battery.

pigraham
Posts: 65
Joined: Sat Aug 15, 2015 1:41 pm

Re: Battery power and USB

Post by pigraham » Tue Sep 08, 2015 4:08 pm

Note that the voltage out of the PWR/GND legs varies with power source:

CR2032 2.6V
USB 4.9V
The bug can be powered by connecting a supply to the PWR/GND legs.

mikerr
Posts: 83
Joined: Fri Jul 31, 2015 10:37 am
Contact:

Re: Battery power and USB

Post by mikerr » Thu Sep 17, 2015 11:28 am

I think the flexibility of powering from many sources (USB / Vcc header / PWR legs) has caused a bit of a dangerous situation
if you're not careful

There's now a big warning added not to connect USB when attached to the raspberry pi GPIO,
and at least one report of someone destroying a Pi by doing that :(
http://www.codebug.co.uk/learn/activity ... -with-i2c/

Good to catch this early.

Presumably the same applies for a battery connected codebug ?
Twitter @mikered codebug profile mikerr

BMS Doug
Posts: 61
Joined: Wed Aug 26, 2015 8:54 am
Contact:

Re: Battery power and USB

Post by BMS Doug » Thu Sep 17, 2015 12:31 pm

mikerr wrote:I think the flexibility of powering from many sources (USB / Vcc header / PWR legs) has caused a bit of a dangerous situation
if you're not careful

There's now a big warning added not to connect USB when attached to the raspberry pi GPIO,
and at least one report of someone destroying a Pi by doing that :(
http://www.codebug.co.uk/learn/activity ... -with-i2c/

Good to catch this early.

Presumably the same applies for a battery connected codebug ?
I saw that one, I would guess that the codebug power lines from the microUSB, tether connector and battery are all connected internally.

When the USB is connected you put 5V onto the battery (Bad) or Pi 3V3 (Bad) connections. If the Pi was connected at the same time as a battery you would be putting 3V3 onto the battery, which isn't going to do it any favours (but may not cause instant death).

phph002
Posts: 1
Joined: Fri Dec 25, 2015 6:09 pm

Re: Battery power and USB

Post by phph002 » Fri Dec 25, 2015 6:48 pm

When the USB is connected you put 5V onto the battery (Bad) or Pi 3V3 (Bad) connections. If the Pi was connected at the same time as a battery you would be putting 3V3 onto the battery, which isn't going to do it any favours (but may not cause instant death).
Not according to the schematic. Both the USB power line and the battery line contain diodes to separate them from each other. Connections to the Pi should not involve the CodeBug's power line at all.

richardcw
Posts: 1
Joined: Fri Mar 04, 2016 6:53 pm

Re: Battery power and USB

Post by richardcw » Fri Mar 04, 2016 6:59 pm

mikerr wrote:Leave the battery in while connecting to usb or not ?

I'm a bit confused as to whether it's "safe" to leave the battery in while connected via USB or not.
I have the same confusion. Whilst diode protection sounds like the panacea to problems of different voltages, I wonder why the official warning...There is presumably some concern. Perhaps the diodes don't protect it fully?

I find the battery difficult to remove from its slot, and would appreciate not having to remove it every time I want to plug in the USB! Is there some official guidance that we could see from the designer?

darkmilk
Posts: 1
Joined: Sat Dec 03, 2016 11:28 am

Re: Battery power and USB

Post by darkmilk » Sat Dec 03, 2016 11:32 am

richardcw wrote: Perhaps the diodes don't protect it fully?
This is probably true - primary (non-rechargeable) coin cells cannot handle any reverse current, at all. Even a few microamps back through a diode can be bad. They can catch fire, with very toxic smoke/fumes and residues if they do.

Post Reply