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

Advanced Embedded design systems (PUE3130)

Lab report 2

Under the direction of:


DR. MUCHUKA Maguu

Presented by :
M. HABA Jules Alexandre
EE 300-0011/2023

Experiment date: 21th june, 2023


Report submission date: 03th june, 2023

MSC. Computer Engineering


Department of electrical and electronic engineering

Institute For Basic Science, Technology And Innovation


Pan African University At Jomo Kenyatta University Of
Agriculture And Technology
HABA Jules Alexandre PUE 3140 2023-2024

Table of content

TABLE OF CONTENT .......................................................................................................... 2


LIST OF FIGURES................................................................................................................ 3
LIST OF TABLES ................................................................................................................. 3
EXPERIMENT TITLE ............................................................................................................ 4
AIM .................................................................................................................................. 5
INTRODUCTION ................................................................................................................ 6
1- Methods and materials ............................................................................................... 6
2- Results .......................................................................................................................... 6
3- Practical task 1............................................................................................................. 7
3.1- DC motor .............................................................................................................. 7
3.2- MOSFET ................................................................................................................ 7
3.3- Circuit to implemented ........................................................................................ 8
3.4- Program in assembly language ............................................................................ 8
3.5- The practical result ............................................................................................... 9
4- Practical task 2........................................................................................................... 10
4.1- Requirements ..................................................................................................... 10
4.1.1- Module relais statique Fotek SSR-50DAa ....................................................... 10
4.1.2- AC load ............................................................................................................ 10
4.1.3- MSP430FR5969 ............................................................................................... 10
4.1.4- Appropriate power supply .............................................................................. 11
4.2- Circuit diagram ................................................................................................... 11
4.3- Circuit description .............................................................................................. 12
4.4- MSP430 Assembly code to test the design ........................................................ 12
4.5- Practical result .................................................................................................... 12
CONCLUSION .................................................................................................................. 13
REFERENCES ................................................................................................................... 14
APPENDIX : ..................................................................................................................... 15
APPENDIX A : MSP430 ON BOARD LED BLINKING ............................................................................ 15

Page 2/15
HABA Jules Alexandre PUE 3140 2023-2024

List of Figures

Figure 1 : DC motor .................................................................................................................... 7


Figure 2: mosfet......................................................................................................................... 8
Figure 3: DC motor using MOSFET ............................................................................................. 8
Figure 4: program for running DC motor using MOSFET ........................................................... 9
Figure 5: pratical result of DC motor using MOFSET .................................................................. 9
Figure 6: Fotek SSR-50DA ......................................................................................................... 10
Figure 7: AC load ...................................................................................................................... 10
Figure 8: msp430fr5969 ........................................................................................................... 11
Figure 9: Circuit diagram of relay and AC load ......................................................................... 11
Figure 10: program for running DC motor using MOSFET ....................................................... 12
Figure 11: lab work result ......................................................................................................... 12

List of tables

Tableau 1: Key values for DC motor ........................................................................................... 7

Page 3/15
HABA Jules Alexandre PUE 3140 2023-2024

Experiment title

As part of the practical application of our theoretical knowledge in the advanced embedded
systems design course, this report is the result of our second laboratory experience. This
document presents the development of two laboratory experiments: the first consists in using
a DC motor, a MOSFET and an MSP430FR5969 and the second consists in using an AC
load, a relay and an MSP430FR5969.

Keywords: MSP430FR5969, Code composer studio, Design, Implementation, Testing,

Page 4/15
HABA Jules Alexandre PUE 3140 2023-2024

Aim

In this experience, we aim to do these task:

 Rotate a DC motor using a MOSFET


 Blink an AC load using relay module as a switching device.

Page 5/15
HABA Jules Alexandre PUE 3140 2023-2024

Introduction

