Micro-controller
Researches
• Visual servo
• Image Processing
• Impedance control
• Intelligent control
Le Duc Hanh, Phd • Robotics
Lecturer at Ho Chi Minh city University
of Technology
Email: ldhanh@[Link]
Web: [Link]
ME3007 Robotic & Vision Lab RoVis
Web: [Link]
Robotic & Vision Lab RoVis
REFERENCE
Robotic & Vision Lab RoVis
Syllabus
• Module 1: I/O application
• Module 2: A/D analog to digital conversion
• Module 3: Timer
• Module 4: PWM and motor control
• Module 5: Communication ( RS232, RS485, I2C, SPI, CAN…)
Robotic & Vision Lab RoVis
Software
Robotic & Vision Lab RoVis
Digital Systems
Digital vs. Analog Waveforms
+5
+5
1 0 1
V V
Time
Time
–5
–5
Digital: Analog:
only assumes discrete values values vary over a broad range
continuously
Robotic & Vision Lab RoVis
Robotic & Vision Lab RoVis
Robotic & Vision Lab RoVis
Robotic & Vision Lab RoVis
Robotic & Vision Lab RoVis
Robotic & Vision Lab RoVis
Robotic & Vision Lab RoVis
Robotic & Vision Lab RoVis
Robotic & Vision Lab RoVis
7400 Series TTL Logic Chips
The 7400 NAND Chip: pin layout
The equivalent logic layout
1 14 Vcc = +5V 00
1
3
2 13 2
3 12
4
6
5
4 11
5 10 9
8
10
6 9
Gnd 7 8 12
11
7400 13
Robotic & Vision Lab RoVis
7400 Series Implementation
Implementing f = x1x2 + x2'x3 using 7400 series ICs
Robotic & Vision Lab RoVis
Reduce the combinational logic circuit
Robotic & Vision Lab RoVis
In a certain chemical-processing plant, a liquid chemical is used
in a manufacturing process. The chemical is stored in three
different tanks.
A level sensor in each tank produces a HIGH voltage when the
level of chemical in the tank drops below a specified point.
- Design a circuit that monitors the chemical level in each tank
and indicates when the level in any two of the tanks drops
below the specified point.
Robotic & Vision Lab RoVis
Robotic & Vision Lab RoVis
Robotic & Vision Lab RoVis
Suppose the cash room at a store has access restricted to certain employees, each of whom has a
key, which produces a logic 1 at particular inputs to an unlocking circuit.
Only the store manager (M) can enter alone. The assistant manager (A) and the cashier (C) also
have access, but only when accompanied by each other, or by the store manager. Design a
combinational logic circuit that will allow access by producing a logic 1 when the above conditions
are met.
X = M + M•C + A•C + A•M + A•C•M
Robotic & Vision Lab RoVis
Decoders
• A decoder is a combinational digital circuit with a number of inputs ‘n’ and a number
of outputs ‘m’, where m= 2n
• Only one of the outputs is enabled at a time. The output enabled is the one specified
by the binary number formed at the inputs of the decoder.
• On the circuit below, the inputs of the decoder are connected on three switches,
forming the number 5 [(101)2], thus only LED #5 will be ON
1 1 1 0 1 2 3 4 5 6 7
0 0 0
0 1 0 1 0 1
3/8 DEC.
Y0
Y1
A0
Y2
A1 Y3
Y4
A2
Y5
Y6
Y7
Robotic & Vision Lab RoVis
IC 74LS138
Robotic & Vision Lab RoVis
2 to 4 Line Decoder:
2-to-4 Line Decoder
2/4 DEC A1 A0 Y0 Y1 Y2 Y3 Y0 = A1 A 0 Y0
Y0 0 0 1 0 0 0 Y1 = A 1 A 0 A1
A1 Y1
Y1 0 1 0 1 0 0 Y2 = A1 A 0
A0 Y2 Y2
1 0 0 0 1 0 Y3 = A1 A 0
A0
Y3 1 1 0 0 0 1 Logic Y3
Expressions
Logic Symbol Truth Table Logic Circuit
2-to-4 Line Decoder with Enable Input
2/4 DEC E A1 A0 Y0 Y1 Y2 Y3 Y0 = E A1 A 0
A1 Y0
A1 Y0 0 X X 0 0 0 0
Y1 = E A 1 A 0
Y1
A0 Y1 1 0 0 1 0 0 0
E
Y2 = E A1 A 0
Y2 1 0 1 0 1 0 0 Y2
E Y3 1 1 0 0 0 1 0 Y3 = E A1 A 0 A0
Y3
1 1 1 0 0 0 1 Logic
Logic Symbol Truth Table Expressions Logic Circuit
Robotic & Vision Lab RoVis
Electrical device
Robotic & Vision Lab RoVis
Robotic & Vision Lab RoVis
A pull-up resistor is a resistor
- connected between a signal conductor and a positive power
supply voltage to ensure that the signal will be a valid logic
level if external devices are disconnected or high-impedance is
introduced
Robotic & Vision Lab RoVis
Pull-down resistors work in the same manner as pull-up resistors,
except that they pull the pin to a logical low value. They are
connected between ground and the appropriate pin on a device
Robotic & Vision Lab RoVis
Pull up and Pull down Resistor
Robotic & Vision Lab RoVis
Example
Robotic & Vision Lab RoVis