Example: barber

NI myRIO Project Essentials Guide

Ed DoeringEd DoeringNI myRIO Project Essentials GuideNI myRIO Project Essentials GuideEd DoeringElectrical and Computer Engineering DepartmentRose-Hulman Institute of TechnologyivPrinted February 9, 2016. Download the latest version 2013 National Technology and Science rights reserved. Neither this book, nor any portion of it, may be copied or reproduced in any formor by any means without written permission of the Press respects the intellectual property of others, and we ask our readers to do the same. This bookis protected by copyright and other intellectual property laws. Where the software referred to in this bookmay be used to reproduce software or other materials belonging to others, you should use such softwareonly to reproduce materials that you may reproduce in accordance with the terms of any applicable licenseor other legal and National Instruments are trademarks of National other trademarks or product names are the property of their respective Disclaimers:The reader assumes all r

LabVIEW programming: Study the video Digital Output Express VI (youtu.be/Y8mKdsMAqrU, 2:21) to learn how to access all of the available digital outputs with the NI myRIO Digital Output Express VI,includingsingleoutput, multipleoutputs, and connectortype. 2.3 BasicModifications Study the video LED Demo Walk-Through

Tags:

  Labview

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of NI myRIO Project Essentials Guide

1 Ed DoeringEd DoeringNI myRIO Project Essentials GuideNI myRIO Project Essentials GuideEd DoeringElectrical and Computer Engineering DepartmentRose-Hulman Institute of TechnologyivPrinted February 9, 2016. Download the latest version 2013 National Technology and Science rights reserved. Neither this book, nor any portion of it, may be copied or reproduced in any formor by any means without written permission of the Press respects the intellectual property of others, and we ask our readers to do the same. This bookis protected by copyright and other intellectual property laws. Where the software referred to in this bookmay be used to reproduce software or other materials belonging to others, you should use such softwareonly to reproduce materials that you may reproduce in accordance with the terms of any applicable licenseor other legal and National Instruments are trademarks of National other trademarks or product names are the property of their respective Disclaimers:The reader assumes all risk of use of this book and of all information, theories,and programs contained or described in it.

2 This book may contain technical inaccuracies, typographicalerrors, other errors and omissions, and out-of-date information. Neither the author nor the publisherassumes any responsibility or liability for any errors or omissions of any kind, to update any information,or for any infringement of any patent or other intellectual property the author nor the publisher makes any warranties of any kind, including without limitationany warranty as to the sufficiency of the book or of any information, theories, or programs contained ordescribed in it, and any warranty that use of any information, theories, or programs contained or describedin the book will not infringe any patent or other intellectual property right.

3 THIS BOOK IS PROVIDED ASIS. ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,ANYAND ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,AND NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, ARE right or license is granted by publisher or author under any patent or other intellectual property right,expressly, or by implication or NO EVENT SHALL THE PUBLISHER OR THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,SPECIAL, INCIDENTAL, COVER, ECONOMIC, OR CONSEQUENTIAL DAMAGES ARISING OUT OFTHIS BOOK OR ANY INFORMATION, THEORIES, OR PROGRAMS CONTAINED OR DESCRIBEDIN IT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, AND EVEN IF CAUSEDOR CONTRIBUTED TO BY THE NEGLIGENCE OF THE PUBLISHER, THE AUTHOR, OR law may not allow the exclusion or limitation of incidental or consequential damages.

4 So theabove limitation or exclusion may not apply to Introduction1I NI myRIO Starter Kit32 Discrete LED53 Seven-Segment LED Display94 Pushbutton Switch135 DIP Switches176 Relay217 Potentiometer278 Thermistor319 Photocell3510 Electret Microphone3911 Buzzer/Speaker4312 Motor4713 Rotary Encoder5114 Photointerrupter5515 Hall-Effect Sensor59viCONTENTS16 Piezoelectric-Effect Sensor63II NI myRIO Mechatronics Kit6717 Servo6918 Motor Adapter for NI myRIO and Geared Motor7519 IR Range Finder8120 Sonic Range Finder8521 Accelerometer8922 Gyroscope9523 Compass10124 Ambient Light Sensor107 III NI myRIO Embedded Systems Kit11125 Keypad11326 LCD Character Display UART Interface11727 LCD Character Display SPI Interface12128 LCD Character Display I2C-bus Interface12529 LED Matrix12930 Serial EEPROM13531 Bluetooth Module14132 Digital Potentiometer14733 Temperature Sensor15134 MEMS Microphone157 CONTENTSviiIV Additional Devices16335 H-Bridge and Geared Motor16536 USB Flash Drive17137 Webcam17538 GPS Receiver17939 RFID Reader183V Integrated Project Ideas18940 Handheld Meter19141 Wireless Sensor19342 Data Logger19543 NTP Clock19744 Steer By Wire19945 Digital Thermometer20146 3-D Color Controller20347 QR Code Scanner20548 RPN Calculator20749 Hotel Room Safe Controller20950 Tachometer21151 Scanning Sensor21352 On-Off Control System21553

