Hello y’all, I’m new to the the quad copter scene and have been reading up on the F450 and checking out its various setups. I have also ordered most of the components to get one off the ground, frame, ESC’s, motors, navio2 ect… Of what I have so far accumulated I have been able to power the navio2 with rPI and get it connected to APMplanner GCS. I also have a power module that came with navio2 hooked up and displaying voltage readings. I was wondering if any one familiar with Navio2’s could assist me on connecting a sonar module and get it working with APMplanner. The one I have is the “Maxbotix LV MaxSonar EZ4 MB1040” which I have been able to power it with the red and black wire’s from the ADC port of the Navio2. What I don’t understand is which wire or pin do I need to connect to get the feedback from the thing?
Or is there a pinout diagram for the navio2 anyone knows of that could maybe help?
I’ve done some digging around with the navio2 adc too… What I’ve found out so far (copied from another thread):
Mikebert4Mike Beaton2d @mikhail.avkhimenia - thanks for the response, I’ve got the ADC example working for me now (see below) but I can’t get the data into APM - I’ve tried pin 4 and pin 5 in APM, but no avail.
…hacked C++ ADC example…
I’ve hacked the C++ example to output voltage from all of the channels provided in /sys/kernel/rcio/adc/ reading from each of the 5 files in that dir and outputting thus:
(ch0 | ch1 | ch2 | ch3 | ch4 | ch5)
Sorry, I should have said - I’m using the LV-EZ4 as well - I found a great video on how to wire it up with a noise-reducing cable…
Basically, Red to V+ (With a 100ohm resister in line), Black to Ground, signal wire to AN (pin 3 - should be labelled), and a 100mF capicator across ground/V+
Using the test in Navio2/C++/Examples/ADC - I got a readable signal this way (on channels 4 and 5, depending which wire I plugged in)
I’ll have a try again later this week - I tried all the APM analogue pins in order (0 to 9) and couldn’t get a reading into mission planner - what pin should we set RNGFIND_PIN to, exactly?
Then I compared with channel mapping and connected the green wire and vuala! I was able to point the sonar around and get different readings from various distances on CH5.
In APMplanner im able to get it to show distance and its corresponding voltage. The only tricky thing was to uncheck ‘Ratio Metric’ in the Initial Setup tab or you could set RNGFND_RMETRIC=0
On the bottom of the Navio2 the wire going from pin labeled ADC3, with mine it was the green wire. then that connected to AN on the bottom of the Maxbotix. Then in APMplanner I set the input pit to 5 and unchecked the Radio Metric box and it works
I’ve just tested it… and success - thankyou all for your help!
Disabling Ratio-metric is important - it seems that that function is either broken or lacks a scale-factor with which to execute it’s maths, enabling it forces my range to 0.
I’ve just tested range - and with my EZ4 I’m using a scale factor of 4.32m/v and an offset of 0.04v - which makes the sensor accurate to within 5cm (indoors - tested to 3m) I’ll refine this when I can get the sensor outside and away from reflections.
Yes, absolutely. That is how we are using it since it gives us a more accurate reading. Just make sure you keep the cable between the sensor and the Navio2 DF13 connector as short as possible. We tried connecting it to the ADC and it was being affected by the 16-channel receiver every time we turned the radio On as show here.