Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

MICROPROCESSORS

EXPERIMENT NO. 6

DC MOTOR

Name: SANGALANG, GABRIEL CARLO P.

Course/Section: COE121L/E01

Group No.:

Date of Performance: July 06, 2020


Date of Submission: July 13, 2020

Engr. Isagani Villamor


Professor
BASIC DC MOTOR CONTROL

Q1. What is the output of the program? Illustrate it using a

picture or a drawing with an explanation.


The output shows that the motor is rotating clockwise and

the SSD displays 0-9 which means the number of

revolutions the dc motor rotated.____________________

Q2. While running the program, what can be observed

from the seven-segment display? Illustrate it using a

picture or a drawing with an explanation.

The first SDD show the number of revolutions from 0-9

and resets back to 0. This is the external clock source for


the timer 1. Timer 1 is put into event counting mode and

will increment every motor revolution._________________

Q3. Press SW0 (below the LEDs) once. What will happen

to the DC motor? Explain the output.

The DC motor rotated from clockwise to counterclockwise.

The motor direction is stored in F0 (1 for clockwise, 0 for

anti-clockwise). The value in F0 is sent to display 0’s

decimal point (P1.7). If the decimal point is lit, it indicates

the motors direction which is anti-clockwise. While if it is

not lit, the motor is rotating clockwise.________________


Q4. Use the slider beside the motor. What is the effect of

changing the slider from MIN to MAX or vice versa to the

DC motor?

The slider beside the motors slows down and speeds up

the rotation of the motor.___________________________

Q5. What is the effect of changing the values in the

LEDcodes? Change 1 value from the define bytes (DB)

and observe the effect by running the program.

Changing the values of LEDcodes also changes the

output. The number of revolutions will not show the

accurate and correct number of revolution.____________


DISCUSSION

The experiment is about the dc motor in edsim51

simulation which it will demonstrate the use of instruction set

to control the dc motor. Interfacing dc motor is an essential

part in designing embedded system such as robotic projects.

In interfacing method for switching the dc motor on and off

through microcontroller uses only 5 V motor, if the supply

voltage changes the motor will be in its on state because

there is a 5 V applied to the base of the pnp transistor,

otherwise it will turn off.

The default state of the motor which the motor’s shaft is in the

3 o’clock position where the motor sensor is depicted by a

vertical line at the top of the motor. The sensor changes from

block to red whenever the shaft crosses the sensor. The


motor sensor is connected to P3.5 switch which is the

external clock source for timer 1.

The basic dc motor control, its instruction set provides an

output of the dc motor rotating clockwise and corresponds to

the first seven-segment display (SSD) to display numbers 0-9

which indicates the number of revolutions the motor has done

then resets after 9 revolutions. When pressing the SW0 below

the LEDs at least once will reverse the rotation of the motor’s

direction as its direction is stored in F0 wherein 1 signals a

clockwise rotation and 0 for anti-clockwise. The slider of the

motor slows down and speeds up its rotation whenever the

slider changing from MIN to MAX. The timer 1 increments

once every motor revolution. The LEDcodes are for the

display in the LEDs to provide a correct output as well as to

show the correct number of revolutions.


CONCLUSION

After performing the experiment, I therefore conclude that:

- The instruction set commands the motor to rotate in

clockwise direction as well as a display its number of

revolutions to the first seven-segment display (SSD)

in which the SSD will only show up to nine (9)

revolutions then will resets.

- The speed of the motor can be varied manually.

When running the program at full speed through the

slider by increasing it s full speed, it is noticed that the

motor completes its revolution before the SSD

updates its display which means that the motor’s

speed cannot corresponds to the running system

clock of the microcontroller of 12 MHz.


- There is a delay between the motor arm and the

sensor whenever the motor arm passes then display

updates.

You might also like