Overview
This document provides an overview of how the NI CompactRIO controller can be used to acquire measurements from a wide variety of sensors and the specifics of how it was done in this particular Waterloo Labs video.
Method
The creators of the Waterloo Labs episode “Drive a Car with an iPhone” used the CompactRIO platform to take measurements from sensors and perform motion control. In general, the CompactRIO embedded controllers can be used to read in data from a variety of sensors via different types of I/O modules.
For example, in this particular project, the CompactRIO was used to read in an analog signal from potentiometers reflecting the value of the steering wheel angle, as well as the positions of gas and brake pedals. This data was acquired from the potentiometers using the NI 9201 Analog Input module and was passed from the CompactRIO to a remote laptop through a wireless connection.

Figure 1. National Instruments cRIO-9074 with 9403 Digital I/O module in the car.
Another use of CompactRIO in this project was motor control. The CompactRIO received the control parameters wirelessly from the connected laptop and used those values and the NI 9403 Digital I/O module to output digital signals to control motors, which in turn pressed the gas and brake pedals of the vehicle.
The I/O modules (also called C Series modules) used in the CompactRIO have a variety of I/O types available including voltage, current, resistance, thermocouple, RTD, encoder (including quadrature and optical), accelerometer, and strain gauge inputs. In addition, modules are available for simultaneous-sampling analog I/O, digital I/O, counter/timers, pulse generation, and high voltage/current relays.
The CompactRIO platform was chosen because it is a rugged embedded control and data acquisition system that can handle being flipped and crashed. It combines the power of a Real-Time controller with the functionality of a reconfigurable FPGA chip. It is the best choice when there is a need for an embedded, headless application or flexibility, performance, and reliability of custom hardware. If there is no need for the high performance of CompactRIO, the C Series modules can be used to read sensor data with other NI hardware platforms such as CompactDAQ or USB Sleeves.
Related Links
Waterloo Labs Episodes 03 Parts List
CompactRIO Developers Guide
CompactRIO Advisor
Products and Services: CompactRIO
Products and Services: NI 9403
Products and Services: NI 9201
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
