11

I've recently begun playing a lot with tiny programmable computers/controllers (like the Raspberry Pi and the Arduino), and I'm planning to distribute several throughout my house as various sensors. So far as I have been tinkering with them I've been using a wall-wart transformer with a USB plug to provide them with 5v (like the one I use to charge my cellphone every night). The problem with doing this throughout my house is that I do not have an AC plug wherever I would need a device.

I've been thinking about running a 12v "bus" throughout my attic, which would allow me to branch off power for devices wherever I need it. This way I would just need a 5v regulator to pair with each of the devices. (The only reason I would run 12v and not straight 5v is because I already have a large 15-amp 12v switching power supply which I could use)

Is there anything special I should consider with this solution? I feel much safer running 12v around in my attic than I would running my own mains power lines. Seems like a no-brainer on the surface, but I may be overlooking something.

bitsmack
  • 16,747
  • 9
  • 52
  • 108
loneboat
  • 320
  • 1
  • 3
  • 8
  • 3
    You may want to check with your local building inspector. They don't see this sort of thing often and you might inadvertently violate building code. – slightlynybbled Mar 29 '16 at 19:04
  • That's a good point, I'll do that. Seems a bit harsh that running low-current 12v would violate code though. But you never know! ¯\_(ツ)_/¯ Thanks! – loneboat Mar 29 '16 at 19:06
  • No joke. It only comes to mind b/c my wife and i recently finished some space and the building code was surprisingly onerous. Good idea, though! – slightlynybbled Mar 29 '16 at 19:07
  • I now realize I have some stuff up there that I KNOW violates code. Better clean that up before having the inspector check in on the stuff that MIGHT violate code. :-o – loneboat Mar 29 '16 at 19:12
  • Yes, but it's easier to say you're sorry than it is to ask permission. – Tim Spriggs Mar 29 '16 at 19:17
  • 7
    National Electrical Code, and Local/State Electrical Code have requirements for proper ***Low Voltage wiring***. You don't need to be a licensed electrician most of the time to install it, but you do need to follow the code. – Passerby Mar 29 '16 at 19:24
  • @Passerby: Where do you look up the local codes? I've never actually read them, and always assumed they were dense and somewhat inaccessible to laypersons. Are they relatively easy to obtain/understand? – loneboat Mar 29 '16 at 19:25
  • 2
    I'm wondering if this question might be a better fit on diy.se as the experienced members there seem to be very familiar with the regulatory codes which @Passerby refers to. – brhans Mar 29 '16 at 19:26
  • If you want to read them yourself, you can find the National Electrical Code "NFPA 70" documentation at the nfpa web site. Once you've registered you can read (but not print or download) for free. – brhans Mar 29 '16 at 19:28
  • It varies. A google for `your state electrical code` may show online copies. Otherwise, local library, local hardware store, town hall (last resort, you don't want local inspectors getting all nosey). NJ for example modifies the NEC NFPA of various years, and has different standards. All located in the subsection of it's Uniform Construction Code. And available online, etc. – Passerby Mar 29 '16 at 19:29
  • brhans that's been asked before on there. http://diy.stackexchange.com/questions/24686/how-should-i-go-about-installing-a-12-volt-dc-residential-circuit – Passerby Mar 29 '16 at 19:46
  • 3
    Instead of providing 12V power, you may want to provide Power over Ethernet so that way would you get the network capability and power with a single cable. – Eric Johnson Mar 29 '16 at 20:25
  • I agree with Eric's note about PoE - solutions exist for this sort of application already - aside from wasting* a large amount of power in the cabling due to the low voltage, your also going to confuse people by rolling your own standard. *(calculation for powering a .6A/3W raspberry pi at 100 feet away with 14 gague wire -> .5 ohms resistance (accounting for return leg as well) * .6A -> .3W wasted power for a single device) – user2813274 Mar 29 '16 at 21:12
  • 1
    @user2813274: Thanks. I think PoE would be too expensive for my application though (sensors throughout my own house), and I do not think confusion is an issue - I'm the only one touching it, and if I ever move, I'm taking my sensors with me! :-) – loneboat Mar 29 '16 at 21:15
  • @Passerby 12V is not __Low voltage__ wiring, it is __Extra Low Voltage__, but yes there are standards. – Jasen Слава Україні Mar 29 '16 at 21:20
  • Don't ask don't tell. – tcrosley Mar 29 '16 at 23:33
  • My guess is that wall-warts are going to work out cheaper and easier than running sufficiently thick cable to provide a 12V bus. If you were using the cable for signal too (PoE), things might be different. – abligh Mar 30 '16 at 09:47
  • 1
    _"I feel much safer running 12v around in my attic than I would running my own mains power lines."_ - Be aware that 12V @ 15A is perfectly able to cause a fire under the right conditions, so don't skimp on cable/connector safety "because it's just 12V". – marcelm Mar 30 '16 at 11:41

