LabVIEW Elevator

For my MECH 2502 Instrumentation and Measurement Techniques course during the last term of second year, we were required to work as a group to use the coding program LabVIEW, along with compatible external parts to create a measurement system of some type.

My group decided that we would create an elevator system that worked by measuring inputted sounds and signals from red lasers and photo diodes.

How the system worked was when we turned on the power source, the red lights would send a constant signal to corresponding photo diodes.  We then sent these signals through a negative bias circuit which looked like this:

fig10

(n.d.). Retrieved July 27, 2017, from https://goo.gl/images/1TceN8

This circuit was able to convert the signal in such a way that the computer was now able to read and manipulate it, and our code took it from there.  Essentially, the code retrieved a value, stored it, and then compared it to the next.  This value would change when the elevator would cover up one of the red lasers, causing the code to stop the elevator from moving if that value change corresponded with the value on the switch.

This is what our compute code looked like:

Capture2

Click here to see a video where I explain a bit more about what each block of code does.

When you start the program it pauses the elevator and begins a recording phase.  During this time the user would clap how ever many times, and each time the sound from that clap would peak over a certain it would add another value to the counter.  The elevator would then proceed to move until the code received a change in value from the corresponding photo diode floor.  For the next clap, the code would compare the value to the previous one and if the value was greater it would move up, if it was less it would move down, and if it was the same it wouldn’t move.

This is what the main program looked like when in use:

Capture1

As one can see, the 3 diodes are giving constant signals, and the change in those values would indicate that the elevator is at that floor.   We ensured to program the system so that it would only stop when the changed photo diode corresponds with the number of claps (e.g. 2 claps – stops when photo diode 2’s value changes).  Also, if this was during the recording phase which is indicated if the floor count button is bright green, that peak we see on the graph would count as 1 clap or value.

Click here to see a video of the system being used.