I have a project that involved using arduino to detect low light and then send a message to an RF plug which will turn on a lamp
And you got that working?
Other than adding a temperature sensor, it should be pretty-much the same. (Depending on how your RF communication works, you may need to "address" either the heater or the lamp.)
What kind of heater? A regular home furnace with a thermostat?
Did you build or buy the RF plug? Is a home automation plug that conforms to one of the home automation protocols?
The [u]LM34[/u] and LM35 are popular, accurate, inexpensive, easy-to-use, solid state temperature sensors, or there are others. You could also use a thermistor. I wouldn't recommend a thermocouple because they require additional analog electronics.
Other than adding a temperature sensor, it should be pretty-much the same. (Depending on how your RF communication works, you may need to "address" either the heater or the lamp.)
What kind of heater? A regular home furnace with a thermostat?
Did you build or buy the RF plug? Is a home automation plug that conforms to one of the home automation protocols?
The [u]LM34[/u] and LM35 are popular, accurate, inexpensive, easy-to-use, solid state temperature sensors, or there are others. You could also use a thermistor. I wouldn't recommend a thermocouple because they require additional analog electronics.
Sorry I may not have been very clear, I have created neither yet. I am a complete Newbie to Arduino but keen to learn.
My lecturer when I explained my Idea said that the Arduino would be perfect however having no previous knowledge and a google search that returns thousands I thought I would ask the experts.
Its basically only a small idea but based around the idea of a smart room. So essentially I just need to be able to monitor light and heat and then automatically react accordingly. in this case by sending an RF signal to a (bought RF Plug) to turn on a lamp. and for heat to do the same process to turn on a mains fan heater.
Have also thrown around the Idea of allowing it to also be smartphone linked via bluetooth.
I just need a rough idea of what I will require to buy. - I feel like I have probably taken on a little too much for a first project! ha
What were you searching for? How is THAT related to the Arduino? 8)
I feel like I have probably taken on a little too much for a first project!
I can't imagine why. It's a simple project.
You want to know if it is dark or light. So, you need an appropriate sensor, like an LDR, and you need to connect it to an analog pin, and use analogRead() to read it.
You want to know if it is hot or cold. So, you need a temperature sensor. Depending on which sensor you get, it may be a simple analogRead() or it might involve a library.
Now, the hard part is going to be controlling the RF plug. For help with that, we need some details on which RF plug you want to control. The Arduino is not a radio, so, by itself, it can't send radio waves. You'll need some additional hardware that can send radio waves in the same frequency as your RF plug, where the radio waves carry the appropriate data.
Not quite so simple.
You need to determine the upper and lower limits of 'low light' and 'comfortable tempreture'.
You then need to determine what signal levels, from your sensors, represent values within those two ranges.
What to when you start reaching, or exceed, those limits (when to turn the lights up or down, when to turn the heat up or down, and by how much).
unless you are building your own (which doesn't sound likely, at this point), you will be using a commercial 'smart plug'. what frequency does it work on, what is the protocol, can you get a RF add-on which will replicate those two elements via the Arduino ( frequency probably yes, protocol,,, unknown)?
So, you need to learn the basics of ARDUINO. you need to learn how to read the sensor signals. you need to understand and be able to use PID routines. you need to learn how to use the RF modules.
And, I probably left a LOT out..... Yeah, pretty ambitious project for one semester, if you are a complete noob. If you decide to proceed, take small steps. get something like an UNO or a NANO and start with the basics. then, move on step at a time.
Another point you need to address is fail-safe - for the light, it is probably not a big deal, but for the heater, you need some sort of failsafe (such as a mechanical thermostat in series with the heater) so that if your controller crashes or loses connection to the heater when it is on, it will turn of at some upper (safe) temperature instead of just staying on - overheated heaters are called "fires". You get extra credit (or at least not lose points) if you take into consideration the "what if my controller fails" situation and how to keep it safe.
Webb30a:
Basically I am completely new to this. Started a software development apprenticeship. No real previous knowledge.
I have a project that involved using arduino to detect low light and then send a message to an RF plug which will turn on a lamp
I also would like the similar process to turn on a heater.
Basically I want it to automatically control itself to ensure enough lighting and adequate temperature is kept constant
Is the possible. if so what would I need
Many thanks in advance. Please bare in mind I am new to this and any help will be appreciated
Good start.
What you have is what used to be called "laundry list" - a basic project specification .
You have identified in no particular order of importance WHAT you want to accomplish in very general terms.
Next step is to "drill down" on some of the list item.
Take
"Detect light"
You have identified "low light" - that implies range (of light.)
How do you measure "range"? - digitally or analog ?
Again in general terms - range is an analog measurement.
Ok, lets jump ahead - what electronic device can give you range of values depending on light intensity?
Active device - solar cell - generate voltage depending on light intensity.
Passive device - LDS - light dependent resistor - varies its resistance depending on light intensity.
Now do same for next hardware item on the list.
Eventually you will be able to select computer to handle your hardware.
Next draw yourself simple "flow chart" how the software should work.
When the light intensity gets to X
turn on heater just kidding
Now append / change your flow chart and you have basic pseudo-code
do
sit around and do nothing
while light intensity is more than x
too dark?
turn on the light how? via RF remote
You should spend more that 50% of project time on "paperwork" before you write first line of code.
I usually write the pseudocode inside /* */ comments and build a real code around them.
/*
do
sit around and do nothing
while light intensity is more than x
Guys, we need to keep this simple if we intend on helping the OP. He's already mentioned he has no background.
What I would suggest to get you started, is start looking at some basic examples of using either an ambient light sensor, or a photoresistor. Here's one a quick google found me, and I remember playing around with this one myself.
This should give you the basic concept, and a first look at some code. This also attempts to explain a bit how it's working. Anyway, hopefully it will point you in the right direction as far as controlling a light based on ambient room light, but will probably need some refinement.
Tell us more about this RF switch. How will it be interfaced with the Arduino? Do you have the transmitter portion to be connected to the Arduino or will you need to build something?
Steverobey:
Guys, we need to keep this simple if we intend on helping the OP. He's already mentioned he has no background.
What I would suggest to get you started, is start looking at some basic examples of using either an ambient light sensor, or a photoresistor. Here's one a quick google found me, and I remember playing around with this one myself.
This should give you the basic concept, and a first look at some code. This also attempts to explain a bit how it's working. Anyway, hopefully it will point you in the right direction as far as controlling a light based on ambient room light, but will probably need some refinement.
Tell us more about this RF switch. How will it be interfaced with the Arduino? Do you have the transmitter portion to be connected to the Arduino or will you need to build something?
Good contribution, but...
This environment perpetuate a stale idea that beginners are idiots, hence we need to talk baby talk to them and keep them at level WE perceive is appropriate for THEM.
Let him decide.
BTW he asked for help here, so why are you sending him to Google?
Give OP some credit, will ya?
IMHO the OP should reply and the forum can take it from there.
When you start college, it can be really difficult. I did not have free time. Every evening I wrote some essay or other paperwork. I sometimes dreamed of just buying a diploma, but I realized that it was useless. I read an article on the online service Edusson that colleges do not use the real potential of students due to the conservatism of teachers. This is really a problem because the use of modern technology in education is an obvious thing, but it is used very little.
ElijahGoe:
When you start college, it can be really difficult. I did not have free time. Every evening I wrote some essay or other paperwork. I sometimes dreamed of just buying a diploma, but I realized that it was useless. I read an article on the online service Edusson that colleges do not use the real potential of students due to the conservatism of teachers. This is really a problem because the use of modern technology in education is an obvious thing, but it is used very little.
I totally agree with you. In our college, we still perform essays on paper sheets, not electronically. We could not even visit the premises of the university if we used all the technological possibilities.