Workshop on Microcontroller Based Project Development

Similar documents
EXPERIMENT 7 Please visit to learn all features of arduino before you start the experiments

Introduction to Arduino. Wilson Wingston Sharon

Figure 1.1: Some embedded device. In this course we shall learn microcontroller and FPGA based embedded system.

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Microcontrollers for Ham Radio

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

CN310 Microprocessor Systems Design

8051 Microcontroller

Segment 1A. Introduction to Microcomputer and Microprocessor

keyestudio Keyestudio MEGA 2560 R3 Board

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

INDUSTRIAL TRAINING:6 MONTHS PROGRAM TEVATRON TECHNOLOGIES PVT LTD

Microprocessors/Microcontrollers

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

Arduino Prof. Dr. Magdy M. Abdelhameed

User Guide v1.0. v1.0 Oct 1, This guide is only available in English Ce manuel est seulement disponible en Anglais

Lab 2 - Powering the Fubarino, Intro to Serial, Functions and Variables

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc)

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

MICROCONTROLLER AND PLC LAB-436 SEMESTER-5

Lab 2 - Powering the Fubarino. Fubarino,, Intro to Serial, Functions and Variables

Microcontroller basics

boolean running = false; // false off, true on boolean gezielt = false; // Water turned on on purpose, true=on, false=off

USER MANUAL ARDUINO I/O EXPANSION SHIELD

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

BASIC ARDUINO WORKSHOP. Mr. Aldwin and Mr. Bernardo

How to Use an Arduino

Basic Components of Digital Computer

Lecture 1. Course Overview and The 8051 Architecture

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.

Lab 01 Arduino 程式設計實驗. Essential Arduino Programming and Digital Signal Process

Arduino Uno R3 INTRODUCTION

CHAPTER 1 MICROCOMPUTER SYSTEMS. 1.1 Introduction. 1.2 Microcontroller Evolution

Diploma in Embedded Systems

Introduction to Arduino

Adapted from a lab originally written by Simon Hastings and Bill Ashmanskas

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

Microcontrollers. Fig. 1 gives a comparison of a microprocessor system and a microcontroller system.

Introduction to Microcontrollers Using Arduino. PhilRobotics

IME-100 ECE. Lab 3. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE,

ELEG3923 Microprocessor Ch.0 & Ch.1 Introduction to Microcontroller

Lecture 6: Embedded Systems and Microcontrollers

INTERFACING HARDWARE WITH MICROCONTROLLER

Microprocessor (COM 9323)

ARDUINO. By Kiran Tiwari BCT 2072 CoTS.

Introduction to 8051 microcontrollers

PD215 Mechatronics. Week 3/4 Interfacing Hardware and Communication Systems

An Arduino Controlled 1 Hz to 60 MHz Signal Generator

Microcontroller Basics

Fig 1. Block diagram of a microcomputer

VLSI Design Lab., Konkuk Univ. Yong Beom Cho LSI Design Lab

Embedded programming, AVR intro

EMBEDDED Systems. Functions. MODULE- 1 C programming with data Structure Introduction to C. Array and String. Control Flow Statements In C

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture

PIC Microcontroller and

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

Department of Electronics and Instrumentation Engineering Question Bank

ARDUINO YÚN Code: A000008

ARDUINO LEONARDO WITH HEADERS Code: A000057

Alessandra de Vitis. Arduino

ECE 471 Embedded Systems Lecture 2

The Microcontroller Idea Book

PIC Microcontroller Introduction

ARDUINO LEONARDO ETH Code: A000022

MICROPROCESSOR BASED SYSTEM DESIGN


Lecture 14. Ali Karimpour Associate Professor Ferdowsi University of Mashhad

ARDUINO MEGA INTRODUCTION

Serial Communication

Digital Design through. Arduino

Distributed Real- Time Control Systems

TEVATRON TECHNOLOGIES PVT. LTD Embedded! Robotics! IoT! VLSI Design! Projects! Technical Consultancy! Education! STEM! Software!

Schedule. Sanford Bernhardt, Sangster, Kumfer, Michalaka. 3:10-5:00 Workshop: Build a speedometer 5:15-7:30 Dinner and Symposium: Group 2

ARDUINO YÚN MINI Code: A000108

TANGIBLE MEDIA & PHYSICAL COMPUTING INTRODUCTION TO ARDUINO

ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers. Eng. Salma Hesham

Engr. A. N. Aniedu Electronic and Computer Engineering Nnamdi Azikiwe University, Awka

Lab-3: LCDs Serial Communication Analog Inputs Temperature Measurement System

Digital Circuits Part 2 - Communication

