Interfacing Sensors & Modules to Microcontrollers

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

Training Schedule. Robotic System Design using Arduino Platform

Project Final Report: Directional Remote Control

Tarocco Closed Loop Motor Controller

EE 314 Spring 2003 Microprocessor Systems

Serial Servo Controller

Exercise 3: Sound volume robot

G3P-R232. User Manual. Release. 2.06

B Robo Claw 2 Channel 25A Motor Controller Data Sheet

Multi-Sensor Integration and Fusion using PSoC

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

EVDP610 IXDP610 Digital PWM Controller IC Evaluation Board

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

Applications. Operating Modes. Description. Part Number Description Package. Many to one. One to one Broadcast One to many

B RoboClaw 2 Channel 30A Motor Controller Data Sheet

DASL 120 Introduction to Microcontrollers

DMP Electronics Inc Robotic Division

DISCONTINUED. Modulation Type Number of RF Channels 15

ZKit-51-RD2, 8051 Development Kit

Master Op-Doc/Test Plan

RF4432 wireless transceiver module

Hardware Flags. and the RTI system. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

Project Name Here CSEE 4840 Project Design Document. Thomas Chau Ben Sack Peter Tsonev

Motor Control Demonstration Lab

1. The decimal number 62 is represented in hexadecimal (base 16) and binary (base 2) respectively as

Pico-Satellite Training Kit HEPTA-Sat: Hands-on Practices for Space Engineering

EE445L Fall 2014 Quiz 2B Page 1 of 5

CSR Bluetooth Modules SBC05-AT. Specification. Version July-11

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

X3M. Multi-Axis Absolute MEMS Inclinometer Page 1 of 13. Description. Software. Mechanical Drawing. Features

ZX Distance and Gesture Sensor Hookup Guide

RY836AI. High Performance GPS & Glonass / GPS & BeiDou Parallel mode antenna module with Compass, Gyroscope, Accelerometer, Pressure Sensor.

Index Terms IR communication; MSP430; TFDU4101; Pre setter

Sensors Fundamentals. Renesas Electronics America Inc Renesas Electronics America Inc. All rights reserved.

Ocean Controls KT-5221 Modbus IO Module

ADVANCED EMBEDDED MONITORING SYSTEM FOR ELECTROMAGNETIC RADIATION

SNIOT702 Specification. Version number:v 1.0.1

Preliminary Design Report. Project Title: Search and Destroy

802.11g Wireless Sensor Network Modules

Brian Hanna Meteor IP 2007 Microcontroller

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

CSR Bluetooth Modules MB-C05-A2DP MB-C05-AT

GP4 PC Servo Control Kit 2003 by AWC

APDS-9960 RGB and Gesture Sensor Hookup Guide

HAW-Arduino. Sensors and Arduino F. Schubert HAW - Arduino 1

AT-XTR-7020A-4. Multi-Channel Micro Embedded Transceiver Module. Features. Typical Applications

DISCONTINUED. Modulation Type Number of RF Channels 15

The Datasheet and Interfacing EE3376

IMU: Get started with Arduino and the MPU 6050 Sensor!

Hardware Platforms and Sensors

PLC-K506 Series FEATURES DESCRIPTION FEATURES

EE445L Fall 2014 Quiz 2A Page 1 of 5

The Information contained herein is subject to change without notice. Revisions may be issued regarding changes and/or additions.

III. MATERIAL AND COMPONENTS USED

SMARTALPHA RF TRANSCEIVER

EITF40 Digital and Analogue Projects - GNSS Tracker 2.4

International Journal of Advance Engineering and Research Development

PAK-Vb/c PWM Coprocessor Data Sheet by AWC

RN-21. Class 1 Bluetooth Module. Applications. Features. Description. Block Diagram. DS-RN21-V2 3/25/2010

Dynamic Wireless Decorative Lights

Jaguar Motor Controller (Stellaris Brushed DC Motor Control Module with CAN)

MY-ZB010C UART to ZigBee Module

ASCOM EF Lens Controller

Catalog

Lab Exercise 9: Stepper and Servo Motors

Master Thesis Presentation Future Electric Vehicle on Lego By Karan Savant. Guide: Dr. Kai Huang

EE445L Fall 2014 Quiz 2A Page 1 of 5

KNC-PLC-K506 Series FEATURES DESCRIPTION FEATURES

Study of M.A.R.S. (Multifunctional Aero-drone for Remote Surveillance)

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

Wide Range Voltage to Frequency Converter using PSoC3 Microcontroller

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

DS1307ZN. 64 X 8 Serial Real Time Clock PIN ASSIGNMENT FEATURES

YDLIDAR G4 DATASHEET. Doc#: 文档编码 :

