Category Archives: Resistor

Identifying Resistor Value

Compositions of color band(s) on a resistor is used to mark a resistor based on it’s ohm value.

5band

For example a  resistor with 5 band(s)  :

The first band of a resistor is it’s first significant digit value, the second band determines it’s second significant digit value. The third band determines it’s third significant digit value. The fourth band determines it’s multiplier based on above tables. The last band determines it’s tolerance , if there’s no tolerance band means tolerance is 20%.

For example here we have a resistor with 4 band(s):

res

There’s a gap between gold and brown, we can determine the first band is brown.

Calculation is Simple:

The first band is brown = 1 , the second band is black = 0, third band is brown = 1, the gold band is gold means tolerance about 5%. Arrange first and second digit we got: 10, multiply it with 1 x 10 ohm = 10 x 10 = 100 ohm with tolerance about 5%.

To make it easy, we don’t have to remember the table, we can use an online resistor value calculator:

4 band:

http://www.digikey.com/en/resources/conversion-calculators/conversion-calculator-resistor-color-code-4-band

5 band:

http://www.digikey.com/en/resources/conversion-calculators/conversion-calculator-resistor-color-code-5-band

6 band:

http://www.digikey.com/en/resources/conversion-calculators/conversion-calculator-resistor-color-code-6-band

Advertisements

Traffic Light With Push Button Control

This is simple electronic project with prototyping (no solder requirement), we’ll be using arduino and a push button to control a traffic light (rgb led)

Fritzing

traffic_schematic

Hardware Requirements:

4 resistor 220 Ω , 1 resistor 10 k Ω, 1 breadboard, 3 led (red, green, blue), 1 arduino, 6 jumper  wires,  1 push button

Fritzing

traffic1

traffic2

traffic3

we use 220 ohm resistor for each led and we connect it to arduino using pwm pin 8, 9 and 10, connect 10 k ohm resistor to push button , red jumper wire for push button connected to 5v pin on arduino, meanwhite black jumper wire connected to pwm pin 7 on arduino. the last black jumper wire we connect to ground pin on arduino.

We use breadboard here to make it easy, we don’t need to solder each component.

Arduino IDE Code

trafik4

trafik5

Here’s  complete code :

/*
traffic light dengan saklar on off - made by Antonius (@Sw0rdm4n)
http://www.ringlayer.net
*/
int merah = 8;
int kuning = 9;
int hijau = 10;
int saklar = 7; 
int on = 0;
int i;
void setup() {
	pinMode(merah, OUTPUT); 
	pinMode(kuning, OUTPUT); 
	pinMode(hijau, OUTPUT); 
	pinMode(saklar, INPUT);
}
void _run()
{
      digitalWrite(hijau, HIGH);
      delay(4000);  
      digitalWrite(hijau, LOW);
}
void _slow()
{
      digitalWrite(kuning, HIGH);  
      delay(2000);
      digitalWrite(kuning, LOW);  
}
void _stop()
{
    digitalWrite(merah, HIGH);
    delay(4000);  
    digitalWrite(merah, LOW);
}

void _traffic_light()
{
    do
    {
      _run();
       on = digitalRead(saklar); 
       if (on == 0) {
         _traffic_down();
       }    
       else {  
              _slow();
              on = digitalRead(saklar);   
               if (on == 0) {  
                  _traffic_down(); 
               }
               else {
                   _stop();
                   on = digitalRead(saklar);     
                   if (on == 0) {  
                      _traffic_down(); 
                   }
                   else {
                          _slow();
                   } 
               }
       }        
       on = digitalRead(saklar);     
    } while(on == 1);
}
void _traffic_down()
{
      for (i = 8;i < 11; i++) {
           digitalWrite(i, LOW); 
      }
}
void loop(){
	on = digitalRead(saklar);     
        Serial.println(on);
        if (on == 1) {
            _traffic_light();          
	} else {
            _traffic_down();
	}
        delay(500);
}

On success we can have a traffic light led that we can control with push button.