-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding case temperature controller #70
Conversation
37c2afa
to
ef8bfcf
Compare
#define TEMP_GPIO 4 // the GPIO data pin of the temperature sensor | ||
#define FAN_GPIO 16 // the PWM pin for fan control |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls check with with @felixherbst to match the correct pins
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pin 26 ist der temp sensor
pin 23 ist der utility fan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I'm changing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to have all pin assignments in one file instead of several?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can live with the way it currently is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can Chance this in the future though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mlkiefer You/We can open up an issue for this if you want to.
#define FREQUENCY 25000 // the PWM frequency (fan runs best at 25kHz) | ||
#define RESOLUTION 8 // the duty cycle resolution in bits (8 means 255 steps) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about expanding the existing fan stuff and adding another func to control the utility fan?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to rip apart the current structure where everything concerning the controller is in one directory, so I'm kind of not feeling good with this. If you insist I will change it, though.
firmware/src/main.cpp
Outdated
@@ -222,4 +228,7 @@ void loop() | |||
|
|||
// handlet the current rotary position | |||
rotary.handle(); | |||
|
|||
// regulate case temperature | |||
caseTempController.caseTempController(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this function not be little bit more selfdescribing? like "readTemperatureAndAdjustFan" or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do
|
||
CaseTempController() | ||
{ | ||
this->sleep_check = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not want to measure/adjust on every loop-through of the main file. Instead, I'm doing so on every 30000th loop in order to save some calculation time (and not trash your logs too much).
In the function readTemperatureAndAdjustFanSpeed (formerly known as caseTempController), the whole logic is encased by an "if (sleep_check % SLEEP == 0)", where SLEEP can be found in config.h and is 30000.
4dc1949
to
cb0f8ca
Compare
case temperature controller: add library for DS18B20 temperature sensor as submodule case temperature controller: add OneWire library for DS18B20 temperature sensor as submodule, turn temperature source code into own class case temperature controller: add some more information to README case temperature controller: turn fan code into own class case temperature controller: remove loop from code case temperature controller: turn printf into actual log case temperature controller: remove unused libraries case temperature controller: remove simulation (not needed anymore, temperature sensor works) case temperature controller: cleanup case temperature controller: add monitoring target to README case temperature controller: add counter to controller so it doesn't execute on every loop through case temperature controller: turn setSpeed into void function since it cannot return errors case temperature controller: fix fan bug case temperature controller: add circuit plan to README case temperature controller: add recursive checkout of submodules to CICD case temperature controller: assign correct pins for temperature sensor and fan case temperature controller: renamend caseTemperatureController() to readTemperatureAndAdjustFanSpeed(), reformat caseTempController.cpp case temperature controller: reformat temperature.cpp, fan.cpp case temperature controller: include OneWire and Arduino-Temperature-Control-Library via pio package manager instead of submodules
cb0f8ca
to
71d49e0
Compare
No description provided.