DESCRIPTION DOCUMENT FOR WIFI / BT HEAVY DUTY RELAY BOARD HARDWARE REVISION 0.1

Generating DTMF Tones Using Z8 Encore! MCU

RN-41. Class 1 Bluetooth Module. Features. Applications. Description. Block Diagram. DS-RN41-V3.

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

IST TSic Temperature Sensor IC. Technical Notes ZACwire Digital Output

Cost efficient design Operates in full sunlight Low power consumption Wide field of view Small footprint Simple serial connectivity Long Range

RN-41-SM. Class 1 Bluetooth Socket Module. Features. Applications. Description. Block Diagram. rn-41sm-ds 9/9/2009

USER'S MANUAL. Model : K

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

Electronics Design Laboratory Lecture #10. ECEN 2270 Electronics Design Laboratory

Figure 1: One Possible Advanced Control System

BW-IMU200 Serials. Low-cost Inertial Measurement Unit. Technical Manual

Embedded Robotics. Software Development & Education Center

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K.

FABO ACADEMY X ELECTRONIC DESIGN

Introduction to the Arduino Kit

RF4463F30 High Power wireless transceiver module

PIC Functionality. General I/O Dedicated Interrupt Change State Interrupt Input Capture Output Compare PWM ADC RS232

Cost efficient design Operates in full sunlight Low power consumption Wide field of view Small footprint Simple serial connectivity Long Range

RF ISM Transparent Transceiver Module V4.0

Brushed DC Motor Control. Module with CAN (MDL-BDC24)

OS3D-FG MINIATURE ATTITUDE & HEADING REFERENCE SYSTEM MINIATURE 3D ORIENTATION SENSOR OS3D-P. Datasheet Rev OS3D-FG Datasheet rev. 2.

VT System. Product Information

Application Note. Communication between arduino and IMU Software capturing the data

Roland Kammerer. 13. October 2010

Controlling DC Brush Motor using MD10B or MD30B. Version 1.2. Aug Cytron Technologies Sdn. Bhd.

Transcription:

Interfacing Sensors & Modules to Microcontrollers Presentation Topics I. Microprocessors & Microcontroller II. III. Hardware/software Tools for Interfacing Type of Sensors/Modules IV. Level Inputs (Digital ON/OFF ) V. Example 1: Interfacing Random Pulses From Radiation Detector VI. VII. VIII. IX. Example 2: Interfacing Pulse Inputs with Coded Information Synchronous & Asynchronous Communication Using Bluetooth SPP with Virtual Com Ports, Android Cell Phones/Tablets Interfacing Motion Sensing Devices X. Example 3: Wing Control Actuating System Catastrophe Avoidance

Microprocessors/Microcontrollers The first complete single-chip microprocessor, Intel's 4004, was introduced in 1971 Gary Boone of Texas Instruments was working on quite a similar concept and invented the microcontroller- TMS1802NC Microprocessor- a central processor on a chip Building block to create a computing devices ROM, RAM, I/O Ports, decoding logic are added to the bus system Microcontroller - a chip that contains a central processor plus RAM, ROM, I/O Ports Microcontrollers are a complete computing/processing system Can be programmed in assembler, C, and in many high-level languages Interfacing involves attaching I/O devices (sensors and modules) to I/O Ports The internal bus system is not available to attach I/O devices

Interfacing Sensors & Modules to Microcontrollers GENERALLY REQUIRES SOFTWARE/HARDWARE TOOLS USEFUL TOOLS

Hardware Tools Breadboards come in all shape and Sizes Adapter PCB converter boards available for most MCU s footprints PCB boards designed for specific MCU Eagle Software Temperature controlled soldering iron SMD devices Wire wrap Gun Hot Air rework gun Digital multimeter Oscilloscope

Software Tools Eagle Software creating PCB boards Limited to 2 schematic sheets, 2 signal layers, and 80 cm 2 board area Tera Term Terminal emulator ASCII serial communication Realterm - Serial and TCP terminal for engineering and debugging Bluetooth SPP Pro android phone/tablet

Off the Shelf Adapter PCB Converter Boards

PCB Boards Designed for Specific MCU

Name That Sensor/Module 1 2 3 4 6 5 7 8

INTERFACING LEVEL & COMMUNICATION DEVICES LEVEL DEVICES (Digital ON/OFF ) INPUT(s) One or more digital inputs hardwired to pins Can be switch closures or pulses random or otherwise PULSES Carry no other information other than the occurrence of an event Pulse Width (or Pulse Position) contains coded information - in RC (Radio Control) pulse width contains data to position an RC servo motor

