Bidirectional Current Port (Device powers accessory or Accessory charges device)

Hi!
I'm doing a project and I would want to have an accessory port, so I can both give current from the device's battery to the accesory (like a sensor) or charge the device's battery if connected to a charge base.

Never both at once, and I could do two ports, but I'd like to have only one port for charging or expansion.

That sounds like an interesting project that could be a lot of fun! However, please keep in mind that we are not a free design or code-writing service. We’re more than happy to help with your design or code, but we need you to make an initial attempt. Please design and write your code, then post it along with an explanation of what’s not working properly.

  1. Show Your Work First: Before asking for assistance, make an attempt to design or write the code yourself. Share your work along with details about what isn’t working.
  2. Provide Clear Documentation: Since we can’t see your project, share an annotated schematic (best) or a clear drawing of your setup. Pictures are welcome, but avoid using Fritzing diagrams as they are wiring diagrams, not schematics, and are not ideal for troubleshooting.
  3. Include Technical Details: If there is specific hardware involved, include links to technical information. There are often many versions of similar components, so precise details are essential.
  4. Reference Resources: For additional help, check out useful links and tutorials: Useful Links on Arduino Forum.
  5. Obtain a copy: of the Arduino Cookbook and complete several of the projects. Many of them will help you achieve parts of your goals.
  6. Course Electronics For Beginners (eBook)
  7. Electronics For Beginners (eBook)
  8. Arduino Step-by-step Projects Course | Build 25 Projects
  • Suggest you buy a ready made power bank, lots and lots to choose from on the internet.

I'm designing the device to be small, self-powered and portable, and I didn't know if such a power system could be possible with simple electronics.

I'd be using a development kit by lilygo that manages battery charging and status, but would like to use a port like the described on my op instead of a qwiic connector to use accesories and the usb C to charge; but I'm only asking if, with simple electronics I can do the "I power you or you power me" system.

I'm trying to make a small, self-powered and portable device, therefore my curiosity if I could have only that one port to do both functions, with some electronics

You might want to study this first.
https://youtu.be/T70mBHeIOZA?si=XdswIxodQUt-axEV

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.