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.