is it possible to write codes such that the arduino only operates automatically from 7pm to 11pm, after which it will turn off by itself?
If it is possible please tell me on how to start. Thanks
is it possible to write codes such that the arduino only operates automatically from 7pm to 11pm, after which it will turn off by itself?
If it is possible please tell me on how to start. Thanks
after which it will turn off by itself?
So if it is off then how can it turn back on with no code running?
You can get a real time clock board with alarm outputs. You can arrange those outputs to wake up the Arduino from a sleep state if you want. But it is not off.
are u referring to DS1307?
It's not clear if you want it to restart after it shuts down. It's also not clear why you want it to switch off. It won't suffer any harm by running continuously 24/7.
But you may be interested in minimizing power consumption if it is powered from a battery.
If so you should look at the options to make it sleep and as far as I know you can use the watchdog timer to make it wake up from sleep. These sleeps might be very short but the average effect would probably mean that it is consuming very little power for 90% (or more) of the time.
...R
Robin2:
It's not clear if you want it to restart after it shuts down. It's also not clear why you want it to switch off. It won't suffer any harm by running continuously 24/7.But you may be interested in minimizing power consumption if it is powered from a battery.
If so you should look at the options to make it sleep and as far as I know you can use the watchdog timer to make it wake up from sleep. These sleeps might be very short but the average effect would probably mean that it is consuming very little power for 90% (or more) of the time.
...R
that is one reason, another is because i need not run arduino in the morning since my project involves solar panels which absorb sunlight making it kinda of redundant
anyways i have another question, is there anyway to increase the voltage of arduino such that i can supply it to a 12V lighting , or do i need any external circuit?
Thanks
To use the Arduino to manage 12v lighting, you will probably want to get or build a relay board. The Arduino itself can't source 12v power. The lighting will need a separate 12v power supply, but the power supply can be switched on and off using the relays, which are controlled by the Arduino. Search for "Arduino relay shield" for more information. Here's one example:
http://www.amazon.com/4-Channel-Relay-Shield-for-Arduino/dp/B007JOEVNW
The way a relay works is, when a small signal voltage is applied to the control circuit, the relay closes and allows a different load voltage to flow through it. You can think of a relay like a light switch that the Arduino can flip by putting power to one of the pins. So when you digitalWrite(HIGH) to the pin, the relay flips closed, and when you digitalWrite(LOW) to the pin, the relay flips open. The effect is almost exactly like you were using the Arduino to source 12v power (or whatever voltage the relay is switching).
For more on relays: Relay - Wikipedia
is there anyway to increase the voltage of arduino such that i can supply it to a 12V lighting ,
Basically no. The processor itself will only work at 5V maximum.
You have to regulate 12V down to 5 to run it.
ArchDemise:
are u referring to DS1307?
There are lots of real time clock chips I was not talking about any specific one.
thanks guys , will try out the relay