Lecture (01) Introducing Embedded Systems and the Microcontrollers By: Dr. Ahmed ElShafee

3 PHASE FAULT ANALYSIS WITH AUTO RESET FOR TEMPORARY FAULT AND TRIP FOR PREMANENT

8254 is a programmable interval timer. Which is widely used in clock driven digital circuits. with out timer there will not be proper synchronization

Low-Cost Microcontrollers

Microcontrollers and Interfacing week 10 exercises

Smart Objects. SAPIENZA Università di Roma, M.Sc. in Product Design Fabio Patrizi

Getting to know the Arduino IDE

CONSTRUCTION GUIDE Remote Big Wheel. Robobox. Level VIII

Interrupts, timers and counters

Lab Course Microcontroller Programming

Goal: We want to build an autonomous vehicle (robot)

PIC32&Overview& E155&

DTMF BASED HOME AUTOMATION

Laboratory 1 Introduction to the Arduino boards

IME-100 Interdisciplinary Design and Manufacturing

Microcontrollers. Principles and Applications. Ajit Pal +5 V 2K 8. 8 bit dip switch. P2 8 Reset switch Microcontroller AT89S52 100E +5 V. 2.

AVR Training Board-I. VLSI Design Lab., Konkuk Univ. LSI Design Lab

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text

CHAPTER 1 - World of microcontrollers

ARDUINO PRIMO. Code: A000135

Transcription:

Organized by: EEE Club Workshop on Microcontroller Based Project Development Presented By Mohammed Abdul Kader Assistant Professor, Dept. of EEE, IIUC Email:kader05cuet@gmail.com Website: kader05cuet.wordpress.com

What is Micro-Computer (Computer)? Micro-computer is a system which consist at least the following components Microprocessor Memory Input Port Output Port 2

Micro-computer in a single chip. A microcontroller may consist of following functional units: Central Processing Unit Memory Unit System Bus Input/Output Unit Serial Communication Timer Unit. Watchdog Analog to Digital Converter Oscillator What is Microcontroller? 3

Central Processing Unit (CPU)- Microprocessor It takes binary data from memory or input device and provides output processing the data as per user instruction. (RAM) Input ROM (instruction) [ (instruction) ] Output 4

System Bus Address Bus Microprocessor Data Bus MWTC MRDC IOWC IORC Read Only Memory ROM Read/Write Memory RAM Keyboard Printer 5

Memory Unit Read Only Memory (ROM): Program Memory Random Access Memory (RAM): To store data (variables) Electrically Erasable Programmable ROM (EEPROM): Store data (variable) even power source is shutdown. 6

Input/output ports (I/O Ports) In order to make the microcontroller useful, it is necessary to connect it to peripheral devices. Each microcontroller has one or more registers (called a port) connected to the microcontroller pins. Why do we call them input/output ports? Because it is possible to change a pin function according to the user's needs. 7

Timer/Counters These are act as "stopwatches" or, external event counter. These are commonly 8- or 16-bit SFRs the contents of which is automatically incremented by each coming pulse. 8

Serial communication The most commonly used serial communication systems are: I 2 C (Inter Integrated Circuit) SPI (Serial Peripheral Interface Bus) UART (Universal Asynchronous Receiver/Transmitter) 9

Watchdog Timer 10

Analog to Digital Converter (ADC) An analogue to digital converter is an electronic circuit which converts continuous signals to discrete digital numbers. In other words, this circuit converts an analogue value into a binary number and passes it to the CPU for further processing. This module is therefore used for input pin voltage measurement (analogue value). 11

Prerequisites to work with Microcontroller Basic Electronics Digital Electronics Programming Microprocessor 12

Steps of Microcontroller Based Project Development a) Generation of Idea. b) Think about the problem and point the objectives of the project. c) Methodology (Theory Related to project) d) Hardware Selection (Necessary Components). e) Study about components. f) Circuit Diagram g) Algorithm h) Program i) Circuit Connection j) Desired Outcome. 13

Name of Some Microcontroller Manufacturer ATMEL (AVR microcontroller) Microchip (PIC microcontroller) Texas Instruments (TI) Freescale Philips Motorola ARDUINO 14 Workshop on "Microcontroller Based Project Development", Organized by EEE Club

Advantages of Arduino: Reduces hardware complexity Crystal Oscillator Program Loader Microcontroller Linear Voltage Regulator 15 Workshop on "Microcontroller Based Project Development", Organized by EEE Club

Advantages of Arduino: Programming Easy Programming in C Lot of functions in the library. No need to learn internal architecture of microcontroller. 16

Arduino UNO Digital I/O Pins Serial Tx-Rx Pins 17 Vcc and GND Pins

