mvm612
Posts: 8
Joined: Mon Jun 17, 2013 12:56 pm

[Solved][renamed] Make Self-powered hub separately powered

Fri Feb 07, 2014 1:50 am

Edit: This thread has been solved, thanks to this wonderful community! See this post for the solution:
http://www.raspberrypi.org/forums/viewt ... 39#p508739


here's the deal, I've been using a Alfa USB wifi device with my Raspberry Pi for months now.

I use a Nexus 10 charger, it is rated at 2A [original samsung charger, so I assume the rating is legit.]
Anyway I plug in a external HDD and the Alfa adapter into USB. The Alfa uses power from the Pi. Also I have a small fan [probably 50 mAh or less, rated for 12 V, but I run it directly on 5V feed from the Nexus charger, wired into a custom microUSB cable].

now I've ramped up the CPU to 900 MHz and seemed to have trouble with the wifi [constantly disconnecting], put it back to 700 Mhz and it worked fine again, so I assume it was running out of power.

what I want to be able to do is run my Raspberry Pi on a 700 mAh USB wall charger [+ the fan], and then separately run the Alfa Wifi adapter a nearly identical 700 mAh USB wall charger, so it's taking all the power from the separate adapter.

My question is, can I just directly wire in the 5V + and - pins to the usb wall adapter? if someone could show me a simple diagram [or simply explain it], I would be grateful!

[I might be selling my tablet so that's why I want to make this work without my 2A power supply]

thanks everyone!
Last edited by mvm612 on Thu Feb 20, 2014 7:18 pm, edited 2 times in total.

gandar
Posts: 215
Joined: Sat Feb 01, 2014 5:45 pm

Re: create a wall-powered "1 port hub"?

Fri Feb 07, 2014 2:38 am

Are you opposed to a powered USB hub running everything including your pi? They are cost effective.

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: create a wall-powered "1 port hub"?

Fri Feb 07, 2014 3:01 am

Hi,
mvm612 wrote:My question is, can I just directly wire in the 5V + and - pins to the usb wall adapter?
You have two adapters, but here you're mentioning just one... ?

Your connections:
1) power supply #1 supplies RasPi (micro USB connector),
2) add a short USB cable between RasPi and WiFi dongle,
3) on this USB cable cut the red wire (+5V),
4) connect those two parts of the red wire via Schottky diode (eg. HSMS-282B):
.a) solder diode's anode pin to the red wire coming from RasPi side,
.b) solder diode's cathode pin to the red wire going to WiFi dongle,
5) power supply #2:
.a) solder its +5V output to the junction of the diode's cathode pin and USB's cable red wire,
.b) solder its GND (-) output to the black wire of the USB cable (remove small amount of its isolation).


P.S. you don't need a fan.


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

mvm612
Posts: 8
Joined: Mon Jun 17, 2013 12:56 pm

Re: create a wall-powered "1 port hub"?

Fri Feb 07, 2014 3:16 am

gandar wrote:Are you opposed to a powered USB hub running everything including your pi? They are cost effective.
well I was going to buy a hub, but I read bad reviews on all the ones under $10. I really don't want to spend like $20 or $30 on a hub, because, the Pi itself cost $35, so like, that would be increasing the whole cost a lot..

anyway, if you can show me a good hub to buy [and it could just be for external devices, because I know a pi will run on a 700 mAh charger with no load on the USB ports], or even one that would power everything, for about $10, I might get that.
Amazon would be my 1st choice, eBay would be second .

FLYFISH TECHNOLOGIES wrote:Hi,
mvm612 wrote:My question is, can I just directly wire in the 5V + and - pins to the usb wall adapter?

You have two adapters, but here you're mentioning just one... ?

Your connections:
1) power supply #1 supplies RasPi (micro USB connector),
2) add a short USB cable between RasPi and WiFi dongle,
3) on this USB cable cut the red wire (+5V),
4) connect those two parts of the red wire via Schottky diode (eg. HSMS-282B):
.a) solder diode's anode pin to the red wire coming from RasPi side,
.b) solder diode's cathode pin to the red wire going to WiFi dongle,
5) power supply #2:
.a) solder its +5V output to the junction of the diode's cathode pin and USB's cable red wire,
.b) solder its GND (-) output to the black wire of the USB cable (remove small amount of its isolation).


P.S. you don't need a fan.


Best wishes, Ivan Zilic.


I meant, ok let me try to explain this way, let's say here is the 4 pins:
[1] [2] [3] [4]

1: +5 V
2: -Data
3: +Data
4: GND

So, I sacrifice a micro USB cable. I carefully cut it apart without terminating any wires. Then I snip pin 1 and 4, and I solder those to 5V that plugs into a separate wall adapter.

so the wires would go

Code: Select all

Wifi Adapter
^    ^   ^   ^
|1| |2| |3| |4|
|1| |2| |3| |4|
 *  |2| |3|   *
    |2| |3|
