Microcontrollers and Sensors. Scott Gilliland - zeroping@gmail



Similar documents
2.0 Command and Data Handling Subsystem

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

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

Computer Automation Techniques. Arthur Carroll

Chapter 13. PIC Family Microcontroller

Waspmote. Quickstart Guide

Bluetooth to serial HC-06 wireless module

Display Message on Notice Board using GSM

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

Using Xbee in Serial Communication

Tutorial for MPLAB Starter Kit for PIC18F

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard

Android Application Development and Bluetooth Technology

Chapter 12. Development Tools for Microcontroller Applications

USB / Data-Acquisition Module NOW LEAD-FREE

Ingar Fredriksen AVR Applications Manager. Tromsø August 12, 2005

EE318 Electronic Design Lab Project Report, EE Dept, IITB, April Wireless Microcontroller Programmer

Microtronics technologies Mobile:

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Microprocessor Project Laboratory

Example Connection between USB Host and Android

Synapse s SNAP Network Operating System

USB to RS-422/485 Serial Adapter

Lab Experiment 1: The LPC 2148 Education Board

A 5 Degree Feedback Control Robotic Arm (Haptic Arm)

Smart Home System Using Android Application

An Introduction to MPLAB Integrated Development Environment

Lab 3 Microcontroller programming Interfacing to Sensors and Actuators with irobot

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

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

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

INTRODUCTION TO SERIAL ARM

Fondamenti su strumenti di sviluppo per microcontrollori PIC

INTRODUCTION: ABSTRACT:

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

Test Driven Development of Embedded Systems Using Existing Software Test Infrastructure

Remote PLC system using GSM network with application to home security system

Questions from The New SensorTag - IoT Made Easy Webinar

Serial Communications

Wireless Home Security System

Controlling a Dot Matrix LED Display with a Microcontroller

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

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

Fachbereich Informatik und Elektrotechnik SunSPOT. Ubiquitous Computing. Ubiquitous Computing, Helmut Dispert

Android Controlled Based Interface

UG103.8 APPLICATION DEVELOPMENT FUNDAMENTALS: TOOLS

Soft processors for microcontroller programming education

Computer and Set of Robots

Microcontroller Programming Beginning with Arduino. Charlie Mooney

Am186ER/Am188ER AMD Continues 16-bit Innovation

Hand Gestures Remote Controlled Robotic Arm

obems - open source Building energy Management System T4 Sustainability Ltd

- 35mA Standby, mA Speaking pre-defined phrases with up to 1925 total characters.

Designing VM2 Application Boards

Design of Wireless Home automation and security system using PIC Microcontroller

AC-PG-USBASP USBASP AVR Programmer

Introducing AVR Dragon

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

Home Security System Using Gsm Modem

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

The $25 Son of a cheap timer This is not suitable for a beginner. You must have soldering skills in order to build this kit.

POCKET SCOPE 2. The idea 2. Design criteria 3

COMPUTER BASED REMOTE CONTROL FOR LAYOUT OF SCALED MODEL TRAINS

Wireless Communication With Arduino

Implementing a Digital Answering Machine with a High-Speed 8-Bit Microcontroller

ETRX3USB ETRX3USB-LRS ETRX3USB+8M ETRX3USB-LRS+8M PRODUCT MANUAL

Intelligent Home Automation and Security System

Designing Home Automation System (HAS) using Java ME for Mobile Phone

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

Data Transfer between Two USB Flash SCSI Disks using a Touch Screen

Yun Shield User Manual VERSION: 1.0. Yun Shield User Manual 1 / 22.

Obj: Sec 1.0, to describe the relationship between hardware and software HW: Read p.2 9. Do Now: Name 3 parts of the computer.

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

LEGO NXT-based Robotic Arm

Pre-tested System-on-Chip Design. Accelerates PLD Development

CB-OLP425 DEVELOPMENT KIT GETTING STARTED

SIP Protocol as a Communication Bus to Control Embedded Devices

FLYPORT Wi-Fi G

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

Wireless monitoring system for temperature and humidity based on ZigBee

Going Linux on Massive Multicore

ÇANKAYA ÜNİVERSİTESİ ECE 491 SENIOR PROJECT I ERDİNÇ YILMAZ

Bluetooth HC-06 with serial port module Easy guide

INTRODUCTION TO WIRELESS SENSOR NETWORKS. Marco Zennaro, ICTP Trieste-Italy

DATA LOGGER AND REMOTE MONITORING SYSTEM FOR MULTIPLE PARAMETER MEASUREMENT APPLICATIONS. G.S. Nhivekar, R.R.Mudholker

3. Programming the STM32F4-Discovery

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

Wireless Sensor Network for Electric Meter Handling

Wireless Security Camera

Alcalde # 1822 Col. Miraflores C.P Guadalajara, Jal. Mexico MX 01 (33) y USA 001 (619) (San Diego, CA.

PolyBot Board. User's Guide V1.11 9/20/08

Hardware Connections between Arduino and IMU Nori Wilkins Apr. 5, 2013

