nanoFramework.Iot.Device.Bq2579x 1.0.544

Prefix Reserved
dotnet add package nanoFramework.Iot.Device.Bq2579x --version 1.0.544
                    
NuGet\Install-Package nanoFramework.Iot.Device.Bq2579x -Version 1.0.544
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nanoFramework.Iot.Device.Bq2579x" Version="1.0.544" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.Bq2579x" Version="1.0.544" />
                    
Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.Bq2579x" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add nanoFramework.Iot.Device.Bq2579x --version 1.0.544
                    
#r "nuget: nanoFramework.Iot.Device.Bq2579x, 1.0.544"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package nanoFramework.Iot.Device.Bq2579x@1.0.544
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=nanoFramework.Iot.Device.Bq2579x&version=1.0.544
                    
Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.Bq2579x&version=1.0.544
                    
Install as a Cake Tool

BQ2579x/BQ25792/BQ25798 - Buck-boost battery charger

This library supports several Bq2579x devices, namely:

  • The BQ25798 is an I²C controlled, 1-4-cell, 5-A buck-boost solar battery charger with dual-input selector and MPPT.
  • The BQ25792 is an I²C controlled, 5-A, 1-4 cell buck-boost charger with dual-input selector and USB PD 3.0 OTG output.

Documentation

Device & EVM

Sensor image
VQFN 29 pins chip package
Simplified schematic
Simplified schematic
Evaluation Module
Evaluation Module

Usage

Warning: If using an ESP32, make sure to properly setup the I2C pins before creating the I2cDevice. Add a reference to nanoFramework.Hardware.ESP32 NuGet package and add the following code lines:

//////////////////////////////////////////////////////////////////////
// when connecting to an ESP32 device, need to configure the I2C GPIOs
// used for the bus
Configuration.SetPinFunction(21, DeviceFunction.I2C1_DATA);
Configuration.SetPinFunction(22, DeviceFunction.I2C1_CLOCK);

For other devices like STM32, please make sure you're using the preset pins for the I2C bus you want to use.

Hardware Required

  • BQ25798 EVM
  • Male/Female Jumper Wires

Circuit

  • SCL - SCL
  • SDA - SDA
  • VCC - 5V
  • GND - GND

Code

The following code creates an I2C configuration and instantiates a Bq25798 object. Then it prints the Minimum System Voltage detected by the device at boot. Last it enters a loop where it prints the current Vbus voltage each second.

I2cConnectionSettings settings = new I2cConnectionSettings(1, Bq25798.DefaultI2cAddress);
I2cDevice device = I2cDevice.Create(settings);

using (Bq25798 charger = new Bq25798(device))
{
    Debug.WriteLine("");
    Debug.WriteLine($"BQ25798 connected to I2C{device.ConnectionSettings.BusId}");
    Debug.WriteLine("");

    Debug.WriteLine($"Minimum System Voltage is config @ {charger.MinimalSystemVoltage.VoltsDc:N3}V");

    while (true)
    {
        Debug.WriteLine($"Current Vbus: {charger.Vbus.VoltsDc:N3}V");

        Debug.WriteLine("");

        Thread.Sleep(1000);
    }
}

Acknowledgments

The development of this library was kindly sponsored by OrgPal.IoT!

orgpallogo.png

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.544 0 10/2/2025
1.0.526 167 7/28/2025
1.0.506 246 4/2/2025
1.0.501 214 4/2/2025
1.0.489 234 3/11/2025
1.0.483 233 3/10/2025
1.0.459 179 2/26/2025
1.0.435 186 2/11/2025
1.0.412 165 2/4/2025
1.0.409 180 2/4/2025
1.0.392 164 1/31/2025
1.0.380 178 1/20/2025
1.0.374 148 1/13/2025
1.0.355 153 12/30/2024
1.0.333 165 12/16/2024
1.0.310 180 10/23/2024
1.0.293 151 10/3/2024
1.0.279 183 9/10/2024
1.0.276 188 9/6/2024
1.0.268 158 8/28/2024
1.0.250 194 8/9/2024
1.0.238 141 7/26/2024
1.0.227 186 7/17/2024
1.0.210 199 6/19/2024
1.0.207 166 6/14/2024
1.0.173 203 4/15/2024
1.0.151 213 3/22/2024
1.0.131 189 2/28/2024
1.0.111 193 1/24/2024
1.0.99 239 1/5/2024
1.0.95 202 12/20/2023
1.0.73 214 11/10/2023
1.0.53 163 11/8/2023
1.0.40 205 10/6/2023
1.0.33 186 9/27/2023
1.0.21 222 9/6/2023
1.0.15 262 8/16/2023
1.0.8 260 8/2/2023
1.0.6 263 8/2/2023
1.0.1 248 7/31/2023