5iMX宗旨:分享遥控模型兴趣爱好

5iMX.com 我爱模型 玩家论坛 ——专业遥控模型和无人机玩家论坛(玩模型就上我爱模型,创始于2003年)
查看: 957|回复: 2
打印 上一主题 下一主题

我又来问问题了,关于MWC电压报警。

[复制链接]
跳转到指定楼层
楼主
发表于 2012-11-12 11:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
没电压报警飞起来很不放心啊,昨天两个电池飞得有点过放了。
具体咋弄?求解答。

config中有一段是这样的,应该是说电压检测的。
  /********************************************************************/
  /****           powermeter (battery capacity monitoring)         ****/
  /********************************************************************/
    /* enable monitoring of the power consumption from battery (think of mAh)
       allows to set alarm value in GUI or via LCD
      Full description and howto here http://www.multiwii.com/wiki/index.php?title=Powermeter
       Two options:
       1 - hard: - (uses hardware sensor, after configuration gives very good results)
       2 - soft: - (good results +-5% for plush and mystery ESCs @ 2S and 3S, not good with SuperSimple ESC)    */
    //#define POWERMETER_SOFT
    //#define POWERMETER_HARD
    /* PLEVELSCALE is the step size you can use to set alarm */
    #define PLEVELSCALE 50 // if you change this value for other granularity, you must search for comments in code to change accordingly
    /* larger PLEVELDIV will get you smaller value for power (mAh equivalent) */
    #define PLEVELDIV 5000 // (*) default for soft - if you lower PLEVELDIV, beware of overrun in uint32 pMeter
    #define PLEVELDIVSOFT PLEVELDIV // for soft always equal to PLEVELDIV; for hard set to 5000
    #define PSENSORNULL 510 // (*) set to analogRead() value for zero current; for I=0A my sensor gives 1/2 Vss; that is approx 2.49Volt;
    #define PINT2mA 13 // (*) for telemtry display: one integer step on arduino analog translates to mA (example 4.9 / 37 * 100

欢迎继续阅读楼主其他信息

沙发
发表于 2012-11-13 10:03 | 只看该作者
不用这么麻烦

#define VBAT

搞两个电阻,串联分压。(328p 接受最高5v电压)用一个analog pin读其中一个电压,然后算出总电压。

具体请自行研究
3
发表于 2012-11-13 10:17 | 只看该作者
低电压保护……并不是报警……
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

关闭

【站内推荐】上一条 /1 下一条

快速回复 返回顶部 返回列表