5 Answers5

7

A few things come to mind:

  1. You need to protect the bus from overcurrent. Even if your power supply has its own built-in protection, I would use an additional fuse (or circuit breaker) at the output of the power supply. This way you can be sure the maximum current won't get away from you. This leads to:

  2. You'll need to use beefy wire. In the USA, 15A circuits are wired with #14AWG, minimum. If you want to use thinner wire, you'll have to fuse each leg appropriately.

  3. If you do use #14AWG wire (or your local equivalent), don't use the typical cable used for household AC! Although it would work out technically, it would cause major confusion and ambiguity. You don't want anyone expecting 12VDC and getting Mains voltage (now or in the future).

  4. At 12V, the current draw can quickly add up. Keep this in mind as you add devices. You may want to swap in a 24VDC power supply in the future. It is a common industrial standard, gives you twice the power over the same wires, and still falls into the "low-voltage" category.

Adding to Point #4: If you choose local 5V converters that accept a range of input voltages (including 12V and 24V, of course), then you won't have to change anything if you bump up the supply voltage.

bitsmack
  • 16,747
  • 9
  • 52
  • 108
  • 1
    Great point about not using similar wiring to my AC. I have a bundle of Romex which I did NOT plan to use, but that was only because of how expensive it is. Avoiding confusion is another great (and better!) reason though. – loneboat Mar 29 '16 at 19:20
  • Would "bouncing up" just entail a transformer on my power-supply's end? Or a new power-supply entirely? – loneboat Mar 29 '16 at 19:21
  • I was referring to a whole new power supply. Stepping up DC is not as trivial as AC, since a simple transformer doesn't work with direct current. And a 15A DC-DC converter is going to be pricey :) – bitsmack Mar 29 '16 at 19:27
  • I only mentioned it because you might want to spec your individual voltage converters to be able to run off of 24V in addition to 12V. – bitsmack Mar 29 '16 at 19:28
  • Okay, thanks! I think I'll stay with 12V for now, since I only have a few very low current devices to power. Good to know that 24V would be a good step up in the future! – loneboat Mar 29 '16 at 19:28
  • I have several of these I was planning on using: http://www.ti.com/product/LM7805C Looks like they would play nicely with 24V as well, meaning I wouldn't even have to change anything on the device's end. :-D – loneboat Mar 29 '16 at 19:32
  • Raspberry pis are NOT "very low current devices". – Peter Green Mar 29 '16 at 19:35
  • @PeterGreen: The primary devices I'll be running are these, @ ~80mA: https://www.adafruit.com/images/product-files/2471/0A-ESP8266__Datasheet__EN_v4.3.pdf – loneboat Mar 29 '16 at 19:38
  • @loneboat You have the right idea, but I wouldn't use a linear regulator like the LM7805's. Linear regulators basically just drop the voltage by creating heat. If you're going from 12V to 5V, and you're drawing 1A, then your device is using 5W but the regulator is using an additional 12W! It'll burn up quickly. And even worse at 24V :) Look up "switching regulators", or "DC-DC converters". – bitsmack Mar 29 '16 at 19:38
  • @bitsmack: Cool, thanks - I'll look up switching ones! – loneboat Mar 29 '16 at 19:40
  • Seeing your comment, 80mA will waste about 1W in a linear regulator. You could survive with a heat sink, but that's not really the way you want to proceed... – bitsmack Mar 29 '16 at 19:40
  • What would you suggest using for cable to distinguish it from AC120? People don't use Romex for looks, but because it helps ensure that overheating wires won't catch fire. – supercat Mar 29 '16 at 19:47
  • @supercat Other answers/comments have mentioned the NEC code. It would be wise for the OP to figure out what de-rating is necessary for two current-carrying conductors in a single cable. I expect that #12AWG will be more than sufficient for 15A, but it should be verified. If so, I would choose a generic 2C#12AWG cable (or 3C#12AWG, if the OP wants a separate ground) from Belden or Alpha, etc. As long as the cables are fused correctly it will be safe. Good point, though. I'll add it to the answer later today. – bitsmack Mar 29 '16 at 20:03
  • **3.** When I put 12VDC and 230VAC circuits in a campervan I just used different colours of outer sheath. In a house where you'd normally use 2-solid-core+earth cable for mains, using 2-core flex for the low-voltage stuff and not using mains junction boxes should be enough (you may want to label the junction boxes as well). Luckily as others are likely to expect mains, the main failure mode due to confusion is the least dangerous one. – Chris H Mar 30 '16 at 08:19
