Activity 4: Due before the lab during the week of Feb

Similar documents
MSP430 Interfacing Programs

Citrus Circuits Fall Workshop Series. Roborio and Sensors. Paul Ngo and Ellie Hass

In this lecture, we will look at how different electronic modules communicate with each other. We will consider the following topics:

Systems & Devices Part 1

MSP430 Teaching Materials

INF8574 GENERAL DESCRIPTION

Training Schedule. Robotic System Design using Arduino Platform

Today's plan: Announcements: status report, midterm results op-amp wrap-up Comparators Measuring capacitance Powering your project

Embedded Robotics. Software Development & Education Center

I 2 C RedBot & DC Motor Servo Motor Control

Roland Kammerer. 13. October 2010

Designing with STM32F3x

ECE 511: MICROPROCESSORS

802.11g Wireless Sensor Network Modules

DNT24MCA DNT24MPA. Low Cost 2.4 GHz FHSS Transceiver Modules with I/O. DNT24MCA/MPA Absolute Maximum Ratings. DNT24MCA/MPA Electrical Characteristics

WDTCTL = WDTPW + WDTHOLD; P1DIR = 1; // P1.0 output, all others input. sits here as long as the pin is high while (P1IN & 8); while (!

Electronics / Water analogy. Resistor. Inductance. Capacitor. Water Electronics Energy - Energy Pressure - Voltage Flow - Current Volume - Charge

Control of Electrical Lights and Fans using TV Remote

Arduino Microcontroller Processing for Everyone!: Third Edition / Steven F. Barrett

Hello, and welcome to this presentation of the STM32L4 comparators. It covers the main features of the ultra-lowpower comparators and some

A Low-Cost Li-Fi Communication Setup

MOSFET as a Switch. MOSFET Characteristics Curves

Wednesday 7 June 2017 Afternoon Time allowed: 1 hour 30 minutes

ZKit-51-RD2, 8051 Development Kit

Interfacing to External Devices

EXPERIMENT 12: DIGITAL LOGIC CIRCUITS

SGD 70-A 7 PanelPilotACE Compatible Display

EE445L Fall 2014 Quiz 2A Page 1 of 5

o What happens if S1 and S2 or S3 and S4 are closed simultaneously? o Perform Motor Control, H-Bridges LAB 2 H-Bridges with SPST Switches

I2C Demonstration Board I 2 C-bus Protocol

Mapping Peripheral Capabilities When Migrating From 8-bit to 16-bit PIC MCUs

EE445L Fall 2011 Quiz 2A Page 1 of 6

DASL 120 Introduction to Microcontrollers

DS1807 Addressable Dual Audio Taper Potentiometer

MCT U.I. Driver Reference Manual Motor Control Technologies; LLC

Characteristic Sym Notes Minimum Typical Maximum Units Operating Frequency Range MHz. RF Chip Rate 11 Mcps RF Data Rates 1, 2, 5.

International Journal of Advance Engineering and Research Development

Experiment (1) Principles of Switching

3.3V regulator. JA H-bridge. Doc: page 1 of 7

DNT2400. Low Cost 2.4 GHz FHSS Transceiver Module with I/O

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 11 Motor Control

Specifications.

Appendix 1. Basic Electronics. The PIC Hardware. Using Transistors (Basic Electronics)

6. HARDWARE PROTOTYPE AND EXPERIMENTAL RESULTS

DNT90MCA DNT90MPA. Low Cost 900 MHz FHSS Transceiver Modules with I/O

EECE494: Computer Bus and SoC Interfacing. Serial Communication: RS-232. Dr. Charles Kim Electrical and Computer Engineering Howard University

Introduction to the Arduino Kit

Oct 30 Announcements. Bonus marked will be posted today Will provide 270 style feedback on multiple-choice questions. [3.E]-1

Castle Creations, INC.

Motor Drive Business Unit Gem Li Marketing Manager

