AS726X NIR/VIS Spectral Sensor Hookup Guide

Similar documents
ZX Distance and Gesture Sensor Hookup Guide

APDS-9960 RGB and Gesture Sensor Hookup Guide

9DoF Sensor Stick Hookup Guide

Pi Servo Hat Hookup Guide

nrf24l01+ Transceiver Hookup Guide

INA169 Breakout Board Hookup Guide

Adafruit SGP30 TVOC/eCO2 Gas Sensor

Photon Weather Shield Hookup Guide

Arduino Lesson 1. Blink. Created by Simon Monk

Touch Potentiometer Hookup Guide

For this exercise, you will need a partner, an Arduino kit (in the plastic tub), and a laptop with the Arduino programming environment.

Grove - Infrared Receiver

Training Schedule. Robotic System Design using Arduino Platform

EARTH PEOPLE TECHNOLOGY. EPT-200TMP-TS-U2 Temperature Sensor Docking Board User Manual

Getting Started with the micro:bit

Lesson 3: Arduino. Goals

Adafruit 16-channel PWM/Servo Shield

Grove - Collision Sensor

Adafruit 16-Channel Servo Driver with Arduino

Internet of Things Student STEM Project Jackson High School. Lesson 2: Arduino and LED

Light Emitting Diode IV Characterization

Attribution Thank you to Arduino and SparkFun for open source access to reference materials.

TWEAK THE ARDUINO LOGO

