Hello all! Ideas for powering both arduino and android device

Hi all. This is my first message here.

I am starting to learn Arduino. My goal is to connect it to an Android device via USB. In the same time, I would need to power both devices also via USB cable. I wonder if anyone have done this before? Would a USB-Y cable be able to supply power to both other ends and would that cause any issue?

Thanks,

Nam

You don't tell what that "adroid device" is so the basic answer is: No.

Powering two devices - from a PC? Or from a wall adapter?
Most PCs have 2 or more ports, so use 2 cables.
2 USB outlet AC adapters are also readily available.
Find one that can support enough current for your Android and your Arduino. For example, my phone needs a 1.8A to 2.0A adapter, while the Arduino only needs 500mA.

Most Androids are USB slaves, aren't they (vs a PC being a USB master).
Arduinos are generally USB slaves also.
I think you'll have better luck adding Bluetooth capability to your Arduino and then connect via Bluetooth to your Android.

This stackexchange answer

explains about "USB On the Go" and using your Android as a USB master.

@CrossRoads
Whow! You really have a thursty phone. My ones run easily, and even get charged from a Pc USB. Joking!!!!!!
May I ask what a mammout phone that is?
Nevertheless, unknown devices can consume unknown amount of power.

LG ThinQ7. 5V/1.8A is what's on the cable.

iPhones need even more.

It will charge from my laptop, but takes longer.

Oops. I have a Sony Experia (T3?) and a Samsung Galaxy J3 2017... Both chargers say; Output 5V, 1 Amp….

The Samsung Galaxy Tab won't charge if switched on and connected to a 1A USB. Battery remains at a steady level forever. Needs a 2A charger, or be switched off, to charge. Took me a while to figure out why the darn thing wouldn't charge - turned out one of the USB outlets on the charger was limited to 1A, the other could supply 2A!

@wvmarle
Thanks for the tip! I have a number of powerbanks only supplying 1 Amp, enough for my baby phones, and one piece of brick supplying 2 Amps.

I didn't know I would get so many replies. Thanks all.

I plan to use either an Android phone or tablet. The android device would connect to the Arduino board to exchange data. This is a USB link because the Android device already uses Bluetooth for another purpose. My question was whether that configuration would allowing data communication and "some" charging, not about sufficient charging power, but rather if a Y cable would acts as power source for both, and also provide USB communication link. After that, I would then look into a USB power supply that is big enough for both.

On the question of which Android device, I didn't know it matters, other than "how much charge needed". But that's depending on what apps I run on the device also.

Thanks!

Power that Android in a reliable way. Then the question remains, "how to communicate".
Give the Arduino its own power supply. Then figure out what comms channel the Android device has left for communicating with the Arduino.

I was looking for a simplest physical connection first, if people here already know about this. If not possible, then I would do what you said. I still have many constraints though. For example, it would be hard to use IP communication, since I plan to use it in a car, and the Android phone/device would use internet for map feature. If the Arduino is also using IP to connect to it, it may work, but I am not quite sure. It's for monitoring sensors. So I prefer it to work even when there is no internet.

Arduino can work with its own power if I use the uno board.

I think something like this may work for me:

https://www.wish.com/product/55582809c45bd00e977e73ff?hide_login_modal=true&share=web

I doubt you can use a Y cable as communications link, but you can always try it out. If the data wire are actually connected it may just work.

Note that for your tablet to be able to communicate with your Arduino, one of the two must be able to go in USB host mode. Most Arduinos can't do this; there are models around that can (Leonardo? Due?). Most tablets are likewise USB client only, not host.