Processing Events POLLING Pin(s) are continuously read until a change of state takes place Useful to initiate a start up Not very useful when other tasks need to be done INTERRUPS An interrupt occurs when a change of state occurs in a hardwired pin The CPU saves its current state and immediately services the interrupt MCUs have many internal/external interrupts and are serviced according to priority

Interfacing Random Pulses From Radiation Detector Project Background 207 Pachube IoT Nuclear accident in Japan 2011 Xively Pachube -> LogMeIn Cosm >Xively 2013 Xively Public Cloud for the IoT 2018 Xively purchased by Google

Interfacing Random Pulses From Radiation Detector THEORY The measurement of ionizing radiation is sometimes expressed as being a rate of counts per unit time. For low level of ionizing radiation, it is convenient to use counts per minute (CPM). Pulses from Radiation Detector are random ranging 0 CPM to many CPM

Interfacing Random Pulses From Radiation Detector PROGRAM DESCRIPTION INPUT One hardwired pin configured to generate an interrupt on each leading edge of the random pulses On Pin Interrupt - Count variable is increased by 1 - Interrupt is reset TIME WINDOW Generated by a PWM (pulse width modulator) PWM runs continuously independent of current code being executed by CPU PWM generates a software interrupts at the end of each time window Sets a Flag - Count is ready for processing - Software Interrupt is reset MAIN PROGRAM Initializes variables Loop on Flag (waits for a PWM to set Flag) Process data Display results Back to Loop

Interfacing Random Pulses From Radiation Detector Program Radiation Monitor Using Cypress PSOC4

Interfacing Pulse Inputs with Coded Information ENCODING/DECODING PWM of RADIO CONTROLLED (RC) SERVO MOTORS RC Servo Motors have may used including Radio controlled boats, planes, cars, robotics, cat/dog doors Are of special interest because they are easily controlled by MCUs without the need of a Radio TX Come in all sizes, are inexpensive and can be modified internally for special applications A servo motor can be positioned by a MCU by suppling a PERIODIC PULSE in a specified time frame of 20 ms - 50 Hz The actual WIDTH of the PULSE (coding)determines the amount of rotation of a servo motor about a neutral axis.

Interfacing Pulse Inputs with Coded Information

Interfacing Pulse Inputs with Coded Information The Pulse width to position a servo motor ranges from 1 MS to 2 MS or 5% to 10% of the period A convenient and flexible way is to use a 16-bit PWM The Period of the PWM to 20 MS and not varied The pulse width is then varied according to required position

Interfacing Pulse Inputs with Coded Information Demonstration Program Uses a 16-bit PWM At design time the period is set to 20 MS. The Pulse width set to 1.5 MS On power up, the program waits for a switch closure On each switch closure the servo motor cycles from extreme left, neutral, to extreme right corresponding to a rotation of -60 o to 0 o to +60 o

Decoding Radio Controlled Pulses from a Receiver RC Receiver RC Servo Mystery Device Decoding the Pulse width has many interesting applications The angular velocity of an RC Servo Motor can be reduced The Mystery Device can be A DC motor whose speed is proportional to the Pulse Width A mechanical/electronic relay with OFF/ON function controlled by Pulse Width

Decoding Radio Controlled Pulses from a Receiver Demo Program Rate Reducer Input Hardwired pin from receiver Configured for Interrupts 16-bit Down Counter Initialized and clocked to produce a count corresponding to a time in the range of 1 MS to 2 MS Output Hardwired pin(s) to hardware device

INTERFACING LEVEL & COMMUNICATION DEVICES Serial communication is either Synchronous or Asynchronous Synchronous serial communication uses a clock 4-wire SPI - Motorola 3-wire SPI- Maxim IC 2-wire I2C Phillips Semiconductor 1-wire Dallas Semiconductor 2- wire specific - Avia Semiconductor -HX711 1-wire analog bus -DTMF

INTERFACING LEVEL & COMMUNICATION DEVICES Asynchronous communication does not a clock Communication needs to be set to one of the standard communication rates (baud rate) Baud rates range from 110 to 25600 bits/sec with tolerance deviation of approximately 6% RS-232 2-wire unbalanced & referenced to ground RS-485 2-wire differential pair signals that improve noise immunity and distance

Interfacing Bluetooth SPP Bluetooth SPP Emulates a serial cable to provide a simple substitute for existing RS-232, communication including the familiar control signals "A serial cable is replaced by a secure wireless connection" SPP Bluetooth Transceiver Modules are designed to connect to MCUs using RS-232 communication (UART Tx/Rx of an MCU) Bluetooth Transceiver Modules can connect with each other or to PC, Cell Phones and Tablets For Android devices download and install Bluetooth spp Pro. It s free.

