I want to create composite gadget device with Raspberry Pi Zero W, and use power and data in the same USB port on another, host, machine. I am worried about it being unplugged while things are written to the SD card (my family is kinda nasty, and not tech-oriented, so they might do that when I'm not around).

I thought of a solution like this: Having a splitted USB cables with one plug having only data lines and other only power lines then solder the data lines to USB "gadget-enabled" connector and power to little power bank and then from powerbank to power connector thus charging it while connected to USB.

This solution is not ideal. It will make whole device heavy, so I am asking for some advice from the community.

PS: English is not my native language.

1 Answer 1


What you need is a "Raspberry UPS". Search on Google for examples...

An UPS is a complex item, requiring a careful design. You need to know the compsumption of your RPi, how many time it need to run on UPS. And you need a mean to signal to the RPi that you are on UPS and it must shutdown.

  • is there any ups for rpi zero?
    – user64112
    Commented Aug 21, 2017 at 11:55
  • Yes, a lot! An example: shop.pimoroni.com/products/lipo-shim Google "raspberry zero ups" for more!
    – user51705
    Commented Aug 21, 2017 at 12:12
  • You should edit your answer to include some specific examples. "Google this term" is not a very good answer. Pictures and descriptions would also be appropriate in a good answer. Commented Nov 5, 2017 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.