Show Posts
|
|
Pages: [1] 2
|
|
1
|
Using Arduino / Sensors / Re: Impact location, using four sound sensors.
|
on: June 11, 2011, 08:28:31 am
|
|
Thanks you guys for all the input, i have been busy with another project the past few months and did not get allot of time to work on this, but yes, it is not an easy solution but i am will find a way to make it work...
Thank you for all the new ideas, i must say the approach from necromancer sounds like it would be the simplest way..
I will keep you up to date as i make progress, still struggling to get the Comparator part sorted out, i am stupid with the electronics, so i need to go by trial and error..
Marcel
|
|
|
|
|
4
|
Using Arduino / Sensors / Re: Impact location, using four sound sensors.
|
on: March 03, 2011, 04:24:51 am
|
Thank you.. Will start working on this approach, Honestly, i understand you frustration, i have been trying to solve this for a long time now, and every single person i present with the challenge says it is easy, until they need to prove it.. I have rewritten this application about 20 times now... Hope this is the last one... Thank again for all your inputs gents.. rewrite this system to express x0 and y0 and you're done. funny that many come out on how to solve this (oh yeah, it's trivial, search wiki) problem, without actually presenting a working solution! In the end I got really annoyed, and here is a a solution to calculate the positions (mathemetica, matlab did not help much so I did it by hand) and you can find here the algo for this particular problem: http://www.schwietering.com/jayduino/#newtonmethod (in 4 iterations you get a 1E-09 result).
|
|
|
|
|
6
|
Using Arduino / Sensors / Re: Impact location, using four sound sensors.
|
on: February 27, 2011, 05:46:03 pm
|
|
Hi Gentlemen,
I have a new question... relating to the same topic... I have been doing some reading on the various ways to get the audio data into the Arduino.
Well i am at the point where i am not sure what is the correct direction to take..
Option one: Using the pre-ams on the analog ports as i am doing now.
Option two: Using a OpAmp as a comparator and putting the data into the Digital ports, and using one of the Hardware timers to create an interrupt to signal the arrival of a new input..
Would Digital be faster than Analog, or the other way around ?
Does anyone have any advice regarding these options, it seems the prediction that i will loose accuracy due to the speed of the processor. so any improvements i can make will help me get more reliable data.
currently i get very random data, still trying to figure it out why, that is why i am looking at way to improve that data input...
here is what i currently get, five impacts at roughly a similar location on a surface 940mm x 640mm the times are in millisecond....
------1--------- Time1 = 0.00 Time2 = 0.94 Time3 = 2.84 Time4 = 5.69
------2--------- Time1 = 0.00 Time2 = 2.34 Time3 = 4.69 Time4 = 13.19
------3--------- Time1 = 0.00 Time2 = 3.75 Time3 = 4.70 Time4 = 5.65
------4--------- Time1 = 0.00 Time2 = 0.47 Time3 = 1.88 Time4 = 3.78
------5--------- Time1 = 0.00 Time2 = 3.76 Time3 = 4.70 Time4 = 8.03 ---------------
Any Ideas????
Thank you Marcel
|
|
|
|
|
7
|
Using Arduino / Sensors / Re: Sensing people moving around
|
on: February 24, 2011, 04:13:22 pm
|
I am a newbie, so this might be stupid.. Depending on the size of the area, RF tags could be an option.. There is a company in South Africa TrolleyScan http://trolleyscan.com who uses RF tag to track trolleys in stores.... They also claim they can track animals ext.. maybe you can find some info in their concept.. That is if that fits the definition of huge... Just my 10 cents 
|
|
|
|
|
8
|
Using Arduino / Sensors / Re: Impact location, using four sound sensors.
|
on: February 23, 2011, 03:53:36 pm
|
|
Thanks Juergen,
I will start playing with this one aswell, Thank all you guys again, i appreciate all the effort you put in to try and help resolve this problem..
Hopefully one day i can also contribute as mush to your or someone else s project.. Might take time but hope to get there...
Thanks Rob and Jeurgen.. i will test and post my results..
Regards Marcel
|
|
|
|
|
9
|
Using Arduino / Sensors / Re: Impact location, using four sound sensors (sampling considerations).
|
on: February 20, 2011, 08:00:02 am
|
Being new to Arduino, i have not really considered that, but i have read quite a few references of using external timing methods to improve the accuracy.. Honestly at this moment i am less concerned about the accuracy than figuring out the mathematics to solve this problem.. The hardware is something i will work on fine tuning later if needed, that is luckily the part where there is way more information available to improve the solution.... The math seems to be a challenge any way i look at it. I have read a post on this forum of a Guy using a similar setup who achieved something like 1.4mm accuracy, now if that is true it is more than i need.. unfortunately i need to find the location before i can determine the accuracy of the solution and start working on that problem... Is there anyone out there who has done something similar, who can help me PLEASE  My current test is based on 1200mm x 800mm but later on i would like to scale it up Did you make considerations about the precision you'll obtain? Using the standard max sample rate of the Arduino ADC (prescaled with 128) you will get these readings AFAIK: 4 sensors dividing an expected sample rate of 8.9 Khz: 340m/s speed of sound (22oC)= 340000mm/s 340000/(8900/4) ~= 153 mm. This means a medium sampling distance of sound vs distance of about 15cm for a single sensor and of about 4 cm for the single fronts delta between adjacent sensors (which makes the error considerations tricky).
|
|
|
|
|
10
|
Using Arduino / Sensors / Re: Impact location, using four sound sensors.
|
on: February 20, 2011, 03:35:27 am
|
Yes they will be connected via wire to the Uno, My current test is based on 1200mm x 800mm but later on i would like to scale it up more to about 2.5m x 2m... What kind of distance are you expecting between the receivers? Will they all be connected to the uno via wires?
|
|
|
|
|
11
|
Using Arduino / Sensors / Re: Impact location, using four sound sensors.
|
on: February 19, 2011, 05:51:49 pm
|
Hi Rob, i have been working on the method you sent me most of the day, but something just caught my attention.. Using the Hyperbola will give me a XY coordinate on the Hyperbola's Dimensions A-B, not on the the larger grid.. I still have no Idea mathematically where on the target area A-B is located, so those coordinates results in another set of unusable data.. Does this make any sense to you ? Or am i missing something here ? --update -- Sorry, my first reasoning was far too simplified ==> removed; a retry. You need the distance between the microphones and the two delta T arrival times of the shockwave to do the math. If you have three points A, B and C. arrival times of soundwave (in order) A - T0 B - T1 C - T2 The fact that the soundwave arrived at A first defines an area(1) of all points P: d.PA < d.PB and d.PA < d.PC (d.PA = distance PA) The delta-time AB = T1 - T0 defines a distance d1 = (T1 - T0) /so (so = speed Sound) The delta-time AC = T2 - T0 defines a distance d2 = (T2 - T0) /so define the curve of all points Q: d.QA - d.QB = d1 (.QA = distance QA) define the curve of all points R: d.RA - d.RC = d2 These two curves cross each other in area (1) => the point of impact ==> Q == R. -- update -- if you knew the time of impact the d.QA, dQB and d.QC would be known, making the math faaaaar simpler as these curves are not trivial - quadratic asymptotic beasts with sqrts in it - Think it is easier to write an approximating algorithm that searches the point. The fact that point A heard the soundwave first => d.QA < d.QB -- update 2 -- from: - http://www.mathwarehouse.com/hyperbola/graph-equation-of-a-hyperbola.phpA hyperbola is a set of all points P such that the difference between the distances from P to the foci, F1 and F2, are a constant K so my "quadratic asymptotic beasts with sqrts in it" can be rewritten as hyperbola with A and B (A & C) as foci. using the drawing of the webpage above: Assume A = (0,-c) and B = (0,c) and the constant K = d1 = (T1 - T0) /so. The point (0,-a) where the hyperbola crosses the Y-axis is (0, -d1/2) --> http://www.mathwarehouse.com/hyperbola/focus-of-hyperbola.php To determine the foci one uses a^2 + b^2 = c^2 => b^2 = c^2 - a^2 = (d.AB/2)^2 - (d1/2)^2 The formula of the hyperbola becomes : y^2 / (-d1/2)^2 - x^2 / (d.AB/2)^2 - (-d1/2)^2 = 1 Same trick for the points A & C (hint: it is easier to use another reference framework to determine the formula and do a translation afterwards: X -> X-xdelta Y -> Y-ydelta) TODO: determine intersection points of the two hyperbolas and then your close... -- update 3 -- intersection points -- http://www.analyzemath.com/HyperbolaProblems/hyperbola_intersection.html Difference with the location problem is that the hyperbola defined by points AB and the one defined by points AC are 'orthogonal' - think of it as the red in the drawing rotated 90 degrees (make a drawing!!) There will be two intersection points and because the soundwave arrived first at A it becomes obvious which one to choose. The code is left as an exercise ....
|
|
|
|
|
12
|
Using Arduino / Sensors / Re: Impact location, using four sound sensors.
|
on: February 18, 2011, 04:23:35 pm
|
Honesty, i have lost you at the first part already........  But i will spend some time on this and see if i can get some understanding of how this all fits together.. Thank you for the effort you put in it is appreciated.. --update -- Sorry, my first reasoning was far too simplified ==> removed; a retry. You need the distance between the microphones and the two delta T arrival times of the shockwave to do the math. If you have three points A, B and C. arrival times of soundwave (in order) A - T0 B - T1 C - T2 The fact that the soundwave arrived at A first defines an area(1) of all points P: d.PA < d.PB and d.PA < d.PC (d.PA = distance PA) The delta-time AB = T1 - T0 defines a distance d1 = (T1 - T0) /so (so = speed Sound) The delta-time AC = T2 - T0 defines a distance d2 = (T2 - T0) /so define the curve of all points Q: d.QA - d.QB = d1 (.QA = distance QA) define the curve of all points R: d.RA - d.RC = d2 These two curves cross each other in area (1) => the point of impact ==> Q == R. -- update -- if you knew the time of impact the d.QA, dQB and d.QC would be known, making the math faaaaar simpler as these curves are not trivial - quadratic asymptotic beasts with sqrts in it - Think it is easier to write an approximating algorithm that searches the point. The fact that point A heard the soundwave first => d.QA < d.QB -- update 2 -- from: - http://www.mathwarehouse.com/hyperbola/graph-equation-of-a-hyperbola.phpA hyperbola is a set of all points P such that the difference between the distances from P to the foci, F1 and F2, are a constant K so my "quadratic asymptotic beasts with sqrts in it" can be rewritten as hyperbola with A and B (A & C) as foci. using the drawing of the webpage above: Assume A = (0,-c) and B = (0,c) and the constant K = d1 = (T1 - T0) /so. The point (0,-a) where the hyperbola crosses the Y-axis is (0, -d1/2) --> http://www.mathwarehouse.com/hyperbola/focus-of-hyperbola.php To determine the foci one uses a^2 + b^2 = c^2 => b^2 = c^2 - a^2 = (d.AB/2)^2 - (d1/2)^2 The formula of the hyperbola becomes : y^2 / (-d1/2)^2 - x^2 / (d.AB/2)^2 - (-d1/2)^2 = 1 Same trick for the points A & C (hint: it is easier to use another reference framework to determine the formula and do a translation afterwards: X -> X-xdelta Y -> Y-ydelta) TODO: determine intersection points of the two hyperbolas and then your close... -- update 3 -- intersection points -- http://www.analyzemath.com/HyperbolaProblems/hyperbola_intersection.html Difference with the location problem is that the hyperbola defined by points AB and the one defined by points AC are 'orthogonal' - think of it as the red in the drawing rotated 90 degrees (make a drawing!!) There will be two intersection points and because the soundwave arrived first at A it becomes obvious which one to choose. The code is left as an exercise ....
|
|
|
|
|
13
|
Using Arduino / Sensors / Re: Impact location, using four sound sensors.
|
on: February 18, 2011, 08:46:52 am
|
I might be missing something in this formula, the problem i see is that Xi and Yi is unknown to me, thus i cannot manipulate the formula to give me the results Yi or Xi, or am i just not understanding what you are trying to show me ? Based on timing and the speed of sound you have the length of line segments A1, B2 and C3. You want to find the point of impact in the center of the circle. Call the radius of that circle R. The distance of the impact from the four corners is 0:R, 1:A1+R, 2:B2+R, 3:C3+R. Write out the four equations and solve for the three unknowns: R, Xi and Yi (the coordinates of impact).
For example: SQRT((Xi-X0)**2+(Yi-Y0)**2) = SQRT((Xi-X1)**2+(Yi-Y1)**2) - AI = SQRT((Xi-X2)**2+(Yi-Y2)**2) - B2 = SQRT((Xi-X3)**2+(Yi-Y3)**2) - C3 = R
You can probably just drop out the R and solve for (Xi,Yi).
|
|
|
|
|
14
|
Using Arduino / Sensors / Re: Impact location, using four sound sensors.
|
on: February 17, 2011, 12:11:39 pm
|
This sounds interesting, i will play with this at some stage, i think i have an application where that would be helpful.. Thanks for the Info.. Also as to my initial line of thought, i do not have the incoming signal angle, which would help to solve the problem with triangle formulas.. Just some food for thought  , (not a solution for your current problem which has been addressed quite well by the previous post of johnwasser): There is a technique to get an angle from an impact with 2 sensors using an... tada: artificial head. The mics are mounted in the ears. As the sound arrives at two different times, while one of them impacts directly you will have a slight phase shift from which you can determine a rough determination of angle (as long as you don't have sine sounds, which makes it complicate with high tones. Humans are quite good in this technique. the phase shift determination is done using autocorrelation functions, and this technique works also quite well in a noisy ambient.
|
|
|
|
|
15
|
Using Arduino / Sensors / Re: Impact location, using four sound sensors.
|
on: February 17, 2011, 12:05:35 pm
|
|
Thank you guys for all the information, i have allot of thinking to do now, i am not the sharpest pencil in the pack when it comes to math..
I will be playing with these options and update you guys on the results.
Thank you all again....
If you have any other suggestion please let me know, i would deeply appreciate it..
|
|
|
|
|