11-22-2011 03:35 PM
Hello to everyone and thank you for trying to help me,
I'm working on a project at CU Boulder and I'm having trouble with NI's Peak Detection Software. I am using it to detect the minimum accelerations from an accelerometer reading data at 1000 samples per .1 seconds. At one point it was saving the amplitude values in the array created by the Peak detection software but, now when it detects an acceleration greater than my threshold (.5), it no longer saves these values in the array, but instead just goes back to 0 and the amplitude that it sensed disappears (maintaining Amplitude 0 as none). I'm wondering how I could save these values. I believe the end of my code from the amplitudes will add each individual amplitude and allow me to create a "score" for the strength of my punch. Thanks to Katie M for helping me with the addition and unbinding of the amplitude array of the individual amplitudes.
Thank you so much,
Zack
11-23-2011 12:47 PM
Hey Zack,
I am trying to understand what you are trying to accomplish, it seems like the program is running like you describe however it looks like when I run it the amplitude values that get stored in the array are the values that are coming out of the Peak Detection vi. So if you want to record all the values, not just the values that are above your threshold all that information is available in the Dynamic data coming out of the DAQ assist. You could also use logic to separate the data as it comes out the DAQ assist as data above your threshold and data below.
Hope this helps.
11-28-2011 07:46 PM
I've discovered my problem. The width of the peak of the acceleration waveform graph is .01 seconds because the acceleration is almost instantaneous (This means the peak detection software cant find the maximum because the width is less than 2). I need to find a way to capture the maximum values of the acceleration from a punch, store it in an array, add all the individual maximum values together and multiply by a constant to get a "score" value for punching strength. Does anyone have suggestions on how to capture the maximum value? It's really coming down to the wire with this project and I've made a version using a scoring system based on "fastest time completed" but, I really think this part of the game is one of the most important.
Thank you for the help
CU Boulder Student
Zack
11-29-2011 03:32 PM
Hey Zaal,
Could you upload you latest vi, and also what hardware setup are you using? Because it seems like the solution is going to be dependent upon the hardware you are using to get the measurement. Also there are Acceleration examples in LabVIEW Help » Find Examples » Search » acceleration.
12-01-2011 11:17 PM
Hey Beau H,
Here is my most recent code and now I'm having trouble inserting a wait function to slow down the rate at which random numbers are generated. I'm also having trouble with my 4 accelerometers. Whenever one of the accelerometers senses an acceleration, they all are sensing acceleration in the graph simultaneously. We are using MMA7361 accelerometers from Sparkfun. They are each connected indiviually to 4 analog input channels. They also seem to be working with and without power. When we turn on the required 2.7-3.3 V the data becomes much more noisy. They seem to work without voltage and we have done tests to verify this. So, besides the wait function and the 4 accelerometers each reading the others acceleration, I would also like to know how to find the maximum output voltage for the period when the acceleration is being compared to a value to tell the light to turn back off and then, leave the case structure (this is where I'd like to insert the wait function) and finally produce the next random number/LED light.
Thank you so much
Zack