5 Security Camera21754 Compass with Tilt Correction219viiiCONTENTS55 Guitar Tuner22156 Music Maker22357 Digital Bubble Level22558 Weather Station22759 EEPROM Programmer229VI Appendices231A MXP and MSP Connector Diagrams233B Build a Stand-Alone Application235C NI myRIO Starter Kit Data Sheets237D Video Tutorial Links2391 IntroductionWelcome to theNI myRIO Project EssentialsGuide, and welcome to the exciting world ofNI myRIO ! This book serves as your Guide tointerfacing your NI myRIO to the wide variety ofsensors, actuators, and displays that you will needfor your projects. Each chapter concentrates on aspecific component or device using a mixture of textand video to Guide you through the learning processnecessary to successfully integrate the componentor device into your example, consider the photocell of Chapter 9on page 35, one of the many parts included with theNI myRIO Starter Kit.

6 You ll get immediate hands-on experience with the photocell as you build asimple demonstration circuit, connect it to one of theNI myRIO expansion ports, and run a provided Lab-VIEW program to confirm that the photocell worksproperly. After that, study a video tutorial that ex-plains photocell operating principles and learn howto design a suitable interface circuit. Next, try yourhand with the suggested modifications to the demon-stration labview code to deepen your understand-ing of the photocell behavior and labview program-ming techniques. At last you will be ready to tacklethe suggested systems integration Project in whichyou combine the photocell with other book is intended for students at the junioror senior year, especially those students engagedin capstone projects or research.

7 A background inelectrical and computer engineering is ideal, butstudents pursuing other disciplines will find thelevel of tutorial detail to be more than document is fully hyperlinked for sectionand figure references, and all video links are livehyperlinks. Open the PDF version of this documentfor the most efficient way to access all of the links;click a video hyperlink to automatically launchthe video in your browser. Within the PDF, useALT+leftarrowto navigate back to a book is organized into six major parts: Parts Ithrough III detail the components and devicesincluded in the NI myRIO Starter Kit, MechatronicsKit, and Embedded Systems Kit; Part IV includesadditional chapters (USB flash drive, webcam,GPS receiver, and RFID reader); Part V providesnumerous ideas for complete projects that integratetwo or more devices and components.

8 And Part VI(Appendices) includes NI myRIO connectordiagrams, a tutorial on building a stand-aloneapplication (power-on your NI myRIO and theapplication runs immediately), collected data sheetlinks, and links to all video AcknowledgementsThis book represents the contributions of many,and I gratefully acknowledge the support of theseindividuals at National Instruments: Gretchen Edel-mon for her technical support and encouragementregarding the book s content and organization;Margaret Barett for inviting me to participate inthe NI myRIO Beta Program; Sam Kristoff fortimely advice regarding labview programmingtechniques; Charles Yarbrough for discussions ofmyRIO hardware design; and Andrew Watchornfor his ongoing support of university academicprograms.

9 I am also grateful to Tom Robbins at NTSP ress for his editorial support on this DoeringDepartment of Electrical and Computer EngineeringRose-Hulman Institute of TechnologyTerre Haute, IN INI myRIO Starter Kit2 Discrete LEDLEDs, or light-emitting diodes, provide simpleyet essential visual indicators for system status anderror conditions. Figure shows some typicalLEDs; the clear LEDs on the right are included inthe NI myRIO Starter : Typical LEDs including standard red andgreen, high-efficiency in various colors, and Objectives:After completing the activitiesin this chapter you will be able the essential concepts related to LEDs:(a)An LED is a diode that permits only one-waycurrent,(b) The LED forward-bias voltage drop varieswith color (wavelength),(c) The interface circuit design depends onknowledge of the DIO output resistance andsource voltage,(d) LEDs may be direct-connected to the DIOunder some circumstances, and2.

10 Select a suitable current-limiting resistor (or noresistor) based on the LED Component DemonstrationFollow these steps to demonstrate correct operationof the discrete LED these parts from the NI myRIO Starter Kit: Two 100 resistors connected in series or two470 resistors connected in parallel Two-terminal LED Breadboard Jumper wires, M-F (2 )Build the interface circuit:Refer to the schematic di-agram and recommended breadboard layout shownin Figure on the following page. The discreteLED interface circuit requires two connections toNI myRIO MXP Connector B (see Figure onpage 233):1. Anode B/+ (pin 33)2. LED control B/DIO0(pin 11)62. DISCRETE LEDF igure : Demonstration circuit for discrete LED: schematic diagram, recommended breadboard layout,and connection to NI myRIO MXP Connector the demonstration VI: you have not doneso previously and unpack the contents to aconvenient location, OpentheprojectDiscrete in the subfolderDiscrete LED demo, Expand the hierarchy button (a plus sign) forthemyRIOitem and then , Confirm that NI myRIO is connected to yourcomputer, and Run the VI either by clicking theRunbutton onthe toolbar or by pressing Ctrl+ to see a Deployment Process window2.