Interfacing Bluetooth SPP Hardware Requirements One SPP Module (for cell phone/tablet) or two SPP Modules (using 2 MCUs) Modules come in many forms Some are transceivers (Tx & Rx) Some are individual Tx or Rx Some have fixed BAUD rates The HC-05 is transceiver with baud rates up to 115200 USB to Serial Converter Module Modules plug into a USB port of a PC The output of the modules are the RS-232 pins Example- Mini FT232RL 3.3V 5.5V FTDI Pins: DTR, RXD, TX, VCC, CTS, GND

Interfacing Bluetooth SPP HC-05 Bluetooth Module FTDI USB to Serial Converter

Interfacing Bluetooth SPP The HC-05 Bluetooth Module HC-05 Bluetooth Modules are NOT ALL the same Pin names and order may be different Some have a binding switch Default Settings of HC-05 Baud Rate: 1200, Data Word:8 bits, Parity: none, Stop Bit: 1 PW 1234 Slave Changing Default Settings Done by AT Commands Demo Viewing and changing settings of a HC-05 SPP Module

Interfacing Bluetooth SPP Demos Viewing and changing settings of a HC-05 SPP Module Cell Phone/Tablet

Interfacing Bluetooth SPP Cell phone/tablet

Interfacing Bluetooth SPP Cell phone/tablet

INTERFACING MOTION SENSING DEVICES BASED ON MEMS TECHNOLOGY MEMNS Micro-Electro-Mechanical Systems Devices and structures that are made using the techniques of microfabrication MEMS SENSING DEVICES INCLUDE Accelerometers, Gyroscopes, Magnetometers, Pressure Combination of two or more of the above Examples MMA7455 Tri-Axial accelerometer (3 DOF) MPU-6050 (6 DOF) accelerometer & gyroscope LSM9DSO -Adafruit accelerometer, gyroscope magnetometer ADIS16480 (Analog Devices) -Ten DOF

INTERFACING MOTION SENSING DEVICES BASED ON MEMS TECHNOLOGY COMMON FEATURES Supply voltage 5 v or 3.0 V to 3.6 V I/O pins 3.0 V to 3.6 V max Communication is Synchronous I 2 C, SPI, usually both

Interfacing MMA7455 Tri-Axial accelerometer Using I 2 C Communication I 2 C Communication Popular because of its simplicity More software overhead Uses two signal wires with Pull Up resistors for communication Communication speed can be 100 KHz or 400 KHz There can be only one Master and many Slave Master initiates ALL communication

Interfacing MMA7455 Tri-Axial accelerometer Using I 2 C Communication l

Interfacing MMA7455 Tri-Axial accelerometer Using I 2 C Communication MMA7455 Module

Interfacing MMA7455 Tri-Axial accelerometer Using I 2 C Communication MMA7455 Module Schematics

Interfacing MMA7455 Tri-Axial accelerometer Using I 2 C Communication Features Digital Output (I2C/SPI) Low Current Consumption: 400 μa Self-Test for Z-Axis Low Voltage Operation: 2.4 V 3.6 V Level Detection for Motion Recognition (Shock, Vibration, Freefall) Pulse Detection for Single or Double Pulse Recognition Selectable Sensitivity (±2g, ±4g, ±8g) for 8-bit Mode

Interfacing MMA7455 Tri-Axial accelerometer Using I 2 C Communication Communication Protocol All communication from and to the Master is in packets of 8 bits Communication is initiated by the Master by sending a Start to the Slave using a 7 bit address Plus a R/W bit (0 /1) R/W bit indicates whether to Write to or Read from the Slave Slave acknowledges by sending AK Communication continuous with Master sending the address of the register to write or read from followed by data Communication is terminated by the Master sending a Stop Condition

Interfacing MMA7455 Tri-Axial accelerometer Using I 2 C Communication Example: To set Sensitivity ±2g Master Writing to a Single of the MMA7455L (R/W bit MSB)

Interfacing MMA7455 Tri-Axial accelerometer Using I 2 C Communication Example: To read the acceleration on the x-axis Master Reading from a Single Register of the MMA7455L (R/W bit MSB)

Wing Control Actuating System Catamarans Flip!

Wing Control Actuating System Project Uses Two Separate Controllers Linked by Bluetooth Master Controller Reads X.Y,Z Acceleration at a regular timed interval Transmits to the Slave Module one of two control codes based on pre-set limits on each of the three axis Control codes indicate normal condition- do nothing or remove RC from operator

Wing Control Actuating System Slave Controller Continuously reads Control Codes from Master Controller Under Go conditions the RC signal from receiver is decoded by the MCU and passed on to the servo controlling the tail. Operator has full RC control Under No Go the MCU RC signal is replaced by a 1 ms pulse to put the tail in Neutral position

Wing Control Actuating System Controller Used In This Project

Wing Control Actuating System Program Demo

END