Make A DIY Temperature Controlled Fan Using Arduino Nano And A 5V Relay

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ก.พ. 2025

ความคิดเห็น • 13

  • @BMonsterLaboratory
    @BMonsterLaboratory  3 ปีที่แล้ว

    I hope this video is helpful to you. I have included everything you need to build a temperature controlled fan with Arduino. If you find it helpful, give it a like 👍 Check out some of of other videos - consider subscribing to the channel if you like the content. Thanks for watching!

  • @TheSoapyJew
    @TheSoapyJew ปีที่แล้ว +1

    Great video. Helped me finish my project that's very similar. Thanks bud.

    • @BMonsterLaboratory
      @BMonsterLaboratory  ปีที่แล้ว

      Great to hear! Thanks for leaving a message 👊👊

  • @yasinsherif8875
    @yasinsherif8875 11 หลายเดือนก่อน +1

    it would be helpful if you include schematic diagram also

    • @BMonsterLaboratory
      @BMonsterLaboratory  11 หลายเดือนก่อน

      hey there! Thanks for the feedback, and I totally agree with you. I include a diagram in my more recent videos. Sorry there's not one in this video. If you need to know the connections or you're having trouble, i'm happy to help 👍

  • @tomhoekstra1088
    @tomhoekstra1088 2 ปีที่แล้ว +2

    Hi, I like your set up, but where can I copy the sketch? Writing it from the screen is quite difficult :)

    • @BMonsterLaboratory
      @BMonsterLaboratory  2 ปีที่แล้ว

      Hi Tom. I copy all code to the Facebook page, mainly because it doesn't fit in the description sometimes. Here is what I used.
      #define FANpIN 5
      #define GREEN 3
      #define RED 4
      int ThermistorPin = 0;
      int Vo;
      float R1 = 10000;
      float logR2, R2, T;
      float c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07;
      void setup() {
      pinMode(FANpIN, OUTPUT);
      Serial.begin(9600); // Serial Monitor
      pinMode(RED, OUTPUT);
      pinMode(GREEN, OUTPUT);
      }
      void loop() {
      Vo = analogRead(ThermistorPin);
      R2 = R1 * (1023.0 / (float)Vo - 1.0);
      logR2 = log(R2);
      T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
      T = T - 273.15;
      T = (T * 9.0)/ 5.0 + 32.0;
      Serial.print("Temperature: ");
      Serial.print(T);
      Serial.println(" F");
      if (T > 74) { // If temperature is more than 74
      digitalWrite(FANpIN, HIGH); // fan on
      digitalWrite(RED, HIGH);
      digitalWrite(GREEN, LOW);
      }
      else if (T < 74) {
      digitalWrite(FANpIN, LOW); // fan stays off
      digitalWrite(RED, LOW);
      digitalWrite(GREEN, HIGH);
      }
      delay(3000); // Waits for 3 seconds to read the pin again
      }

    • @BMonsterLaboratory
      @BMonsterLaboratory  2 ปีที่แล้ว

      There are other ways to do it...i"m sure you could improve on what I have here. Hope that helps! 👍

    • @tomhoekstra1088
      @tomhoekstra1088 2 ปีที่แล้ว +1

      Thank you it saves me a lot of time and possible mistakes!

    • @BMonsterLaboratory
      @BMonsterLaboratory  2 ปีที่แล้ว

      @@tomhoekstra1088 welcome anytime!

    • @tomhoekstra1088
      @tomhoekstra1088 2 ปีที่แล้ว

      @@BMonsterLaboratory That is kind to say, but I'm shure I cannot (I'm an technical engineer and do not know anything about electronics) but I can copy quite nicely :) - unfortunately I have only a TMP36 thermo sensor, which you do not use. I assume I better do not cut off one of the legs haha but where to connect to, I have no idea...

  • @irfanfendi2767
    @irfanfendi2767 3 ปีที่แล้ว +1

    Is it possible to do it without the relay? Cuz i followed your temperature sensor with lcd on it and now i need to put the fan into the circuit but still confused

    • @BMonsterLaboratory
      @BMonsterLaboratory  3 ปีที่แล้ว

      Hi Irfan! Yes, you should be able to do it without a relay. You can use a 9v power supply (wall adapter or battery connected to Vin/GND). From the 9v power supply i'm thinking you can use a voltage divider circuit and drop 9v to 5v so you can connect it to pin 5. You don't want to connect more than 5v to your digital pins. I haven't tried this ...just thinking out loud. If you're unsure or need help, let me know and I can try it and send you a circuit diagram. hope that helps! good luck