Milli Developer Kit Reference Application Published on Silver Spring Networks STAGE (

Adafruit 16-Channel PWM/Servo HAT & Bonnet for Raspberry Pi

User Manual. Grove - IR Distance Interrupter. Release date: 2015/9/22. Version: 1.0

Application Note AN 157: Arduino UART Interface to TelAire T6613 CO2 Sensor

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

Lab 5: Arduino Uno Microcontroller Innovation Fellows Program Bootcamp Prof. Steven S. Saliterman

Adafruit 16-channel PWM/Servo Shield

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

Adafruit 16-Channel PWM/Servo HAT for Raspberry Pi

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

Lab 2: Blinkie Lab. Objectives. Materials. Theory

HC-SR501 Passive Infrared (PIR) Motion Sensor

GP4 PC Servo Control Kit 2003 by AWC

Adafruit 16-Channel Servo Driver with Arduino

Setup Download the Arduino library (link) for Processing and the Lab 12 sketches (link).

Welcome to Arduino Day 2016

Si4707 Hookup Guide. Introduction

URM37 V3.2 Ultrasonic Sensor (SKU:SEN0001)

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

GrovePi Temp-Humidity Sensor Lesson Video Script. Slide 1

J. La Favre Using Arduino with Raspberry Pi February 7, 2018

LaserPING Rangefinder Module (#28041)

EE 314 Spring 2003 Microprocessor Systems

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

Coding with Arduino to operate the prosthetic arm

smraza Getting Start Guide Contents Arduino IDE (Integrated Development Environment)... 1 Introduction... 1 Install the Arduino Software (IDE)...

100UF CAPACITOR POTENTIOMETER SERVO MOTOR MOTOR ARM. MALE HEADER PIN (3 pins) INGREDIENTS

CPSC 226 Lab Four Spring 2018

Community College of Allegheny County Unit 7 Page #1. Analog to Digital

Grove - I2C Color Sensor User Manual

Total Hours Registration through Website or for further details please visit (Refer Upcoming Events Section)

SEN Description. Features. MG-811 Specifications

Lesson 13. The Big Idea: Lesson 13: Infrared Transmitters

On the front of the board there are a number of components that are pretty visible right off the bat!

Internet of Things with Arduino and the CC3000

Practical Assignment 1: Arduino interface with Simulink

Arduino An Introduction

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino

General Description. The TETRIX MAX Servo Motor Expansion Controller features the following:

Application Note AN 102: Arduino I2C Interface to K 30 Sensor

Adafruit 16-Channel Servo Driver with Arduino

LEARN ARDUINO SENSORS ALL SENSORS DESCRIPTION APPLICATION SPECIFICATIONS EXAMPLE CODES NOTES DOWNLOADS DHT11, DHT22 AND AM2302 SENSORS ADAFRUIT

Megamark Arduino Library Documentation

In this lab, you ll build and program a meter that measures voltage, current, power, and energy at DC and AC.

MATERIALS TO GATHER. Electronic Parts

Green Electronics Library Documentation

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

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

Grove - Infrared Temperature Sensor

Heating Pad Hand Warmer Blanket

Adafruit Si4713 FM Radio Transmitter with RDS/RDBS Support

Getting started with the SparkFun Inventor's Kit for Google's Science Journal App

SC16A SERVO CONTROLLER

Zybo Z7 Pcam 5C Demo

Veyron Servo Driver (24 Channel) (SKU:DRI0029)

Tarocco Closed Loop Motor Controller

Ardweeny 1.60" 0.54" Simple construction - only 7 parts plus pins & PCB! Ideal for breadboard applications

MicroWave Sensor SKU: SEN0192

1Getting Started SIK BINDER //3

Montgomery Village Arduino Meetup Dec 10, 2016

1 Lab + Hwk 4: Introduction to the e-puck Robot

ESC 100: Exploring Engineering. Fall Lab 2: Calibrating An Infrared Distance Sensor

TETRIX Servo Motor Expansion Controller Technical Guide

Arduino Intermediate Projects

ICM Shield Hardware User Guide

DragonLink Advanced Transmitter

MAKEVMA502 BASIC DIY KIT WITH ATMEGA2560 FOR ARDUINO USER MANUAL

USER MANUAL SERIAL IR SENSOR ARRAY5

Adafruit 16 Channel Servo Driver with Raspberry Pi

EEC WINTER Instructor: Xiaoguang Leo" Liu. Application Note. Baseband Design. Duyen Tran ID#: Team DMK

Arduino Platform Capabilities in Multitasking. environment.

Grove - Gas Sensor(MQ9)

Computational Crafting with Arduino. Christopher Michaud Marist School ECEP Programs, Georgia Tech

Operating Mode: Serial; (PWM) passive control mode; Autonomous Mode; On/OFF Mode

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

Sweep / Function Generator User Guide

// Parts of a Multimeter

Transcription:

Page 1 of 9 AS726X NIR/VIS Spectral Sensor Hookup Guide Introduction The AS726X Spectral Sensors from AMS brings a field of study to consumers that was previously unavailable, spectroscopy! It s now easier than ever to measure and characterize how different materials absorb and reflect different wavelengths of light. Don t know what part of the spectrum you want to look at? You re in luck! Sparkfun carries two different flavors of spectrometer. The AS7262 detects wavelengths in the visible range while the AS7263 detects wavelengths just below the visible range, in the Near Infrared (NIR) range. SparkFun Spectral Sensor Breakout - AS7263 NIR (Qwiic) SEN-14351

Page 2 of 9 SparkFun Spectral Sensor Breakout - AS7262 Visible (Qwiic) SEN-14347 Product Showcase: Qwiic AS726X Required Materials To follow along with this hookup guide, you will need one of the following Qwiic shields to match your preference of microcontroller: SparkFun Qwiic Shield for Arduino DEV-14352 Qwiic Shield for Raspberry Pi SPX-14292

Page 3 of 9 Qwiic Shield for ESP32 SPX-14203 Qwiic Shield for Photon SPX-14202 You will also need a Qwiic cable to connect the shield to your AS726X, choose a length that suits your needs. Qwiic Cable - 500mm PRT-14429 Qwiic Cable - 50mm PRT-14426 Qwiic Cable - 100mm PRT-14427 Qwiic Cable - 200mm PRT-14428 Suggested Reading If you aren t familiar with our new Qwiic system, we recommend reading here for an overview. We would also recommend taking a look at the following tutorials if you aren t familiar with them. How to Solder: Through- Hole Soldering This tutorial covers everything you need to know about through-hole soldering. Serial Communication Asynchronous serial communication concepts: packets, signal levels, baud rates, UARTs and more! Light I2C

Page 4 of 9 Light is a useful tool for the electrical engineer. Understanding how light relates to electronics is a fundamental skill for many projects. An introduction to I2C, one of the main embedded communications protocols in use today. Qwiic Shield for Arduino & Photon Hookup Guide Get started with our Qwiic ecosystem with the Qwiic shield for Arduino or Photon. Hardware Overview The AS7262 detects 450, 500, 550, 570, 600, and 650nm of light each with 40nm of full-width half-max detection. The AS7263 can detect 610, 680, 730, 760, 810, and 860nm of light each with 20nm of full-width half-max detection. Communication 2 The AS726X is unique as it can communicate by both an I C interface (through the onboard Qwiic connectors, or pins at the bottom of the board) and serial interface using AT commands (pins at the top of the board). 2 2 While I C is the default setting (The default I C address is 0X49 for both AS7262 and AS7263) Serial communication can be enabled by removing solder from the jumpers labeled JP1, adding solder to the jumper labeled JP2 (on the back of the board), and using Sparkfun s USB-to-Serial breakout to interface directly with the computer.

Page 5 of 9 LED The board also has multiple ways for you to illuminate the object that you are trying to measure for a more accurate spectroscopy reading. There is an onboard, 5700K LED that has been picked out specifically for this task. However, if you aren t satisfied with the onboard LED, you can grab your own through hole incandescent. While you should find a bulb rated for 3.3V, a bulb rated for higher voltage, like 5V, will still work, but will not run as bright as it normally would with 5V. We ve found that Mouser is a good place to look for these. If you are going to go that route and use your own bulb, be sure to disable the onboard LED by removing the solder from the JP4 jumper.

Page 6 of 9 Hardware Assembly The beauty of Sparkfun s new Qwiic environment means that connecting the sensor could not be easier. Just plug one end of the Qwiic cable into the AS726X, the other into one of the Qwiic Shields, and stack the board on a development board. You ll be ready to upload a sketch to start taking spectroscopy measurements. It seems too easy, but thats why we made it this way! Here s an example using the RedBoard Programmed with Arduino. Library Overview Before we get started, we ll need to download and install SparkFun s AS726X Arduino library. DOWNLOAD THE SPARKFUN AS726X LIBRARY Note: This example assumes you are using the latest version of the Arduino IDE on your desktop. If this is your first time using Arduino, please review our tutorial on installing the Arduino IDE. If you have not previously installed an Arduino library, please check out our installation guide. Before we get started developing a sketch, let s look at the available functions of the library. void begin(twowire &wireport, byte gain, byte measurementmode); Initializes the sensor with user given values for the wire port, gain, and measurement void takemeasurements(); Sensor writes spectral measurements to memory locations. void takemeasurementswithbulb(); Illuminates onboard bulb, calls takemeasurements();, then turns off the onboard bulb. void printmeasurements(); Fetches data from memory and outputs calibrated measurements using Serial.print(); void printuncalibratedmeasurements(); Fetches data from memory and outputs uncalibrated measurements using Serial.print(); byte gettemperature(); Fetches the temperature in degrees Celsius. float gettemperaturef(); Fetches the temperature in degrees Fahrenheit. void setmeasurementmode(byte mode); Changes the measurement mode to 0, 1, 2, or 3 0: Continuous reading of VBGY (Visible) / STUV (IR) 1: Continuous reading of GYOR (Visible) / RTUX (IR) 2: Continuous reading of all channels 3: One-shot reading of all channels (power-on default)

boolean dataavailable(); Returns true or false based on whether or not data is available to be read. void enableindicator(); Powers on the surface mounted blue indicator LED. void disableindicator(); Powers off the surface mounted blue indicator LED. void setindicatorcurrent(byte current); Sets the current on the indicator LED. The default is current = 3, or 8 ma. 0: 1 ma 1: 2 ma 2: 4 ma 3: 8 ma void enablebulb(); Powers on the surface mounted blue indicator LED. void disablebulb(); Powers off the surface mounted blue indicator LED. void setbulbcurrent(byte current); Sets the current limit on the indicator LED and optional bulb (They are connected in parallel) The default is current = 0 or 12.5 ma. 0: 12.5 ma 1: 25 ma 2: 50 ma 3: 100 ma void softreset(); Gives the sensor a 1 second reset. void setgain(byte gain); Pass in a 0, 1, 2 or 3 to change the gain. 0: 1x 1: 3.7x 2: 16x 3: 64x (power-on default) void setintegrationtime(byte integrationvalue); This sets the time over which samples are taken. Takes a value between 0 and 255. Integration time will be 2.8 ms * integrationvalue. void enableinterrupt(); Pulls the interrupt pin low. (Note: not yet implemented) void disableinterrupt(); Pulls the interrupt pin high. If you d like access to just one channel, getting uncalibrated and calibrated spectral readings for the AS7262 (Visible) sensor can be accomplished with the following commands: int getviolet(); int getblue(); int getgreen(); int getyellow(); int getorange(); int getred(); float getcalibratedviolet(); float getcalibratedblue(); float getcalibratedgreen(); float getcalibratedyellow(); float getcalibratedorange(); float getcalibratedred(); A similar set of functions is available for accessing individual channels on the AS7263 (Near Infrared) sensor. int getr(); int gets(); int gett(); int getu(); int getv(); int getw(); Page 7 of 9

Page 8 of 9 float getcalibratedr(); float getcalibrateds(); float getcalibratedt(); float getcalibratedu(); float getcalibratedv(); float getcalibratedw(); Software Example 1 Basic Readings The below sketch will get you up and running taking calibrated spectral readings on all 6 channels. Once this sketch is uploaded, open the serial monitor with a baud rate of 115200 to display the spectral data from the sensor. #include "AS726X.h" AS726X sensor; void setup() { sensor.begin(); } void loop() { sensor.takemeasurements(); sensor.printmeasurements();//prints out all measurements (ca librated) } 2 If we want, we can change the gain, measurement mode, and Wire that I C uses by calling the begin() function with a few arguments. First, let s look at what values we can assign to which characteristic. Example 2 Sensor Settings The below example code will initialize our sensor with a gain of 16x, measurement mode of 0, and our regular I2C port (you can run the sensor on a different I2C port if you have the right hardware, a Teensy perhaps?). #include "AS726X.h" AS726X sensor; byte GAIN = 2; byte MEASUREMENT_MODE = 0; void setup() { sensor.begin(wire, GAIN, MEASUREMENT_MODE); } void loop() { sensor.takemeasurements(); sensor.printmeasurements(); } Expected Output Here is a picture of what to expect when bringing your AS726X online for either of the above sketches. (The program will print AS7263 online! instead if you have that sensor)

https://learn.sparkfun.com/tutorials/as726x-nirvi?_ga=2.260827209.594753028.1508768... Page 9 of 9 10/23/2017 Resources and Going Further Now that you ve successfully got your AS726X up and running, it s time to incorporate it into your own project! For more information, check out the resources below: AS726X Schematic (PDF) - Schematic for both the AS7262 and AS7263. AS726X Eagle Files (ZIP) - Board design files for both the AS7262 and AS7263. AS7262 Datasheet (PDF) - Datasheet for AS7262 Visible Sensor. AS7263 Datasheet (PDF) - Datasheet for AS7263 NIR Sensor. Product Showcase: Qwiic AS726X Qwiic System Landing Page SparkFun AS726X GitHub Repository Source and example files for the Arduino library used in this tutorial. Need some inspiration for your next project? Check out some of these related tutorials: Qwiic Shield for Arduino & Photon Hookup Guide Get started with our Qwiic ecosystem with the Qwiic shield for Arduino or Photon. CCS811/BME280 (Qwiic) Environmental Combo Breakout Hookup Guide Sense various environmental conditions such as temperature, humidity, barometric pressure, eco2 and tvocs with the CCS811 and BME280 combo breakout board. SparkFun GPS Breakout - XA1110 (Qwiic) Hookup Guide Figure out where in the world you are with the Qwiic SparkFun GPS Breakout - XA1110.