|1| |2| |3| |4|
|1| |2| |3| |4|
v    v   v   v 
Raspberry Pi
Where it stays *, I would solder those wires to the +5V and GND of the other USB cable that is connected to the separate wifi power supply [700mAh], and the Pi would be connected to the 1st 700 mAh adapter.

Would this idea work?

Also about the fan, I have a 3.5" HDD & the Pi in an enclosed box [with vent holes, and a pc fan(12V, for a cpu I think) to circulate]. The pi runs at about 35-39C. It might be OK without the fan, but I figured I would be on the safe side, because when you close things up, things can heat up [especially with the HDD spinning--a 1TB drive.]

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: create a wall-powered "1 port hub"?

Fri Feb 07, 2014 3:47 am

If you *don't* break the GND wire it will work. You need a common ground between the Pi and the USB device.

Code: Select all

Wifi Adapter
^    ^   ^   ^
|1| |2| |3| |4|
|1| |2| |3| |4|
 *  |2| |3| |4|*
    |2| |3| |4|
|1| |2| |3| |4|
|1| |2| |3| |4|
v    v   v   v 
Raspberry Pi
So, carefully remove some insulation from the GND wire, but don't cut it, then solder to the exposed portion. For the +5V wire, which is cut, make sure you tape up the unused part (on the Pi side) so that it won't short out with anything.

I use a cable exactly like this to power an external USB hard drive independently from the Pi, but still have it connected to the Pi.

mvm612
Posts: 8
Joined: Mon Jun 17, 2013 12:56 pm

Re: create a wall-powered "1 port hub"?

Fri Feb 07, 2014 3:55 am

Oh right!
Ok I will try that in like 3 or 4 days (got a busy next 2 days), thank you for your post!

=)

Matt

Edit: my only question, when you pull the power from all adapters, and then turn them on, does the pi have any trouble recognizing the device? Because the usb device receives power immediately, but pi takes a bit to boot. Just wondering if I'd have to reset power to my Wi-Fi adapter after boot to get it connected or not.

Dilligaf
Posts: 283
Joined: Wed May 23, 2012 6:48 pm

Re: create a wall-powered "1 port hub"?

Fri Feb 07, 2014 5:57 am

