# Electrical Question (12v DC on DB9)

**URL:** <https://boards.straightdope.com/t/electrical-question-12v-dc-on-db9/781174>\
**Category:** Factual Questions\
**Created:** [March 2, 2017, 3:05am UTC](https://boards.straightdope.com/t/electrical-question-12v-dc-on-db9/781174 "2017-03-02T03:05:44Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![RememberMe](https://avatars.discourse-cdn.com/v4/letter/r/5fc32e/32.png) [@RememberMe](https://boards.straightdope.com/u/RememberMe)\
**Post date:** [March 2, 2017, 3:05am UTC](https://boards.straightdope.com/t/electrical-question-12v-dc-on-db9/781174/1 "2017-03-02T03:05:44Z")

</div>

I have a device that gets its power from a db9 connection but am missing the power cord. I would like to rig something up using a spare serial cable and 12v power supply. Given the attached image showing the pin-out, how would I make this happen? Is it as simple as connecting pins 4,5 to the +12v lead on the transformer and pins 8,9 to the -12v?

[![](https://uploads.tapatalk-cdn.com/20170302/41ec78e63ef7cfed1567f205fb4a0e80.jpg) ](https://uploads.tapatalk-cdn.com/20170302/41ec78e63ef7cfed1567f205fb4a0e80.jpg)

Sent from my iPhone using Tapatalk

---

<div class="post-metadata">

**Author:** ![SamuelA](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@SamuelA](https://boards.straightdope.com/u/SamuelA)\
**Post date:** [March 2, 2017, 3:48am UTC](https://boards.straightdope.com/t/electrical-question-12v-dc-on-db9/781174/2 "2017-03-02T03:48:06Z")

</div>

Almost correct. You need a DB-9 connector, first of all. You need something like [this](http://www.newark.com/l-com/sd9p/d-sub-connector-standard-9-position/dp/67P4173?mckv=Pyr8IJjG&gross_price=true&CATCI=aud-106011026661:pla-164504983461&CAAGID=20389674261&CMP=KNC-GUSA-GEN-SHOPPING-67P4173&CAGPSPN=pla&gclid=CjwKEAiA_9nFBRCsurz7y_Px8xoSJAAUqvKCF_Z-mYx1NFrSP576gQFpyJqjsFwpyUf4w95nH56_rxoCE37w_wcB&CAWELAID=120185550001155984). You want those solder cups and you want some solid core wire you can insert into the cups and solder down. The other end you would connect to the cord from a 12 volt power brick of some sort - those are a dime a dozen, USB hubs use em, cable modems use em, etc. Lots of ways to get one - at worst, buy another online. Make sure it is 3 amp capacity or higher.

You actually connect the +12 of the brick to the pins 4 and 5 (you solder the 3 wires together, then take the 2 wires you soldered on and solder to those pins) and the GROUND - NOT -12 - to 8,9. ± 12 would actually be a 24 volt supply and that is a totally different setup.

The way you figure this out is with a multimeter set to voltage. Plug in the power brick and place the leads of the multimeter on the stripped wires coming out. If it reads +12 (or 12V), the RED multimeter lead is the +12 and that is what goes to 4,5. If it reads -12, the BLACK multimeter lead is the +12 and that goes to 4,5. The OTHER goes to 8,9.

Note that “ground” means return to an isolated supply - it’s not actual ground and should not be in common with earth ground.

For a neat job, you need to use solder flux from a flux pen and heatshrink is nice. Also heat the wire, not the solder, when soldering and let the hot wire heat the solder. Also helpful to have clips to hold the wires together prior to soldering, but you can make do by twisting.

---

<div class="post-metadata">

**Author:** ![Terry\_Kennedy](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@Terry\_Kennedy](https://boards.straightdope.com/u/Terry_Kennedy)\
**Post date:** [March 2, 2017, 10:11am UTC](https://boards.straightdope.com/t/electrical-question-12v-dc-on-db9/781174/3 "2017-03-02T10:11:39Z")

</div>

> [@RememberMe](#):
>
> I have a device that gets its power from a db9 connection but am missing the power cord.

As the question was answered above…

\<pedant\>It is a DE-9, not a DB-9. Somebody saw that a DB-25 had 25 pins and decided the connector with 9 pins had to be a DB-9, and the misnomer stuck.\</pedant\>

> [@](#):
>
> I would like to rig something up using a spare serial cable and 12v power supply. Given the attached image showing the pin-out, how would I make this happen? Is it as simple as connecting pins 4,5 to the +12v lead on the transformer and pins 8,9 to the -12v?

A novice mistake to watch out for is wiring the pins backwards due to looking at the face of the mating connector, where the pin numbers run in the other order. That is more common with separately-inserted pins as opposed to the solder cup type.

With the permanently-installed solder cup type, you have to be careful not to heat the pin too long - the material it is sitting in is plastic and will eventually melt.

You’ll want to get a compatible housing, both to protect the non-mating face of the connector from electrical shorts as well as providing a mechanical strain relief on the cable itself. Most housings (“shells”) have both strain-relief hardware and screws for holding the shell+connector onto the mating connector, but there are various permutations.

Last, if you haven’t soldered before, something involving power (even 12V) and dimensions this small is probably not the best place to start. Before anybody takes me to task for an uninformed comment, I soldered [this](https://www.glaver.org/mod-6-nixie/6F5S8138-s.jpg) by hand without a magnifier (the picture was taken with a magnifier).

---

<div class="post-metadata">

**Author:** ![pyromyte](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@pyromyte](https://boards.straightdope.com/u/pyromyte)\
**Post date:** [March 2, 2017, 1:16pm UTC](https://boards.straightdope.com/t/electrical-question-12v-dc-on-db9/781174/4 "2017-03-02T13:16:09Z")

</div>

> [@SamuelA](#):
>
> The other end you would connect to the cord from a 12 volt power brick of some sort - those are a dime a dozen, USB hubs use em, cable modems use em, etc. Lots of ways to get one - at worst, buy another online. Make sure it is 3 amp capacity or higher.

:dubious:Wait…What? To me it looks like the device in the picture IS the power supply. Looks like the box would be plugged into mains via another connection (not shown in the pic), and the box would supply DC 12V out of the DB-9 connector to power something else.

Are you trying to power the device shown in the pic, or another device not seen?

---

<div class="post-metadata">

**Author:** ![RememberMe](https://avatars.discourse-cdn.com/v4/letter/r/5fc32e/32.png) [@RememberMe](https://boards.straightdope.com/u/RememberMe)\
**Post date:** [March 2, 2017, 4:07pm UTC](https://boards.straightdope.com/t/electrical-question-12v-dc-on-db9/781174/5 "2017-03-02T16:07:01Z")

</div>

The picture is the correct power supply, which I don’t have. I had someone who had one on hand send me a picture.  
Sent from my iPhone using Tapatalk

---

<div class="post-metadata">

**Author:** ![carnivorousplant](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/carnivorousplant/32/3563_2.png) [@carnivorousplant](https://boards.straightdope.com/u/carnivorousplant)\
**Post date:** [March 2, 2017, 4:46pm UTC](https://boards.straightdope.com/t/electrical-question-12v-dc-on-db9/781174/6 "2017-03-02T16:46:23Z")

</div>

> [@SamuelA](#):
>
> Also helpful to have clips to hold the wires together prior to soldering, but you can make do by twisting.

Are clips made for that? I hate soldering those things.

---

<div class="post-metadata">

**Author:** ![SamuelA](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@SamuelA](https://boards.straightdope.com/u/SamuelA)\
**Post date:** [March 2, 2017, 10:04pm UTC](https://boards.straightdope.com/t/electrical-question-12v-dc-on-db9/781174/7 "2017-03-02T22:04:12Z")

</div>

> [@carnivorousplant](#):
>
> Are clips made for that? I hate soldering those things.

Yes, like the [SE MZ101B](https://www.amazon.com/SE-MZ101B-Helping-Magnifying-Glass/dp/B000RB38X8/ref=sr_1_3?ie=UTF8&qid=1488492150&sr=8-3&keywords=third+hand+soldering+tool) Helping Hand. Those are cheap and commonly used, though professional shops tend to use rubber clamp vices.

---

<div class="post-metadata">

**Author:** ![scr4](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@scr4](https://boards.straightdope.com/u/scr4)\
**Post date:** [March 2, 2017, 10:33pm UTC](https://boards.straightdope.com/t/electrical-question-12v-dc-on-db9/781174/8 "2017-03-02T22:33:14Z")

</div>

> [@Terry\_Kennedy](#):
>
> A novice mistake to watch out for is wiring the pins backwards due to looking at the face of the mating connector, where the pin numbers run in the other order. That is more common with separately-inserted pins as opposed to the solder cup type.

It’s a common mistake, novice or otherwise.

But there is a consistent standard on which pin is considered pin 1 - [like this](http://www.suntekpc.com/htm-2/cable-serial-rs232-db9-female-db9-male-xxx-generic-oem-xxx.htm). So the diagram posted by the OP shows a view of the female connector, which should be the one on the power supply side.

---

<div class="post-metadata">

**Author:** ![scr4](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@scr4](https://boards.straightdope.com/u/scr4)\
**Post date:** [March 2, 2017, 10:35pm UTC](https://boards.straightdope.com/t/electrical-question-12v-dc-on-db9/781174/9 "2017-03-02T22:35:57Z")

</div>

> [@RememberMe](#):
>
> Is it as simple as connecting pins 4,5 to the +12v lead on the transformer and pins 8,9 to the -12v?
> 
> [https://uploads.tapatalk-cdn.com/20170302/41ec78e63ef7cfed1567f205fb4a0e80.jpg](https://uploads.tapatalk-cdn.com/20170302/41ec78e63ef7cfed1567f205fb4a0e80.jpg)

Um, what kind of “transformer”?? A transformer, by definition, outputs AC.

If you mean an AC-\>DC power supply - if it has +12V and -12V output terminals, then you’ll end up applying 24V on the device, which is incorrect. You need to connect pins 8,9 to neutral or ground, and pins 4,5 to +12V.

---

<div class="post-metadata">

**Author:** ![PoppaSan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/poppasan/32/189_2.png) [@PoppaSan](https://boards.straightdope.com/u/PoppaSan)\
**Post date:** [March 2, 2017, 10:41pm UTC](https://boards.straightdope.com/t/electrical-question-12v-dc-on-db9/781174/10 "2017-03-02T22:41:20Z")

</div>

> [@scr4](#):
>
> It’s a common mistake, novice or otherwise.
> 
> But there is a consistent standard on which pin is considered pin 1 - [like this](http://www.suntekpc.com/htm-2/cable-serial-rs232-db9-female-db9-male-xxx-generic-oem-xxx.htm). So the diagram posted by the OP shows a view of the female connector, which should be the one on the power supply side.

When I soldered any connector I always made sure to mark pin 1 on the wire side with some type of permanent marker. Saved trying to read the tiny numbers stamped or molded into the plug or whatever else they used to mark it.

---

<div class="post-metadata">

**Author:** ![carnivorousplant](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/carnivorousplant/32/3563_2.png) [@carnivorousplant](https://boards.straightdope.com/u/carnivorousplant)\
**Post date:** [March 2, 2017, 11:27pm UTC](https://boards.straightdope.com/t/electrical-question-12v-dc-on-db9/781174/11 "2017-03-02T23:27:11Z")

</div>

> [@SamuelA](#):
>
> Yes, like the [SE MZ101B](https://www.amazon.com/SE-MZ101B-Helping-Magnifying-Glass/dp/B000RB38X8/ref=sr_1_3?ie=UTF8&qid=1488492150&sr=8-3&keywords=third+hand+soldering+tool) Helping Hand. Those are cheap and commonly used, though professional shops tend to use rubber clamp vices.

Thanks, SamuelA. I’ve made very long VGA cables for security cameras using twisted pair, Cat 5. I hate soldering those connectors.

---

<div class="post-metadata">

**Author:** ![thelurkinghorror](https://avatars.discourse-cdn.com/v4/letter/t/7c8e57/32.png) [@thelurkinghorror](https://boards.straightdope.com/u/thelurkinghorror)\
**Post date:** [March 3, 2017, 12:19am UTC](https://boards.straightdope.com/t/electrical-question-12v-dc-on-db9/781174/12 "2017-03-03T00:19:41Z")

</div>

I just did something similar to a DE-9, chopped it open and hardwired to screw connectors. It’s important to note that the colors of the wires aren’t standardized, but you can use a multimeter and the continuity function to test which wire goes to which pin

For the record: male pins 1-9 went brown, red, orange, yellow, green, blue, purple, gray, and black on the one I did. The uninsulated wire goes to the shroud.
