Overview
This VI a LEGO™ motor and an inexpensive Hall effect sensor to demonstrate the principles of measuring RPM using a NI myDAQ.
Description
This code is part of a test in which a bar magnet is attached to a LEGO™ motor and used to excite a Hall effect sensor. Every time one of the ends of the bar magnet rotates past the switch, it will change state. The rotation rate can be determined by counting the number of times the switch changes in a second and dividing by 2. The protoboard and NI myDAQ are used for data acquisition in this task.
Steps to Implement or Execute Code
1. Re-create the physical setup described in the attached PDF
2. Set values for maximum and minimum voltage, physical channels on the NI myDAQ, and the input terminal configuration
3. Run the code using the run arrow in the LabVIEW toolbar
Requirements to Run
Software
LabVIEW 8.6 or newer
Hardware
NI myDAQ
A protoboard, LEGO™ motor, and an inexpensive Hall effect sensor are described in the attached PDF
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.