05-12-2023 02:05 PM - edited 05-12-2023 02:15 PM
For fanspeed. are you using digital pin 0?
I know you are using A0 for temperature.
If you are using digital pin 0 for fan speed, can we switch to a different pin #? I am assuming you are using arduino Uno.
NEVER MIND!!! I THINK I GOT IT. Sorry!
05-12-2023 02:31 PM
No the fan speed is controlled by digital pin 9.
the speed of the fan is controlled using the fanSpeed
variable. The value of fanSpeed
determines the speed of the fan motor through the analogWrite()
function.
In the code, you can see three conditions that determine the value of fanSpeed
based on the temperature readings:
tempSetpointLow
, the fan speed is set to 20, indicating a lower speed.tempSetpointLow
and tempSetpointHigh
, the fan speed is also set to 20, indicating a medium speed.tempSetpointHigh
, the fan speed is set to 50, indicating a higher speed.The analogWrite(fanPin, fanSpeed);
statement then adjusts the fan speed by applying a PWM (Pulse Width Modulation) signal to the fanPin
, which controls the fan's motor speed.
05-12-2023 02:54 PM - edited 05-12-2023 02:58 PM
Hey Zero,
I'm done with the code. Give it a try and let us know know. Now, more LabVIEW programmer will be able to help you. I just set the floor now. Also, if you can give me a kudo to encourage me, I would appreciate it. But you don't have to. Even if you don't give me a kudo, I will still help you.
FanPin = D9. It's not analog.
05-12-2023 04:11 PM
Hi, thank you so much for writing the code. Unfortunately, I cannot open the file as i am using labview 2021! I cannot install a later version as it is a college software. Sorry I should have mentioned the version i was using.
05-12-2023 04:46 PM
Hi Zero,
You are welcome my friend. I am also here to get help (learn) and to help others as well. I tried to save it as previous version. Try and see if it works for you and let us know the results or any problem that you encounter.
05-13-2023 01:03 PM
I just tried the code there and it works for the most part but unfortunately the heater does not turn off when the temp goes above 30.
05-14-2023 02:00 PM
Hi ZeroSB,
Can you try the attached code and let us know?
05-14-2023 03:20 PM
Thats working a lot better CRCK thanks. Unfortunately the speed of the fan is not changing for some reason. I cant figure out why?
05-14-2023 04:16 PM - edited 05-14-2023 04:17 PM
Can you please pick my answer as best answer if it’s okay with you? I can also try to help with the fan?
05-15-2023 06:24 AM
No problem! To me the fan should vary in speed based on the code, cant figure out why it doesnt.