First off mAh (milliamp hour) is a measure of battery capacity, not current. mA (milliamps) and is a current measurement (sorry I'm anal about that) :) I'm assuming you've got it all running off the 2A power supply so why not go the easy route and get another 2A supply to use with your tablet and continue using the known working supply for your PI?

mvm612
Posts: 8
Joined: Mon Jun 17, 2013 12:56 pm

Re: create a wall-powered "1 port hub"?

Fri Feb 07, 2014 12:28 pm

Dilligaf wrote:First off mAh (milliamp hour) is a measure battery capacity, not current. mA (milliamps) and is a current measurement (sorry I'm anal about that) :) I'm assuming you've got it all running off the 2A power supply so why not go the easy route and get another 2A supply to use with your tablet and continue using the known working supply for your PI?
Ah..Sorry. I knew that, just typed it wrong I guess.

And the answer is: there are no legit 2A adapters for cheap. And I don't want to spend more than I can help. (Since I've already got the 0.7A adapters it's free, minus the time to solder/heat shrink)

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: create a wall-powered "1 port hub"?

Fri Feb 07, 2014 12:56 pm

Hi,
ame wrote:If you *don't* break the GND wire it will work.
Yes... but I'd add also a diode, as mentioned in my previous message:

Code: Select all

Wifi Adapter
^    ^   ^   ^
|1| |2| |3| |4|
|1| |2| |3| |4|
 *  |2| |3| |4|*
 C  |2| |3| |4|
 A  |2| |3| |4|
|1| |2| |3| |4|
|1| |2| |3| |4|
v    v   v   v 
Raspberry Pi
"C" is diode's cathode, "A" is anode.

The purpose of this additional diode is to protect WiFi adapter if power supply of the RasPi is plugged-in before the second one supplying WiFi (or HDD). This diode "bridges the time gap" in case you plug-in power supplies one by one in mentioned order.

What I'd like to prevent is to apply signals on USB's data signals in case the USB device is not powered yet. With this diode, the USB device is temporarily powered from the RasPi's power supply. When in the next moment you plug-in also second power supply, the USB device starts getting power from it.
The voltage drop on the diode when conducting must be higher than the output voltage diff of both power supplies... but it is not recommended to use crap power supplies anyway... ;-)


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: create a wall-powered "1 port hub"?

Fri Feb 07, 2014 12:59 pm

Hi,
mvm612 wrote:Just wondering if I'd have to reset power to my Wi-Fi adapter after boot to get it connected or not.
Not needed.
After booting, RasPi detects a device presence and initiates enumeration, etc.


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

gandar
Posts: 215
Joined: Sat Feb 01, 2014 5:45 pm

Re: create a wall-powered "1 port hub"?

Fri Feb 07, 2014 2:31 pm

Mvm,

Here is a link to a great hub posted USB hub. At $12 it is two dollars over your $10 budget but is versatile and can be used beyond the pi of required.

It can be ran both with and without ac power and has there juice to power my wireless adapter, keyboard mouse combo, 2gb external HD, and the pi itself using a micro USB cable.

http://www.amazon.com/gp/aw/d/B004OBZ088

Hope this helps.

gelfling6
Posts: 23
Joined: Sat Dec 01, 2012 8:39 pm
Location: Canton, Connecticut, USA, Planet Earth, SOL-3, Milkyway Galaxy, 3rd star on the left...
Contact: Website

Re: create a wall-powered "1 port hub"?

Fri Feb 07, 2014 6:41 pm

I would think, instead of sacrificing a port on a powered hub, You'd want to keep all open. I built a simple switch box that has a coaxial socket on one side, with a simple SPST toggle switch. Inside, the center pin of the connector goes to one side of the switch, the other side from the switch branches off to a red Banana jack/binding post (for external +5V to projects on the breadboard), to a coaxial wire out the other side of the box, to a plug that fits the USB hub, and a sacrificed Mini-USB cable end, red wire, to power the Pi. the outer shell of the coaxial plug, a black banana jack/binding post, the shield wrapping for the hub power plug, and black wire from the USB cable all as a common GND. This way, the wall-wart that came with the USB hub, could be switched on/off without needing to unplug anything right at the computer. I arranged everything on a lexan cutting board, with velcro strips, so everything was close at hand. The hub I have, is a 7-port mini hub (2 on top, 5 on side), bought at a Staples store (Office supply), which came with a 3.2-amp +5V supply. (http://www.staples.com/Staples-7-Port-U ... uct_837529, which I just found out is out of stock.)

The USB cable end powers the Pi, I plug the keyboard & mouse into the hub, and the hub's input cable into the Pi's USB socket.
leaving room for 5 more devices. (a portable hard drive, Flash-RAM Sticks, etc.)
Stephen Griswold

mvm612
Posts: 8
Joined: Mon Jun 17, 2013 12:56 pm

Re: create a wall-powered "1 port hub"?

Mon Feb 10, 2014 4:24 am

Just wanted to say that I decided to try without the diode, and it works great!

And about that powered hub that was linked, I would have bought it if it was only $12, but it had shipping, unless i bought $35 worth.Thanks anyway.

Going to trade my tablet tomorrow so I don't have any downtime since I whipped up the custom cord. :)

I'll experiment with overclocking now, perhaps I can reach 900mhz without trouble since Wi-Fi is separately powered (it kept disconnecting).

gandar
Posts: 215
Joined: Sat Feb 01, 2014 5:45 pm

Re: create a wall-powered "1 port hub"?

Mon Feb 10, 2014 1:20 pm

mvm612 wrote:Just wanted to say that I decided to try without the diode, and it works great!

And about that powered hub that was linked, I would have bought it if it was only $12, but it had shipping, unless i bought $35
Mvm, glad that you found a solution my friend.

mvm612
Posts: 8
Joined: Mon Jun 17, 2013 12:56 pm

Re: create a wall-powered "1 port hub"?

Thu Feb 20, 2014 7:16 pm

Guys I just wanted to say that I found a great solution for people who don't want to buy an expensive hub, and have the resources/skills to modify a USB cable.

So basically, this is what I did:

Code: Select all

Wifi Adapter
^    ^   ^   ^
|1| |2| |3| |4|
|1| |2| |3| |4|
 *  |2| |3| |4|*
    |2| |3| |4|
|1| |2| |3| |4|
|1| |2| |3| |4|
v    v   v   v 
Raspberry Pi
Where the * means a solder point. [Also, I put aluminum foil to make up for disrupting the shielding when I put it back]
+5V is red wire, GND is black wire. Where it says *, I soldered the wire to the corresponding wire onto a sacrificed Male-to-wire usb cable. [which I cut off a cheap chinese knockoff iphone usb cable]
So then you plug in that other cable to a dedicated 750mA [or more] USB charger.

Now here's the cool part, instead of directly powering the wifi device with this mini usb cable [my adapter uses mini usb], I bought a self powered 4-port hub, that used a mini usb for the Source usb port. this works out great, because I can power my wifi device, and plug in a flash drive without any trouble! Whichever items you use with your hub, they must total less than 750mA, or else you will probably run into trouble with devices resetting, or not working correctly at all. YMMV.

I bought I hub on eBay for $3.96 Free S/H.
The kind I got was "Dynex Say it in color" 4 port hub.
Check eBay or amazon. Or try this link: http://www.ebay.com/sch/i.html?_sacat=0 ... or&_sop=15

Anyway I just wanted to share this idea for anybody like me who doesn't want to spend a crazy amount on a powered hub, if you've already got tons of 750mA or similar chargers already lying around. :)
:D

Return to “General discussion”