book cover
book cover

Programming Projects

Unclassified

maintained by Francis Glassborow

  Home     

The Multicoloured Motherboard [15A]

Contributed by Roy Read

As a programmer you must have at least a glancing acquaintance with the motherboard that lies at the heart of the computer(s) you spend so long slaving over. Perhaps you have even admired the multicoloured components that go to make up the bits and pieces that connect it all together. The colours are there for a purpose, of course, they are the identification code for the different electrical values of the components.

Take, for example, a resistor. This is normally a cylindrical component with a single wire coming out of each end. The electrical value of a resistor can range from 1 ohm to 10,000,000 ohms or more. It would be impractical to stamp this information on the object so a colour code was developed which goes like this:

  • black = 0(zero)
  • brown = 1
  • red = 2
  • orange = 3
  • yellow = 4
  • green = 5
  • blue = 6
  • violet = 7
  • grey = 8
  • white = 9

The system works like this:

Taking the band nearest an end note the colour. This is the first number in the value. Taking the second band along note the colour. This is the second number in the value. Taking the third band along note the colour. This is the 10 x multiplier value.

Hence if the bands were:

red / blue / green value is 26 * 100000 = 2600000 or 2.6 megohm (million ohm)

yellow / violet / red value is 47 * 100 = 4700 or 4.7k ohm (thousand ohm)

It gets a bit tiring doing it in your head all day so please write a programme to do it for me.

If you do look at a resistor you will also notice a band of colour a little distant from the value bands. This colour designates the tolerance of the resistor.

  • Silver = 10%
  • gold = 5%
  • red = 2%
  • brown = 1%

This band is just a simple statement of how accurately the component has been made and does not affect the calculations of value set out above.

Hence a resistor value 4.7 kohm actual value can lie between 4.7k - 10% to 4.7k + 10%. The only reason that your computer/TV/HiFi or whatever works is that on average the tolerances cancel themselves out to give what is required of the circuit.

Oh, yes you are right, if you are colour blind it does not make electronics any easier.

Program elements

You will almost certainly need to investigate look-up tables for this one.

Extensions

Add a graphical display so that the user can verify that the input data matches the case being dealt with


  Home      Unclassified Projects      You Can Do It!