I have been using the AttoPilot 90A sensor on my 3DR quad copter, from the start. It works, even though AC firmware requires some software lines to define calibration ratios (I looking forward to that to be set in the Mission Planner configuration).
Anyway, a few days ago I read a post from Arnt-Inge about AttoPilot sensor noise was interfering with sonar signal. That got me thinking about how the Atto-sensor is installed, and I started to worry about if the black ground wire in the Atto-sensor signal cable might act as a parasitic shunt to the main battery ground lead. Simply put, the motor current and other power consumers on the copter should have their current returning via the battery pack cable, not via the tiny Atto-sensor ground wire (and the APM board cirquit).
This evening I set up a test to find out whether the Atto-sensor three wire signal cable, black ground wire, acts as a parasitic shunt or not. I simply cut the black wire and connected a low impedance digital current meter.
Test turned out positive. At rest there is a 30mA current from the APM board to the sensor ground.
At full motor power it mesures 450mA. Half of an ampere. Hmm.
For me this is slightly disturbing. Having parasitic current like this in low level signal cables is simply dirty, even though I am not sure what significant implications it has.
I would like to know what you hardware guys have to say about this, please??
(this issue was also posted in the hardware issue forum, but that is a bit too narrow, since it is meant to be a tech support forum of the DIY store, sorry)
Thanks for that info Andrew!
I will check it up. Sounds like it will make things a little easier.
Yep, thinking of it, that dead band you describe might have something to do with the grounding issue. Or not. I would certainly be interested in your findings!
I don't own an ArduCopter - or indeed any DIYDrones product - but I do feel qualified to comment because I'm an Elec Eng.
Your suggestions as to what is going wrong and how to fix it are exactly correct. In an ideal world, for sensing large currents with a shunt resistor you need a 4-wire interface: 2 to carry the actual current and 2 to sense the drop across the shunt. Obviously the sense wires feed a differential amplifier.
The situation you are experiencing is an entirely predictable result of connecting 2 grounds in parallel to sink a large amount of current. They current will divide itself up according to the impedances. You are getting 29A/0.45A, so this is roughly the impedance ratio of your 2 ground paths.
I think you should consider the possibility of large current flows through your servo cable. As the system stands this is potentially a safety concern, as obviously servo cables are not designed to handle motor current. I'd be tempted to tolerate the sensing error and disconnect the servo cable ground.
I agree with Andrew on this one, since you have already moved the current sensor as close to the PDB as possible.
That could just maybe explain why some get "noise" on the sensor output, with a groundloop like that, it might just push the op amp in the sensor into oscillation.
If you read the datasheet of the actual sensor chip, the manufacturer does point out different circuits, for different installations.
Now I've looked at the Atto sensor datasheet - which I should have done before - I see that it does implement a 4 wire interface, and brings out the I and V signals as single ended (referenced to ground). The shunt is floating with 60V of common-mode range.
The Atto current sensor board needs the shunt to be on the high-side (at least 2.7V), as it uses this to power the INA169.
You do need to connect ground otherwise the board has no ground reference and will not work.
But you should not see 450mA of ground current. There is something wrong.
Not owning any of this hardware I should perhaps pull my head in now. Sorry for intruding :-)
The sensor chip itself gets its ground from the battery ground running down the edge of the board.
AND from the ground wire to the APM.
There is a thin trace that can easily be cut, and then the ground from the APM should approximate a single point ground better ?
Ah, I see, thank you. Yes, I agree, cut that track. The battery ground is not needed on the current sensor board and is very likely the problem.
The current sensor only needs ground for signal referencing, and grounding the INA169. This can be provided by the APM alone. With a single point earth the ground current should become tiny.
Now away on travel. Have yet not had the opportunity to test my new setup.
Since your postings I too have been looking into the circuit design and I concur with the conclusion that the INA169 is designed to work in a differential mode. Though I am very uncertain just cutting the PCB ground connection would work, due to inherent design.
I have another suggestion, based on removing the current sense output resistor and replacing it with a resistor on the APM board side of the sense cable, between analog input and APM ground. Since the sense output signal is a current generator type, the signal would then be floating on the APM ground, precisely what we want!
The AttoPilot sensor built in voltage divider is less than optimal, since it have such a high division ratio that it wastes much of the resolution, and the voltage drop "error" between sensor ground and PDB thereby gets 15,7 times significance, introducing a significant current depending measurement error. We would be much better off just hooking up to the + battery voltage at the PDB and route it to a simple (range tailored) voltage divider at the analog input at the APM.
In the attached AttoPilot data sheet I have made comments on the circuits and application design which would provide better accuracy and no parasitic ground current at all.
Please check it up and tell me what you think.
Tomas, you are seeing excessive current in the sensor ground lead, because the way it is presently wired up, it acts as a second ground path for the BATTERY.
Just cut the thin ground trace running at 90 degrees from the thick trace, and all the black wire then does, is supply a milliamp or so to the opamp, and acts as the ground reference for the sensor output.
Yes Gustav, I understand it is acting as a second return paht for the battery, this understanding is the reason why I started this thread!
I have not had opportunity myself to study the PCB routings, but you and Andrew has, and if you say everything will work fine after cutting that trace, I believe you - and once verified I think this procedure should be officially recommended, in the wiki.
Now, I will probably not do that trace cutting this time, because after having moved my sensor as close as possible to the PDB and using coarse wire, the remaining resistance between PDB and sensor ground is negligible. The current passing through the black sensor wire will maily be bart of the APM current consumption, and these milliamps will hardly be a problem. I will not tear the quad apart again for that.
But in installations to come, I will cut the trace.
Gustav, i fully agree. Mixing GND signals from the APM and the Battery+PDB is a very plausible source of noise from the ESCs into the APM throught the Sensor GND Connection.
I agree with the both of them Tomas, However, I still think you need a capacitor inline with the output or ground of the sensor... Also now that I know there is an op amp involve, one should consider if it has enough reference voltage to push this op amp, also it depends which op amp they are using (inverted, non-inverted, current to voltage, voltage to current, Integrator ETC...) I could be wrong, because I haven't been in Electronics class for a long time however, I still feel that you need a capacitor inline with the ground of your sensor... This will smooth the signal and help get ride of noise... Also you have to figure out if the noise is coming from another component or not...
Also consider that it actually could be a APM design issue...
The datasheet shows a much simplified "circuit".
Don't take it as gospel.
Not sure what you mean by "inline", in my jargon that would mean "in Series", and that would be absolutely of no use.
The battery, if it is connected properly, has a much lower impedance that anything but a HUGE capacitor.
It's not an APM design issue, it is a sensor design issue.
Or maybe an application issue.
The solution of which Andrew and myself has pointed out.
Or myself and Andrew.
Waiting for Tomas to do some tests.............