Simple timer help needed... solar furnace flap.

I want an Uno to activate a timer once a button is pushed. I then need it to count down for 6 hours and then activate a 12 V motor for 3 seconds, then reset itself (wait for the next time the button is activated.) The 12v power supply will be separate from the Arduino.

This will hopefully be closing the flap on my solar furnace! Any help with programming and guidance would be appreciated. Newbie here!

What you want to do is effectively a bit like Blink without Delay which is here.

You can turn the 12 volt power with a relay. Either get a relay board with the correct electronics to drive it or you will need a transistor to switch the relay on and off.

This is a great start.. thanx! I assume I don't need milliseconds considering it will be hours before it functions. Also, how do I learn how to use a relay or transistor to kick the motor on?

wildatnite:
This is a great start.. thanx! I assume I don't need milliseconds considering it will be hours before it functions.

Unless you want to use microseconds, you'll have to use millis(). They are the only two ways the microcontroller keeps time.
1 hour = 60 X 60 X 1000 millis().

Also, how do I learn how to use a relay or transistor to kick the motor on?

Google is your friend.

Hi, any reason for a timer, why do you need to close a flap.

I would say that if you have a solar furnace you could detect the sunlight so when the sun goes down it would be controlled to close.
Also I would be adding a couple of switches to the flap, one to show full open the other to show full closed.

Tom....... :slight_smile:

Thanx all for the help! I think I am going to try and use this idea: http://www.instructables.com/id/Build-a-cat-litter-box-fan-with-Arduino/?ALLSTEPS

The flap will trip the infrared sensors, I should be able to change the wait time to 5 hours, and then the power time to 3 seconds.

Do you suppose it will work?

wildatnite:
I should be able to change the wait time to 5 hours, and then the power time to 3 seconds.
Do you suppose it will work?

There would be no problem programming an Arduino to do that.

Whether it will be useful is another matter - you know your subject, I don't.

...R

The reason I need the flap closed is it gets to -30 F here. If I am away, it kinda negates the benefit of the solar furnace.

wildatnite:
The reason I need the flap closed is it gets to -30 F here. If I am away, it kinda negates the benefit of the solar furnace.

Wouldn't it be better, then to have a temperature sensor INSIDE and another OUTSIDE then use some logic based on that criteria to decide when to close the flap. Far less risky than relying on the whims of a passing moggie.

Where would i go for a temp sensor and the logic i would need? The timer was a failure...

BTW, I think I would only need one sensor... the furnace has an internal thermostat that kicks on at a certain temp... which opens the flap and operates the fan. All I would need is the sensor to sense below that temp to activate the Arduino, send voltage to a Darlington transistor, and close the flap. Am I learning anything?
Or maybe I wouldn't even need the transistor? 5V closes the flap.

Hi, can you explain a little more how this solar furnace works? Sounds from what you say that the flap is opened by the internal thermostat even when this will not provide any heat. Would this not cool the house further?

You asked if the darlington is needed because the flap is 5V. Well, it all depends how much current is needed to close the flap. If that is more than around 25mA, you will need a transistor of some kind, or a relay.

Also if you have 2 devices controlling the flap you will need to ensure they cannot damage the flap mechanism or themselves when they disagree.

Paul