dspic30f4012 Microcontroller

Similar documents
Welcome to the tutorial for the MPLAB Starter Kit for dspic DSCs

Selecting and Implementing H-Bridges in DC Motor Control. Daniel Phan A

Tutorial for MPLAB Starter Kit for PIC18F

Digital Signal Controller (DSC) Development Tools

How to Turn an AC Induction Motor Into a DC Motor (A Matter of Perspective) Steve Bowling Application Segments Engineer Microchip Technology, Inc.

DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB

AC/DC Power Supply Reference Design. Advanced SMPS Applications using the dspic DSC SMPS Family

Evo Laser Firmware Developer s Manual

Using Xbee in Serial Communication

How To Program A Microcontroller Board (Eb064) With A Psp Microcontroller (B064-74) With An Ios 2.5V (Power) And A Ppt (Power Control) (Power Supply) (

Lab Experiment 1: The LPC 2148 Education Board

Real time MATLAB Interface for speed control of Induction motor drive using dspic 30F4011

EDUMECH Mechatronic Instructional Systems. Ball on Beam System

DS1104 R&D Controller Board

An Introduction to MPLAB Integrated Development Environment

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

FLYPORT Wi-Fi G

Soft processors for microcontroller programming education

Electronic Shopping Cart Facility for Blind People Using USB Firmware

Fondamenti su strumenti di sviluppo per microcontrollori PIC

Open Source 100kW Electric Vehicle Controller/Inverter

Design And Implementation Of Bank Locker Security System Based On Fingerprint Sensing Circuit And RFID Reader

DKWF121 WF121-A B/G/N MODULE EVALUATION BOARD

How To Use A Watt Saver On A Microcontroller (Watt Saver) On A Cell Phone Or Mp3 Player

PIC-MAXI-WEB development board Users Manual

FlowKit in-circuit debug system

MX PIC24F Educational Module User Manual

A DESIGN OF DSPIC BASED SIGNAL MONITORING AND PROCESSING SYSTEM

DSPDemo. By Moe Wheatley MoeTronix.

Work with Arduino Hardware

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures

USB OTG and Embedded Host Microchip Technology Incorporated. All Rights Reserved. Slide 1

POCKET SCOPE 2. The idea 2. Design criteria 3

RPLIDAR. Low Cost 360 degree 2D Laser Scanner (LIDAR) System Development Kit User Manual Rev.1

DRV8312-C2-KIT How to Run Guide

Arduino Motor Shield (L298) Manual

Board also Supports MicroBridge

Chapter 13. PIC Family Microcontroller

RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards

PROJECT PRESENTATION ON CELLPHONE OPERATED ROBOTIC ASSISTANT

Accurate Measurement of the Mains Electricity Frequency

PID Control. Proportional Integral Derivative (PID) Control. Matrix Multimedia 2011 MX009 - PID Control. by Ben Rowland, April 2011

Example Connection between USB Host and Android

RN-131-PICTAIL & RN-171-PICTAIL Web-Server Demo Application

Integrated Development Environment

DELLORTO. Instructions Manual. Deuss Service Tool For ECS System ECU. Dell Orto Deuss Service Tool instruction manual Page 1 of 11.

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

Micro-Step Driving for Stepper Motors: A Case Study

Setting up a Local Interconnect Network (LIN) using dspace MicroAutoBox 1401/1501 Simulink Blocks

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

Fingerprint Based Biometric Attendance System

dspace DSP DS-1104 based State Observer Design for Position Control of DC Servo Motor

Technical Training Course Catalog

A 5 Degree Feedback Control Robotic Arm (Haptic Arm)

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V th November L6470 Stepper Motor Shield

A Master-Slave DSP Board for Digital Control

Building a Simulink model for real-time analysis V Copyright g.tec medical engineering GmbH

Digital I/O: OUTPUT: Basic, Count, Count+, Smart+

E-Blocks Easy Internet Bundle

Microcontroller based speed control of three phase induction motor using v/f method

REMOTE HOST PROCESS CONTROL AND MONITORING OF INDUSTRY APPLIANCES

Getting Started with PIC24F/PIC24H Programming and Interfacing in C

Microcontroller-based experiments for a control systems course in electrical engineering technology

EE289 Lab Fall LAB 4. Ambient Noise Reduction. 1 Introduction. 2 Simulation in Matlab Simulink

INTRODUCTION TO SERIAL ARM

Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II

Embedded Component Based Programming with DAVE 3

UPS PIco. to be used with. Raspberry Pi B+, A+, B, and A. HAT Compliant. Raspberry Pi is a trademark of the Raspberry Pi Foundation

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual

Controlling a Dot Matrix LED Display with a Microcontroller

Pmod peripheral modules are powered by the host via the interface s power and ground pins.

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs)

