element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Temperature controlled relay (help needed for noobie)
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 17 replies
  • Subscribers 394 subscribers
  • Views 983 views
  • Users 0 members are here
  • temperature
  • arduino
  • relay
Related

Temperature controlled relay (help needed for noobie)

Former Member
Former Member over 10 years ago

Hello, my name is Aisha this is my first post and I am excited to get into the community.


I live in a studio apartment with my wife. The entire apartment is on a 15amp breaker so we have to be careful about power use. We find if we run the A/C and cook something in the kitchen the fridge will kick on more often and trip our breaker. We have a blower to pull hot air out of the kitchen and I would like to use an arduino to turn it off and on based on the temperature.


I have:

 

an arduino uno

a tmp36 temperature sensor

a 5v arduino relay module

a breadboard and leads

 

I want to do this not only the right way and the best way with what I have available. I have used the arduino to switch the relay using the blinking LED code from a kit I got. I have wired up the sensor and read readings off of it.

 

 

The tutorials I find online say I should connect it to 3.3v and also AREF to 3.3v when I do this I don't get 3.3v in my serial monitor like the tutorials say but 1.5 (average). I am left lost as no tutorials show how to do this without an LCD screen and with a relay module. I don't need to monitor the temperature after I have it set properly once so an LCD is unnecessary (though I would not mind being able to add on in the future.)

 

I plan to put the sensor on a cable, are there limits to how long a cable can be for this sensor? I was planning on using cat5 cable.

 

So far all of my experiments with arduino involve copy pasting code and maybe modifying a couple lines that are clearly labeled or that a tutorial has told me to edit. I have 0% skills and about as much understanding and confidence in coding anything let alone a micro controller.

 

I have seen people adding things like data logging to increase accuracy of readings and delays to keep the switch from tripping like crazy but again I'm still struggling with the hardware and code is not at my level yet.

 

Hopefully there are people who can help me out. I know this is super easy for anyone who knows how to use and code arduino, I just need some help getting my first project finished.

  • Sign in to reply
  • Cancel

Top Replies

  • clem57
    clem57 over 10 years ago +4
    aishalove First off, programming is not "super easy" as you say. I have done this most of my life and the biggest headache is to fix broken code. Even I break and fix my own code. I suggest read some about…
  • neilk
    neilk over 10 years ago +3
    aishalove Clem and Enrico have given you sound advice . For what it's worth, I have 2 basic rules when I am developing a project: Start small with something that should work - an example from the Arduino…
  • Robert Peter Oakes
    Robert Peter Oakes over 10 years ago +3
    What had not been said yet is the issue of driving mains with an arduino relay board. They are not all created to handle mains . Even if the physical elay is capable. The board may not be and mistakes…
Parents
  • Former Member
    Former Member over 10 years ago

    I have a major breakthrough! I found a code example for switching an LED using a temp sensor. I successfully used it to toggle my relay!

     

    This is the example I used

     

    http://www.dave-auld.net/index.php?option=com_content&view=article&id=89:arduino-analogue-in-temperature&catid=53:arduino-input-output-basics&Itemid=107

     

    All I did was change the digital pin 7 to the sens on my relay and bingo it works! The only issue I have is when I change the trigger temp it won't upload unless I try over and over until it works as a fluke (recompiling doesn't seem to help) or re paste the code, recompile and then upload and often that still gives errors.

     

    The error I am getting is "Error: process returned not zero code: 1"

     

    I have yet to get on my pc to try uploading using the official IDE, I use a smart phone as a programmer because I don't have room for my pc at my desk.

     

    Here is my proof of concept on a breadboard (Right now I am lighting an LED using the relay, after working out my upload error I will move on to a small AC indicator light.

     

    https://www.dropbox.com/s/ocui6plj2dlwzza/20150518_135910.jpg?dl=0

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Former Member
    Former Member over 10 years ago

    I have a major breakthrough! I found a code example for switching an LED using a temp sensor. I successfully used it to toggle my relay!

     

    This is the example I used

     

    http://www.dave-auld.net/index.php?option=com_content&view=article&id=89:arduino-analogue-in-temperature&catid=53:arduino-input-output-basics&Itemid=107

     

    All I did was change the digital pin 7 to the sens on my relay and bingo it works! The only issue I have is when I change the trigger temp it won't upload unless I try over and over until it works as a fluke (recompiling doesn't seem to help) or re paste the code, recompile and then upload and often that still gives errors.

     

    The error I am getting is "Error: process returned not zero code: 1"

     

    I have yet to get on my pc to try uploading using the official IDE, I use a smart phone as a programmer because I don't have room for my pc at my desk.

     

    Here is my proof of concept on a breadboard (Right now I am lighting an LED using the relay, after working out my upload error I will move on to a small AC indicator light.

     

    https://www.dropbox.com/s/ocui6plj2dlwzza/20150518_135910.jpg?dl=0

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube