Hi everyone, I am having a great deal of difficulty designing the control system for my senior design project.
I integrated an Arduino Uno with Labview and I am currently attempting to use a "latching" hall effect sensor to output the RPM of a motor, once I am able to that I need to have the motor turn off once it reaches a desired RPM. The hall effect sensor output switches between 0V and 0.5V and if I understand correctly, I need to turn the analog signal into a square wave then output the highs and lows into 1's and 0's with respect to time/frequency. Then from there, I think I may have to use a timer to calculate for RPM?
How would you guys go about doing this? I am doing all I can to research but making the block diagram is very difficult for me. Please help, I am very stressed.
Thanks in advance.
Solved! Go to Solution.
It is not clear from your post exactly where the problem is. Senior design projects are supposed to produce stress. When I taught a senior design course it was required to graduate and that alone was enough to generate stress.
1. What is the Arduino doing and what is done in LabVIEW? That can make a big difference.
2. From your description it seems likely that the analog signal from the Hall effect sensor is already at least approximately a square wave. What kinds of highs and lows and 1's and 0's do you want? The terms you are using are not specific with respect to LV data types.
3. What is the sample rate for the analog to digital conversion? What is the maximum pulse rate at the output of the sensor? How many pulses per revolution?
Before you start to "make a block diagram" you should understand the steps you would use to solve the problem using other tools. How would you "turn the analog signal into a square wave" if you were designing electronic circuits to do the job? What information will your system give you that relates to time or frequency? How can you use that information to get the motor speed?
Thank you for the reply.
1) The Arduino is being used as a "middle man" if you will. The I/O pins on the Arduino are to read in and send out sensor values. Once the mechanical guys in my group choose a motor and a Variable Frequency Drive (or perhaps a Programmable Logic Controller), I would like to hook up the VFD/PLC to Arduino as well (I have to research this more). The reason I would like to use Labview for the control system design is because of the interface that can be designed which seems somewhat user friendly. We are building a shock dynonameter which tests shocks. In short, the control system is to start the motor and run a warm up cycle to heat up the shock being tested untill it reaches a desired temperature. Then, the motor is to be ran untill it reaches a final velocity of 16 inch/sec (I figure this linear value can be converted from the hall effect sensor finding the motor RPM). In the "testing phase", Force (from a load cell in between the shock dyno frame and the shock) vs Velocity is to be plotted so that the shock can be analyzed and tuned. I have attached an image of a shock dyno in case it helps with visualization.
2) What I meant by highs and lows and 1's and 0's is implementing the square wave to count the number of times there is a pulse in the wave over over time.
3) There will be one pulse in the wave per revolution, I am trying to implement this with how many times that pulse occurs per minute. The hall effect sensor I am using is a US1881 latching hall efffect sensor. Our motor will go no more than 350RPM so I converted that into frequency to get 5.83HZ. After some research, I believe the Arduino Uno has a ADC sameple rate of about 9600Hz.
Considering the hall effect sensor I am using switches between "on and off" if you will, I believe this will basically provide an output of a square wave anyways just like you said.
To get the motor speed I believe there are probably two options here;
1) Using the hall effect sensor to find the RPM over time (I am struggling correlating how one would find RPM over coresponding time in Labview)
2) Using feedback from the VFD/PLC through serial communication.
If I have one then do I need the other? In other words, If I have frequency feedback of the motor (from the VFD/PLC) then do I even need the hall effect sensor to measure RPM?
Thank you so much for the advice, through the questions you asked me I feel as if I am already begining to understand more.
If you have a VFD and PLC, you will probalby not need the Arduino. You can probably communicate with those devices using a serial connection, which can easily be done in LV.
Think about what the signal from the Hall sensor would look like on an oscilloscope. A sqaure wave, possibly with some noise and perhaps a modest rise and fall time, depending on the characteristics of the sensor. (I have not looked it up.) Now think about what you will get from the Arduino: a series of numbers representing the voltage at the output of the sensor at discrete times - 9600 of them each second. About half of those numbers will be near zero and the other half significantly larger. Use some logic to locate the transitions from small to large numbers (0 -> 1). The "location" will be an index into the array of numbers. The time of the location is related to that index by the sampling period.
The rest is left as an exercise for the student. Let us know how you are doing.
I will take your advice and see if I can get it solved tonight. I hooked up the output to an oscilloscope and it was most definitely a square wave.
Let's say I had a DAQ such as the NI USB-6001. It has 8 analog inputs, 2 analog outputs, 13 digital I/O pins, and a 32 bit counter. Would I theoretically be able to hook up the VFD/PLC to the DAQ and completely get rid of the use of the arduino and the hall effect sensor? Considering I am trying to find motor RPM, I think perhaps I can do this with an encoder or VFD rather than fart around with a hall effect sensor. I have no idea what DAQ to choose, below I listed my materials and my guess on where they will go in the DAQ.
My assumption of inputs/outs for my project;
Temperature sensor-This will go into a Analog input on the DAQ. I would like the motor to stop when it reaches a desired temperature (this would conclude the warm-up phase).
Load Cell sensor-This will go into a Analog input on the DAQ.
Variable Frequency Drive-I am not exactly sure, research tells me that this can probably be done through MODBUS which I believe is a serial communication protocol I think, if I'm not mistaken I think this can be analog or digital? I would like to start/stop and control the motor speed/frequency through labview
Encoder-I believe this will use the DAQ counter as well as a digital output on the DAQ
Do these inputs/outputs seem right going into the DAQ? I am trying to find a quality USB DAQ (on the cheaper side if possible) that can be used for my control system.
I figure if I can have back and forth communication to a VFD for example, I will be able to figure out the RPM's using the frequency that the VFD outputs to the DAQ. I have looked into this and apparently I need to figure out how many poles my motor provides in order to use the equation RPM=120f/p, any thoughts on this? Maybe if I used VFD to find RPM this would use up the counter pins on the DAQ rather than the encoder using them to find RPM? I would much rather prefer to use the VFD to find RPM as it would elimate the need of an encoder.
Your advice truly means a lot me, you have been one the most influential resources I have encountered for my project so far:)
Read again the first 2 sentences from Lynn: the suggestion was to have a VFD with a serial (RS232) interface. Actually after some google search I have found that there VFDs coming with an encoder (to create a feedeback to the closed loop control of the VFD) and also a serial port, RS232 interface. That means you can configure how the VDF (motor) should run only using your serial port. No need to use a DAQ device!
You only need a DAQ for your load cell sensor. The temperature sensor can be tricky, for example if you want to use a thermocouple, a simple DAQ will not work keep in mind! The voltage level is too small. I imagine you could use a thermistor bridge with an external DC excitation, but carefully designed avoiding self-heating of the thermistor. Or just use a simple J or K type thermocouple, and buy this from NI:
Hi again Blokk,
I have a design review for my project tomorrow so I will have a VFD theoretically chosen by tonight.
As far as measuring temperature goes...I currently have a TMP36 sensor. The datasheet states that the supply range is 2.7V to 5.5V and the output voltage range is .1V to 2V. I have tested this and using a hairdryer I recieved an output of 1.5V. This should theoretically be ok I assume.
Here is the link to the datasheet if you would like to see it; http://ctms.engin.umich.edu/CTMS/Content/Activities/TMP35_36_37.pdf
The load cell's output however is rated in mV/V. How would I determine if the output is too small for the DAQ to read in? In other words, how would I determine the minimal voltage that the DAQ can take in and still be read?
Does it look something like this?
--> USB-6001 DAQ for example has a 14bit ADC. So would 5V/16384=resolution of analog input pins? I calculated that to get 0.3mV. If I'm not mistaken, I believe that means that analog input variations below 0.3mV would not be recognized.
The full scale output of the load cell would be around 3mV/V.