Resistor Sorter - Ishaan

Introduction: Resistor Sorter - Ishaan

About: 17 developer delhi

Hello Elite Researchers!

.... Read the Instructable below.

Resistor sorter is an Arduino based project which separates the required resistor from a bunch of resistors. The resistor which the user needs is separated using this device. It is a boon to the people associated to electronics and IT.

What was the need to build Resistor Sorter: Based on a real life problem

While working in laboratories or small workshops we often need resistors, but there is mostly a huge bunch of resistors filled up in a box.

  • Using multi-meter is a highly stress full task.
  • consumes lot of human labor.
  • Time consuming

In this Instructable we are going to built this project using waste material and e-waste so that people with low budget can also built it.

First get an,

Overview of How to use Resistor Sorter

  • Once the device will be switched on the user will have to give the value of the required resistor.
  • When the green light glows user will have to leave the resistor in the funnel.
  • The value of the resistor will be read and further transferred to a plate(let the name be decision plate), which will rotate and sort resistors.
  • If the resistor will be of the correct value, decision plate will rotate to right side.
  • Else the plate will rotate to the left side.

Now try to understand,

Basic Working of Resistor Sorter

  1. This project is build by combining many small projects. Such as: - LCD display, keypad, Servo motors.
  2. When green light glows, the resistor is left in the funnel. It goes straight into the pipe.
  3. A servo is present at the bottom of the funnel which blocks the path of pipe and does not let the resistor pass through it. Now the resistor is stationary at one point.
  4. Voltage divider has been built and Ohm's law is being used to calculate the value of resistor and current.
  5. Once the reading is taken the servo at the bottom rotates and opens the path for the resistor to pass and fall on the decision plate.
  6. If the value of resistor is within range, the decision plate will rotate clockwise.
  7. Else if the resistor is not of that range the plate will rotate anti-clockwise.

Step 1: Gather All the Stuff

Materials Required:

Name Quantity Specs

  • Arduino Mega 1 Standard(you can use any other board also)
  • Resistor 1 100k Ohm
  • led 2 Red and Green
  • Jumper Wires 30 - 40 Male to Male
  • Bread Board 2 Standard
  • Keypad 1 (4*3)
  • LCD Display 1 (16*2)
  • Servo Motors 4 Mini Servo (180 degree)
  • A4 size sheet * 1, cardboard(as big as shoe box), piece of thermocol.
  • Led strip(optional)

From where to gather stuff:-

You can get all the electronics components on any e-commerce site(Amazon). But talking about the body of RS(Resistor Sorter), I personally have built this project using the Cardboard of shoe boxes. Except a few electronic components it is completely built using Waste material. According to me make this project using waste material only if you are skilled in using them.Or else it can become really hard to align all the components.

If you have all a 3D printer, I would recommend to go for 3D printing.

Software used:-

  • Arduino IDE
  • Eagle(for circuit designing)
  • Sketch Up(for 3D designing)

Step 2: Working of Resistor Sorter

Watch the video above....

Resistor sorter is detecting the value of resistors using the Ohm's law V = I * R.

  1. We store the value of known resistor as R1. and let unknown resistor be Rd.
  2. When we supply 5v to the series circuit some amount of voltage drops at R1 and we get the left over voltage at v_out.
  3. let the voltage drop = V2.
  4. using V = IR, we calculate I = V2 / R1.
  5. We know current remains the same in series connection.
  6. now we again use V = IR to calculate the value of Rd, Rd = V_out / I .

Now we are ready to build the project..

Step 3: Connecting All the Components

Now first gather :-

  • Keypad
  • Arduino Board
  • LCD(16*2)
  • Servo Motors
  • Jumper wires
  • led

and start make the circuit as mentioned below.

LCD(16*2)

Rs = A2;

E(enable) = A3;

D4 = A4;

D5 = A5;

D6 = A6;

D7 = A7);

Keypad

ROWS] = {8, 7, 6, 5}; //connect to the row pin outs of the keypad
[COLS] = {4, 3, 2}; //connect to the column pin outs of the keypad

Servo motors

M1 = 9;

M2 = 10;

M3 = 11;

M4 = 12;

Leds

led1 = 52;
led2 = 53;

See the image uploaded above.

Step 4: Building the Body of RS

  1. Take an A4 size sheet and fold it to make a funnel.
  2. I have used Cardboard pieces to make the it's body. You can built the body of this project by thousands of different ways.
  3. Cut 2 small pieces of tubes from a pen so that resistor can pass through it.
  4. The diameter of pipe should be minimum 5 mm.
  5. Cut a small cuboid from thermocol and paste all the 3 motors as mentioned in the next step.
  6. Refer to the images and videos above for getting a clear idea.

Step 5: Setting Up Servo Motors

The servo motors have to be connected in the order. M1; M2; M3; M4. as shown in the picture. The motors will have to be connected to an external power supply. If this is not done the project will malfunction.

Once you paste all the 3 motors on the thermocol piece. Make sure you align them and paste the pieces of pipe in such a way that resistor is able to pass freely through it.

Paste the 4th motor to the body, below thermocol cuboid.

While setting up the motors use the code below.

#include <Servo.h>

Servo M1;
Servo M2;
Servo M3;
Servo M4;

void setup() {
 M1.attach(12);
 M2.attach(11);
 M3.attach(10);
 M3.attach(9);
}

void loop() { 
  M1.write(90);
  M2.write(90);
  M3.write(90);
  M4.write(90);
  delay(15);                          
}<br>

Step 6: Building the Body of RS Part - 2

  1. Take 3 pieces(3 * 2 cm each) of aluminium foil used in kitchen.
  2. Take 2 wires and connect it to the aluminium foils.
  3. rap these pieces of aluminium foil on the rotating arm of servo motor.

