|Tank level meter|
|menuconfig||Applications->Tank level meter|
|Depends on||ECMD, Clock, ADC, Cron (optional)|
Tanklevel provides an application for measurement of tank levels by hydrostatic pressure.
You need an aquarium air pump, some kind of pipe/tube, a Freescale MPX5050DP pressure sensor and an relay for the pump. Parameters are configurable by ECMD and stored in EEPROM.
│ │ (0) ADC channel │ │ │ │ [ ] Measure on system startup │ │ │ │ [ ] Measure at 12 am and 12 pm │ │ │ │ [ ] Inverted pump output │ │ │ │ [ ] Check lock input │ │ │ │ [ ] Inverted lock input │ │ │ │ [ ] Inline tank level │ │
- ADC channel - ADC channel that is connected to the MPX5050DP pressure sensor.
- Measure on system startup - Start initial measurement at system startup.
- Measure at 12 am and 12 pm - Start measurement at fixed time. Can be changed in services/cron/cron_static.c.
- Inverted pump output - Output pin for pump is inverted.
- Check lock input - Check lock pin before measurement and wait if needed. This is used to delay the measurement e.g. if the oil burner is running.
- Inverted lock input - Lock input pin is inverted.
- Inline tank level - Inline a page to query the tank level.
Example pinning from pinning/hardware/netio.m4:
ifdef(`conf_TANKLEVEL', ` pin(TANKLEVEL_PUMP, PC3, OUTPUT) ') ifdef(`conf_TANKLEVEL_LOCK', ` pin(TANKLEVEL_LOCK, PA2, INPUT) ')
- TANKLEVEL_PUMP - output pin for driving the pump relay
- TANKLEVEL_LOCK - optional pin for external lock signal (see Configuration)
+-------+ |Sensor | +---+---+ | +--------+ +---------------+-+ Pump | | +--------+ +------+------+ | | | | | | |------|------| | | | | | | | | | +-------------+ Tank
See the following example:
Electrical setup is quite simple. Connect the TANK_PUMP port with an relay (usually via an Transistor as current amp) and the output of the Sensor with the selected ADC channel (have a look at the datasheet for power supply decoupling and output filtering). Select a optimal Vref for the ADC if possible. Schematic could look like this:
Parameters can be viewed/set by ECMD commands:
- sensor_offset - zero offset of the pressure sensor in mV
- med_density - medium density in g/ltr (default of 840 for fuel oil)
- ltr_per_m - Ltr per meter tank level
- ltr_full - Tank capacity in ltr
- raise_time - Pump time (in 1/50 secs)
- hold_time - Hold time before measurement (in 1/50 secs)
If SNMP is enabled the level can be queried by this OID's:
- .184.108.40.206.4.1.2021.13.23.4.0 = INTEGER: current level in ltr
- .220.127.116.11.4.1.2021.13.23.4.1 = INTEGER: tank capacity in ltr
- .18.104.22.168.4.1.2021.13.23.4.2 = INTEGER: timestamp of last measurement (unix date)
- .22.214.171.124.4.1.2021.13.23.4.3 = STRING: timestamp of last measurement (clear text)