Charging uninterrupted power system over native USB

Hello!

I design USB peripherals and am new to developing on IC platforms, so I apologize if this is obvious, or if I'm asking the question incorrectly!

Previously, I used one of Adafruit's 32u4 feather designs to provide an input device that charged its own lipo battery and switched its output from the USB micro to bluetooth on the fly.

I'd like to be able to have a circuit on the Due that provides uninterrupted power while unplugged, and charges while forwarding USB device data on the native port.

I wanted to know if you all knew of any friendly circuits for this, why this would be difficult due to the Due's constraints, or why this is a terrible idea and would never work :slight_smile:

Thanks!

As per USB 2.0 protocol, when a USB device (e.g. a keyboard, a thumb drive or a web camera) is conneted to the Native USB port, the Native USB port IS the USB Host. As a USB Host, the DUE will PROVIDE up to 500 mA to power the USB device, except if this one is a self powered USB device, after the enumeration process (only 100 mA are provided during the enumeration process).

I mean to say that the Due would operate as a the input device (keyboard and mouse) for a Host computer, and charge while plugged in, and not "Brown Out" when unplugged and switched to battery.

When a DUE is connected to a PC thru the Native USB cable, the DUE is a USB Device and receives up to 500 mA from the PC (the USB Host). However, if a battery pack is connected to the jack, the DUE behaves as a self powered USB Device and as such the PC provides no current to the DUE.

Any other behavior would require modifications in the DUE schematic.

Thank you for the answer!

Does this mean it is impossible to plug a keyboard into the Due, and plug the Due into a computer, and have the Due perform translation of input from the keyboard into the computer?

I didn't try that out myself but that should work, assuming the DUE is connected to the PC thru the Programming Port.

The USBHost library has been done for connecting a Keyboard to the DUE.

ard_newbie:
I didn't try that out myself but that should work, assuming the DUE is connected to the PC thru the Programming Port.

The USBHost library has been done for connecting a Keyboard to the DUE.

Excellent! I'll consider this as an option.

ard_newbie:
When a DUE is connected to a PC thru the Native USB cable, the DUE is a USB Device and receives up to 500 mA from the PC (the USB Host). However, if a battery pack is connected to the jack, the DUE behaves as a self powered USB Device and as such the PC provides no current to the DUE.

Any other behavior would require modifications in the DUE schematic.

I thought about this, and the DUE operating as an self powered device, and receiving no current seems like it would protect against voltage differences between the USB host and the DUE's battery pack.

Does this mean the DUE connected to a PC while operating off battery power could be charged from a separate power source without voltage differences or brown outs?

Thanks for the ongoing help, I couldn't find much about running the DUE with charging battery packs while plugging and unplugging it from USB hosts. I'm rather concerned about frying my nice new DUE.

troyfletcher:
Does this mean the DUE connected to a PC while operating off battery power could be charged from a separate power source without voltage differences or brown outs?

I don't understand what that mean.... I suggest that you take some time for analyzing the DUE schematic.