I have a sonar MAXBOTIC i2c that works if I put 25 in the full param list, but I would like to use it as a front sensor to avoid obstacles. However if I put 0 the reading stops and I always get the message “Prearm prx1 no data”
did you set proximity1 to use rangefinders?
I’m using exactly this sensor in i2c with FW 4.4 dev custom (custom fw server) because I have a kakute F4 1MB flash.
I think this should work and the settings shown above look ok except that RNGFND1_ORIENT should be set to zero (forward)… can you provide an onboard log?
thank you very much!
I attach two logs with option log_disarmed=1.
With RNGFND =25 and with RNGFND =0
I noticed that with RNGFND =25 sonar range works, while with RNGFND =0 sonar range reads 0 but the screen (ctrl F) proximty works. I’m in trouble…
However the final configuration would be a small 4" quad with sonar for altimeter and frontal TF luna lidar for obstacle avoidance. Both sensors on I2c.
Ah, if you’re seeing the distance on the proximity radar screen then it is working as expected.
I think the sonarrange field that you’re looking at is only ever used for downward facing lidar (on Copter at least).
Thanks Randy, yes the radar works! Then I’ll do a test flight even if sonar range is zero.
In the log I see the PRX data only if RNGFND ORIENTED=0, the PRX data disappears for RNGFND ORIENTED=25.
However sonarrange works with sonar if (pointed downwards (see pictures above).
Down only. In case of RNGFND ORIENTED = 0 SONARRANGE no longer works
This all sounds correct to me.
Yeah, everything you described is the normal operation of it.
Works as expected! The Jedi Force
However, I had some problems with the compass. By simply changing the poshold braking parameters in the full parameter list, in the field the compass had lost its calibration data and the quad risked crashing. I had to do the calibration again (the dance) and the system worked (arducopter 4.4 dev)
Congrats! great video!
Re the poshold braking parameters, I can’t imagine how changing those parameters could affect the compass. My guess is that its either a coincidence or some issue with the GCS updating parameters unexpectedly. All parameter changes are recorded in the logs at least if they occur while the vehicle is armed.
The compass calibration required message also comes up if the order of the compasses is changed or one is gained or lost. So a wiring issue (for example a broken cable) can also cause this message to appear on the next attempt to arm.
Thank you @rmackay9 ,
I didn’t quite understand what happened (never happened before), but I didn’t receive any message to recalibrate the compass, it simply indicated a wrong direction, but without warning I flew anyway and when I put loiter mode, the quad went out of control. I re-calibrated the compass with mission planner and the old dance system. Later I had some compass variance messages in fast maneuvers, but not logged as an error. I assume this is due to placing the sonar too close to the gps compass, but this is only a temporary arrangement. I think the sonar will be used as an altimeter and I will be using a small forward facing lidar for obstacle avoidance.
Could it be an i2c bus problem where I also connected the sonar in addition to the compass? Or not enough power supply of FC (kakute F4)?
I am trying the same sonar in the down position as an altimeter for surface tracking however, although the sonarrange is correctly displayed, the copter seems to ignore the presence of the down facing sonar. I set RNGFND1 ORIENTED 25 (down) and on Auxiliary Function Switches I left 40 (Proximity Avoidance). I could try 75:SurfaceTrackingUpDown, but I don’t think that’s the problem. In the dataflash log the sonar reading appears and appears to be correct. I’m using a CFW 4.4 DEV (fc 1MB) am I forgetting to enable something? Thank you!
If you have an onboard log I can have a look. I’m pretty sure that this is not a software error but rather configuration problems.
Thanks a lot @rmackay9
This is a log of yesterday’s flight trying to stay under the copter in flight with an umbrella but the copter only lifted due to ground effect.
I have now set RCx_OPTION to 10 Rangefinder … could it help?
2022-12-12 16-14-51.param (14.9 KB)
I think I found the problem thanks to the rangefinder reading on the yaapu telemetry. I could see the sonar getting out of range even at low altitudes. Could it be a sonar vibration problem? the sonar is in contact with the copter frame. In particular, the sonar “microphone” touches the frame. Do I have to isolate it mechanically? However when the reading is correct the copter behaves correctly.
In general sonars are difficult to use. I have not used a Maxbotix sonar for many years but last time I did (see video below) it was important to create a cable with a capacitor in it.
Thanks @rmackay9 , I will watch the video carefully. However as obstacle avoidance (at least with the simple stop) as seen in the video it worked well. As an altimeter I changed the support to point it downwards, the rest is all the same. Cables included. What technology does DJI use on small low altitude altimeter copters?
it works, but only at low altitude (less than 2m), otherwise the sonar is too noisy. I don’t know whether to try the way of shielded cable and filter because I’m working on a small 4" copter with little space and lots of noise. Would a small lidar be better?
My sonar works in i2c