Wire Color Conventions

I first started in residential electrical, then moved to industrial electrical, and now I'm working in Automation/controls engineering. We always blue or brown for 24 Volt and white with a blue stripe for common. And green for ground. Our signal wires are usually black, white, or red. I guess my question is, why hasn't some standard been applied to microcontrollers?

Welcome to the forum

Some people use their own standard colours but mine are limited to black for GND, red for 5V and orange for 3.3V

How far would you intend to take this ?
One problem in setting standards would be the limited number of colours available when you consider the possible different interfaces that might be used such as

  • Serial - Rx, Tx
  • SPI - MISO, MOSI, SCK, SS
  • I2C - SDA, SCL
    That is already 8 different colours needed off the top of my head, and there are more

Welcome to the forum.

That's a great stupid question! I have no idea. I always wondered why a few ppl in the audience don't agree that cutting the red wire is the right one to disarm the bomb.

I asked chatGPT all about it, the relevant bit seems true enough although beyond red and black I haven't run across too many hobbyists hewing to any known convention. chatGPT listed 8 "standards", looks like every little area that uses wires thinks it needs to have its own.

I didn't mention Arduino in any prompts:


I suspect many of us regular ppl have habits of our own that inform the use of colours beyond red and black.

I just use not-red and not-black for anything at all that isn't power or ground. Ground is always and only black; red may sometimes be power, or switched power or just red.

a7

3 Likes

Too many pins/signals. We do have loose conventions re +5V, +3.3V, G but as a hobbyist I am not a slave to any of that.

It doesn't really matter when it comes to microcontrollers as long as you can figure what connects to what. Of course, a few common practices have emerged such as using red for 5V and black for GND. At the end of the day, it's not like hobbyists are building life-scale rockets that are being worked on by thousands of people.

Personal preference here, North American.

Power wiring, AC:
Black - hot
White - neutral
Green - safety ground
The above was an absolute in the workplace for me. Get them confused, or add other colours (unless working with multiple phases, obviously), at your peril.

Power wiring, "low voltage" DC:
5V - Red
+12V - Yellow
Common - Black
chassis/earth - Green
The above comes from the innards of early PCs, and was "more or less" standard, and found on cables for powering floppies, CDs, and other devices that needed power.

Low voltage signal wiring is generally of a lesser size(higher AWG), and easily identified as such, so I don't fret about reusing the above colours; instead, where numbering is expected, I use the resistor colour codes, BlackBrownRedOrangeYellowGreenBlueVioletGreyWhite; that has stood the test of time for me.

If numbering isn't appropriate/necessary, I use whatever suitable wire I've got to hand, but it generally also forces me to start labeling individual wires.

By the way, my early mentor would tell me a schematic isn't complete unless it references a wire gauge addendum/document/standard, or calls out wire sizes explicitly. No 24 ga ground wires, please!

2 Likes

Comms and avionics (used CPUs and MCUs) had a convention pre-internet:

BLK, BRN, RED, ORG, YEL, GRN, BLU, PUR, GRY, WHT (value/multiplier 0 - 9)
...with PNK, TAN (val/mult 10 - 11).

In comms, DB25 pinning... (PNK, TAN for TXC, RXC)
Pins 1, 2, 3, 4, 5, 6, 7, 8, 15, 17, 20, 22 (SG, TXD, RXD, RTS, CTS, DSR, GND, DCD,TXC, RXC, DTR, RI)

Probably partly because most microcontroller circuits are done on PCBs.
There ARE standards for common cables (CAT5, USB)

And of course, a lot of hobbyists are using "found wire" to connect things up.

3 Likes

I would say effectively all circuits in commercial products are done on PCBs, and probably always were for microcontrollers. The age of wire-wrap was phased out quite a while ago.

I was surprised to find US standard where all the phases are black, and the neutral is blue. Even more surprised to find that house wiring originally was just bare wire, and run across ceramic insulator posts. After sufficient houses burned down due to shorts, it was realized insulated wire might be a good idea. The cheapest way to do that was with cotton and pitch, which may be where the convention of black live came from.

2 Likes

I found a few dozen feet of telco 50-pair cable some years ago - never mind how long precisely - and I will never run out of very nice solid copper 24 AWG hookup wire.

I will admit to using up the brighter colours faster.

I had a summer job as an unqualified technician, we wired an entire backplane of some ungodly instrument with 28 wire wrap, which at the time was all red.

a7

1 Like

That may have been the standard where you are but other countries such as Aus are different again. Same as for mains ac colour coding.
In the end, what does it matter anyhow?

Mainly because your color coding is a local requirement. Color codes for other countries are different. Electronic devices are made worldwide and shipped worldwide and used worldwide. Standards in one country do not apply to all countries.

In the US, Green is ground. But in England, yellow is ground, Sometimes with a green stripe. At least that is what I have seen in commercial equipment.

Did you meant a 240 AC rather than 24 DC?

According to US NFPA-79 standards, Brown is +DC, Blue is -DC (Ungrounded or Floating). White w/ Blue Strip is -DC (Grounded).

Because I work in industrial electronics and controls, I use the above standard for microcontrollers when possible. I'll also use +Red, -Blk since this was the old school method and pretty much, universal. I try not to match colors on adjacent pins simply to prevent confusion. But for the most part, I don't really care what color they are. In multiwire cable, I use the solid colors first then proceed to the striped wires. I don't know why I do that. Maybe because it's a few extra keystrokes when doing the schematics. Always document what you have!

It bothers me quite a bit that Black is "Ground" in LVDC circuits, and "hot" in AC wiring :frowning:

I had a summer job one year, wire-wrapping prototypes for a relatively good-sized defense contractor (Hazeltine, ~1977) No color coding there; just big spools of white and/or blue 30g wire. (But I've worked other places where there were a wide assortment of WW wire colors; by then I was doing mostly SW, so I don't know if they had a standard, or just someone's personal preferences.)

For multicolored ribbon cables I always use the resistor colour to label the wires.

That is
black - zero
brown - one
red - two
orange - three
yellow - four
green - five
blue - six
violet - seven
grey - eight
white - nine

So that is not by function but by wire number.

For wire by functions

3v3 orange
5V red
ground black
earth green

Any other colours for signal wires.

No, I meant 24VDC. The automation company I work for now uses black, red, blue for 240 or 208V, 3-phase. If we are wiring a panel, blue is 24VDC, wht/blue is com. For most field devices like photoeye's, BRN is 24VDC and blue is com

You might not have noticed that you are not in the motor industry now, you are in the world of embedded processors.

Fine if you want to use the colours of your old profession no one is saying you should not.

But that is not the question you asked.

The question you asked has the answer there is no universally colour scheme for this world.

microcontrollers don’t have strict wiring color standards because their applications vary so widely across industries and personal projects. Unlike building or industrial wiring, microcontroller setups are often low-voltage, temporary, and custom, so consistency isn't enforced like in regulated fields.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.