3

On the face of it it should be OK but the reason we use 120 / 230 V is because the current is so much lower. At 12 V your currents will be 10 or 20 times higher and your cable size will be correspondingly higher to avoid high voltage drops.

Your 15 A, 12 V PSU is capable of delivering 15 x 12 = 180 W into a partial short circuit. This is an obvious fire hazard so good wiring practice is a minimum requirement and, maybe, using a star topology with current limiting on each leg would provide some additional safety.

Transistor
  • 168,990
  • 12
  • 186
  • 385
  • Can you clarify what you mean by "at 12 V your currents will be 10 or 20 times higher"? I have some large-ish cable I intend to use (single-core, I think it's 10 or 8 gauge). – loneboat Mar 29 '16 at 19:17
  • And by current limiting, do you mean putting a fuse in-line with each leg? – loneboat Mar 29 '16 at 19:18
  • Yes, there's a reason Tesla chose AC instead of DC. – Tim Spriggs Mar 29 '16 at 19:19
  • 5
    @TimSpriggs This is high voltage (240/110 V) vs low voltage (12V), nothing to do with AC vs DC. – Bimpelrekkie Mar 29 '16 at 19:25
  • My mistake. Terribly sorry, old chap. – Tim Spriggs Mar 29 '16 at 19:28
  • (1) For a given power, P, the relationship between current, I, and voltage, V, is given by \$ P = VI \$ so if we reduce our distribution voltage to \$ \frac {12}{120} = \frac {1}{10} \$ the voltage the current must go up by a factor of 10. (2) Protection could be by fuse, miniature circuit breaker or some sort of electronic protection. I don't have a good suggestion for a domestic installation (where cost will be an issue) although they're common on industrial 24 V DC distribution. – Transistor Mar 29 '16 at 19:47
  • @FakeMoustache AC voltage is much easier to convert, and the ability to trivially spin 120V up to transmission voltage was a major factor economically. – chrylis -cautiouslyoptimistic- Mar 30 '16 at 03:46
  • @chrylis: FakeMoustache is well aware of the benefits of AC for power transmission. He's simply pointing out that this question is about distribution _voltage_ and not AC vs DC. Tim acknowledged this in the next comment. – Transistor Mar 30 '16 at 04:56
  • "At 12 V your currents will be 10 or 20 times higher" - yes, 10 or 20 times higher than an almost negligible amount. I doubt running Arduinos and Raspberry Pi's will pose very much of a problem. – user253751 Mar 30 '16 at 07:03
  • Yes but consider that for the **same** voltage drop you would need 10 to 20 times thicker wire (not 10-20 times as thick but 10-20 times more conductive area). And also consider that on 110 V a 1 V drop is less than 1% but on 12 V that same 1 V drop is 8% of the voltage ! – Bimpelrekkie Mar 30 '16 at 07:22
  • @FakeMoustache: At least in the UK, 240V is "low voltage" (a technical term in power distribution). "high voltage" is stuff in the kV range. 12V is SELV ("special extra-low voltage"). – Martin Bonner supports Monica Mar 30 '16 at 08:00
  • @MartinBonner And as an IC designer working with transistors that can barely withstand 2 Volts, 12 Volt is high voltage ! My point being: **it is all relative.** – Bimpelrekkie Mar 30 '16 at 09:17
  • 1
    Thanks for all the comments, chaps. 12 V is 12 V. At least we all agree what a volt is. I think we should drop the arguement. What will the neighbours think? – Transistor Mar 30 '16 at 09:46
  • @immibis 1+ years on :-) -> At 12V, 15A, a 10% drop (1.2V) requires a loop resistance of R=V/I = 1.2/15 = 80 milliohms = annoyingly low. That's a loop of about about 60 linear feet (ie 2 x 60 foot long wires) of 8 gauge or 40 feet of 10 gauge. As the current draw will probably be << 15A and as it will taper off with distance, processors and typical peripherals will be fine (as you say). If he does / did want heavier loads then there may be issues. [[Hey look! - I can switch these two 75 Watt 12V spots with the Arduino and ... whoops]]. – Russell McMahon May 31 '17 at 13:19
