

The CN3791 is a Maximum Power Point Tracking (MPPT) charge controller manufactured by Shanghai Consonance Electronics Incorporated. It is designed to optimize the power output from solar panels by dynamically adjusting the electrical operating point of the modules. This ensures maximum energy harvest and efficient charging of batteries, making it ideal for renewable energy systems.








The CN3791 is a highly efficient MPPT charge controller with the following key specifications:
| Parameter | Value |
|---|---|
| Input Voltage Range | 4.5V to 28V |
| Output Voltage Range | Adjustable (up to 28V) |
| Maximum Charging Current | 3A |
| MPPT Efficiency | Up to 98% |
| Battery Types Supported | Lithium-ion, LiFePO4, Lead-acid |
| Operating Temperature Range | -40°C to +85°C |
| Package Type | SOP-8 |
The CN3791 comes in an 8-pin SOP package. Below is the pin configuration:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VIN | Input voltage from the solar panel |
| 2 | GND | Ground connection |
| 3 | BAT | Battery connection for charging |
| 4 | VCC | Internal power supply pin |
| 5 | MPPT | MPPT control pin; connect a resistor divider to set the maximum power point |
| 6 | PROG | Charging current programming pin; connect a resistor to set the charging current |
| 7 | STAT | Status indicator pin; indicates charging status |
| 8 | TEMP | Temperature sensing pin for battery protection |
The CN3791 can be used with an Arduino UNO to monitor the charging status. Below is an example code snippet:
// Example code to monitor the charging status of the CN3791 using Arduino UNO
const int statusPin = 2; // Connect the STAT pin of CN3791 to Arduino pin 2
const int ledPin = 13; // Built-in LED on Arduino for status indication
void setup() {
pinMode(statusPin, INPUT); // Set STAT pin as input
pinMode(ledPin, OUTPUT); // Set LED pin as output
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int chargingStatus = digitalRead(statusPin); // Read the STAT pin
if (chargingStatus == LOW) {
// STAT pin LOW indicates charging
digitalWrite(ledPin, HIGH); // Turn on LED
Serial.println("Battery is charging...");
} else {
// STAT pin HIGH indicates charging complete or no charging
digitalWrite(ledPin, LOW); // Turn off LED
Serial.println("Battery is fully charged or not charging.");
}
delay(1000); // Wait for 1 second before checking again
}
No Charging Occurs
Overheating of the CN3791
Battery Not Fully Charging
STAT Pin Not Responding
Q: Can the CN3791 charge multiple batteries in series?
A: No, the CN3791 is designed to charge a single battery or a single battery pack. For multiple batteries in series, use a charge controller designed for higher voltages.
Q: What type of solar panels are compatible with the CN3791?
A: The CN3791 is compatible with solar panels that provide an output voltage within the range of 4.5V to 28V.
Q: Is the CN3791 suitable for outdoor use?
A: The CN3791 itself is not weatherproof. If used outdoors, it must be enclosed in a weatherproof housing.
Q: How do I calculate the resistor value for the PROG pin?
A: Refer to the CN3791 datasheet for the formula to calculate the resistor value based on the desired charging current.
By following this documentation, users can effectively integrate the CN3791 MPPT charge controller into their solar energy systems for efficient and reliable battery charging.