Professional Documents
Culture Documents
1
For entrance detection a motion sensor is used it will be mounted middle of
the sterilizing cabin
https://www.alibaba.com/product-detail/Factory-Directly-Supply-HC-SR04-PIR_62133789914.html
2
HC-RS04 specifications:
Dimension 32*24 mm
28mm distance between two screws
23 mm Lens diameter
3
HC-RS04 Schematic diagram
F1https://electronics.stackexchange.com/questions/304115/pir-sensor-not-triggering-p2n2222
Key features:
1. Compatible with Arduino
2. Detects motion reliably inside, at any time of day or night.
3. It consumes less energy (0.8W to 1.0W) compare to microwave
sensor.
4. They are cheaper compare to microwave sensors
4
5
6
4 valves the type of valve I will use is solenoid valve
Figure 2https://www.robotics.org.za/ROB-10456
7
Solenoid valve specifications:
Orifice 5.0mm
Voltage 5 to 12 Volts
Service Air/Water/Liquid
8
Solenoid valve schematic diagram:
9
10
I will use 4X4 Matrix 16 Key membrane switch keypad
Figure 3https://www.joom.com/en/products/5b7b79e18b2c3701f41541f6
What is keypad?
Keypads are a great way to let users interact with your project. You can
use them to navigate menus, enter passwords, and control games and
robots.
Keypad specification:
Input Voltage: 5 to 24 V
11
Interface pins 8 Pins
12
4X4 Matrix 16 Key membrane switch keypad Arduino wiring:
13
14
Figure 4Figure 5https://store.ncd.io/product/water-level-sensor-analog-sensor/
15
Liquid level sensor specifications:
Supply voltage 3.3 to 5 V
Operation current 4 to 20 mA
Dimensions 60 X 20 mm
Contact 45 mm
16
17
Display 16x2 Arduino
Figure 5https://www.aranacorp.com/en/using-a-lcd16x2-screen-with-arduino/
You can easily interface a liquid crystal display (LCD) with an Arduino to
provide a user interface.
18
Display 16x2 Arduino specification:
Supply voltage 5V
Dimensions 80 X 36 X 12 mm
19
20
21
22
23
24
25
26
27
When cabin is 1-ultrasonic is not detecting
empty 2-LCD print ( Person detected count)
When person
28
detect
(out of save range
temp>37.5)
29
Arduino Mega2560
30
Atmega2560 specifications:
Microcontroller: ATMEGA2560
Crystal: 14.7456MHz
Power on reset circuit
6 pin FRC socket for ISP (In System Programming)
Atmega2560 Features:
Advanced RISC Architecture
Up to 16 MIPS Throughput at 16 MHz
256K Bytes of In-System Self-Programmable Flash
8K Bytes RAM
4K Byte Internal SRAM
86 Programmable I/O Lines arranged in nine 8 bit ports
In-System Programming by On-chip Boot Program
JTAG
16-channel, 10-bit ADC
Two 8-bit Timer/Counters with Separate Prescalers and Compare
Modes
Four 16-bit Timer/Counter with Separate Prescaler, Compare Mode,
and Capture
Real Time Counter with Separate Oscillator
Twelve 16 bit and Four 8 bit PWM Channels,
Four Programmable Serial USART
Eight external interrupts
Master/Slave SPI Serial Interface
Byte-oriented Two-wire Serial Interface
Programmable Watchdog Timer with Separate On-chip Oscillator
100 pin TQFP package
31
Program counter:
A program counter is a register in a computer processor that contains the address of the
code and the next instruction to be executed from memory.
A program counter (PC) is also known as an instruction counter, instruction pointer,
instruction address register or sequence control register.
The program counter is a register (memory cell)
This register contains the address (location in memory) of the next instruction after the
CPU finishes executing the current instruction in the instruction register
The value in the program counter will be increased after the CPU finishes executing one
instruction
32
Instruction Register:
33
Instruction decoder:
A processor's instruction decoder is a combinatorial circuit that takes the form of a read-only
memory at times and an ordinary combinatorial circuit at other times.
Its function is to convert an instruction code into the address in the micro memory where the
instruction code will be executed.
ALU:
An arithmetic logic unit (ALU) is a combinational digital circuit that performs arithmetic and
bitwise operations on integer binary numbers. A processor's input and output are controlled
by an integrated circuit. It collects programmed instructions and moves them on to the
arithmetic logic unit (ALU). The ALU executes the required calculations and transmits the
results to the control unit.
Is a complex electrical circuit that can perform Mathematical (+, -, ×, /) and logical
operations (<, ≤ >, ≥, and, or)
The output (result) of the computation (obtained by the ALU) is often stored in a general
purpose register
34
Program Memory:
The read-only memory (ROM) is used to save programmed codes that are being run
permanently, and it is split into two sections: the Boot Program section and the Application
Program section. After we've burnt the software (which we'd created), it's stored in a memory.
As a reminder, Program Counter performs one-by-one execution of commands stored in the
programmed memory.
35
Data Memory
RAM is the data space that is used for temporarily storing constant and variable values that
are used by the microcontroller during normal program execution. The General Purpose
Registers and Special Function Registers are divided into various banks in the data memory.
To access a register that is located in another bank, one should access it inside the program.
36
Buses:
A bus is a data transmission channel for digital signals. Processors are connected to one of
three internal buses:
the data bus
address bus
control bus
The "system bus" is made up of these three internal buses. The system bus is an internal
bus that connects the processor to the rest of device's hardware.
Instruction Set
37
Interrupts
Interrupt is the method of creating a temporary halt during program execution and allows
peripheral devices to access the microprocessor. An unusual situation or a specific
instruction in the instruction set that creates an interrupt when executed by the processor
causes a software interrupt. If the processor's arithmetic logic unit executes an instruction
to divide a number by zero, for example, a divide-by-zero exception will occur, prompting
the computer to quit the computation or show an error message. A shopper is similar to
an interrupt. If he need a service or product, he approaches him and informs him of his
requirements. When flags or signals are received in the case of interruptions, they alert
the controller that they need to be addressed.
ADC
38
Timers
A timer is a specialized type of clock which is used to measure time intervals. A counter is
a device that stores (and sometimes displays) the number of times a particular event or
process occurred, with respect to a clock signal. It is used to count the events happening
outside the microcontroller. The timer is a critical component of embedded systems
because it keeps an operation's timing in sync with a system clock or an external clock.
The timer may be used for a variety of purposes, including measuring time and producing
delays. It can also be used to generate baud rates.
39
USART
40
Harvard Architectures:
Computer instructions and data are stored in separate memory units linked by various
buses in the Harvard architecture. There are at least two memory address spaces to
deal with in this case, so there is a memory register for system instructions and another
for records. Computers built with the Harvard architecture will run programmed and
access data on their own. And, as a result, concurrently The Harvard architecture
maintains a clear distinction between data and code. As a result, Harvard's architecture
is more complex, but independent pipelines eliminate Von Neumann's bottleneck.
[ CITATION SCO18 \l 1033 ]
41
Modified Harvard Architecture:
Since the majority of modern machines have no physical distinction between the
memory spaces used for data and programs/code/machine instructions, they may be
classified as Von Neumann. An "updated Harvard architecture" is a simpler way to
describe the bulk of modern computers. Modern processors can share memory, but
they have mechanisms in place to prevent data from being misinterpreted as code, such
as special instructions. This is referred to as "updated Harvard architecture" by others.
However, the updated Harvard architecture has two separate signal (code) and storage
(memory) paths (buses), while the memory itself is one shared, physical piece. The
memory controller is where the modification is seated, since it handles the memory and
how it is used.[ CITATION SCO18 \l 1033 ]
42
Von-Neumann architecture:
In a Von-Neumann architecture, all data and programmed instructions are stored in the
same memory and bus. Since you can't access software and data memory at the same
time, the Von Neumann architecture is prone to bottlenecks, and machine performance
suffers as a result.[ CITATION SCO18 \l 1033 ]
43
Comparison between Harvard and Von Neumann:
point of
Compariso Harvard Architecture Von Neumann Architecture
n
The CPU is attached to both the data There is no independent storage and
memory (RAM) and the application application memory in Von-Neumann
memory (ROM) independently in architecture. Instead, the CPU is given a
Harvard architecture single memory link.
Arrangemen
t
Hardware It necessitates more hardware since Unlike the Harvard architecture, this one
requirement each memory would take its own needs fewer hardware so only a shared
s storage and address bus. memory must be accessed.
Space
Less space required than the Harvard
requirement More space is required
model
s
Since the processor fetches data and Since it can't fetch data and commands
Speed of
instructions at the same time, at the same speed, execution time is
execution
execution time is reduced.(FASTER) slower.(SLOWER)
Since data and instructions must be Since either data or instructions must be
Controlling fetched at the same time, controlling fetched at the same time, controlling
becomes more difficult. becomes easier.
[ CITATION Nee20 \l 1033 ]
44
After examine figure one I realized that this architecture is a state of Harvard
Architecture
ATMEGA 8
ATMEGA 16
ATMEGA 32
8051 series
89S52
89S51
89C51
PIC series
Pic 10F
Pic 12F
Pic 16F
45
Comparison Atmega328P Atmega128
points
Programmable I/O 23 programmable I/O 53 Programmable I/O
lines lines Lines
64-lead
Power +1.8 V TO +5.5V +4.5V to +5.5V
consumption
46
Memory map of Atmega328P:
47
Atmega328P
48
Atmega328P pinout
49
Atmega328P applications
Footstep Mobile Charging With RFID
50
Bibliography
Components101, 2020. MLX90614 Non-Contact IR Temperature Sensor. [Online]
Available at: https://components101.com/sensors/melexis-mlx90614-contact-less-ir-temperature-
sensor
[Accessed 28 may 2021].
Khatri, P., 2019. How to control a Solenoid Valve with Arduino. [Online]
Available at: https://circuitdigest.com/microcontroller-projects/how-to-control-solenoid-valve-using-
arduino
[Accessed 25 may 2021].
Mishra, N., 2020. Difference between Von Neumann and Harvard Architecture. [Online]
Available at: https://www.thecrazyprogrammer.com/2019/02/difference-between-von-neumann-and-
harvard-architecture.html
[Accessed 4 april 2021].
THORNTON, S., 2018. What’s the difference between Von-Neumann and Harvard architectures?. [Online]
51