DAQ With Wireless Sensor Nodes Chris Ruskai, Mike Hannaford, Garrett Colas December 13, 2011 Florida Gulf Coast University Dr. Janusz Zalewski
DAQ With Wireless Sensor Nodes
Chris Ruskai, Mike Hannaford, Garrett ColasDecember 13, 2011
Florida Gulf Coast UniversityDr. Janusz Zalewski
Problem Definition
• Make a wireless motion detection system with National Instruments Wireless Sensor Network
• Write code in LabVIEW for sensors to detect motion
Devices Used (1/2)
• NI WSN 9791 Ethernet Gateway
• NI WSN 3202 Wireless Node
Devices Used (2/2)
• Parallax PING UltraSonic Sensor
• Parallax PIR Infrared Sensor
Wireless Network Interface
• IEEE 802.15.4• Low‐rate wireless personal
area network(LR‐WPAN)• Intended for very low cost
devices that communicate over a short range
• Open Systems Interconnection Model
Sensor Connectivity
• Yellow – Analog Input 0 (signal acquisition for PING))) sensor)
• White – Ground for PING))) sensor
• Orange – Analog Input 2 (signal acquisition for PIR sensor)
• Red (left) – Ground for PIR sensor
• Red (right)/Green – Power for sensors (5V)
LabVIEW Code (1/6)
LabVIEW Code (2/6)
• This is an example of the PING))) and PIR sensors detecting motion and triggering an on screen LED
• The code is encapsulated in a persistent (Must be ended by terminating the program in LabVIEW) while loop.
• The PING))) sensor is attached to the AI0 terminal on the NI WSN‐3202 node and as such, is denoted by the AI0 variable.
LabVIEW Code (3/6)
• The PIR sensor is attached to terminal AI1 and as such, is denoted as AI1.
• Each sensor is connected to its own waveform graph.
• Also, each sensor is connected to a comparator.– PING))): Less‐Than Comparator– PIR: Greater‐Than Comparator
LabVIEW Code (4/6)
• Attached to the comparator is also an integer constant that the voltage of the sensor is compared to.– PING))) is compared to 4 and returns true if the voltage drops below 4 volts.
– PIR is compared to 2 and returns true if the voltage rises above 2 volts.
LabVIEW Code (5/6)
• The comparators‘ outputs are each attached to a boolean LED. – If the comparator returns true, the LED activates.– Else, the LED remains off.
Experiments and Results
• The sensors trigger properly to show that data acquisition and control work
• The upper graph displays the voltage of the PING))) sensor. As detects motion, the voltage lowers to 0 volts.
• The lower graph displays the voltage of the PIR sensor. As it detects motion, the voltage increases to 5 volts.
Conclusion
• Biggest challenge was overcoming incorrect previous documentation
• We worked hard and figured out a way to make it work and provide a working project