I have been thinkering with the idea and did a search but seems nobody has done it before
how would be the most pratical way to do it with as less hacking as possible? i guess a wifi shield and either a LCD or LED display and then a arduino board...
maybe a small solar cell and a 9V rechargeable battery
I would add a DS3232 or similar temperature-compensated real-time-clock. The ChronoDot is a good example device to do this.
Then I would set it up so it's mostly in sleep mode, to save power. You can use the ChronoDot to wake up when needed.
The NTP only needs to sync the real-time clock every once in a while -- say, every hour would be plenty.
I don't like 9V batteries for power. They aren't generally rechargeable, and you have to "burn off" half of their energy to regulate down to 5V.
Try a LiPo battery at 3.7V. You may be able to drive the Arduino directly (at 3.3 Volts) or use a boost power regulator to get to 5V. It's also rechargeable.
The biggest question is the user interface. How would you enter the 64 hex digits of the WiFi security key so the clock can connect to the network?
For the sake of everyone that is reading, Network Time Protocol (NTP). I didn't even know what that was. I bet I'm not alone. If are using LCD or LED, any reasonable operating time would need an AC adapter. I would not use a battery. The real time clock can use a backup battery.
liudr:
If are using LCD or LED, any reasonable operating time would need an AC adapter
LCD watches run for years on a single coin cell battery. Typically powered by something less draining than an AVR microcontroller, to be sure, but it's the backlight that's the real drain. With a solar cell, and a solar battery charger, you can probably run the clock for a long time without AC.
A LiPo rider, plus a battery, plus a solar cell, will probably run about $30 or so. Seeedstudio has one: http://www.seeedstudio.com/depot/lipo-rider-p-710.html?cPath=155
jwatte:
The biggest question is the user interface. How would you enter the 64 hex digits of the WiFi security key so the clock can connect to the network?
good point... my first answer would be when programming... seems the most easy way
but yeah backup battery in some way is needed...but as an alternative i would go for a lipo pack (thanks for pointing out the 9v to 5v issue)
letting the wifi module sleep and only having it powered for the time it takes to sync every hour or so, would help preserve battery time. so during the daytime it can charge
to keep interface simple 3 push buttons. 1 held down when setting the alarm time and the 2 others advance hours and mins. hitting the first button for less than X secs could kill an alarm.
The Arduino is not a charging controller. It cannot provide enough current, for one. You can probably use a sense resistor to an analog in and some switchable external circuitry to properly manage the charging of the battery, but then you have to keep the Arduino on more, which draws more power.
If you start with a wall wart version, you can add the battery stuff later, perhaps...
yeah, there are ups and downs to it all, but what i had i mind was a small alarm clock that you could place anywhere in the house. Of course for the solar cell idea to work right it was to stay in a room with enough light during the daytime.
using lipo (below 5V) is a resistor relly needed, i mean can the ADC input not handle up to 5V ?
a transistor of course to "disconnect" the solar cell when there is enough charge on the battery...
just thinkering with a hardware list:
Arduino board
Wifi Shield
Lipo battery pack
Pizo speaker
LCD Display
3 Push Buttons
1 Transistor
Solar Cell
Small Transparent Case
I have been thinkering with the idea and did a search but seems nobody has done it before
That is maybe because it is not very practical.
An DS3231 keeps a very accurate time (+/- 1 minute a year at a stable room temperature), you may need to synchronize it once a year. Why pay $50 more for a WiFi shield used just to get the time once on a while?
BTW, you can also get the time from GPS. Price would be in the same range (as the WiFi module), but handling it would be much easier (no network configuration, less string parsing (TinyGPS lib is already written, tested and available)).
BTW, you can also get the time from GPS. Price would be in the same range (as the WiFi module), but handling it would be much easier (no network configuration, less string parsing (TinyGPS lib is already written, tested and available)).
Also the GPS could be used to determine DST in the area your currently in.
just thinkering with a hardware list:
Arduino board
Wifi Shield
Lipo battery pack
Pizo speaker
LCD Display
3 Push Buttons
1 Transistor
Solar Cell
Small Transparent Case
then it't limited to where it can view sat's surfing the sky....
I thought so too. But apparently not true. Unless you use your clock (with GPS) in a Faraday cage.
It works just fine in my normal house, away from the window.
thats what the solar cell is for ? solar cell has to match a single lipo cell (max 4,2 V)
If it was that simple, there would be no need for chargers
Something would need to stop the charging when the battery is fully charged (so it does not explode). Among other roles.
the transistor is used to stop the charging... why a spec. lipo charger when only working with a single cell and not a battery?
as for the gps... i live i a flat where the outer wall is brick and inner wall is concrete i have once some time ago tried gps inside and could only get a valid fix if the damm thing was just up to the window or just outside...
LiPo cells want to charge using constant current, until they reach 4.2 volts (typical -- check specifics for your cell), at which point they want to stay at constant voltage.
You will need a current sense method (such as a small high-watt resistor with an opamp across it to an analog in pin) and a voltage sense method (to know when it gets to 4.2V.)
Most LiPo cells come with protection built in against over-charging, but if you use this to "control" charging, you'll significantly reduce the lifetime of the cell. In fact, for best lifetime, you don't want to charge the cell entirely to full, but stop somewhat short.
as for the gps... i live i a flat where the outer wall is brick and inner wall is concrete i have once some time ago tried gps inside and could only get a valid fix if the damm thing was just up to the window or just outside...
The GPS will still keep track of time, but unless it does get a fix occasionally, it'll drift just like the RTC.
That's why i ruled it out, the reception at the window is poor enough as is
Thats why i thought of NTP, The signal is plenty strong and and i should be able to move the alarm clock to any location within wifi range..
i had a look at this post: http://arduino.cc/forum/index.php/topic,8505.0.html and its somewhat close to what i want except that it pulls the alarm times from a server and also the time. this makes it dependent on haveing a server running all the time so not so great in the end.
but i guess i could use the debounce routine for each button... but then again my programming skills are to bad for me to figure out how to set/store an alarm time