DIY Power Supply - Add Barrel Jack to VIN - Question


Hey, I picked one of these up because my boss is wanting to setup about 20 of them in the office. Only requirement he has, is he wants me to make custom power cables that use a DC jack. I have read all the documents/docs and schematics on your website.

I am planning to hook the female end of the DC jack to the VIN port. However, I see that the VIN port has TWO EACH of positive (+) and negative (-) pins. My DC jack only has ONE positive (+) and One negative (-). Should I use BOTH of the VIN (+) wires, and solder them to the single (+) on the DC jack? Or should I only use ONE (+) and ONE (-) from the VIN port?

My logic with the above, is that if I used all 4 wires from the VIN, that it would provide more stable voltage, and may have an easier time with higher currents (will be adding quite a few accessories).

If anyone needs clarification, I will make a quick MS Paint diagram and post it.



My advice, keep that:
Should I use BOTH of the VIN (+) wires, and solder them to the single (+) on the DC jack?
and btw same for GND (2 to one).

it’s about Kirchoff law, you cannot makes wrong :smiley: and your logic is right, the voltage drop caused by current will be reduced if you use two wires instead one.


Okay perfect! I was pretty sure it would be safe, but for some reason started doubting myself. I was thinking it may pull double the voltage (10v) due to 2x 5volt wires. Didn’t want any “smoke” ; )

Thank you very much for the assistance!!

I might make a quick tutorial for others, as I’ve seen lots of chatter about DC jack power from other users.

Thanks again!


Yes, as Tomas suggestion, both 4 wires should be used together to keep more current.

BTW, may I know that what’s the usage of the 20pcs in your office? Is it for clusters?


FYI: it is Khadas VIM


I think they refer to the power port called Vin=volts in. 4-pin connector behind USB-C.


Hello stephen77, I have an example of using the VIN connector in this post.
This method of using 2xPos and 2xNeg is employed in some Chromebooks.


Thank you for confirming that for me, I appreciate it. Yes, the plan is for cluster setups but as to what they’ll be running, I haven’t a clue. I’m just the hacky hardware guy. I do remember that the AES acceleration is important. For the solo VIM deployments, I’ll be using original RPI 5.1v PSU with the USB end chopped off of course. For the clusters, I’m leaning toward using high powered 5v arcade PSU units. They work like a dream, and if you get a decent model (test it before deploy) they have very stable voltage/current.


Thank you very much for the link, I’ll definitely check it out!

Thanks again!


Ok so a little update - received my 1.25mm JST connectors (pre wired). However I notice that the wiring is 28 guage (very thin). According to a few “combined multi wire gauge calculators” 2x 28awg wires combined = 25 guage. (2 x28awg for both positive and negative)

Should I be trying to replace these wires with thicker wire? I have found a single 1.25 JST that comes with thicker guage wire, but I can’t find it for sale.

You folks think that 2x 28awg is too small? I’m under the impression that even tho they are thin, they are thicker than the contact pins in a USB-C cable?

Thanks everyone!


Hello Stephen77,

well, no more choices if you haven’t crimping tools.

and connector

But according shouldn’t be so bad even with 2x AWG28 (cal. based only on AWG28)

my recommendations is try what you have, so 2x AWG28 for VIN, 2x AWG28 for GND. Run VIM1, run applications or makes some extra load (USB keyboard/USB mouse) and

  1. measure voltage on input connector (VIN positive pin of voltmeter, GND negative pin of voltmeter)
  2. voltage drop in 4pin connector VIN (positive pin of voltmeter) and VIN of your DC plug for negative plug of voltmeter.

the max current isn’t issue, the voltage drop on cable can be issues (the VIM will have lower input voltage, than is required => makes unpredictable reset of VIM+). Let us know a voltage drop and input voltage…

you need in notice, that many voltage power supply has +5V +/- 10% output. Some looses in cable if our power supply give for exaple 5.12V isn’t issues, if your power supply give you only 4.8V than you can have issues when looses is appear.


Thank you very much for the detailed response, I appreciate that. I did notice that if you use a pin to lift the little white tabs on the connector, the wire will slip right out when pulled. I have put the wire back in and it is just as secure so I’ll buy some pre crimped wires of various gauges. :slight_smile:

In addition to the above, if the bigger wire is a bit too thick, I’ll try shaving a tiny bit off the plastic jacket on the wire. Then maybe insulate the whole area with hot melt glue.

I will try it with just the 28’s and see how it goes. I’m sure it will be enough but my main reason for doing this is because I’m all about safety and trying to prevent equipment malfunction.

EDIT: I have the option of using a 5.1v Official RPI 3 PSU, or a 5.25v (quality) RPI3 PSU. I was leaning to the 5.1v. If you think the 5.25v is a better choice, please let me know!

Thanks for the helpful and detailed responses. They have been most helpful!



yes, welcome in onboard connectors worlds :smiley: sometimes is more dificults to remove them, the white tab can be damaged or cable is too tight. Specially if home-made cables is used

So when I’m look original USB-C cable delivered with VIM, I’m doubt that wires for power are better than AWG26. For your reference why you should be safe, checkout below links that about USB cables. So how long cables exactly you plan for the connections?

about power supplies, I know that here is some discussion from severals users about their experience of their powersupplies. Can happend that RPI3 PSU 5.1V is better then 5.25V. see that thread

btw, so your plan is 20 PSU for 20 VIM units or some PSU sharing with VIMs or?


Thanks so much for the additional resources! I’ve been reading everything you send me.

I noticed something pretty significant (maybe) today when looking at those “pre crimped” 26awg molex wires you linked - they are made from Phosphor Bronze, which only has about 15% of the conductivity of regular copper.