2

Things to consider.

  1. How will you convert from 12V to 5V? Linear regulators will get very hot and waste a lot of power if they are asked to deliver nontrivial current. So you will want to use some kind of switching converter for more power hungry devices (A pi is a LOT more power hungry than a simple microcontroller).

  2. How thick will the wires need to be to avoid unacceptable voltage drop (which wastes power, can also cause startup problems with switched mode converters and can cause ground potential differences when can be a problem if you have any non-isolated communications links between the devices).

  3. What will you do about overcurrent protection? lower voltages mean lower electric shock risk but low voltage high current supplies can be a fire risk.

Peter Green
  • 21,158
  • 1
  • 38
  • 76
  • Was considering using something like this to regulate: http://www.ti.com/product/LM7805C – loneboat Mar 29 '16 at 19:31
  • Thats a linear regulator. Start trying to use it to power a high current device like a Pi and you will end up with a lot of heat to get rid of. – Peter Green Mar 29 '16 at 19:37
  • Someone above referred me to switching regulators to alleviate that. I will research those before I implement anything. Thanks for your comments! – loneboat Mar 29 '16 at 19:42
  • switching regulators with reasonable efficiency cost about $1 for a 2A regulator PCB assembly at [any on-line marketplace]. – Jasen Слава Україні Mar 29 '16 at 21:39
  • The voltage drop bit is important. If you get a 5V drop at the far end of a 120V line, nobody will care much. But a 5V drop in a 12V supply is significant. – Simon B Mar 30 '16 at 15:55
  • 1
    Yep, to achive the same percentage volt drop at a given power level in a 12V system and a 120V system supplying the same ammount of power the cables in the 12V system need to be a hundred times bigger. – Peter Green Mar 30 '16 at 15:59
0

Any cable must be fused to avoid fire hazard.

Consider using 48v. That's the highest voltage considered a 'safe' low voltage by most authorities. It eases the cross-section requirements on cable compared to 12v. As it's found in telephone exchange cabinets and pro-audio desks, switching regulators to get down from that to any other voltage are readily available.

Neil_UK
  • 158,152
  • 3
  • 173
  • 387
  • 1
    +1 This is also the standard for PoE (Power over Ethernet), but limits are fairly low. One thing the OP definitely has to do is to separate the mains and low voltage wiring. Not in the same conduit and not in the same junction boxes. – Spehro Pefhany Mar 29 '16 at 19:56
  • any cable capable of carrying more than the short circuit current of the power supply need not be fused. The cheap buck converters on e-bay top out at 35V in, so a lower voltage may be preferable. Personally I'd use 24V if I was using all new parts. – Jasen Слава Україні Mar 29 '16 at 21:42
0

Do not run your 12v in the same conduit as any other lines (120, 240 or phone lines). It is dangerous and illegal.