MCP4725 Digital to Analog Converter Hookup Guide

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

Locus digital DVB-T STB

Cell Phone Operated Land Rover

ET-BASE AVR ATmega64/128

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Board also Supports MicroBridge

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

Transcription:

Microcontrollers and Sensors Scott Gilliland - zeroping@gmail

Microcontrollers Think tiny computer on a chip 8 to 128 pins Runs on 3.3 to 5 Volts 8 to 20 Mhz Uses µw to mw of power ~ 4 kilobytes of flash memory ~ 256 bytes of RAM Lots of built-in hardware Analog voltage readings Communication: I2C, Serial, USB device Cheap - $5 Small Programmable (actual size: ) Often in C or Assembly

How Your Code Gets from Here to There (on a regular Linux computer) C compiler C code (gcc) Libc Compiled Executable (on disk) Operating System (things like printf) Other Libraries (for anything not in libc) I386 processor

How Your Code Gets from Here to There (on an Atmel Atmega) C code C compiler (on your desktop) avr-libc (things like sprintf) (gcc-avr) Compiled Executable (.hex file) Programmer Other Libraries (for anything not in libc) Microcontroller (in flash memory)

How Your Code Gets from Here to There (on an Atmel Atmega) C code C compiler (on your desktop) (gcc-avr) avr-libc (things like sprintf) Compiled Executable (.hex file) Programmer Other Libraries (for anything not in libc) One big difference: there is no OS Your code has full run of the processor There is no OS-level threading Microcontroller (in flash memory)

Atmega Programming USB In-System-Programmer Reads and writes flash memory 6-pin connector to the Atmega You need to wire this up yourself Provide your own power to the system We have several USB In-System-Debugger Full on-chip debugging 10-pin connector to the Atmega More expensive We haven't needed to buy one yet

A word on Avr-Libc[1] Includes many things you get from regular Libc stdio.h, string.h: printf family stdlib.h, math.h: Malloc, normal C math But not all No Files No Standard Out Microcontroller-specific parts Read high or low voltage levels on pins Drive pins high or low Access to hardware registers Many hardware modules in the Atmega each with hardware registers Needed to do everything listed in the datasheet[2] Interrupts 1.http://www.nongnu.org/avr-libc/ 2.For example: http://www.atmel.com/dyn/resources/prod_documents/doc2467.pdf

Examples

An Example: Textile Touch-button Sensing Controls Input/Output pins to do Capacitive sensing Basically measures the capacitance of a line Uses the USART module of the microcontroller Acts much like an old serial port on a desktop Uses two pins TX and RX Similar to RS232 different voltage levels Uses a USB-to-serial converter One specifically made for our +5 volt signaling Shows up as a file (/dev/ttyusbn) to a Linux machine; as COMn to Windows Main program is just a while(forever) loop Senses the capacitance of 4 line Writes a few values to the computer over serial

Atmel Atmega 128

Sparkfun FT232R Breakout Board

Another Example: Gesture Watch Sensing using 5 IR proximity sensors Digital proximity sensors On/Off 0V when nothing nearby +5V when there is something nearby Uses a Serial-Bluetooth module Hooks up to the USART module of the Atmega Shows up as a Bluetooth serial device /dev/rfcommn under Linux Main program is initialization plus a while loop Puts the Bluetooth module into discoverable mode This is done by sending AT+BTMODE3 Senses the state of 5 lines Writes a few values to the Bluetooth module over serial

Sharp IR Proximity Sensors

Atmel Atmega 128

Sena Wireless ESD-100 Bluetooth-to-Serial module

Dlink USB Bluetooth Adapter

A Final Example: BlueSense Accelerometers Designed due to lack of small, low-power Bluetooth accelerometers Measure movement in 3 directions Also has capacitive sensing ability Build to be extensible Centered around a BlueCore microcontroller A microcontroller with a Bluetooth radio built in Uses I2C to communicate with accelerometer and capacitive sensor

A word on BlueCore Microcontrollers Pros: Tiny Integrated Bluetooth radio Fewer parts to put together

A word on BlueCore Microcontrollers Cons: Too tiny You need to have a custom-made board to solder down Hard to develop for Proprietary compiler, weird assembly Difficult radio design for anyone not an Electrical Engineer

I2C Communication Protocol Master/Slave protocol for chips on the same board Uses 2 wires (3 if you count ground) Most microcontrollers support it Including the Atmega The I2C library from the 'wiring' project works great Protocol is left up to the device It's in the datasheet somewhere Often defines how to read and write to register addresses Ex: Accelerometers have several control registers, and registers for X, Y, and Z axes.

Overall Lessons Go with the simplest solution that works Wired communication is the easiest A Bluetooth module complicates the design a small amount A Bluetooth-enabled microcontroller complicates the design by an order of magnitude Sometimes, this means not building anything new We already have Bluetooth accelerometers and capacitive sensors We have Wiimotes We have serial bitwackers - USB-controlled I/O lines