Single AC clamp can measure current flowing through a single wire in a non-invasive way. There are AVR/Arduino projects use such a clamp to measure house power usage. However, they use 3 clamps for 3 main wires that come into house breaker box. Unfortunately, I don't have access to separate wires in my breaker box. I can only access main power cable that comes to my house through the roof, and that cable has all the wires inside itself (is this a good assumption?) without possibility to separate them. If that is so, then the question is can I use a single clamp on that main cable for my own little power usage measurement AVR project, and if I can then is there some reason for it to be less reliable then 3 clamps solution?
To measure single-phase power, simply measuring voltage and current does not yield actual power with any precision. Any power factor issues will skew the results, often badly.
Consider instead a solution like this one from SiLabs with their Si8902, which uses digital-side isolation, not line-side. Or here is another approach from Linear Tech using their LM2940, where isolation is at line side. Similar isolated solutions exist from Texas Instruments, and many other companies.
If you must measure in discrete parts,
- Measuring current on both live and neutral legs is often useful - a difference would indicate an earth leak inside the domestic network. Inductive clamps are safe enough.
- Measure voltage across live to neutral using either an isolated voltmeter or an isolating voltage sense IC
- Measure phase on both voltage and current sense channels, so you can have a PFC correct power figure such as the utility company bills you for.
An important point to keep in mind:
Most utility companies frown upon any equipment connected on the distribution side of your domestic entry point / fuse box - all devices including power monitoring must be on your side of the fence. Also, connecting anything at all beyond the fuse box may violate UL or equivalent certification for your geography, leaving your home exposed to diminished insurance coverage.
For measuring remaining capacity of a LiPo battery pack, search for Battery Fuel Gauge ICs.
For instance, the Texas Instruments bq34z100 Wide Range Fuel Gauge supports LiFePo4 batteries from single cell through to 18 cells (3V to 65 V range), monitors battery health, charge and discharge, battery aging and self-discharge. It interfaces using I2C 2-wire, and also has direct indication support via an LED direct output pin.
Fuel Gauge or Gas Gauge ICs like this can both estimate remaining capacity, and learn the battery parameters over time, thus improving precision of estimate with use.
To take battery management further, LiPo battery pack manager ICs such as bq3055 not only provide fuel gauging, they also incorporate over and under-voltage protection, overcurrent and over-temperature protection, all in one package.
For measuring current in the 50 Ampere range mentioned in the question, an integrated Hall Effect Current Sensor IC such as Allegro's ACS756 Hall Effect based Linear 50-100A Current Sensor can be used. While sub-50 Ampere current sensors are also available, at lower prices, it would be better to use a sensor rated for higher than the maximum current envisaged.
The down-sides of measuring current flow and thereby attempting to estimate remaining capacity are:
- Current has to be monitored constantly, as any missed readings due to interrupts on the microcontroller, for instance, would lead to imprecision in readings.
- Reactive loads like motors do not have a linear current draw: Besides ripple, they can also back-feed current. With the proper battery protection in place, this back-feed will not harm the batteries, but may be partially used to charge the batteries. This leads to further imprecision.
- A low current draw when the motors are off but the rest of the circuit is operating may not register at all in a high current sensor, and self-discharge certainly will not register. More imprecision.
The current sensor mentioned has an analog voltage output, 20 mV per Ampere, and requires an ADC pin at the microcontroller to constantly poll the readings. Other current sensors exist with direct serial (I2C or SPI) output, saving the ADC pin, and for buffered output devices, the requirement for constant sampling by the microcontroller.