General Procedure

if (eclipse){
	battery -> loads
}

else {

	while (!loads_enough_power){
		solar_cells -> loads
		
		do {
			battery -> loads
		} while (!loads_enough_power)
	
	}
	
	solar_cells -> battery;
}

There are only 2 states the CubeSat can be in: either in sunlight or without.

Look at this page to get the components that we have to deal with: What is EPS?

Integrated Circuit Option

Integrated Circuit: BQ25798

Discrete Components Option

Battery Charger: LTC4155

Battery Fuel Gauge: MAX17048