9504 Solar Charge Controller
Production Firmware v1.0 - User Guide
1. System Overview
The 9504 Solar Charge Controller is a comprehensive monitoring and control system designed for solar panel arrays. The production firmware provides real-time monitoring of solar panel voltages, temperature sensing, current monitoring, and LED control capabilities.
Key Features
- Solar Panel Monitoring: 6 individual solar panel voltage readings
- Current Monitoring: INA219-based current and voltage measurement
- Temperature Sensing: 8-channel temperature monitoring with 10k thermistors
- LED Control: 8 LEDs (6 side LEDs + 2 status LEDs) with multiple control modes
- Watchdog Protection: 8-second watchdog timer for system reliability
- Dual Input Modes: Terminal and string-based command processing
- Data Transmission: Structured packet format for external monitoring
- Sensor Filtering: Automatic validation and filtering of sensor readings
2. Hardware Configuration
Pin Assignments
Component |
Pins |
Function |
Shift Register 1 |
D2, D3, D4 |
LED Control (A, B, C) |
Shift Register 2 |
D5, D6, D7 |
Solar Voltage Sensing (A, B, C) |
Shift Register 3 |
D8, D9, D10 |
Temperature Sensing (A, B, C) |
Temperature Excitation |
D20 |
Thermistor Bias Control |
Analog Inputs |
A0, A1, A2 |
Temperature, Solar Voltage, LED Output |
I2C Bus |
A4, A5 |
INA219 Current Monitor |
LED Configuration
LED 0-5: Side LEDs (6 cube faces)
LED 6: Status LED 1 (Heartbeat)
LED 7: Status LED 2 (System Active)
3. Communication Setup
Serial Communication
Baud Rate: 9600 bps
Data Bits: 8
Stop Bits: 1
Parity: None
Input Modes
The system supports two input modes for maximum flexibility:
Terminal Mode (Default)
> help
=== 9504 Solar Charge Controller Commands ===
- Character-by-character input with echo
- Backspace support for editing
- Enter key terminates commands
- Interactive terminal experience
String Mode
help;status;led 0 on 50;
- Full string input without echo
- Multiple commands per string
- Terminated by newline, semicolon, or null
- Ideal for automated systems
4. Command Reference
System Commands
Command |
Description |
Example |
help |
Display all available commands |
help |
status |
Show current system status |
status |
info |
Display system information |
info |
reset |
Perform system reset |
reset |
test |
Run comprehensive system test |
test |
LED Control Commands
Command |
Description |
Example |
led <n> on [brightness] |
Turn on LED n (0-7) with optional brightness (0-100) |
led 0 on 75 |
led <n> off |
Turn off LED n |
led 0 off |
led <n> blink [rate] |
Set LED n to blink with optional rate (ms) |
led 6 blink 1000 |
Configuration Commands
Command |
Description |
Example |
config mode <value> |
Set system mode (1=normal) |
config mode 1 |
watchdog on/off |
Enable/disable watchdog timer |
watchdog off |
terminal |
Switch to terminal input mode |
terminal |
string |
Switch to string input mode |
string |
mode |
Show current input mode |
mode |
limits |
Show sensor filtering limits |
limits |
5. LED Control System
LED Modes
- OFF: LED is completely off
- ON: LED is on at specified brightness (0-100%)
- BLINK: LED blinks at specified rate (default 500ms)
- FADE: LED fades smoothly (future enhancement)
Default LED Behavior
- LED 6: Heartbeat indicator (blinks every second)
- LED 7: System active indicator (solid on at 50% brightness)
- LEDs 0-5: User controllable side LEDs
LED Control Examples
led 0 on 100 # Turn on side LED 0 at full brightness
led 1 blink 250 # Make side LED 1 blink every 250ms
led 2 off # Turn off side LED 2
6. Data Packet Format
The system transmits structured data packets every 5 seconds in the following format:
Packet Type 1: Solar Voltages
$SCC,1,1.0,1.2,1.5,1.2,1.2,1.5,*
Field |
Description |
Range |
$SCC |
Packet identifier |
Fixed |
1 |
Packet type |
Fixed |
1.0,1.2,1.5,1.2,1.2,1.5 |
Solar panel voltages (6 panels) |
0.0-5.0V |
* |
Packet terminator |
Fixed |
Packet Type 2: Temperature Readings
$SCC,2,23.5,23.5,23.5,23.5,23.5,23.5,23.5,23.5,*
Field |
Description |
Range |
$SCC |
Packet identifier |
Fixed |
2 |
Packet type |
Fixed |
23.5,23.5,23.5,23.5,23.5,23.5,23.5,23.5 |
Temperature readings (8 channels) |
-20.0 to +40.0ยฐC |
* |
Packet terminator |
Fixed |
Packet Type 3: Output Monitoring and Status
$SCC,3,12.34,150.5,1,*
Field |
Description |
Range |
$SCC |
Packet identifier |
Fixed |
3 |
Packet type |
Fixed |
12.34 |
Output voltage (INA219) |
0.0-5.0V |
150.5 |
Output current (mA) |
Unlimited |
1 |
System mode |
1=Normal |
* |
Packet terminator |
Fixed |
7. Sensor Monitoring
Solar Panel Voltage Monitoring
- Channels: 6 individual solar panels
- Range: 0.0V to 5.0V (filtered)
- Update Rate: Every loop cycle (~10ms)
- Filtering: Out-of-range values default to 0.0V
Current and Voltage Monitoring (INA219)
- Shunt Resistor: 0.33 ohm
- Voltage Range: 0.0V to 5.0V (filtered)
- Current Range: Unlimited (can be negative for discharge)
- Calibration: 32V, 2A range for optimal resolution
Temperature Monitoring
- Channels: 8 temperature sensors
- Sensor Type: 10k ohm thermistors
- Range: -20.0ยฐC to +40.0ยฐC (filtered)
- Excitation: 5V through 10k resistor
- Conversion: B25/85 = 3950K approximation
8. Troubleshooting
Common Issues
No Response to Commands
- Check baud rate (9600 bps)
- Verify serial connection
- Try sending 'help' command
- Check input mode with 'mode' command
LEDs Not Working
- Run 'test' command to verify LED hardware
- Check LED number (0-7)
- Verify command syntax: 'led 0 on 50'
- Check if LED is in correct mode
Sensor Readings at 0.0
- Check sensor connections
- Verify shift register addressing
- Run 'test' command for sensor verification
- Check 'limits' command for filtering status
System Resets Frequently
- Check watchdog status with 'status' command
- Disable watchdog temporarily: 'watchdog off'
- Check power supply stability
- Verify no short circuits
Warning
Disabling the watchdog timer removes system protection against hangs. Only disable for debugging purposes and re-enable when done.
9. Technical Specifications
System Specifications
Parameter |
Value |
Firmware Version |
1.0 |
Serial Number |
9504-001 |
MCU |
ATmega328PB |
Communication |
Serial 9600 bps |
Packet Interval |
5 seconds |
Watchdog Timeout |
8 seconds |
Heartbeat Interval |
1 second |
Sensor Specifications
Sensor |
Channels |
Range |
Resolution |
Solar Voltage |
6 |
0.0-5.0V |
~4.9mV |
Temperature |
8 |
-20.0 to +40.0ยฐC |
~0.1ยฐC |
Output Voltage |
1 |
0.0-5.0V |
~1mV |
Output Current |
1 |
Unlimited |
~0.1mA |
LED Specifications
LED |
Function |
Default Mode |
0-5 |
Side LEDs (Cube faces) |
OFF |
6 |
Status LED 1 |
BLINK (1s) |
7 |
Status LED 2 |
ON (50%) |