Laboratory work is the means allowing us to master the know-how in laboratories. In this lab
text we will begin by asking the following questions:

 What is a DC motor and what are his characteristics?


 What is also a MOSFET and what are his characteristics?
 How can we implement a circuit to turn on and off a DC motor using MOSFET ?
 What is the use of the Switching device: Fotek SSR-50DA – solid state relay module
?
 How can we implement it for blinking a light?

In the rest of our work, we will answer the questions posed above step by step.

1- Methods and materials

As a method, we are going to work as:

 Give some detail concerning the devices we are going to use


 Give the circuit we are going to implement
 Give the program written in assembly language
 Finally, provide the practical result of an implementation circuit design.

As a material, we need respectively in our lab implementation thos materiel :

 Task 1 : a DC motor, a MOSFET, a testing board, the wires for establishing connexion
between the device, a power supply which can gives 12 v as supply voltage, and a
MSP430FR5969 microcontoler for executing our program
 Task 2 : we also need here a light which can take 110 V as supply voltage, a
MSP430FR5969 microcontroler for executing our program, a testing board, a
switching device having those characteristics : Switching device: Fotek SSR-50DA –
solid state relay module and AC socket which can give 110 as a power supply.

2- Results

As you read, you'll find practical results like:

 The detail concerning the device we are going to use


 The circuit design we are going to implement

Page 6/15
HABA Jules Alexandre PUE 3140 2023-2024

 The program written in assembly language we needed for doing our task
 The practical result taken as picture into the lab

3- Practical task 1

In this part we are going to design and implementation of an interface circuit to turn on and
off a DC motor using MOSFET, we need first to give some information concerning to DC
motor and MOSFET characteristics, then to give the circuit we are going to implement.

3.1- DC motor

ZYTD520 is a type of DC motor commonly used in various applications. Here is some useful
information about the engine:

Tableau 1: Key values for DC motor

Characteristic Detail
Voltages 12 V
Speed 5000 r/min
Some application Robotics, automation system, electric vehicules

Here we are going to show the image of the DC motor which has the following characteristic:

Figure 1 : DC motor

3.2- MOSFET

First of all, MOSFET means Metal-oxide-Semiconductor Field-Effect Transistor. It is a type a


transistor widely used in electronic. The use is to control the flow of electrical current by

Page 7/15
HABA Jules Alexandre PUE 3140 2023-2024

varying the voltage. MOSFET have three main terminals: Source, Drain, Gate. Let’s see
below the images of the transistors.

Figure 2: mosfet

3.3- Circuit to implemented

For doing this circuit we needed livewire software, this circuit contain DC motor having two
terminals, and then we have one MOSFET having three terminals: source, drain and gate,
source, next we can also find the ground, the pin and the direct current supply.

Figure 3: DC motor using MOSFET

3.4- Program in assembly language

Here we need the program which can blink LED for doing our task, we have used that
program in the first lab, we need to copy and paste, the small deference will be to conform the
pin we are going to use in this case into the program.

Page 8/15
HABA Jules Alexandre PUE 3140 2023-2024

Figure 4: program for running DC motor using MOSFET

3.5- The practical result

Here we are going to show us the picture provides into the result of our work into the lab, let’s
looking at that picture below.

Figure 5: pratical result of DC motor using MOFSET

In conclusion, we can say the implementation showed us the utilities of MOSFET, the
MOSFET can help us to vary the supply voltage value going throw into the DC motor. If we
increase the supply voltage value, the speed of the DC motor can increase also and when we
decrease the supply voltage, the speed of the DC motor decrease.

Page 9/15
HABA Jules Alexandre PUE 3140 2023-2024

4- Practical task 2

Here we will design and implement an interface circuit to drive an 11O v AC load using a
switching device with this parameter: Fotek SSR-50DA - Solid State Relay Module. The
objective of this experiment is to make an alternating current lamp flash.

4.1- Requirements

4.1.1- Module relais statique Fotek SSR-50DAa

The Fotek SSR-50DA is a solid-state relay module manufactured by Fotek Automation. It is


