43Views3Replies

Author Options:

Help on a phone automatic charger project Answered

Hello everyone,

Im trying to build a circuit that allows a phone to be charged by a PowerBank automatically and I obviously need your help since Im kinda new to all this.

So the idea is to connect a phone to a powerbank using a relay. This relay is controlled by a PIC16F877A.

The Powerbank turns on once it is connected and off when disconnected. Im planning on using an android application to turn on the flash light once the phone is on 15% so that the LDR detects it and the PIC command the relay to switch. So once the powerbank gets connected it should turn on and start charging the phone. what do you think ? can i use a MOSFET instead of a relay ?

my problem is on the determination of the exact components I need so that the phone gets charged correctly.

Basically, the powerbank voltage is 5V and the phone draw a current of about 1.4A.

What is the best relay and transistor to use ? or should I simply use a MOSFET

Here I used a 5V relay but I need to determine the coil current to determines BJT collector current --> this determines useful BJT base current --> this determines useful base resistor values.

I hope you guys can help me pick the right components to use and advise me of how I can make this work perfectly.

PS : the simulation is working just fine

Discussions

0
Downunder35m
Downunder35m

24 days ago

Well, there is many way to make things move, like a wheel, but I does not need to mean you have to invent the wheel ;)

You a few problem that need to be checked.
1. Battery voltage is only 3.7V while the phone requires a steady 5V.
2. Safeties for he battery, like short circuit or other things.
3. Charging of the powerbank.

It is certainly possible to simplify all this and to ignore good practise, but even then the components from your list are not ideal.
The PIC can do so much more... ;)
What you need is a step up converter with proper protections, quite cheap these days in the usual online places.
If 5V comes out at sufficient current the phone electronics will take care of the charging - no problem there, just add a USB port for the charging cable.
Still you need a way to charge the powerbank, prefarbly with enough intelligence to work while the phone is charged as well.
Searching for USB charging module brings quite a few cheap results.
IMHO the easiest way out would be to just buy a battery enclosure that has all included what you need.
Most of these boxes are designed to hold 3, 5 or 8 16850 cells.
Simple plug an play, add you battery(ies), close the box, ready to go.

If you want to develop your own I suggest to start by getting rid of the relay first.
Just uses way too much energy, a tiny mosfet works the same ;)
You might want to switch to 3.3V components for the active part to avoid having to power them with a step up converter to get the required minimum of 5V.
On the power bank side you need to add a voltage check so the charging is stopped once your battery reaches a critically low state - you don't want to ruin the battery by discharging it too much.
The mosfet then basically only "switches" the step up converter on so you get 5V instead of 3.7V on the USB output.

Please keep in mind that for most phones you will have to provide the correct voltages on the data lines, otherwise the phone will only charge at 500mA.
You can look up the required voltages for most manufactures that use it on the Wiki page about the USB charging standard.

0
AbdChahidS
AbdChahidS

Reply 23 days ago

Downunder35m Thank you so much for the valuable informations, actually the powerbank voltage is 5V, my bad.
As for the powerbank, Im planning to charge it using the normal way. The idea here is that Im using a Powerbank that turns on once it is connected and off when disconnected. Im planning on using an android application to turn on the flash light once the phone is on 15% so that the LDR detects it and the PIC command the relay to switch. So once the powerbank gets connected it should turn on and start charging the phone. what do you think ? can I use a MOSFET instead of a relay ? as much as I know, relays are all-or-nothing (like switches) whereas a MOSFET can transmit more or less current I guess, which the powerbank will detect I guess and then it will turn on ..

0
Downunder35m
Downunder35m

Reply 22 days ago

Ah, now it all makes more sense :)
Sure, use a mosfet.
There are plenty of websites with ciruit examples and explanations on how they work and can be used.
I short: if the gate is driven properly they will act like a switch.
You can also so called SSR's Solid State Relays.
Quite small and cheap ones too.
They basically combine what is required for the "mosfet switch" in one package.
Just apply a minimum input voltage and the output switches fully on.
Not sure if you can sourse a small mosfet and corresponding electronics cheap than a tiny SSR but if you like to keep it simple check the SSR route.