Designing an efficient Programmable Logic Controller using Programmable System On Chip

Electronics 5: Arduino, PWM, Mosfetts and Motors

Computer Automation Techniques. Arthur Carroll

Palaparthi.Jagadeesh Chand. Associate Professor in ECE Department, Nimra Institute of Science & Technology, Vijayawada, A.P.

MPLAB IDE 64-Bit USB Device Drivers Installation

Network Enabled Battery Health Monitoring System

ERIKA Enterprise pre-built Virtual Machine

Embedded Patient Monitoring System

How to design and implement firmware for embedded systems

ATB50v1 GPRS / GPS Based Fleet Management Terminal. Datasheet

If an occupancy of room is zero, i.e. room is empty then light source will be switched off automatically

Making model-based development a reality: The development of NEC Electronics' automotive system development environment in conjunction with MATLAB

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board

Microstep Driver Manual Version 6/13/2006

C8051F020 Utilization in an Embedded Digital Design Project Course. Daren R. Wilcox Southern Polytechnic State University Marietta, Georgia

Motor Control using NXP s LPC2900

Tire pressure monitoring

Microcontroller for Variable Speed BLDC Fan Control System. T.C. Lun System Engineer, Freescale Semiconductor, Inc.

2.0 Command and Data Handling Subsystem

PIC32 Microcontroller Families

Embedded Software Development: Spottbillige Hardware + OSS = Zum Spielen zu Schade!

APPLICATION NOTE. Atmel AVR443: Sensor-based Control of Three Phase Brushless DC Motor. Atmel AVR 8-bit Microcontrollers. Features.

SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

Integrated Development Environment

Freescale Semiconductor, I

ELECTRICAL ENGINEERING

Transcription:

dspic30f4012 Microcontroller dspic30f4012 is manufactured by Microchip, and is about $6 Specifications: 28-pin, 16-bit microcontroller 24-bit wide instructions 16-bit wide data path 48 Kbytes on-chip flash program space Up to 30 MIPs operation 20 I/O pins 30 interrupt sources 16-bit Capture input functions 16-bit Compare/PWM output functions 2 UART modules with FIFO Buffers 1 CAN modules, 2.0B compliant 6 PWM output channels Trigger for A/D conversions

Getting Started with dspic30f Microcontroller APPLICATIONS: Motor Control Brushless DC, AC Induction and Switch Reluctance motors Power Conversion and Monitoring Power conversion, inverters, and uninterruptible power supplies (UPS) Internet Connectivity Ethernet and modem applications for Internet connectivity with TCP/IP Speech and Audio Noise and echo cancellation, speech recognition and speech playback Sensor Control Advanced sensor control and smart sensor interface modules Automotive Certified high-temperature grades parts for automotive applications For more detail see: Getting Started with dspic30f Digital Signal Controllers Users Guide ww1.microchip.com/downloads/en/devicedoc/70151a.pdf

Programming dspic30f Microcontroller Microchip development tools: MPLAB IDE An integrated development environment (IDE) for C programming, debugging and uploading (free) MPLAB ICD2 and PICkit In-circuit debugger tools that can be used for uploading programs into the dspic () Development boards Various development boards are available for different applications dspicdem Starter Demo Boards dspicdem General Purpose Development Boards dspicdem Motor Control Development Systems dspicdem Connectivity Development Boards Other dspic30f controller boards: dspic30f4011 Controller Board: $33 dspic30f2010 Controller Board: $28 www.futurlec.com/dspic30f4011_controller_tips.shtml PICkit dspic30f4012 chip For more detail see: Getting Started with dspic30f Digital Signal Controllers Users Guide ww1.microchip.com/downloads/en/devicedoc/70151a.pdf

Embedded Projects with dspic Professor Mark Csele's Home Page - Projects and Hobbies 192.197.62.35/staff/mcsele/project.htm dspic programs and projects www.baghli.com/dspic.php dspic-servo Project - members.shaw.ca members.shaw.ca members.shaw.ca/swstuff/dspic-servo.html Robots and PIC Projects by Bill and Mark Sherman home.comcast.net/~botronics/robots.html Images for pic robotic projects - Report images https://www.google.com/search?q=pic+robotic+projects&hl=en&client=firefox- a&hs=tz7&rls=org.mozilla:en- US:official&prmd=imvns&tbm=isch&tbo=u&source=univ&sa=X&ei=MN1MULzDAsW90Q Gz3oHYAQ&ved=0CCgQsAQ&biw=931&bih=706 Pololu - PIC-Based, Obstacle-Avoiding Robot www.pololu.com/docs/0j2 RoverBot Project - Build a Robot - Robot Kit PIC www.midnightkite.com/roverbot.html

