You are on page 1of 8

WORKING:

In this project we are using electronics components such as temperature sensor, matrix
keypad of 4*3, potentiometer, o-led display, stepper motor driver board uln2003, \stepper
motor and micro controller of arduino-uno. Here arduino-uno controller takes the major part of
the project; it controls the total working of project. Matrix keypad, temperature sensor and pot
are the inputs of controller. Stepper motor driver and o-led display is the output of the
controller. when coming to the temperature sensor we will get the analog value that value is
given to the controller A0 pin, that read the value of temperature in the 8bit which means the
value up to 0-255 degree Celsius.pot value also read in analog type only, it connected to the A1
pin of controller. Matrix keypad is connected to the 2,3,4,5,6,7,8 pins of controller, it will
activate when the key is pressed. Then the stepper motor will be controlled by the step per
revolution, here we will enter the step value up to 0-2048.the stepper motor is connected to
the 12, 11,9,10 of the controller pin. it will produce a square wave to the stepper motor,
according to the pulse apply in stepper motor it will rotate. Then the o-led display is worked as
an i2c communication to the controller, here it will get the print value on display as per the
coding done to the controller.

Here when the kit is energized, the o-led display will print the enter password on the
screen. Then we will enter the password as denied in the code of 4 character which is
‘1’,’2’,’3’and’4’.it is the proper password for the project, if we enter the correct password it will
move to the next process. If the enter password is not correct means the display will show the
IN-CORRECT PASSWORD, after entering the incorrect password the controller will be freeze
while entering the correct password. After entering the correct password o-led will display
CORRECT PASSWORD after few seconds it prints SET MOTOR DIRECTION. Here we need to
rotate the pot value as per our requirement which means if the pot value is below 400 means,
the stepper motor will rotate in clock-wise direction. Then if the pot value above 500 means
that stepper motor should run in ANTI-CLOCKWISE direction. Then the temperature value will
be read on the controller. Finally the o-led will display direction of the motor, temperature
sensor value, pot value, speed of the motor and motor ok. Here the MOTOR OK will display
when the input of the motor is connected properly otherwise it will print MOTOR OFF on the o-
led display.
ARDUINO-UNO:
The Arduino Uno is a microcontroller board based on the ATmega328
(datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6
analog inputs, a 16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header,
and a reset button. It contains everything needed to support the microcontroller; simply connect
it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver
chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a
USB-to-serial converter.

"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0.
The Uno and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is
the latest in a series of USB Arduino boards, and the reference model for the Arduino platform

SUMMARY

 Microcontroller - ATmega328
 Operating Voltage-5V
 Input Voltage (recommended)-7-12V
 Input Voltage (limits)-6-20V
 Digital I/O Pins-14 (of which 6 provide PWM output)
 Analog Input Pins-6
 DC Current per I/O Pin-40 mA
 DC Current for 3.3V Pin-50 mA
 Flash Memory-32 KB (ATmega328) of which 0.5 KB used by bootloader
 SRAM -2 KB (ATmega328)
 EEPROM -1 KB (ATmega328)
 Clock Speed-16 MHz
STEPPER MOTOR:

A Stepper motors are driven in discrete steps, they excel at absolute positioning

applications. The most commonly available stepper motors move in precise increments of 1.8° or

0.9° per step. Stepper motors are controlled directly. The primary command and control variable

is the step position.

#include <Stepper.h>

const int stepsPerRevolution = 2048;

Stepper myStepper = Stepper(stepsPerRevolution, 12, 10, 9, 11);

TEMPERATURE SENSOR:
A temperature sensor is a device, module, machine, or subsystem whose purpose is to
detect events or changes depends upon tranducer in its environment and send the information to
other electronics, frequently a microcontroller.A sensor is always used with other electronics.
#define temp A0
pinMode(temp,INPUT);
t = analogRead(temp);
t = map(t,0,1023,0,400);

POTENTIOMETER:
A pot is a device that uses to control the voltage values on the electronic circuits. Here it use
to vary the voltage value 0-5volt to the controller.uno will get convert that voltage value into an
analog value.
#define pot A2
pinMode(pot,INPUT);
p = analogRead(pot);
MATRIX KEYPAD:
A matrix keypad is a device that use to enter the password on this project. Here we are using
the 4*3 matrix keypad.
#include <Keypad.h>
const byte ROWS = 4;
const byte COLS = 3;
char keys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'*','0','#'}};
byte rowPins[ROWS] = {2,3,4,5}; byte colPins[COLS] = {6,7,8};
Keypad keyfun = Keypad( makeKeymap(keys), rowPins, colPins, ROWS,
COLS );

