Download Final software Power Point Presentaton

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Water Flow
GROUP A
Analogue input voltage results:
Motor
Input
voltage( V)
pin 12 Analogue input
voltage (V)
Display
number
0.5
0.58
5
0.6
0.98
25
0.7
1.3
31
0.8
1.6
40
0.9
1.78
46
1
2.1
53
1.1
2.2
58
1.2
2.5
59
1.3
2.6
65
1.4
2.9
73
1.5
3
76
1.6
3.5
88
1.7
3.8
97
1.8
3.8
EE
voltage (V)
4
3.5
3
2.5
2
1.5
1
0.5
0
1
3
5
7
9
11
13
D
N
G
D
N
G
D
N
G
D
N
G
D
N
G
D
N
G
D
N
G
0.01uF
1N4007
4
F
u
0
7
4
1.8K
2
D
1
C
1
R
2
C
3
VOLTAGE
INPUT
ANALOGUE
DC_GENERATOR
DC_MOTOR
1
resistor
discharge
and
Filter
1N4007
2
LM358
8
1
D
U1A
D
N
G
5
+
5
+
K
0
5
1
3.3K
D
N
G
circuit
clamp
3
R
2
R
2
GAIN
x5.5
D
N
G
T
U
O
N
I
1
3
5
+
MC78L05ABP
2
U
+9V
Supply
Power
Hardware
D
N
G
D
N
G
PIN5
-
PTA4
1.5K
1.5K
BC337
BC337
8
PIN
-
PTA3
2
Q
1
Q
R10
9
R
P
D
P
D
7
7
g
g
3
3
f
f
2
2
e
e
B7
-
B0
PIN
4
4
d
d
5
5
-330
R8
to
R1
c
c
8
8
K
b
K
b
6
9
6
9
K
a
K
a
1
0
1
1
0
1
VCC
UNITS
VCC
TENS
Block diagram of software functions:
Microcontroller
“ad_output”
Signal input
AD Converter
Averaging
device
“ad_average_output”
The relative 7-segment
values output and
display on 7-segment
7-Segment
decoder
“number0”
&
“number1”
Decoder
Timer flow chart:
Every 10ms
Update the variable
“ad_average_output” to
“number1” and “number0”
The odd number
of timer ISR
The even number
of timer ISR
Convert the result to Left
Digit (Tens) and Right Digit
(Unit)
Check “current”
YES
NO
Current=
0
Display the Left Digit
(Tens)
Display the Right
Digit (Units)
Invert “current” byte
for next cycle
Invert “current” byte
for next cycle
Continue timer thread
Counter is only counting from 1 to 129
This loop determine do we need to
updata the ADS results
Continue timer thread
Counter 129, updata
the average ADC
result for 7segment display
YES
There are
64 results
of ADC
Counter 1 to 128,
Trigger the ADC
and obtain
results
Check counter
Counter = 0
NO
=
1
2
9
The even number of
timer ISR
Load the
“sum_of_adoutput”
and divide it by 64
CounterAD + 1
The odd number of
timer ISR
Check counterAD
YES
NO
2
counterAD = 0
Store the final result to
“ad_average_output”
Enable_AD_ISR
Load the “ad_output” and
add it to
“sum_of_adoutput”
Timer thread finish
Related documents