astrohr / dagor_tca

Telescope control application, and stuff
0 stars 0 forks source link

kontroler vrata kupole treba mjeriti napon akumulatora #28

Open frnhr opened 8 years ago

frnhr commented 8 years ago

measure the voltage and thus estimate the battery charge/state, and warn the user/software that charging of the battery might be needed, or there is another problem with the battery (see: http://www.instructables.com/id/12V-Battery-State-Of-Charge-Indicator/)

frnhr commented 8 years ago

Since Arduino runs on 5V and battery gives 12V (or more?), it should be very easy to detect battery voltages accurately down to 7.5V.

If battery goes below 7.5V, Arduino will start to get less then 5V (because linear regulator 7805 needs about 7.5V on input). This will cause errors when comparing input voltage on analogue inputs (ADC). But if battery goes that low, we will probably have problems closing the doors etc. anyway.

Before building the actual battery meter, we should test how the battery behaves when it goes low. If it turns out it can operate the doors well with voltages below 7.5V, then we might want to build a more complicated voltage meter. Otherwise, the simplest 1:2 or 1:3 voltage divider will work perfectly.


BTW, arduino will work fine on voltages down to about 3V. Technically, running on 16MHz (crystal is soldered onto Arduino board) below 4.5V is "out of spec", though it is a very conservative spec, and even if Arduino starts to skip a cycles, it won't be a problem (Arduino talks to radio module via SPI bus, which does not require accurate timing).

vedran-dobos commented 8 years ago

12V nominal lead-acid batteries should never be discharged below 11.8V without load, anyhow. Applying a load could lower the voltage to 10V or so. At that point charging should start (dome rotates to "zero" position) and/or the doors should close.