Power and safety

I’ve a project that requires a portable power source. The Arduino end is just a 5v Trinket running 44 Ws2812b LEDs. In bench tests, a simple phone charger type rechargeable battery pack works admirably, connected to the micro usb on the Trinket.

In practice though it would be ideal if;

  1. The Trinket port was still available to the user,
  2. the recharging port of the power pack was accessible for charging
  3. The powerpack could also be accessible to the user to charge another device in emergencies.

My first concern is safety. If the Arduino was running and the user decided to draw power to charge a device, or recharge the power pack at the same time, is this safe or is some sort of overload possible? Can I put something in my code to stop the Arduino running the LEDs (or maybe, just flash a single one in red to indicate the charger is being used)?

How would I go about arranging all three of the above? I was wondering about using the FTDI interface to give the user access to programming - or is there an alternative (better?) way of providing power to the Trinket than the micro USB port.

I’ve no diagram as yet, sorry, but my description would be;

Two external female “A” USB ports...one to recharge the battery pack, one to charge an external device from it (thought...would it be best to have a single port and a physical switch so you can only charge or recharge depending on switch position?).

One external female “micro” USB port to program the Trinket...connected either to the FTDI or these on the Trinket, depending on how the Trinket is powered.

If things like capacitors and resistors are required for safety and protection, please advise.

By the way the projec is very tight on space...is ventilation also going to be an issue?

Thanks all!

If you want to use a battery, connect it to the battery pin on the trinket and power it that way. That leaves the USB port available for programming. If you want to recharge the battery while it is still connected to the Trinket, then you will have to splice into the battery/ground connections so they both go to the trinket and the connector you are using for recharging.

Adafruit has a nice description of all the pins and how they are typcially used: Pinouts | Introducing Trinket | Adafruit Learning System

blh64:
If you want to use a battery, connect it to the battery pin on the trinket and power it that way.

Well, I know the rechargeable power packs contain a battery, but I was thinking of using one in it’s entirety because then it already has the architecture for recharging built into it. I know, I’m being lazy.

blh64:
If you want to recharge the battery while it is still connected to the Trinket, then you will have to splice…

Another reason for using the powerpack option, the recharge socket is separate to the output.

I’ve done some (frankly terrible) Powerpoint drawings…the way I originally envisaged it and the way blh64 has suggested (I think!) One advantage to the new suggested method is I could just mount the Trinket so that it’s port is directly available…saves the cost/bother of yet another cable…so thanks for that!

Question - instead of having a physical switch that controls the whether the external USB “A” port charges an external device or recharges the internal powerpack, is it possible for the Trinket to control this behaviour automatically depending on what is connected?

Again are there any safety measures I should be including to protect both the Trinket, the LEDs and the user (capacitors, resistors etc…?)

Thank you!

The USB "A" socket on the power pack is for outputting 5V to charge a phone, I don't believe you can recharge the PP through it, thats what the USB "micro" socket is for, I have had Arduinos running from PPs and charging at the same time but I doubt the battery will charge very fast while driving a heavy load at the same time, also, you may overload your power supply that is charging the PP.
You could use this between the PP and Trinket to break out wires which you could put into 5V (or raw / Vin if 3.3V Trinket) and GND pins, leaving the USB connector open.

Check these USB connector images.
http://www.l-com.com/content/USB-Connector-Chart.html

outsider:
The USB "A" socket on the power pack is for outputting 5V to charge a phone, I don't believe you can recharge the PP through it, thats what the USB "micro" socket is for,

I thought I said that...sorry if I miscommunicated...yes, the micro on the PP is the “Power in”, wondering if it’s possible and above all, safe, to switch a single external (to my device) A port so that if a user connects a power source, the switch goes to the micro port to recharge the PP, but if they connect a “load” the switch goes to the “A” port to recharge the external device from the PP?

Thanks for links, checking now...