Greetings
Have built & flashed 5v Arduino with OpenXsensor and used configurator to modify settings in sketch.
I can get Vario tones,Alt,Vspd,Flight Pack voltage(using MikeB circuit),Rx voltage,RSSi with a D8R2.
But cannot get any current readings using 30Amp ACS712 sensor on A3 pin with sensitivity 66mV/A an Output Offset of 2500mV & a Divider Factor of 1.
The Sensor Outputs 2.5v @ 0A,and a decreasing voltage when current flows through it!
After reading Manual about configuring current source correctly in Tx & trying most of them to no avail!.
Thought I would post & see if any of you can tell me what i have done wrong.
Yours in anticipation a newbe @ Taranis
OpenXsensor Config & setup in OpenTx 2.015 with a Taranis pl
Moderator: rainer
OpenXsensor Config & setup in OpenTx 2.015 with a Taranis pl
A common mistake people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools!... Douglas Adams: "Mostly Harmless"
Re: OpenXsensor Config & setup in OpenTx 2.015 with a Tarani
Decreasing voltage? Hmmm, I think it should be an increasing voltage? That is a bidirectional sensor. Maybe try swapping the wires that are being sensed. NOT NEGATIVE AND POSITIVE.
João
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Re: OpenXsensor Config & setup in OpenTx 2.015 with a Tarani
You are using a bidirectional sensor. Depending of the direction of the current the value reported by the sensor is higher or lower than 2.5 Volt.
The voltage at the output of the sensor is converted in current by the software in openXsensor by this formula:
currentData.milliAmps = ((currentData.sumCurrent / cnt) - OFFSET_CURRENT_STEPS ) * MAMP_PER_STEP ;
where (currentData.sumcurrent /cnt) is the average of the reading from the currentsensor.
So at this line currentData.milliAmps can be positive or negative (when the average is lower than the offset.
Still, on the next instruction openXsensor forces the current to zero when the calculated current is negative (in order to transmit only positive value).
That explains why you only get 0.
To solve it you can swap the wires that are being sensed as jhsa said. In this case, the voltage returned by the sensor will be higher than the offset and the current will be positive.
Still there is an easier alternative: do not modify you wires and just put a negative value for the parameter MAMP_PER_STEP (adding a minus in your config file). The resultwill be the same.
The voltage at the output of the sensor is converted in current by the software in openXsensor by this formula:
currentData.milliAmps = ((currentData.sumCurrent / cnt) - OFFSET_CURRENT_STEPS ) * MAMP_PER_STEP ;
where (currentData.sumcurrent /cnt) is the average of the reading from the currentsensor.
So at this line currentData.milliAmps can be positive or negative (when the average is lower than the offset.
Still, on the next instruction openXsensor forces the current to zero when the calculated current is negative (in order to transmit only positive value).
That explains why you only get 0.
To solve it you can swap the wires that are being sensed as jhsa said. In this case, the voltage returned by the sensor will be higher than the offset and the current will be positive.
Still there is an easier alternative: do not modify you wires and just put a negative value for the parameter MAMP_PER_STEP (adding a minus in your config file). The resultwill be the same.
Re: OpenXsensor Config & setup in OpenTx 2.015 with a Tarani
Didn't know about this simple solution
João
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW