Skip to content

Conversation

@rnpnr
Copy link
Contributor

@rnpnr rnpnr commented Mar 28, 2020

The delay in loop() might need to be adjusted. Right now it effects the publishing rate. We might also want to force a publish immediately after swapping srcs. Currently there will be a delay equal the value in loop(). It might not matter if this delay gets changed.

The following needs to be tested when we have access to hardware:

  • Is a delay needed after disabling the previous voltage src and before enabling the new voltage src?
  • Is 100mV a good threshold for swapping or should we change it?

@rnpnr rnpnr requested a review from davidlenfesty March 28, 2020 20:15
@rnpnr rnpnr force-pushed the batt_leveling branch 3 times, most recently from 9808af8 to 56466f7 Compare March 28, 2020 21:35
rnpnr added 7 commits March 28, 2020 15:39
also initialize subscibers for all batteries

remaining TODO is the voltage src swapping function
some delay may be needed between the calls to digitalWrite()
this will need to be determined in testing
right now we only publish:
	ee_batt enabled or disabled
	motor_batts enabled or disabled

more info could be provided if needed. for instance, we can sense a
short on any of the LM5050 chips but right now we aren't making use of
that info.
we don't need to use the motor batteries until the ee battery has
dropped below a certain threshold. for now this will be 15v but it can
be changed if needed.
@davidlenfesty
Copy link
Contributor

Looks good to me. I'll wait to merge until we've tested this on the real hardware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants