amabrayd reidmond giannina

0 views
Skip to first unread message

Asia Jordan

unread,
Aug 2, 2024, 8:27:47 PM8/2/24
to comjuijinte

Ethernet connectivity is not yet standardized in the Ardupilot ecosystem, with a number of different connector and pinouts co-existing. To solve this problem, we have developed a simple cable adapter board that converts between our ethernet pinout and a number of other common connector pinouts.

The Benewake TFmini Plus connector pinouts are GND SCL SDA +5V while the Navio 2 I2C are GND SDA SCL 5V. If the SCL and SDA pins on the TFmini Plus are not swapped to match those of the Navio 2, then entering i2cdetect -y 1 on the Raspberry PI does not show the TFmini Plus as a connected I2C device. When the pins are swapped, then TFmini Plus is shown at address 10 (decimal 16).

In the photos is a power module I got on eBay, It looks almost exactly like what I needed to power my Hobby king Crius AIO clone for my tricopter. Look closely at this and a picture of an official one - there are some parts missing!

They have been produced at a cheaper price because they are not the same spec and will not work in exactly the same way as the 3DR part. The photo above is of an official 3DR module and you can see the big old smt capacitor that is clearly missing from ours, but thats not all - keep reading for the main issue!

A: They (probably) don't have a regulator on them and so may pass your battery voltage, possibly 16 volts or more, straight to the flight controller which expects, and can only handle, 5 to 5.5 volts.

I am re writing this as I may have jumped to some conclusions. It appears that I may be wrong and that the full battery voltage may be due to reverse leakage through the diode that will not exist once its plugged into the APM but IM NOT GOING TO BE THE FIRST ONE TO TEST THAT THEORY:) I think its safer to simply remove some wires like I explain further in.

Look at the second picture in step one, notice a big old empty space with a square printed on it and 5 empty through holes? Its where a regulator would be if we weren't so cheap and bought an official one:) You will probably notice a capacitor missing in step ones first photo too, there are two big pads where a tantalum cap is supposed to go. Apparently there maybe a resistor or two missing as well from the full spec but ... doesn't seem to stop it from supplying the voltage and amperage values.

A: Cheap linear regulators waste to much power as heat in order to do a large drop from 16'ish or more volts to 5'ish volts, more expensive switching regulators do a great job at around 90% efficiency and so create little wastage in heat, but are expensive! 3DR spec the official power module with a which cost probably $5 + each (in bulk, more like $10 to you or me at 1 piece prices).

A: Yes, but don't plug it in yet, test everything and make sure you realise that you cannot power your flight controller with this unit you can only pass battery voltage and current usage values into the flight controller! We have to remove a few wires from the cable and move others around a bit so to get everything in the right order.

You should now only have 3 wires left in the supplied harness - which correspond to pins 3, 4, and 5 in my photo. Remove as in carefully lift the retaining clip and withdraw the wire, don't just cut it and leave a stub waiting to short out on something.

Across pins 5 (negative) and 4 (positive) you will see a voltage value of approx. 10 times less than your battery voltage. Using a fully charged 4s battery at 16.75v I read a 1.651 voltage between pins 5 & 4 (yes it should be 1.675 but there is some calibration to do in software). Using a 3s lipo at 11.1v you will see something more like 1.11 volts etc ect. The flight controller will read this voltage, times it by 10 in code and know your battery voltage. Its done this way as the flight controller would like to know battery voltage but cant handle more than 5 volts and so we give it something smaller and tell it how to scale it back up.

Same as above, measure between pins 5 (ground) and pin 3 (positive) to see what voltage is coming out, at this point it will probably be 0v or something very small. You wont get any indication of current until you actually draw some by loading up the power module - ie by flying your quadcopter! With no load its 0v * amp factor which is still 0.

So without caring to much if that chip is or isn't what I think it is I moved on, the instructions I have compiled work either way. So from here on this is how I think this thing is working and how I have set it up and it seems to work this way.

The shunt resistor marked 0M50 has a very low resistance and so will have a very small voltage drop across it even when you load up this power module with 8 motors it likely wont be very much, its going to be read by the flight controller, probably after being amplified by quite an amount (in the suspected INA 169 IC) and then again in code some simple ohms law maths will deduce how much current you are using at the point in time.

