Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Research and implement a heater control method #22

Open
brandonrobertz opened this issue Jul 30, 2018 · 5 comments
Open

Research and implement a heater control method #22

brandonrobertz opened this issue Jul 30, 2018 · 5 comments

Comments

@brandonrobertz
Copy link
Contributor

We need to find a reliable and safe method for keeping the heat at the correct temperature. The canonical method is via PID. We'll need to implement something similar, either a PID library, or something similar like Kalman Filter. There are libraries for all of these things. We need to abstract them out into a celery process which gets kicked off via a microlab command. This ticket is for the groundwork on this.

@brandonrobertz brandonrobertz changed the title Find and implement a PID library for Heater Research and implement a heater control method Jul 30, 2018
@SpikeNebula
Copy link
Contributor

I did this at a previous company, so it's something I can take a stab at.

Where would the code be inserted? Could you add stubs?

@brandonrobertz
Copy link
Contributor Author

In microlab/services/heater/control.py we need a function that kicks off the heater control algorithm and manages the heater element itself (via a pin on the PI). I added a stub function called heater_control where it would be best to put the heater code.

@brandonrobertz
Copy link
Contributor Author

Also note that this function will be a Celery function so it can be long running, can be a periodic task running every second, or less, etc. The while True: is just there as an example to show it's a proc, but it can be a cron, too.

@SpikeNebula
Copy link
Contributor

SpikeNebula commented Jul 31, 2018

I'm not familiar with Celery, so bear with me. Where does it get the current set point from? Can the function have the current heater passed into it? Will it always have access to new set points?

@brandonrobertz
Copy link
Contributor Author

brandonrobertz commented Aug 8, 2018

Hey, sorry, never got a github notification on this.
We're going to set the point via a 4tvc script command set temp = whatever. I'm thinking that will write something to a DB marking the desired temp and then kick off this heater control command. Don't worry too much about the specifics, yet. If you can write a generic version that works as a function, we can make it work.
And yes, we can have heater passed to it. And it will always be able to read from the thermosister.
In fact, any requirements you think this function will need, we can make it work. So just keep that in mind. You're free to implement this the best way you think it should be done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants