Professional Documents
Culture Documents
MCTE 4105 Mechatronics Lab Iii Sem Ii - Session 19/20 Title: Experiment 6: Motor Control
MCTE 4105 Mechatronics Lab Iii Sem Ii - Session 19/20 Title: Experiment 6: Motor Control
SEC 1 || GROUP 9
N CONTENT MARKS
O
1 OBJECTIVES
1.1 To demonstrate microprocessor interfacing and control of a DC
motor.
2. COMPONENTS NEEDED
1. Personal Computer
2. Breadboard
3. DC Motor
4. HD74LS48P
5. Arduino UNO / ATMEGA328
3. SCHEMATIC DIAGRAM (ONLY FOR DLD & MICROP)
TASK 1 AND 2:
4 FLOW CHART (ONLY MICROP)
Task 1: Drive the DC motor in clockwise and counter clockwise direction.
START
LDI R16, $FF
OUT DDRB, R16
LDI R21, 0B00000010 //register number 2 as binary as r21
OUT PORTB, R21
CALL DELAY
LDI R21, 0B00000001 //register number 1 as binary as r21(motor moves opposite)
OUT PORTB, R21
CALL DELAY
RJMP START
DELAY:
LDI R18, 200
LDI R19, 150
LDI R20, 50
L2:
DEC R20
BRNE L2
DEC R19
BRNE L2
DEC R18
BRNE L2
NOP
RET
8. DISCUSSION
Task2:
Video for Experiment 6:
https://youtu.be/SgwqPejrCR8
9. CONCLUSION
To conclude, the motor moving according to the code show that
the experiment achieve its objectives. We can control the speed of the DC
motor by differ the value of its counter and timer.