Skip to content
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

Merged
merged 1 commit into from
Dec 1, 2020
Merged

Conversation

AnMW
Copy link
Contributor

@AnMW AnMW commented Nov 29, 2020

No description provided.

@AnMW AnMW force-pushed the adding-case-temperature-controller branch 3 times, most recently from 37c2afa to ef8bfcf Compare November 29, 2020 19:40
Comment on lines 9 to 10
#define TEMP_GPIO 4 // the GPIO data pin of the temperature sensor
#define FAN_GPIO 16 // the PWM pin for fan control
Copy link
Contributor

@thegreatdane6 thegreatdane6 Dec 1, 2020

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

Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor Author

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.

Comment on lines +10 to +11
#define FREQUENCY 25000 // the PWM frequency (fan runs best at 25kHz)
#define RESOLUTION 8 // the duty cycle resolution in bits (8 means 255 steps)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@@ -222,4 +228,7 @@ void loop()

// handlet the current rotary position
rotary.handle();

// regulate case temperature
caseTempController.caseTempController();
Copy link
Contributor

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

Copy link
Contributor Author

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Contributor Author

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.

@AnMW AnMW force-pushed the adding-case-temperature-controller branch 2 times, most recently from 4dc1949 to cb0f8ca Compare December 1, 2020 17:00
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
@AnMW AnMW force-pushed the adding-case-temperature-controller branch from cb0f8ca to 71d49e0 Compare December 1, 2020 17:07
@AnMW AnMW merged commit 23bc0d1 into main Dec 1, 2020
@AnMW AnMW deleted the adding-case-temperature-controller branch December 1, 2020 18:50
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