Need help for project

Hey there few days ago my mom was cooking and she left the stove on. When she came back, all the stuff inside was burnt. Essentially my project aims to turn off the stove with a servo motor and sound an alarm with a piezo. I have no problem with the hardware but i dont know how to make arduino perform both operations if like

if (temp>60) { //both actions here }

thanks!

I think you will find that the decision is more likely based on time rather than temperature. I'm a very poor (uninterested) cook so I use the timer on my phone to sound an alarm after the correct time.

Another complication you may have is how to attach the servo to the cooker control after the cooker has been turned on. It will just get in your Mom's way if it is there all the time.

If you read about servos and study the servo examples that come with the Arduino IDE you will see how easy it is to control a servo.

There is also a tone() command that can be used to make a sound.

And you should study the Blink Without Delay example sketch to see how to manage things using time.

...R

firstly, a subject line that lists the subject is key to getting help.

second. I cook hot dogs, and eggs, both about 8 minutes. pancakes about 30 minutes if I make a lot. sauce can take a couple hours.

the timer for each food would make sense.

let me rant a bit. we use a toaster oven. when cooking toast, the heater comes on and off to maintain temperature. what bothers me is when I come to the toaster as it is done and the heatin elements are red hot indicating it was heating at the last second. the retained heat should have been enough for those last few seconds. I think that the internal timer should know that under 30 secnds and the element will not come on. this would save a lot of electricity.

rant #2 my main stove has a red light that comes on when the burners are hot. this light is based on some temperature sensor and shows if any burner is hot. I would like this to also turn on the light above the stove. this way, the light is on and the red light are on. more indication that the store is hot.

thanks for letting me rant.

back to the subject. IF the heating elements are electric and IF they are switched by solid state relays, you could add a control circuit.

if you have a gas stove and want to add a motorized device to shut off the gas, I would make sure the device is rated for such a use. also, lots of testing in the lab. the device should have a clutch so that manual operation can close the valve at any time. AND the operation should not require any training. the one time visitor must be able to turn the stove off without thinking.

Johnorangeseed: Essentially my project aims to turn off the stove with a servo motor and sound an alarm with a piezo.

Is the stove electric or gas? Worse case scenario, what would happen if your solution turned the stove [u]on[/u] unexpectedly?

I read the thread but I am not very sure where do you plan on measuring the temp? Above the stove? What distance? 60 degrees C seems like a low value to consider as a maximum when cooking (steam from cooking food can have close to 100 degrees C near the stove), so you need to make sure you won't get false alarms when you should not get them.

After you decide how to sense the alarm with accuracy, you can do it like this: If it's electric, you could cut the power to the device if a real alarm is detected. (AC relay with DC coil connected to arduino) If it's gas, search for a firm that can install a solenoid on the gas input pipe of the stove. Theare are special solenoids that need manual reset after an alarm (the ones that a gas sensor would command to shut off the mains if it detects something wrong like gas escape in the kitchen.)

Please note that this is cleaner and safer than the servo option you were thinking about, but at same time it will cut off all the power, so if you got anything else cooking, it will be stopped too when alarm is detected.

PeterH:

Johnorangeseed: Essentially my project aims to turn off the stove with a servo motor and sound an alarm with a piezo.

Is the stove electric or gas? Worse case scenario, what would happen if your solution turned the stove [u]on[/u] unexpectedly?

I would laugh if the answer is 'wood'