LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with arduino temperature control project.

Solved!
Go to solution

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!

Message 11 of 24
(782 Views)

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:

  1. If the temperature is below the tempSetpointLow, the fan speed is set to 20, indicating a lower speed.
  2. If the temperature is between tempSetpointLow and tempSetpointHigh, the fan speed is also set to 20, indicating a medium speed.
  3. If the temperature is above 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.

0 Kudos
Message 12 of 24
(773 Views)

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.

GRCK5000_0-1683921008499.png

FanPin = D9. It's not analog. 

GRCK5000_1-1683921037612.png

 

 

 

Message 13 of 24
(764 Views)

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.

0 Kudos
Message 14 of 24
(750 Views)

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.

Message 15 of 24
(746 Views)

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.

0 Kudos
Message 16 of 24
(731 Views)
Solution
Accepted by topic author zeroSB

Hi ZeroSB,

Can you try the attached code and let us know?

Message 17 of 24
(679 Views)

Thats working a lot better CRCK thanks. Unfortunately the speed of the fan is not changing for some reason. I cant figure out why?

0 Kudos
Message 18 of 24
(673 Views)

Can you please pick my answer as best answer if it’s okay with you?  I can also try to help with the fan?

Message 19 of 24
(665 Views)

No problem! To me the fan should vary in speed based on the code, cant figure out why it doesnt.

0 Kudos
Message 20 of 24
(618 Views)