Software Design
The EPS software is encapsulated within the EPS task. It's main functionality is providing the OBC with battery readings on it's voltage, current generated, capacity, temperature and charging status. The task will also indicate any error generated by the Power Management IC.
The OBC is interfaced to the battery sensor through an I2C line yet it also receives and outputs information to the PM IC, as previously stated:
Pin | Input / Output | Digital / Analog | Description |
---|---|---|---|
!CHRG | O | Digital | During a battery charging cycle, !CHRG is pulled low until the charge current drops below C/8 when the !CHRG pin becomes high impedance |
!Fault | O | Digital | Indicates charge cycle fault conditions during a battery charging cycle. A temperature fault or a bad-battery fault causes this pin to be pulled low. If no fault conditions exist, the FAULT pin remains high impedance. |
!RST | O | Digital | This pin is pulled to ground by an internal N-channel MOSFET whenever the RSTFB pin falls below 0.74V |
CLPROG | O | Analog | VSYS Current Monitoring Pin |
CHGOFF | I | Digital | Disable Pin for the Battery Charge. Enables the charger when tied to ground and disables it when tied to a voltage avobe 1.2V |
!PFO | O | Digital | Pulled to ground by an internal N-channel MOSFET when the PFI input is below the falling threshold of the power-fail comparator. |
Table 1: LTC4040EUFD#PBF Interfaces with the OBC. The I/O point of reference is the EPS board.
The first duty it is responsible for is the polling of the battery sensor (DS2782E+) for voltage, current and capacity. This IC is connected to the IC2 line 1 (SCL1,SDA1).
The second duty is to keep monitoring of the state of the power harvesting and battery charging process. The LTC4040EUFD#PBF battery manager provides the required information and its acquired by directly reading GPIOs (set to input in the MCU) and an ADC in the case of the CLRPROG pin. Those PINS are the ones present in table 1.
Once all this information has been acquired by the task it is then sent to the back of a FreeRTOS queue where it will be read by the OBDH Task and subsequently stored in the flash memory.
A block diagram of the modus operandi is provided next:
Figure 1: EPS Task Data Block Diagram
No Comments