The 28awg ones I bought (cheap from China ) - they seem to made from aluminum wire - around 60% of the conductivity of copper. Even if I’m incorrect , and they are ‘zinc copper’, they still have a conductivity of about double the phosphor bronze. So now I’m leaning towards the 28awg wires for that specific reason, but I could be incorrect in my assumption.

The regular single PSU (RPI3) will only be used for the solo units located in different offices. For the clusters, I’m gonna use a high AMP arcade PSU (5v) which should be able to handle several units each easily :slight_smile:

I am also making the cables minimal length. The RPI3 5.1v has 18awg wire. I am going to cut off about 6 inches of the cable to accomade the 3-4 inches of extra wires I’ll be soldering. That way its still a bit shorter than the original was.

So I’m gonna go with the 28awg for now and hope for the best. Im thinking 28awg aluminum/zinc wire might be better than 26awg phosphor bronze wire.

I would actually prefer to use single wire leads, directly on the VIN pins, but haven’t had any luck finding connectors that small. This way I could say goodbye to the silly JST connector altogether. If I get really desperate, I’m just gonna solder directly to the VIN pins and forget this silly 1.25mm JST connector crap (mostly joking :slight_smile: )

Why use a connector that requires a $250+ crimping tool to make half decent wires - rawr lol.

EDIT: Also, I decided to drop the “barrel connector” and go with these instead:

I have a local source for them, dirt cheap. They may not be as visually appealing, but I know for a fact they are 18awg. I ordered 5 different barrel connectors, and they ALL had thinner wire than advertised when I ripped them open to check. I wanted the prewired ones with tails. I know I can get “legit” barrel connectors, with better awg but it becomes much more costly - hence the alternative!


some thoughts about

Phosphor Bronze is just mainly outer of that wires, it’s consist of 98% copper.

according PSU, looks in my VIM needs current under 1A (quick test 0,7A, USB keyboard, mouse, HDMI, Ethernet, Android 7), so you can calculate 5W per unit. But highly depends how yours applications will look like.
I’m expecting something like that for cluster or?

JST connector - why you focus on jst? Because if is from China supplier that I have doubt, that use JST at all.
There are plenty of others suppliers of 1.25mm header connectors
Wurth 653004113322 , Harwin M30-1100400 , Molex 51021-0400 , AMPHENOL FCI 10114826-00004LF, Multicomp MC34729

the issue is that wiring can not fit - hold properly in the connectors, I had that issues. I cannot suggest who is best, but there aren’t 100% compatible each others with wiring.

crimping tools - as I’m introduced you in that connectors world, believe not, everybody suffering from that. But still that kind of 1.25mm connector is pretty common and very good trade off between space/price/features.

and is possible to buy from Asia complete set cables with headers like


EDIT: So I just noticed something on the Khadas board PCB schematics that might be my saviour - Do you see the EC1 and EC2 solder pads (4x pads right behind the VIN port. According to the Khadas “PCB Drawing Doc”, the two pads closest to the VIN port are “EC1”, and the second two pads are " EC2". Which is + and which is - ?

According to VIM schematics, EC1 looks to be + positive ? But then in the PCB drawing, there is + sign next to the EC2 pads… So I’m not too sure.

Can I simply solder to these pads? I would HIGHLY prefer that option - and it looks like it might just work.

You are a smart man! Thank you again for all.your help. Been very busy lately, but finally started working on the cable today in my spare time. Only made one slip up - forgot to slide the outer layer of heat shrink over both wires BEFORE soldering (doh!). Just bought some 4:1 adhesive heat shrink that will fit/slide over the connector anyways - hopefully it arrives soon.

EDIT: You are correct about the PSU used for the clusters. Something basically just like that! Very cheap, and they tend to have very clean/stable power.

And that’s exactly the kind of cables/connectors I got! I did find a suitable crimper for these single wires in the $40-50 range but not.gonna bother unless I need it.

And I know phosphor bronze “is copper” - but its conductivity is still really really low in comparison to zinc copper or regular copper. I felt that the 26awg phosphor bronze wires might conduct less than the 28awg zinc copper ones. I might be wrong about that, but the numbers really jumped out at me.

Anyways I should hopefully know how the cable will work in the next day or so. But I’m really intrigued by those EC1 and EC2 solder pads on the VIM board.


Success! Finished my first prototype, and must say its working very well. Things that I’ve noticed:

  1. Should have went with the traditional DC barrel connector. Connector I used works awesome but is REALLY hard to separate/pull apart. Deal breaker. I will likely redo it when suitable adapters arrive (I need them for various other projects too).

  2. Power seems very stable. Wiggled the connector/wires while running and it never skipped a beat. I expected it to kill the power when wiggled, but nope. All good there.

  3. Tested using a 3.5" USB HDD as well as a 2.5" Type C HDD simultaneously, with wireless mouse/keyboard. I may choose to wire up a few additional USB ports (I see that more can be wired to GPIO) Additional ports would only be used for low voltage stuff like USB/serial adapter, webcam, etc.

So overall I would say it was a success, however I am going to redo it with the DC barrel cable (as I should have originally).

But if someone can please enlighten me about the EC1 and EC2 contacts on the VIM board as I mentioned in my previous post, that would be wonderful. It would simplify this a lot for me. I know you guys aren’t gonna “recommend” soldering to the board, which is fair. But I’m gonna do it anyways, but just want to be 100℅ I’m reading the schematics correctly.

And thanks again for all the help with information regarding the connectors and wires. I’ve read and learned a lot!