Refer the video above to get a clear idea.

Step 7: The Circuit Board

After making the working model on bread board. Go ahead to built the circuit board.

Step 8: Coding

#include <LiquidCrystal.h>
LiquidCrystal lcd(A2, A3, A4, A5,A6, A7);

#include <Keypad.h>

const byte ROWS = 4; //four rows
const byte COLS = 3; //three columns
char keys[ROWS][COLS] = {
  {'1','2','3'},
  {'4','5','6'},
  {'7','8','9'},
  {'*','0','#'}
};

byte rowPins[ROWS] = {8, 7, 6, 5}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {4, 3, 2}; //connect to the column pinouts of the keypad

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

int error;
int max_per;
int min_per;

long int num,a,b = 0,c;

long R1 = 100000; 
long Rd;

int P1 = A1;
int P2 = A0;

double I;

double  v_in1;
double  v_in2;

double v_out;

double V1;  //input volatge 1
double V2;  //input volatge 2

#include <Servo.h>

Servo M1;
Servo M2;
Servo M3;
Servo M4;

int led1 = 52;
int led2 = 53;
void setup(){
  
   Serial.begin(9600);
   lcd.begin(16, 2);

  M1.attach(9);
  M2.attach(10);  
  M3.attach(11);
  M4.attach(12);

    pinMode(P1,INPUT);
    pinMode(P2,INPUT);

    pinMode(led1,OUTPUT);
    pinMode(led2,OUTPUT);
     
   lcd.setCursor(0,0);
   lcd.print("Resistor Sorter");
   Serial.println("Resistor Sorter");
   delay(1000);
   
   lcd.clear();
   
   lcd.print("Pls give value:-");
   Serial.println("Pls set resistance..");
   delay(1000);
   
   lcd.clear();

   lcd.print("Resistance:-");
   Serial.println("Resistance:-");
   lcd.setCursor(0,1);
   while(true)
    {
      char key = keypad.getKey();
      num = key;
      
      if(num)
      {
        if (key != '#')
        {
          a = num - 48;
          b = b * 10;
          b = b + a;
          Serial.println(b);
        }
        if(key == '#')
        {
          Serial.println("ok");
          lcd.print(b);
          delay(1000);
          
          lcd.clear();
          
          lcd.print("OK");
          delay(500);
          
          lcd.clear();
          
          Serial.println(b);
          break;
        }
      }
    }
}



void loop(){
  
 // lcd.setCursor(0,0);
 // lcd.print("working...");
  
  M3.write(0);
  delay(10);
  digitalWrite(led1,HIGH);
  digitalWrite(led2,LOW);
  delay(1000);
  digitalWrite(led1,LOW);
  digitalWrite(led2,HIGH);
  
  M1.write(120);
  M2.write(160);
  delay(10);
  
  delay(1000);
  
  Serial.println("reading");
  
 v_in1 = analogRead(P1);
 V1 = v_in1 * (5.0/1023.0);
 Serial.print(V1); 
 Serial.print("v          ");

 v_in2 = analogRead(P2);
 V2 = v_in2 * (5.0/1023.0);
 Serial.print(V2); 
 Serial.print("v          ");

 v_out = V1 - V2;
 Serial.print(v_out);
 Serial.print("           ");
 
 I = v_out / R1;
 Serial.print(I,6);
 Serial.print("A          ");

 Rd = V2 / I;
 Serial.println(Rd);


      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print(Rd);

  
  M1.write(70);
  M2.write(90);
  delay(10);
 
  delay(1000);
  lcd.clear();
  
    error = 0.2 * b;

    max_per = b + error;
    min_per = b - error;



    /*while(true)
    {
      Serial.print(max_per);
      Serial.print("   ");
      Serial.println(min_per);
      break;
    }*/

    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print(max_per);
    lcd.setCursor(0,1);
    lcd.print(min_per);

    if(Rd <= max_per and Rd >= min_per)
    {
      lcd.clear();
      //Serial.println(Rd);
      lcd.print("found");
      M3.write(90);
      M4.write(30);
      delay(10);
     delay(1000);
    }
   else{
      
      M3.write(80);
      M4.write(150);
      delay(10);
      
      delay(1000);
      
    }
    
    M4.write(90);
    delay(10);
}

Step 9: Finish

I hope this project will inspire those students and people who where facing the same problem.The best pros of this project is the speed at which it sorters resistors. You can easily built this project even if you don't not have much money. Hope you enjoyed my post.

Do Subscribe my Youtube Channel:- https://www.youtube.com/channel/UC3Wv9RrdSKglvuEX...

Please Do Vote !

Arduino Contest 2020

Participated in the
Arduino Contest 2020

Be the First to Share

    Recommendations

    • Pets Challenge

      Pets Challenge
    • First Time Author Contest

      First Time Author Contest
    • Fandom Contest

      Fandom Contest

    7 Comments

    1
    Palingenesis
    Palingenesis

    1 year ago

    Very Nice.
    A good example of automation.

    1
    tommo_79
    tommo_79

    1 year ago

    I love it! Definately a solution to a real world problem frequently experienced by me.

    1
    B Yadav
    B Yadav

    1 year ago

    Nice project

    1
    Gursimran Singh 425

    This is a great project bro! Especially the mechanism.

    0
    scientist Ishaan
    scientist Ishaan

    Reply 1 year ago

    Thanks
    Bas aap sab ka payar hai

    0
    scientist Ishaan
    scientist Ishaan

    Reply 1 year ago

    Thanks.
    But do vote.