CHAPTER-5 DESIGN OF DIRECT TORQUE CONTROLLED INDUCTION MOTOR DRIVE

Embedded Systems. Oscillator and I/O Hardware. Eng. Anis Nazer First Semester

Page 1. Relays. Poles and Throws. Relay Types. Common embedded system problem CS/ECE 6780/5780. Al Davis. Terminology used for switches

Hardware Platforms and Sensors

Solid State Devices (2)

Programming and Interfacing

EE445L Fall 2012 Final Version B Page 1 of 7

DNT900. Low Cost 900 MHz FHSS Transceiver Module with I/O

MSP430 Family Mixed-Signal Microcontroller Application Reports

SGD 70-A 7 PanelPilotACE Compatible Display

3U High, 19" Drive Rack

2F. No.25, Industry E. 9 th Rd., Science-Based Industrial Park, Hsinchu, Taiwan Application Note of OGM220, AN001 V1.8

Mechatronics Laboratory Assignment 3 Introduction to I/O with the F28335 Motor Control Processor

R & D Electronics DIGITAL IC TRAINER. Model : DE-150. Feature: Object: Specification:

Ocean Controls KT-5221 Modbus IO Module

PLC-K506 Series FEATURES DESCRIPTION FEATURES

Application Note Using MagAlpha Devices to Replace Optical Encoders

Ocean Controls KT-5198 Dual Bidirectional DC Motor Speed Controller

EE445L Fall 2014 Quiz 2B Page 1 of 5

Lesson UART. Clock Systems and Timing UART (Universal Asynchronous Receiver-Transmitter) Queues Lab Assignment: UART

I2C Encoder. HW v1.2

LP3943/LP3944 as a GPIO Expander

RX23T inverter ref. kit

IGBT based Multiport Bidirectional DC-DC Converter with Renewable Energy Source

Dual Protocol Transceivers Ease the Design of Industrial Interfaces

Lecture #4 Outline. Announcements Project Proposal. AVR Processor Resources

Phys Lecture 3. Power circuits how to control your motors Noise and Shielding

SPI, Talking to Chips, and Minimizing Noise

The Development and Application of High Compression Ratio Methanol Engine ECU

Servo click. PID: MIKROE 3133 Weight: 32 g

the elektor datasheet collection

Single-phase Variable Frequency Switch Gear

MD04-24Volt 20Amp H Bridge Motor Drive

Web-Enabled Speaker and Equalizer Final Project Report December 9, 2016 E155 Josh Lam and Tommy Berrueta

MD03-50Volt 20Amp H Bridge Motor Drive

DC Motor-Driver H-Bridge Circuit

Npaq Series Drive Racks

PNI Axis Magneto-Inductive Sensor Driver and Controller with SPI Serial Interface. General Description. Features.

EE445L Fall 2014 Quiz 2A Page 1 of 5

AC Current click PID: MIKROE Weight: 27 g

Trademarks & Copyright

DIGITAL ELECTRONICS ANALOG ELECTRONICS

DC-Motor Driver circuits

KNC-PLC-K506 Series FEATURES DESCRIPTION FEATURES

Vacuum Tubes. BJT or FET. Transistor Configurations. Depends on application Amplifiers

16-Port I/O Expander with LED Intensity Control, Interrupt, and Hot-Insertion Protection

ELCT 912: Advanced Embedded Systems

RF4432 wireless transceiver module

Debugging a Boundary-Scan I 2 C Script Test with the BusPro - I and I2C Exerciser Software: A Case Study

32-bit ARM Cortex-M0, Cortex-M3 and Cortex-M4F microcontrollers

Transcription:

Today's Plan Announcements: Lecture Test 2 programming in C Activity 4 Serial interfaces Analog output Driving external loads Motors: dc motors, stepper motors, servos

Lecture Test

Activity 4: Due before the lab during the week of Feb 12-13. Complete the C program below so that it will: 1) configure pin P1.0 as an output and P1.3 as an input. 2) then enter a loop that continuously reads the P1.3 value. Each time the program sees a change from Low to High, it should toggle the P1.0 output. #include <msp430.h> int main(void){ WDTCTL = WDTPW + WDTHOLD; while(1){ } }