dspic Programming Programming dspic in C Use MPLAB IDE to write the C code and compile it for the dspic Use MPLAB ICD2 to upload the compiled code to the dspic Programming dspic using Matlab products Embedded Target for dspic - A MATLAB toolbox for real-time control of dspic microcontrollers (Target Blockset for dspic, PIC24 and PIC32) http://www.kerhuel.eu/rtwdspic/ The evaluation version is free, but allows only up to seven I/O pins SIM2LAB Rapid Embedded Solutions (Target Blockset for dspic33 family) http://www.sim2lab.com/s2l_dspic33.html The program is free MATLAB Device Blocks for MPLAB IDE http://www.microchip.com/developmenttools/productdetails.aspx?partno=sw007022 The demo version is free, but performs 30 sec wait before each program execution

Embedded Control Lab Experimentation Lab projects: The lab experiments are to be completed in groups of two in the Embedded Control Systems (ECS) lab (room E238) Must get the TA s signature after completing each lab The lab projects involve modeling/identification and control of an integrated DC motor/tacho-generator, using two different microcontrollers Arduino board (Atmega328p microcontroller) dspic30f4012 microcontroller hardware Both lab experiments must follow the MAD (modeling, analysis, design) process, using Matlab, Simulink, and other Mathworks toolboxes Details of the experiments are provided in the lab projects manuals Approx. dc motor specs: +/- 4000 RPM, 12V, L=7mH, R=10 ohm, kt=3.45 oz-in/a Power-card specs: dc input 12V, dc outputs +5V, GND, +12V, 0V, -12V Submit a concise lab report for each experiment, including the collected data, data analysis, system identification, control design, simulations and plots, and hardware implementation and verification

Lab Project Set-Up Host PC with Matlab, Simulink, RTW and Embedded Target Arduino or dspic30 uc y Opto- Isolator Signal Conditioning x H-Bridge Driver Tacho- Generator DC Motor The system consists of a dc motor, with an integrated tachometer (angular speed sensor), and is driven by an H-bridge driver The goal is to model and control the dc motor The system includes a microcontroller interfaced with the H- bridge driver and the tacho-generator, via an opto-isolator and a signal conditioning circuit The opto-isolator is to protect the low-power processor from high-power motor The signal conditioning circuit consists of a voltage divider and an op-amp, which is to scale and offset the measured speed to be compatible with the processor s ADC

Signal Conditioning Circuit For an ADC reference voltage of 5v and a tachometer with maximum 10v output, one gets: V REF : V y 0,5 volts; V TACH : V x 10,10 volts; m = V ymax V ymin = 5 V xmax V xmin 20 = 1 4 ; b = V ymax mv xmax = 5 10 4 = 2.5; then: V y = 1 4 V x + 2.5 The tacho signal needs to be quartered and given a 2.5v offset Inside the microcontroller, the inverse function must be used to determine the tachometer voltage from the ADC value: V y = 1 4 V x + 2.5; V x = 4(V y 2.5)

Motor Control Modeling Tools for system modeling System Identification Toolbox Identify the system model (approx. linear model) from observed I/O data The model includes motor, opto-isolator, H-bridge, tachometer, and signal conditioning circuit Simulink Design Optimization Toolbox Build a mathematical model of the system (possibly nonlinear) in Simulink or Simscape and adjust its parameter values to fit the I/O data Linearize the nonlinear model and determine its transfer function, using Simulink Control Design Toolbox Simscape model of the dc motor

Motor Control Design Tools for control design Control System toolbox and Robust Control Toolbox Design linear controllers for the linearized model of the system Use SISOTool for lead-lag, PID, pole-placement control design Simulink Design Optimization Toolbox Design linear controllers for the Simulink or Simscape model of the system, using auto-tuning tools For example PID auto-tuning Optimization Toolbox Design fixed-structure controller parameters by minimizing a cost For example, minimize an ITAE cost to adjust the parameters of a lead-lag control See Simulink Design Optimization Toolbox example at: Help Simulink Design Optimization Toolbox Demos Rotational inverted pendulum

Control Implementation Arduino development board Use Simulink and Arduino Target Blockset to write the program for I/O measurement, communication with the PC, via USB/serial port, and for uploading the code into Arduino dspic30f4012 microcontroller hardware Use Simulink and Lubin Kerhuel s dspic Target Blockset to write the program for I/O measurement and uploading the code into dspic MPLAB IDE must be installed for use by the dspic Target Blockset MPLAB ICD2 must be available for program download via USB Use Real-Term freeware for communication with the PC, via USB/serial port, for monitoring