designed to switch AC loads using a low voltage control signal from a microcontroller or any
other compatible device.

Figure 6: Fotek SSR-50DA

4.1.2- AC load

An AC load in our context refers to incandescent lamps that can use an alternating current
(AC) power supply.

Figure 7: AC load

4.1.3- MSP430FR5969

In our case we are using a family of 16 – bit microcontrollers developed by texas instrument
(TI). It has these following characteristics: low power consumption, performance, memory
option, peripheral, clocking option, development ecosystem, low-cost solution, low-energy
accelerator.

Page 10/15
HABA Jules Alexandre PUE 3140 2023-2024

Figure 8: msp430fr5969

4.1.4- Appropriate power supply

Here we are using a lab socket which can provide 110v as a power supply, let’s see it as a
picture.

4.2- Circuit diagram

Figure 9: Circuit diagram of relay and AC load

Page 11/15
HABA Jules Alexandre PUE 3140 2023-2024

4.3- Circuit description

Our circuit contain input terminal of the relay connected to the output pin of the
microcontroller, then the output terminal of the relay connected to AC source in series with
AC load.

4.4- MSP430 Assembly code to test the design

Figure 10: program for running DC motor using MOSFET

4.5- Practical result

During our experiment task we be carefully to implement well instruction, after our
implementation we get these images as result.

Figure 11: lab work result

Page 12/15
HABA Jules Alexandre PUE 3140 2023-2024

Conclusion

This second laboratory work was a challenge focused on two targets. First, we succeeded to
turn on and off DC motor using a MOSFET controlled by a microcontroller MSP430FR5969.
Then, we also succeeded to blink AC load using a relay controlled by also a microcontroller.
These experiences was important task to improve our knowledge and to prepare us to be good
in lab experiment in general.

Page 13/15
References

1. LaMeres, Brock J. Embedded Systems Design Using the MSP430FR2355 LaunchPad™.


ozeman, MT, USA : Springer Nature Switzerland AG, SECOND EDITION.

2. Haba, Jules Alexandre. Internship report. Casablanca : s.n., 2021.

3. Texas instrument MSP430FR5969 LaunchPad development kit. compagny, Texas


instrument. Texas : www.ti.com, Revised by 2015, Vol. 47 PAGES.
Appendix :

Appendix A : Msp430 on board led blinking

;-------------------------------------------------------------------------------
; MSP430 Assembler Code Template for use with TI Code Composer Studio
;
;
;-------------------------------------------------------------------------------
.cdecls C,LIST,"msp430.h" ; Include device header file

;-------------------------------------------------------------------------------
.def RESET ; Export program entry-point to
; make it known to linker.
;-------------------------------------------------------------------------------
.text ; Assemble into program memory.
.retain ; Override ELF conditional linking
; and retain current section.
.retainrefs ; And retain any sections that have
; references to current section.

;-------------------------------------------------------------------------------
RESET mov.w #__STACK_END,SP ; Initialize stackpointer
StopWDT mov.w #WDTPW|WDTHOLD,&WDTCTL ; Stop watchdog timer

;-------------------------------------------------------------------------------
; Main loop here
;-------------------------------------------------------------------------------

init:
bic.w #LOCKLPM5, &PM5CTL0;
bis.b #BIT0, &P1DIR; set p1.3 as output

main:
xor.b #BIT0, &P1OUT; toggle p1.3
mov.w #0FFFFh, R4; move a word into register 4
again:
dec.w R4; decrement register 4
jnz again; continue decreasing register 4 till 0
jmp main ; jump to main
nop;

;-------------------------------------------------------------------------------
; Stack Pointer definition
;-------------------------------------------------------------------------------
.global __STACK_END
.sect .stack

;-------------------------------------------------------------------------------
; Interrupt Vectors
;-------------------------------------------------------------------------------
.sect ".reset" ; MSP430 RESET Vector
.short RESET

You might also like