Anchor chain controller Project idea

Serial interfaces Many sensors use standard interfaces such as I 2 C (inter-integrated circuit) or SPI (serial peripheral interface) to talk to the microcontroller. The MSP430 has a module that can ease using these interfaces (Universal Serial Communication Interface, USCI, which can speak: I 2 C, SPI and UART).

Texas Instruments MSP430 LaunchPad MSP430G2231 Seraial ports are build into m http://www.ti.com/tool/msp-exp430g2

UART: Universal Asynchronous Receiver/Transmitter 11011001 start bit stop bit - 3 lines for bi-directional communication: ground, transmit, receive - start bit is always low, stop bit is always high. - usually have 8 data bits in between, (but sometimes 5 or 6 or 7) - least significant bit first, most significant bit last - sometimes there is parity bit after the data The USCI can output bytes and decode incoming bytes. - to transmit a byte, just write it to UCA0TXBUF = byte; - to receive a byte, set up interrupt to trigger when byte received, then read from receive buffer: byte = UCA0RXBUF;

SPI: Serial Peripheral Interface SCLK: clock from master MOSI: Master out, slave in MISO: Master in, slave out. Slave Select On every toggle of the clock, bits are transmitted in both directions, though not always useful. Communications controlled completely by the master. point-to-point, one master, one slave.

I2C: Inter-integrated Circuit SDA serial data SCL serial clock Both lines are open-drain, pulled up with pull-up resistors data line changes when clock is held low. I2C is a bus: can be multiple masters, multiple slaves on the bus.

Analog Output: The MSP430G2553 doesn't have a DAC. If you want an adjustable analog output, there are a couple of options: Add an external DAC (serial or parallel) low-pass filter a PWM output. R + - PWM output C 2 nd order Low-pass filter

Analog Output: Parallel DAC: eg TLC7528, Dual 8bit multiplying digital to analog converter.

DAC: TLC7528

TLC7528 is a current DAC:

But it can be used in a voltage-output mode.

Controlling things with the microcontroller MSP430 P1.x maximum output current: +/- 6 ma (x 3.3V = 20mW) To drive external loads that are more demanding than logic chips, the MSP430 Some possibilities: Beefier logic op-amps Buffer/driver Transistor (bipolar or MOSFET) opto-isolators Relay Solid-state relay H Bridge chip (eg for bi-directional motors) REFERENCE: The Art of Electronics (Horowitz and Hill)

Controlling things with the microcontroller Driver eg SN75451 up to 300 ma usage: +5 - +30V Load logic 1/2 75451

Driving loads: Transistors V+ eg 2N3904 max Ic ~ 100 ma Load V+ A bit more current V+ Load V+ Load maximum current: how much do you want? N-channel mosfet

Driving loads: Transistors V+ eg 2N3904 max Ic ~ 100 ma Load V+ A bit more current V+ Load V+ Inductive loads require that you protect the transistor with a diode! Load maximum current: how much do you want? N-channel mosfet

Driving loads: Optoisolators V+ V+ Logic input 4N36, low current, but good isolation

Driving loads: Relays The diode is essential to prevent destroying the transistor on turn-off! logic There are some small low-current relays that can be driven directly by logic chips, again, a diode is essential to protect the logic circuit from the inductive spike on turn-off!

Driving loads: Solid-state Relays good for AC, large loads, fast, repeated switching (expensive, may need a heat sink), Often will synchronize to line voltage. eg Crydom D2425: 280VAC, 25A! $44

Driving loads: Solid-state Relays good for AC, large loads, fast, repeated switching (expensive, may need a heat sink), Often will synchronize to line voltage. eg Crydom D2425: 280VAC, 25A! $44 Be careful buying solid-state relays on the grey (Ebay etc) market, there are many 'fakes' out there.