Magnetometer and Multiple signals on Naze32 I2C


#1

I’m building an ImmersionRC Xugong V2 Pro quadcopter with Naze32 Full Rev6 FC with the aim of using it as an atmospheric boundary layer scientific research platform. This requires the platform to be stable and to fly to pre-set locations both horizontally and vertically. The Naze32 Full FC has a magnetometer on board but I’m concerned about the interference from the nearby ESC power lines. I have a Neo-n8m GPS/Compass on an aerial mount and want to use this compass via the SCL/SDA I2C contacts. But I currently have these lines linked to an on-board Bluetooth module so that I can check on the quadcopter in the field with a tablet. Two questions: 1) I don’t want to disable the Naze32 magnetometer by cutting contacts and I don’t particularly want to move the FC away from its current position near the power wires. The Cleanflight CLI command “mag_hardware” appears to offer a software solution to disabling the Naze32 magnetometer - has anyone successfully done this? 2) Is it possible to run multiple sensors (in my case a bluetooth module and the Neo-n8m compass) from the single SCL/SDA position. My RC setup is a Turnigy TGY-i10 linked to a Turnigy TGY-iA10 receiver running as a PPM unit.


#2

@Micromet

Hi Colin
I don’t think the NAZE32 Full R6 is the best FC for this application.
As you have found out it is limited in UART / I2c ports, as you wish to use external mag, external compass, GPS, and telemetry you need to look at the later generation of FC’s e.g.
Minihawk PX4
Flip32 F3 AIO,
F4 AIO
These have more processing power and additional sensor inputs.
There are also separate remote magnetometer boards which some people have mounted away from power cables (on the landing gear !!) with some success.
I’m afraid the NAZE32 is a bit old now and been overtaken by newer stuff

Hope this helps
Steve :slight_smile:

PS Out of interest, how high will you be flying this platform ?


#3

Hi Steve,
Thanks for the information. Although retired now, I’ve been involved with micrometeorology throughout my working life. This quadcopter lark is just one of my retirement hobbies, and it is all new to me. So this is all just a “proof-of-concept” project and I have been trying to keep costs down to a minimum until I’m aware of limitations in both my choice of drone items and what I can feasibly do. This not only applies to FC’s but motors, frames etc. My first scientific project is to get a fast-response fine-wire thermocouple to ascend through the boundary layer (0-100m) and use the statistical properties of the data to give me a profile of Sensible Heat flux. Similarly, this method can be used to provide data at a fixed height over a ground area to gain a picture of the variation in Sensible Heat flux over different terrains. So this will all be line-of-sight operation but with control via the GPS and altimeter. A colleague is developing a lightweight (200g) photospectrometer - so that we can then do vegetation surveys. Eventually using lightweight sonic anemometers that the Arduino community have developed, I can move into full energy balance studies of the boundary layer.

I’m not planning telemetry if you mean FPV - and my data collection will be to OpenLog Datalogger SDcards - not back to ground station.

But I will have a look at the FCs you mentioned and bear your suggestions in mind - and thanks again for your input.


#4

At Steve has said I think some other FC will be better many of the naze, or f3 boards that run cleanflight/betaflight are built for fpv racing and their ability for position hold and GPS navigation is very limited and in my tests, not very good. My suggestion would go for an arducopter based autopilot system. You can grab a apm2.8 kit for about £50-70 with an external GPS/compass module which would do an excellent job for your needs.

One of our university customers have used the arducopter platform for a high altitude quad to get atmospheric measurements to great success.


#5

Thanks Alex - yes I was coming to that conclusion as well. I began with the Naze32 because I’d never built a quadcopter before and I found excellent video series on both the ImmersionRC Xugong V2 Pro quadcopter frame (although the presenter used a Naza FC) and another video series on the Naze32 by Painless360. So this was an easy route in. Having just looked at the specs. of both the Pixhawk and the APM2.8 (which I see you sell) - I can see why you recommend them.
Are you allowed to say who the University customer is?
I know that Manchester Univ. have been doing gas sampling of things like NOx and other greenhouse gases. And my Alma Mater (Edinburgh Univ) where I got my PhD have also begun testing a hexacopter - they also have a Dimona light aircraft that they use for atmospheric work. They were just about to deploy it in northern Sweden as I retired. Back in 1998, I looked at UAVs (they were all fixed wing then) for aerial work in northern Finland and Sweden - where taking off and landing from the deserted roads was possible. But the cheapest price then of £55K was more than my project budget could afford for the limited results it might have achieved. The NERC Centre for Ecology and Hydrology (where I am a Research Fellow) has had a DJI Phantom stuck beneath a desk for the past year and my little hobby is just to show what is possible and then they can take it further. It’s very difficult to get managers to invest in what looks like a toy without showing some results.


#6

Hi Steve and Alex,
Just for your information - it is possible to multiplex I2C signals. It’s explained in an Arduino forum thread (see http://forum.arduino.cc/index.php?topic=110115.0 ) where both the code, setup and available mux board are described. Nevertheless I am going down the route that you both suggested and getting a more sophisticated FC board.