You are on page 1of 15

# SWISS GERMAN UNIVERSITY

## ANALOG DIGITAL CIRCUIT

PROJECT REPORT
Subject : Final Project
Lecturer : Mr. Benny
Instructor :
Faculty : BEN/BLS
Semester : 3

HEIGHT BASED
CAN SORTING MACHINE

GROUP 6
MT3A

Alfian Wildany
Ignatius Deo Putranto
Joshua Phartogi

## Swiss German University Tel. +62 21 3045 0045

EduTown BSDCity Fax. +62 21 3045 0001
Tangerang Selatan 15339 info@sgu.ac.id
INDONESIA www.sgu.ac.id
I. BACKGROUND

A lot of big soft drink company produce different volume and height for one product. Such as
Coca Cola, Fanta , and Sprite. The problem that we see is the company need a separate line to
produce the same product for only to separate different height and volume. So we decided to
make a canned drink sorted machine which can separate different height and volume of a
product.

Our concept of sorted the canned drink is to make soft drink company easier to separate their
products. Although we make this machine as a miniature, it also can modify and enlarge the
machine to manufacturing level. You just place the product in the conveyor and then the
machine will separate the product. In this machine we simply just use tracker sensor for
identify the height of the product and limit switch to limit the motion of the valve that used to
separate the product.

Page 2 of 15
II. SENSOR FUNCTION
The three sensors that we are using :
- IR Sensor (TCRT5000)
- Limit Switch (V-152-1C25)
- Ultrasonic Sensor (HC-SR04)

IR Sensors (Tracker Sensor) work by using a specific light sensor to detect a select light wavelength
in the Infra-Red (IR) spectrum. By using an LED which produces light at the same wavelength as
what the sensor is looking for, you can look at the intensity of the received light. When an object is
close to the sensor, the light from the LED bounces off the object and into the light sensor. This
results in a large jump in the intensity, which we already know can be detected using a threshold.

Limit Switch is a switch operated by the motion of a machine part or a presence of an object. It is
a mechanical sensor which input is considered as analog. Its operation depends on the two slots of
input, NC or NO, just like relays. If we set the wiring on NC, as soon as the machine starts, electricity
will be allowed through, as NC stands for normally closed. Otherwise, if we set the wiring on NO, it is
normally open.

Page 3 of 15
Ultrasonic ranging module HC - SR04 provides 2cm - 400cm non-contact measurement function,
the ranging accuracy can reach to 3mm. The modules includes ultrasonic transmitters, receiver and
control circuit. The basic principle of work:
1. Using IO trigger for at least 10s high level signal
2. The Module automatically sends eight 40 kHz and detect whether there is a pulse signal back.
3. IF the signal back, through high level , time of high output IO duration is the time from
sending ultrasonic to returning. Test distance = (high level timevelocity of sound
(340M/S) / 2.

## Component & Material List :

1. Limit Switch
2. Tracker Sensor
3. Module Relay
4. LM 331
6. Transistor
7. Acryllic
8. Conveyor Belt
9. Cable
10. Aluminium Profile
11. Nuts & Bolts (M3, M4, M5, M6)
12. Cable Ties
13. LED

Page 4 of 15
III. METHODOLOGY
A. Circuit & Logic
1. Circuit (Mechanical)

Page 5 of 15

3. Flow Chart

Page 6 of 15
4. Coding

## // defines pins numbers

const int trigPin = 10;
const int echoPin = 11;
const int a = 2;
const int b = 3;
const int c = 4;
const int d = 5;
const int e = 6;
const int f = 7;
const int g = 8;
const int h = 9;
// defines variables
long duration;
int distance;
void setup() {
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
pinMode(a, OUTPUT);
pinMode(b, OUTPUT);
pinMode(c, OUTPUT);
pinMode(d, OUTPUT);
pinMode(e, OUTPUT);
pinMode(f, OUTPUT);
pinMode(g, OUTPUT);
pinMode(h, OUTPUT);
Serial.begin(9600); // Starts the serial communication
}
void loop() {
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 micro seconds
Page 7 of 15
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// Calculating the distance
distance= duration*0.034/2;
// Prints the distance on the Serial Monitor
Serial.print("Distance: ");
Serial.println(distance);
if ( distance >= 33 && distance <= 38)
{
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
digitalWrite(h, LOW);
}
if ( distance >= 28&& distance <= 33)
{
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, LOW);
digitalWrite(h, HIGH);
}
if ( distance >= 23 && distance <= 28)
{
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
Page 8 of 15
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, LOW);
digitalWrite(g, HIGH);
digitalWrite(h, HIGH);
}
if ( distance >= 18 && distance <= 23)
{
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, LOW);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
digitalWrite(h, HIGH);
}
if ( distance >= 13 && distance <= 18)
{
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, LOW);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
digitalWrite(h, HIGH);
}
if ( distance >= 8 && distance <= 13)
{
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, LOW);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
Page 9 of 15
digitalWrite(h, HIGH);
}
if ( distance >= 4 && distance <= 8)
{
digitalWrite(a, HIGH);
digitalWrite(b, LOW);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
digitalWrite(h, HIGH);
}
if ( distance <= 4)
{
digitalWrite(a, LOW);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
digitalWrite(h, HIGH);
}
else
{
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
digitalWrite(h, HIGH);
}
}

