...
Statically sets relay state, updates stored state, and returns whether the relay state set was successful.
Exposes set_relay_state
Note: may need to have a delay when setting relay states to avoid drawing too much current at once
Read the relay state through GPIO expander upon receiving interrupt
Current_sense
Registers an interrupt to update the stored current value based on ADC reading
If the updated current value is above a threshold, raise overcurrent fault
If the overcurrent fault bit is set and the updated current value is below the threshold, drop the fault bit
Should read at ideally 100hz
Exposes init
...
has access to main storage
handles relay can messages
handles center console can messages
Raspi
toggle the 5V_EN pin when we want to turn the raspi on
send data to the raspi through UART
Receive data from raspi through UART
Other questions:
What’s passive balancing?
Balancing is making sure cells are all at the same voltage so one module doesn’t limit the charging current
Passive balancing is using up charge from high voltage packs through a resistor
Toggle balance control on the highest voltage cell
Look at AFE data sheet for how this works
“We tried” in MSXII, probably not implemented
The difference between the highest and lowest voltage cell should be < 25 mV
How do you tell if the battery is charging? Re: directional temperature faults
Current sense gives positive vs negative current
Ask Liam if positive is in or out / if negative or in and out
What timing is needed for the relays?
Part number EV200HAANA, datasheet has specs of current in it
100 ms 4A, afterwards 130mA
We don’t want to draw 4A from more than one relay at once, so wait at least 200 ms
Relays have a sanity check in an aux coil: aux coil will mimic the main coil.
Relay control: always check after toggling state, if it didn’t toggle, either retry or fault. Waiting 100 ms between closing it and checking the state is good.
Does order matter for relays / what order?
Always close HV_GND first.
Note: there’s a relay for MCI and for Charger interface
What’s considered fast for current sense measurements?
Theoretically should do 14 khz
100 hz is good, below 20 is bad
Based on coulomb counting, current always has sinusoidal components (from motor controllers, since we drive motors with sinusoidal phases), so higher frequency means better SOC accuracy, also MPPTs don’t have perfect DC output
What’s / Why UART?
We have a library so we’re good
Do we have to receive anything from the pi?
Right now no. Eventually, yes. No sending over UART either for MVP elec.
What’s needed for the RPI software?
Nothing right now.
...