Digital I/O Pins Most of the important pins of microcontroller are digital input-output pins. These pins are used to connect INPUT Device (i.e. Push Button, keypad, digital sensors etc) and OUTPUT Device (i.e. LED, Display, Relay, Motor etc.) with microcontroller. These pins can act as INPUT or OUTPUT. Digital Output pin means microcontroller can make this pin HIGH or LOW state (Write Operation). Digital Input pin means microcontroller can read HIGH or LOW state from other devices (Read Operation). 18

Configuring Digital I/O Pins Configuring as OUTPUT An LED is connected with pin 13. The pin should be an OUTPUT pin. We can configure a pin as OUTPUT by pinmode function. pinmode(pin Number, OUTPUT) pinmode(13, OUTPUT) Making a Pin HIGH or LOW Microcontroller can make a digital pin HIGH or LOW by digitalwrite function. digitalwrite(pin number, HIGH/LOW) digitalwrite(13,high) digitalwrite(13,low) 19

Program Structure in ARDUINO Verify Program Load Program Serial monitor Processor run the instructions written here only once after loading program or reset. Processor run the instructions written here repeatedly after loading program or reset. i.e. void loop() function creates an infinite loop. 20

LED Blinking void setup() { pinmode(13,output); } void loop() { digitalwrite(13,high); delay(300); digitalwrite(13,low); delay(300); } Note: To insert a time delay in the program use following functiondelay(time_in_ms); 21

Project-1: Home Appliance Control by TV Remote All on/ All off 22

Required Components TV Remote Microcontroller IR Receiver Relay 23

Basics of IR Remote (Transmitter and Receiver Circuit) 24 Arduino Foundation Course, Lecture-11, By-Mohammaed Abdul Kader, B.Sc in EEE, CUET

Code Transmitted from TV Remote 25 Decimal Binary Hexadecimal 948321248 = 11 1000 1000 0110 0011 1011 1110 0000= 3886 3BE0

RELAY A relay is an electromagnetic switch operated by a relatively small electric current that can turn on or off a much larger electric current. The heart of a relay is an electromagnet (a coil of wire that becomes a temporary magnet when electricity flows through it). 26

Functions Related to IR Remote Receiving IRrecv irrecv(receivepin): Create the receiver object, using a name of your choice. irrecv.enableirin() :Begin the receiving process. This will enable the timer interrupt which consumes a small amount of CPU every 50 µs. irrecv.decode(&results): Attempt to receive a IR code. Returns true if a code was received, or false if nothing received yet. When a code is received, information is stored into "results". results.value: The actual IR code (0 if type is UNKNOWN) irrecv.resume(): After receiving, this must be called to reset the receiver and prepare it to receive another code. 27 Arduino Foundation Course, Lecture-11, By-Mohammaed Abdul Kader, B.Sc in EEE, CUET

Circuit Diagram 28

Program #include <IRremote.h> int RECV_PIN = 8; const int LightPin=13; const int FanPin=12; const int DLightPin=11; IRrecv irrecv(recv_pin); decode_results results; void setup() { pinmode(lightpin, OUTPUT); pinmode(fanpin,output); pinmode(dlightpin, OUTPUT); Serial.begin(9600); irrecv.enableirin(); } boolean LIGHT = 0; boolean FAN=0; boolean DLIGHT=0; boolean all=0; 29 void loop() { if (irrecv.decode(&results)) { if (results.value==0x38863be0) { LIGHT =!LIGHT; digitalwrite(lightpin,light); } else if(results.value==0x38863bd0) { FAN=!FAN; digitalwrite(fanpin,fan); } else if(results.value==0x38863bf0) { DLIGHT=!DLIGHT; digitalwrite(dlightpin,dlight); } else if(results.value==0x38863bd2) { all=!all; digitalwrite(lightpin,all); digitalwrite(fanpin,all); digitalwrite(dlightpin,all); } irrecv.resume(); }}

Project-2: Home Appliance Control by Smart Phone 30

Bluetooth Module F A G D E C B 31

char i; boolean a=0,b=0,c=0; void setup() { Serial.begin(9600); pinmode(13,output); pinmode(12,output); pinmode(11,output); } void loop() { if(serial.available()>0) i=serial.read(); Serial.println(i); delay(10); if(i=='a' ) { a=!a; digitalwrite(13,a); i=0; } Program of Project-2 if(i=='b') { b=!b; digitalwrite(12,b); i=0; } if(i=='c') { c=!c; digitalwrite(11,c); i=0; } if(i=='d') { digitalwrite(13,1); digitalwrite(12,1); } if(i=='e') { digitalwrite(11,0); digitalwrite(12,0); digitalwrite(13,0); }} 32