If you don't have some voltage values similar to the described above, don't move on. You absolutely don't want to be able to find more than 5 volts across any combination of any of the 3 pins left in your harness or something is wrong. In fact more than a few volts and something is wrong.

3DR state their power modules are good for up to a 4s battery, this is I believe because of the voltage regulators maximum input voltage specification. The INA169 has a max of 60v. Since we don't have this regulator, its feasible to assume we can use a higher cell count battery with this setup. Being that the voltage divider scales battery voltage down by 10, and the FC can (probably- depending on what kind of ADC its using, and yes I haven't looked into this but I think the mega 2650 they are based on is happy with 5v, they are in my Arduinos anyway:) accept 5 volts to its analog to digital converter it makes sense that we could use a supply voltage of 50 volts (50/10=5). So maybe up to an 11s battery if such exists, without going over the (assumed) 5 volt input limit to the FC analog 0 pin. There is a diode with a 20 v rating in there on the 5 volt line which doesn't work anyway which might be less than happy with the extra battery voltage? So with that said maybe, since we dont use the 5v out from these 'reg less' units we could use big cell count batteries. Please put more thought into that idea than I just did before trying it.

1) The wire going from power module pin 3 needs to goto the FC pin for voltage sensing, On the AIO boards its marked A1 current sensor. In the image above of my Hobby King MultiWii and Megapirate AIO FC (hobby kings Crius AIO clone) its the second bottom pin on the connector in the top white female plug.

2) The wire going from power module pin 4 needs to goto the FC pin for current sense, on AIO boards its marked A0 voltage sensor/divider. In the image above of my Hobby King MultiWii and Megapirate AIO (hobby kings Crius AIO clone) its the bottom pin on the connector in the top white female plug.

3) Ground, pin 5 from the power module side, needs to connect to a ground on the flight controller. There are no ground pins in that female connecter on the AIO FC however the board is littered with them so just goto any spare.

The pictures above show the wiring, its tough to see, sorry, but there is only 3 wires so follow carefully and it shouldn't be to hard to be sure you've done it right. I added one pic with wires drawn in paintbrush to try and make it clear.

Clearly, regarding power, your battery goes in one end and the other end goes off to your usual power distribution, your speed controllers and such. The direction of flow is marked on the board, in from the battery, out to the multirotor/plane or what ever.

There are methods for instructing the Arducopter code based flight controller to A) listen on these analog pins and B) calibrate to valid values. The Calibration is important - maybe with a 3DR power module you could consider being lazy and skipping it, however chances are the tolerance or spec'd values of the divider and shunt resistors in our cheapies are different than those supplied by 3DR and so are all the more in need of calibration from default values!

These steps are fairly well documented on 3DR's Page ( -measuring-...) . Remember not to follow any pinout or connection instructions on that page, thats for people with official power modules which wont blow up flight controllers, just follow the steps to enable and calibrate the readings within the mission planner software or the steps below.

8) Then measure your battery voltage with multimeter (don't disconnect battery, do it in place, you can do it across the balance leads measuring from the end pins, furthest from each other. Its important to have some kind of load on a battery even though the FCs load is quite minimal its all we've got right now, its also important to have the flight controller listening to its signals on A0 and A1 so when you give it the correct value it can compare it with its A0/A1 voltage values and make the decision about what the error is and how much to change the divider value).

9) Then on the right under calibration you can add the value you measured into "Measured battery voltage". This will update the voltage divider values. As I suggested every module, and in fact every resistor worth less than $10 itself, is a little bit different and needs to have this done.

What its eluding to is that for every volt it can see on pin A1, its going to assume that there are 'some constant value' times that many amps in play. So for example my value is 18, meaning that for every volt the power module delivers to the A1 pin, the arducopter software is going to believe that 18 amps are being drawn. This is where the 90 amp maximum for the power module sensing comes from I guess, 18 volts per amp * 5 volts = 90. Would be interesting to see whether the sensor will provide a damaging voltage value of over 5v to the APM board if you somehow managed to draw over 90 amps?

c01484d022
Reply all
Reply to author
Forward
0 new messages