O-LED DISPLAY:
A o-led display is use to print the output value came in the project. It is use for identify that
the project will working properly.The o-led display can use to print grafix output on the screen,
but here we are just printing the values and the character on the display.
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
Adafruit_SSD1306 oled(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
METHODOLOGY:
Case1:
When the kit is energized,we need to enter password. If the password is wrong, the o-
led will display IN-CORRECT PASS WORD,

oled.clearDisplay(); // clear display

oled.setTextSize(2.5); // text size

oled.setTextColor(WHITE); // text color

oled.setCursor(0, 10); // position to display

oled.println("IN-CORRECT"); // text to display

oled.setCursor(0, 40); // position to display

oled.println("PASSWORD"); // text to display

oled.display(); // show on OLED

delay(500); // wait for initializing

case2:
when we enter the proper password, o-led will display CORRECT PASSWORD,

oled.clearDisplay(); // clear display

oled.setTextSize(2.5); // text size

oled.setTextColor(WHITE); // text color

oled.setCursor(0, 10); // position to display

oled.println("CORRECT"); // text to display

oled.setCursor(0, 40); // position to display

oled.println("PASSWORD"); // text to display

oled.display(); // show on OLED

delay(2000); // wait for initializing


case3:
After entering the proper password,o-led will display set motor direction.Here u need to
rotate the part as per required direction,if the pot value is below 400 it will rotate clock-wise
direction,

if(p <= 400)

oled.println("CLOCKWISE");

myStepper.step(stepsPerRevolution);

Here p is the value of pot, it will rotate clockwise if the value below 400, step per revolution
is the no of steps given to the stepper motor to rotate.

Case4:
If the pot value is above 500 the motor will rotate in the anti clockwise direction,

if(p >= 500)

oled.println("ANTI-CLOCKWISE");

myStepper.step(-stepsPerRevolution);

Here –stepperrevolution is the function that moves a stepper motor in the reverse direction.

Case5:
After the rotation of the stepper motor the o-led display will display the status of the motor,

oled.clearDisplay(); // clear display

oled.setTextSize(1.5); // text size

oled.setTextColor(WHITE); // text color


oled.setCursor(100, 45); // position to display

oled.println(p); // text to display

oled.setCursor(5, 0); // position to display

oled.println("CLOCKWISE"); // text to display

oled.setCursor(5, 15); // position to display

oled.print("Temp = "); // text to display

oled.println(t);

oled.setCursor(5, 30); // position to display

oled.println("Speed = 15 rpm"); // text to display

oled.setCursor(5, 45); // position to display

oled.println("motor ok"); // text to display

oled.display();

delay(2000); // wait for initializing

myStepper.step(stepsPerRevolution);

Here the clear display is the function to clear the old print values on the display. Then we
need to enter the size of the words to print on the display. After that we need to choose colour
that we want to be see after printing. Then where should the character print is defined as set
cursor on the program, here (0,100) means that the character should print on the (x,y) x-position
of ‘0’ and y-position of ‘100’. After that the values will be printed and finally stepper motor will
rotate as per the dirction of the pot.
BLOCK DIAGRAM:

You might also like