Embedded Linux

Measuring DC Voltage, Current, Power, Energy & Charge with a Raspberry Pi

Do you have a requirement to measure the voltage, current and power drawn from a battery or by a device using a Raspberry Pi? Perhaps you are also seeking to measure energy consumed (watt/hours) or charge (amp/hours) to determine state of charge (SoC) like a coulomb counter? If the answer is yes, then one of the easiest ways of achieving this is via a dedicated I2C sensor wired into the Raspberry Pi. Hardware One of the more popular sensors for measuring voltage and current is the digital power monitors from Texas Instruments. At the time of writing, the portfolio included

Electronics Hardware

INA226 DC Voltage/Current/Power Monitor

A breakout board for a DC Voltage/Current/Power Meter based on the popular INA226 36-V, Bi-Directional, Ultra-High Accuracy, I2C Current/Power Monitor with Alert.  While many INA226 breakout boards are available from eBay/Banggood/AliExpress (e.g. CJMCU-226) they do not allow for easy connection of the bus voltage. In addition, we list different shunt resistor values you can use to customise the current range to best suit your application. Specifications Design Notes The device is powered via a separate 2.7 to 5.5V power supply connected to J3. Typical power consumption is just 330uA @ 3.3V.  The signed 16-bit bus voltage register has a least significant bit/resolution

Electronics Hardware

LT8490 MPPT Buck-Boost Multi-Chemistry Battery Charger

Most PV solar regulators are buck (step down) regulators and require the PV panel voltage to be above the battery voltage. This design uses a buck-boost topology and allows the PV solar voltage to be above, below or equal to the battery voltage. For example, you could charge a 48V battery bank from a 72 cell PV panel with a maximum power point voltage (VMP) of around 37V. The LT8490 allows for a PV panel voltage in the range of 6V to 80V. This makes it ideal for commodity 72 cell PV panels that typically have an open-circuit voltage (VOC)

Electronics Hardware

LTC4040 5V, 2.5A Uninterruptible Power Supply (UPS) with USB-C

Motivation I have had the requirement to back-up small 5V low-powered devices such as a Foscam C1 security camera and a Raspberry PI based LoRaWAN concentrator. Many commonly available 5V Uninterruptible Power Supplies feature a two chip design with a Li-Ion battery charger to charge the back-up battery, and boost converter to step up the battery voltage back up to 5V. Like most of my personal designs, cost was not a primary driver. I was on the search for a elegant, preferably single chip device that was fit for purpose. Lithium Ion batteries can be stressed when left at full

Electronics Hardware

Review: BQ24650 5A MPPT Solar Controller 3S / 4S Li-Ion, LiFePO4, 12V Lead Acid

Designs based on the Texas Instrument’s bq24650 Synchronous Switch-Mode Battery Charge Controller for Solar Power With Maximum Power Point Tracking are commonplace on Aliexpress, ebay and Amazon. Consumers can purchase assembled PCBs, such as the one pictured above, or complete product enclosed in a relatively nice aluminium extruded housing. According to the silkscreen of versions pictured on-line, different variants are available including: 3S Li-Ion 4S Li-Ion 4S LiFePo4 12V Lead Acid I’m still old-school and wanted to purchase a 12V lead acid version, but couldn’t find any available for sale. And like many similar electronics products from the above mentioned

Electronics Hardware

Powerpole Distribution Box

For far too long, I have been on the search for the ideal way to distribute power for low voltage systems, typically 12V. I have an small assortment of domestic networking gear, small embedded systems, LED desk lamps, battery chargers and USB chargers that operate from a backed-up 12V PV solar supply. I have finally settled on the “Powerpole” 15-45 connector from Anderson Power Products. The 15-45 denotes that the connector comes with terminals rated from 15 to 45 Amp. The housings are designed for voltages well exceeding 100V AC or DC depending upon your choice of UL or IEC certification.

Electronics Hardware

LT8390 Synchronous Buck-Boost DC-DC Converter

For the past couple of years, I have been powering my Sony 55” LCD TV and charging a couple of laptop computers from a 12V solar system. Both the Sony TV and the laptop computers have an input voltage of 19.5VDC. To step up the voltage from the battery, I purchased two “LTC3780 Automatic lifting pressure constant voltage step up step down 10A 130W” a.k.a. LTC3780 – High Efficiency, Synchronous, 4-Switch Buck-Boost DC-DC Converters from ebay. These boards operated from a moderately wide 5 – 36V input and had an output voltage range of 1 – 30V. The LTC3780 has

Power

ML2032 Coin Cell Charger

This design is intended to recharge Maxell ML2032 Lithium Manganese Dioxide rechargeable coin cell batteries with a nominal voltage of 3.0V. These are ‘special’ coin cell batteries designed specifically as a rechargeable secondary cell. It is not recommended to attempt to recharge a primary CR2032. These cells have not be designed for recharging.  Background Rechargeable replacements of the popular CR2032 3V lithium coin cell battery exist, but one caveat is reduced capacity. The common CR2032 from name brand manufacturers such as Panasonic will have a capacity of approximately 220mAh. Rechargeable replacements of the CR2032 appear to come in a range of different chemistries.

Power

12V 7Ah SLA Low Voltage Disconnect

The 12V 7Ahr “alarm” battery is still a safe, dependable choice for stationary back-up supplies, running items such as LED lighting or modem/routers. Using two Keystone 3571 female PCB terminals, this PCB assembly attaches directly to the terminals of a 12V 7AH SLA Battery (with 4.75mm spade terminals) and provides a low voltage cut-out to protect the battery, and a fuse to protect wiring. The Maxim Integrated MAX8212 Micro-power Voltage Comparator with 1.15V reference switches a high side P-Channel MOSFET to disconnect the load. The MOSFET has a low on resistance of 4.1mOhms and a maximum current capability of 90 Amps well exceeding that of the battery. The