I can't mount my sonar below the CoG on my hex a so I was going to mount it on an arm, but then I realized that when the craft banks to hover against the wind the sonar would show a change in height.So I was thinking if I put two of the same sonars on a Y cable and put one sonar on an arm and the other on another arm, would the two analog signal result in a the final output being the average of the two analog signal?Or would that result in the two analog signals adding together?Or would I need to connect the second to another analog input and modify code to average the signal?
You need to be a member of diydrones to add comments!
I think the two sonar idea is not a good direction to go.
I think a highly proficient Arduino / Arducopter programmer (which I am not) would be able to read the sonar distance as usual, pick up the current tilt readings of the quadrotor, and then do some trigometery to determine the physical distance to the ground. But I think it would be quite tricky to get it right and it may not be necessary. (Also, this may already be done and part of the code. See my notes below about the "official" sonar mount).
I have been flying quite a bit on "Altitude Hold" using the sonar. I love it. If I was in your situation, and I couldn't mount the sonar dead center on the bottom (which is where mine is), then I would mount it as close as i could get it (on the edge of the frame or on the arm or whatever), and then test it. I'm not sure, but I would think about putting it on the front or rear rather than the side (because when I fly it seems like the degree of pitch is less than degree of bank/roll, although I could be wrong on that). I have a feeling, based on what I've seen thus far, that your single sonar might work OK. It would be interesting to watch what it did. Of course the results might be crazy. You would just have to see.
Also, I've not seen any significant tilt when the unit is on altitude hold and stationary and in the wind. The tilt comes when you manually fly the unit around in circles when on altitude hold.
Also, take a look at this picture of the "official" arducopter sonar mount. It is attached to the edge of the frame a bit off center. It's not dead center on the bottom.
Please note that I am just one person, not super experienced, and not one of the official team, so these are just some friendly ideas, not serious advice.
Replies
I think the two sonar idea is not a good direction to go.
I think a highly proficient Arduino / Arducopter programmer (which I am not) would be able to read the sonar distance as usual, pick up the current tilt readings of the quadrotor, and then do some trigometery to determine the physical distance to the ground. But I think it would be quite tricky to get it right and it may not be necessary. (Also, this may already be done and part of the code. See my notes below about the "official" sonar mount).
I have been flying quite a bit on "Altitude Hold" using the sonar. I love it. If I was in your situation, and I couldn't mount the sonar dead center on the bottom (which is where mine is), then I would mount it as close as i could get it (on the edge of the frame or on the arm or whatever), and then test it. I'm not sure, but I would think about putting it on the front or rear rather than the side (because when I fly it seems like the degree of pitch is less than degree of bank/roll, although I could be wrong on that). I have a feeling, based on what I've seen thus far, that your single sonar might work OK. It would be interesting to watch what it did. Of course the results might be crazy. You would just have to see.
Also, I've not seen any significant tilt when the unit is on altitude hold and stationary and in the wind. The tilt comes when you manually fly the unit around in circles when on altitude hold.
Also, take a look at this picture of the "official" arducopter sonar mount. It is attached to the edge of the frame a bit off center. It's not dead center on the bottom.
Please note that I am just one person, not super experienced, and not one of the official team, so these are just some friendly ideas, not serious advice.
mntmax110-3.jpg
you can't simply connect them via a Y cable, it would break at least one unit. you could use some resistors do make something like a voltage divider
but two sonars pointing in the same direction would interfere each other: you will get very bad readings
you would need to control them via the apm
the best solution is to mount one sonar as close to the GoG as possible