Using Sensors with the RoboRIO

Similar documents
Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this?

Team 2228 CougarTech 1. Training L2. Software Environment

Prototyping Module Datasheet

AK-DS2482S-100. Reference manual. Copyright 2016 Artekit Italy All rights reserved

Explorer V1.20. Features

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

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

Doc: page 1 of 6

VL6180 Hookup Guide. Introduction. Board Overview - VL6180 Breakout. Covered in this Tutorial. Suggested Reading

Introduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications

Embedded Systems and Software. Serial Interconnect Buses I 2 C (SMB) and SPI

Raspberry Pi - I/O Interfaces

ARDUINO MICRO WITHOUT HEADERS Code: A000093

Growing Together Globally Serial Communication Design In Embedded System

keyestudio Keyestudio MEGA 2560 R3 Board

Parallax LSM9DS1 9-axis IMU Module (#28065)

PCB-STM32-F3U. Development baseboard for the STMicro Discovery-F3 module (STMicro part# STM32F3DISCOVERY)

Doc: page 1 of 8

Voltage Regulator Board User Guide

1.6inch SPI Module user manual

Serial Peripheral Interface. What is it? Basic SPI. Capabilities. Protocol. Pros and Cons. Uses

Real-Time Embedded Systems. CpE-450 Spring 06

General-Purpose Microcontroller Module 12a Hardware Reference Release 1.4a (October 11, 2017)

2011 FIRST Robotics Competition Sensor Manual

Microcontrollers and Interfacing

Introduction to I2C & SPI. Chapter 22

or between microcontrollers)

ARDUINO MICRO PINS associated functions

Various power connectors. 3.3V regulator. 64K Flash (Internal) 2K EEPROM (Internal) 4K SRAM (Internal) JA Mem Adr/ Data. Doc: page 1 of 9

LIS3DH Hookup Guide. Introduction. SparkFun Triple Axis Accelerometer Breakout - LIS3DH SEN Required Materials

Pridgen Vermeer Robotics Xmega128 Manual

Modern Robotics Inc. Sensor Documentation

Embedded Workshop 10/28/15 Rusty Cain

Gumstix Pi HAT Sensor board

Interfacing Techniques in Embedded Systems

How to create your own peripheral modules for use with the ARC EMSK and embarc

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front

MTi 1-series Development Kit

Overview. Functional Description. Calidad en nuestros productos. Tecnología a su servicio.

MC3635 FEATURES GENERAL DESCRIPTION

Ken Foust Intel. A Developer s Guide to MIPI I3C SM for Sensors and Beyond

MultiConnect OCG. Break-Out Board. Developer s Guide

EPT-200TMP-TS-U2 TMP102 Temperature Sensor Docking Board Data Sheet

How to Use an Arduino

ZigBee Compliant Platform 2.4G RF Low Power Transceiver Module for IEEE Standard. DATA SHEET Version B

ARDUINO MEGA ADK REV3 Code: A000069

COOKING WITH TEAM 279

4X4 Driver Shield Manual

Color 7 click. PID: MIKROE 3062 Weight: 19 g

Arduino ADK Rev.3 Board A000069

Cerebot Nano Reference Manual. Overview. Revised April 15, 2016 This manual applies to the Cerebot Nano rev. A

Doc: page 1 of 6

Understanding SPI with Precision Data Converters

Revision: 05/05/ E Main Suite D Pullman, WA (509) Voice and Fax. Various power connectors. 3.3V regulator

Arduino Uno R3 INTRODUCTION

Hardware Reference Manual

Lecture 25 March 23, 2012 Introduction to Serial Communications

Interfacing to Digital Potentiometers

DS WIRE INTERFACE 11 DECOUPLING CAP GND

Serial Communications

KNJN I2C bus development boards

MTi 1-series Development Kit

PN532 NFC RFID Module User Guide

Adafruit BME680. Created by lady ada. Last updated on :10:23 AM UTC

Grove Digital Extender 0059-GRVDE-DSBT/SF

A4988 Stepper Motor Driver Carrier with Voltage Regulators

ARDUINO UNO REV3 Code: A000066

ISA Host Controller 15a Hardware Reference Release 1.2 (October 16, 2017)

PWR Meter click. PID: MIKROE 3169 Weight: 31 g

I2C interface Tutorial

Computer Science 121. Scientific Computing Prof. Levy Chapter 13 Sensors and Data Acquisition

ARDUINO UNO REV3 SMD Code: A The board everybody gets started with, based on the ATmega328 (SMD).

CORTESIA ELECTRONICCA

GSDM110 Three-Axis Digital Magnetometer

Stepper 6 click. PID: MIKROE 3214 Weight: 26 g

Arduino Diecimila Pinouts 697B B8D-A50A-61944C26074F

GENERAL DESCRIPTION MC3635 FEATURES

WICE-SPI Hardware Operation Manual

Adafruit BMP280 Barometric Pressure + Temperature Sensor Breakout

MMA axis digital accelerometer module

Part Number: PCB-STM32-F4B1 (unpopulated PCB with Discovery module sockets, no other parts) STM32-F4B1 (assembled board, not presently available)

SH1030 Rev Introduction. Ultra low power DASH7 Arduino Shield Modem. Applications. Description. 868 MHz. Features

AlphaBot2 robot building kit for Arduino

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

Introduction to Arduino (programming, wiring, and more!)

HZX N03 Bluetooth 4.0 Low Energy Module Datasheet

JeeNode V2. A small *duino-ish MPU board with a wireless RF module. Jean-Claude Wippler jeelab.equi4.com March 2009

Analog Input. Sure sure, but how to make a varying voltage? With a potentiometer. Or just pot.

Grove - Multichannel Gas Sensor

Almond - Datasheet November 2015

ARDUINO MEGA 2560 REV3 Code: A000067

Adafruit BME280 Humidity + Barometric Pressure + Temperature Sensor Breakout

DIGI POT 3 click. PID: MIKROE 3016 Weight: 25 g

EECS 373 Design of Microprocessor-Based Systems

KNJN I2C bus development boards

Driver/Controller Development Assistance Package For IDEX Health & Science TitanHT TM Driver Board

RS485 3 click. How does it work? PID: MIKROE-2821

MINITRONICS v1.0 DATASHEET

PAT9125EL: Optical Tracking Miniature Chip

PIC Serial Peripheral Interface (SPI) to Digital Pot

Transcription:

Using Sensors with the RoboRIO Jeff Bernardis jeff.bernardis@gmail.com David Zhang david.chao.zhang@gmail.com A copy of this presentation is available at: https://drive.google.com/file/d/1sjlpsrm8wbguehgyblcopmrnw2qsmxkf/view?usp=sharing

Using Sensors with the RoboRIO A Sensor Catalog Types of sensors How to connect Solving problems with sensors Camera and Inertial Sensor Fusion RoboRio References: Specification: http://www.ni.com/pdf/manuals/375275a.pdf User Manual: http://www.ni.com/pdf/manuals/375274a.pdf

My Background Software Engineer - PSU 1978 Over 35 years of experience in software development for the telecommunications industry with AT&T/Bell Laboratories, and now Ericsson Amateur Astronomer and past Director of the Amateur Astronomers Association of Princeton An electronics hobbyist with high interest in 3D printing contributor to open source projects This will be my 6th year as mentor for Team 1403

Things to remember: Always inter-connect ground wires Check for ground loops via chassis Be aware of VCC differences 3.3v versus 5v (rio has 5V compatible digital inputs) Be aware of current limitations especially for things being driven through the rio or arduino Read the datasheet

Types of sensors SPI Bus CAN Bus I2C Bus Expansion Port provides additional ports Digital Analog

Digital Sensors Connect to DIO ports 3 connections Voltage, Ground, and Signal V, Gnd provide power to sensor S is the returned value, V/Gnd, True/False, 1/0 (binary) Typical Sensors: switch, encoder, hall effect sensor, optical gate

Digital Sensor - Switch Do not leave input floating 3 Wiring options: SPDT Switch SPST with pull-down resistor SPST with pull-up resistor RIO has 2.2k pull-up resistors connected to all DIO ports

Digital Sensor Optical Gate Essentially an SPST with a pull-up resistor

Digital Sensor - Encoder Requires 2 digital ports

Analog Sensors Connect to Analog In ports Same 3 connections Voltage, Ground, Signal V, Gnd power sensor S is the returned value, any voltage between V and Gnd Most analog sensors require calibration through experimentation Typical Sensors: Potentiometer, photocell, gyro, proximity/range sensors

Analog Sensor - Potentiometer S will vary between G and V S connects to wiper Almost always the center pin Take caution not to crash through the ends of the turn range single turn versus 10-turn

Bus-Based Protocols/Sensors Intelligent sensors exchange messages with RIO I2C AKA IIC (inter-integrated circuit), Wire, 2-Wire, or TWI SPI Serial Peripheral Interface CAN-Bus Controller Area Network

Bus Protocols Bus allows many devices to connect to the same port, each with its own address More sophisticated software Details are on datasheet Typical Applications: Proximity/Range sensor, Accelerometer/Gyro/Magnetometer(IMU)

I2C Bus 3 necessary wires: SCL clock SDA data Gnd electrical ground (voltage reference point) always connect grounds together VCC optional to power slaves 1 Master device - RIO N Slave devices each with a different address Master initiates transfer, addresses device(embedded in message), writes or reads data, and then ends transfer www.robot-electronics.co.uk/acatalog/i2c_tutorial.html

I2C Example Multiple Slaves address is usually set with solder bridges or jumpers

I2C Bus Magnetometer Configuration, operation, and reading values are all device specific Read the datasheet for device specifics such as address, protocol, etc

SPI Bus 5 necessary wires MOSI Master Out Slave In MISO Master In Slave Out SCK Clock SS Slave Select one for each slave Gnd ground always connect your grounds together Vcc optional power to slave (3.3v vs 5v) One master device (RIO) drives SCK, chooses one or more slaves via SS ports Multiple slave devices when selected, react to data received on MOSI line, send responses out MISO line

SPI Example

MyRIO Expansion Port

Passive Breakout Board for RoboRIO Expansion Port https://www.oshpark.com/shared_projects/dczxig8j

Using Sensors with the Talon SRX Source: http://ctr-electronics.com/talon%20srx%20user's%20guide.pdf

Talon SRX Analog Sensor Source: http://ctr-electronics.com/talon%20srx%20user's%20guide.pdf

Talon SRX - Encoder Source: http://ctr-electronics.com/talon%20srx%20user's%20guide.pdf

Talon SRX Limit Switches Source: http://ctr-electronics.com/talon%20srx%20user's%20guide.pdf

RioDuino Opens up the Arduino eco-system to the RIO Programmable in C++ using Arduino IDE Supports UART or I2C communication between RIO and RioDuino Not a lot of use or experience to draw from.

Using Sensors to Solve Problems

Using Sensors External Sensing How to determine distance traveled: encoder - count axle turns + simple + can use two encoders on opposite sides to determine turns - relative values - only know the distance between point A and B, but not where point A is - Inaccuracies caused by wheel slippage accelerometer - complex to use - only measure acceleration - best used in conjunction with other sensors

External Sensing (cont) How to determine Heading - gyro - measures rotational acceleration. Not an absolute measurement - magnetometer - may be subject to inaccuracies from nearby magnetic fields (the motors)

External Sensing the IMU Inertial Measurement Unit combination of accelerometer/gyro/magnetometer, with on-board software to simplify interactions. Very powerful and inexpensive, but can be difficult to use. AltIMU-10 v5 Gyro, Accelerometer, Compass, and Altimeter ($23) www.pololu.com

External Sensing (cont) Range finding - distance to target - IR - easy analog interface - short ranges (max 150cm ~5ft) - Narrow field - Sonar - Choices in interface - Longer ranges (max ~ 21ft) - Different field patterns available, wider than IR - Easy to get bad readings - LASER/Time of Flight - Inexpensive (~$15) - Large range (50-1200mm 2 to 40 ) - Camera - powerful, but requires complex algorithms

Using Sensors Internal Sensing Linear positioning - Limit switches, - Optical gates - String" potentiometer - Encoder - Magnet/Hall effect sensor Radial positioning - Potentiometer - Encoder - Magnet/hall effect sensor