Page 10 of 15
Page 11 of 15
B. MACHINE PROCESS
1. Prototype Layout

2. Rundown

Our machine will run in a conveyor system. A canned soft drink is scanned according to
its height and directed into a specific line for each type of drink. For this project we will
be using 2 types of can size 11.5x6.5 cm (330 ml), and 13.5x5.2 cm (240 ml)

Page 12 of 15
The machine start off with random sorting of cans. For the first IR sensor, it would detect
the medium height, according to our subjects, and sorted out in the first valve. The second
IR sensor would detect the tallest subject and sorted out in the second valve. At last, if the
sensors doesnt detect the subject implemented, it would leave all the valve open which
would take the subject until the end of the line.

As the can reached the heigth sensor section, the sensor would detect different heights and
would activate the machine to sort the can to the given places.

The Ultrasonic sensor function as the distance observer of the can along the conveyor. It will
continuously taking data (input) as the object runs, which input variable is frequency.
the sensor, and later on is coverted into voltage, by using the IC LM-331. And to convert the
the output in digital from certain range of voltage (from frequency).

The digital output from the arduino would be connected to 8 LEDs which shows the 8
conditions or logic from the system.

## We could also use SAR or arduino to convert analog to digital output.

Page 13 of 15
IV. TEST, TESTING RESULT & DISCUSSION

The testing result of the can sorting machine is that out of 25 trials using the sorting machine it
is about 88% accurate. One problem is that the can is not detected by the sensor due to it not
being close enought to the sensor. During the test, the can that is not detected by the sensor is
the tall thin can. This makes sense because the can is smaller in diameter.

Another problem we found that the time taken for the machine to sort the can is not optimal. It
is relatively slow. We found that the sensor only works if the can is placed one at a time it
cannot be stacked. This also means that it can only work if the can is placed in a standing
postion and it needs to be distanced from each other.

A good solution to all the problem above is first changing the sensor into a more far detecting
sensor. This change will help the sorter to detect the height of the can regardless the distance
between the sensor and the can. A good adition is if that we have some sort of mechanism to
place the can properly before going through the can sorter. This two addition and changes will
surely make the sorter a better

A problem we found that is very hard to fix is to make the sorter to be more efficient or faster.
We believe that it is either hard or impossible to fix this with our limitation because in order to
make it more efficient we think we need to use a microcontroller. By having a microcontroller
the sorter will surely move better and faster also it should be able to sort the can regardless the
amount of can per unit time.

Page 14 of 15
V. CONCLUSION

- The Sorting Machine use Infrared sensor to determine the height of the Product
- It sorted by using valve that moved by motor 3-6 VDC
- It can sorted up to 3 types of product : High , Medium , Low
- The Sorting Machine is useful for company who want to sort their product by their height.

Page 15 of 15