Course Code: CSE360 Course Title: Computer Architecture Section: 02 Project Title: Suggest and Design A Minimal CPU Group Number
Course Code: CSE360 Course Title: Computer Architecture Section: 02 Project Title: Suggest and Design A Minimal CPU Group Number
Course Code: CSE360 Course Title: Computer Architecture Section: 02 Project Title: Suggest and Design A Minimal CPU Group Number
Submitted To
Dr. Ahmed Wasif Reza
Associate Professor & Chairperson, Department of CSE
East West University
Submitting Date
17-Dec-2017
Objectives:
Our main goal is to design a minimal CPU architecture for controlling the washing
machine. In this project we have seen hardware design. Thus once the entire system is
designed it is very economic in large quantity production.
Single-phase motor is considered for the design. Front panel consists of a keypad and
LCD display. Keypad provides automatic and manual wash options to the user. LCD
display is well-located to convey machine information to client.
One more design option is to use brushless DC motors or three phase induction motor. In
this project single phase universal motor has been used to design model due to its
simplicity.
Theory:
In this project we design a minimal CPU which will control washing machine.
The system should supply completely automatic mode, semi-automatic mode and manual
mode which is selected by a keypad.
User involvement obligation should be zero in fully automatic mode. In this mode once
system is started it should perform its work autonomously and after the end of work it
should inform the user concerning the end of work. This mode directly should sense cloth
quality and necessity of water, water hotness, detergent, load, wash round time and
perform process consequently.
In semi-automatic mode also user necessity should be zero. But user has to decide any
one of the semi-automatic modes in which washing environment are predefined. One
time the predefined method is started the system should perform its job and after end it
should notify the user.
Gradual involvement of user is required in manual mode. In manual mode User has to
specify which action he wants to do and has to supply related information to the control
system. Suppose if user desires to wash only, he will select ‘wash’ option. After that the
system should ask the user to enter the wash time, amount of water and the load. After
entering those data, the user should begin the machine. The user will be informed when
certain operations are completed.
The system should not work, when the lid is open. If the door is opened incorrectly in the
wash operation, then the system should stop working at the lowest amount feasible time.
It will be 10 seconds.
For upgradeability of new features system should supply simple options. Should not
influence the working of any other features or overall working of the system after
deletion of any feature.
On single phase AC from 190VAC to 250VAC the system should work. If occurs any
variations from power supply voltage, the system should defend itself.
During the power failure, the power will be restarted when the washing machine
automatically starts its cycle automatically.
Design:
To rotate the motor in two different directions ‘forward’ and ‘reverse’ direction control
blocks are used. Motor speed sensor is interfaced to microcontroller. Microcontroller
reads the speed of the motor and properly controls the speed of the motor in different
phases of washing using PWM output. Door sensor, pressure sensor, keypad are also
interfaced to microcontroller. Sequential port in connected to GSM module. EEPROM
and RTC are interfaced to MSSP module of controller. In circuit serial programming
facility is provided for fast and simple programming and debugging.
A detailed schematic with pin connection of PIC microcontroller is provided in this
below Figure.
Implementation:
User settable parameters & washing machine default parameters are stored in
external EEPROM. Internal EEPROM of the PIC is used to store status of the washing
machine. The status is frequently logged to the internal EEPROM.
In the incident of power failure or whenever program resets, status flags are read
from the internal EEPROM and thus status of the machine is determined and operation is
continued from the point of interruption. Accessing of internal EEPROM is faster
compared to external EEPROM. PIC18F452 provide 256 bytes of internal EEPROM that
is not enough for storing parameters of machine. External EEPROM is used for this
reason.
Consequent machine parameters are read from the external EEPROM and
temporarily stored in RAM and operations are performed depending on the mode flag
and status flag condition.
RTC DS1305 is interfaced to SPI port of the microcontroller. This RTC is used as
timing position for all timing estimate of machine. Whenever a particular mode starts
RTC is initialized to zero and there onwards RTC is read and compared with the set
timings; with the battery backup provision actual RTC can also be implemented. Since
PIC allows either I2C or SPI mode at a time, whenever we need to access EEPROM or
RTC, MSSP port of the PIC has to be configured to respective protocol.
Keypad is linked to PORTD. Keypad and meaning of keys are shown in Figure
(2). Pull-up resistors are linked to RD0 to RD3 to allow keypad press detection. ORing
RD4 to RD7 achieves this and output is given to external interrupt 1(INT1). When any of
the keys is pressed ORed output becomes high and INT1 triggers. INT1 ISR does a
keypad scan and properly performs the action.
An external clock enters to timer1/timer3 where Motor speed sensor is given to T1CKI.
For calculating the speed timer is configured in counter mode. Speed is calculated by
counting pulse output from the sensor for one second.
It is also assumed that PWM driver circuit controls gearbox and clutch
mechanisms. Power supply circuits and regulators are not shown in the Figure (1).
Suitably designed SMPS and AC regulators take care of power supply requirement of
each block.
The projected design can be simply a part of home automation. The system is flexible and
safer to use. Smart features can be added or withdrawn as per requirements and hence
design is fully cost effective. The same design methodology adopted here can be
extended to design the commercial product. Hardware can be simply customized to
include an independent BLDC (or three phase) motor controller either through
multiplexed serial port or by replacing GSM module by BLDC (three phase) motor
controller, if cost is not a principle.