LibrePilot Forum

International Forums => Chinese => Topic started by: xfce on February 12, 2020, 01:29:38 pm

Title: Librepilot-配置电流电压计
Post by: xfce on February 12, 2020, 01:29:38 pm
发现有不少人开始关注公众号了,欢迎关注
Librepilot-配置电流电压计
描述Revolution和Revolution Nano如何配置电流电压计
任何传感器都可以使用,只要输入不超过3.3V即可,否则可能会损坏CPU。

基本的电阻分压电路
(https://github.com/xfce/flare/blob/master/CurrentVoltConfig/%E5%9B%BE%E7%89%871.jpg?raw=true)

Revolution连接如下
(https://github.com/xfce/flare/blob/master/CurrentVoltConfig/%E5%9B%BE%E7%89%872.jpg?raw=true)


电阻分压电路举例
假设3S电池,电池电压12.6V,电阻分压比为R2:R1=3:1,采样电压为3.15V<3.3V, 对应的比例因子为4

GCS地面站设置
1.飞控连接GCS地面站;
System页面>Settings/Hwsettings,使能电池模块OptionalModules > Battery > Enable;
选定AD采样通道,比如
ADCRouting > adc0 > BatteryCurrent
ADCRouting > adc1 > BatteryVoltage
(https://github.com/xfce/flare/blob/master/CurrentVoltConfig/%E5%9B%BE%E7%89%873.jpg?raw=true)

4.点击按钮,(https://github.com/xfce/flare/blob/master/CurrentVoltConfig/%E5%9B%BE%E7%89%874.jpg?raw=true)保存
5.飞控断电,重启。
电流电压计校准
连接电压电流传感器到ADC输入,电压电流会不正确,需要校准
(https://github.com/xfce/flare/blob/master/CurrentVoltConfig/%E5%9B%BE%E7%89%875.jpg?raw=true)
比如上面的电阻分压的电压系数即为4,
FlightBatterySettings参数设置
1.连接飞控到地面站,切换到System页面;
2.找到FlightBatterySettings,设置相应的电压电流系数。
3.设置电池容量参数,如果希望飞行器提前2分钟报警,否则设为0;
4.设定NbCells个数(2代表2S,3代表3S);
5.设定相应的警告和报警电压;
6.点击,(https://github.com/xfce/flare/blob/master/CurrentVoltConfig/%E5%9B%BE%E7%89%876.jpg?raw=true)保存。
偏置
某些时候,小读数不是很准确,需要增加偏置校准,
(https://github.com/xfce/flare/blob/master/CurrentVoltConfig/%E5%9B%BE%E7%89%877.jpg?raw=true)
注:如果单独使用电压测量,则需要将电池容量改为0mAh,否则由于缺少电流计,PFD中time会出现飞行器能飞行时间小于30秒的报警,导致不能解锁.
-------------------------
欢迎扫码关注微信公众号
(https://github.com/xfce/flare/blob/master/bi4wmsStudio%E5%BE%AE%E4%BF%A1%E5%85%AC%E4%BC%97%E5%8F%B7.jpg?raw=true)