Pages: 1 2 [3]   Go Down
Author Topic: Simple easy programmable muliti day alarm clock.  (Read 5069 times)
0 Members and 1 Guest are viewing this topic.
Oz
Offline Offline
God Member
*****
Karma: 3
Posts: 659
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, the picture:

The story as well.

The shield was made but I made a mistake with HOW I built it.

See red arrow in picture.  I simply put pins BELOW the board to allow the shield to plug into the main board.

After a bit of thinking and seeing the straps and the clock not "ticking" (as well as the weird time/date) I realised that the pins may not be connected from the main board to the tracks on the shield, and that somehow I had to allow what was shown in the PDF to happen.

Then I realised that if I used this set of pins with longer legs, and access points above them, they would do both functions.
So I took the initial pins out - fun! and replaced them with the longer legged version.  Then I got the other pins - like the ones used for the LCD access points - top left of the shield - and put some in above the other ones, I would nearly have what was shown on the PDF.   AND!  I could put in the straps.

At this point there is no RTC, no battery and no EPROM.

Done, plugged in.  Garbage.  Won't tick, won't set.  But the display works.  The menus work.

Put in RTC chip and battery.   SAME - and before you ask, I'll get to it in due time.

Totally stumped.  Looked at code, can't work out what is going on.  For the hell of it - and honestly nothing more - I went to the local electronics shop and bought the OPTIONAL EPROM.

Got home, stuck it in - NO RTC, NO BATTERY.

Voila!  The clock starts ticking and it is set to the time I "flashed" the main board with on the compile.  You know, the part where I un-comment the remarks and set the time further down, flash the chip, then re-comment the instruction.

Powered down, put in RTC and battery, and powered up.  All good.

Waited a few minutes and powered down and powered back up.  It kept the time.

No, I haven't bothered setting the right time.  At this point it was academic.

Every time I put the RTC chip in, it was in the same socket and the same way around.
The ONLY time I put the EPROM in, it is/was in that socket and that way around.



* The full shield.JPG (158.99 KB, 1024x768 - viewed 22 times.)
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6904
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Picture looks good. I am stumped. The code only ticks the clock when the RTC (DS1307) is connected and running. Otherwise it would be stuck trying to read the clock. I am jealous, I don't think I have a local electronics parts shop that have the EEPROM. I'm in a small city (that's what want to call it but I rather go with town). You are a lucky guy! So when you put in the EEPROM (24LC256) without the RTC, the clock starts ticking and then powered down and inserted the RTC then everything goes AOK? I'm confused. Keep an eye with the setup see if it loses time too quickly like a few minutes or more per day. I would appreciate a picture of the underside of the board. Oh, you can buy some solder wick to help with desoldering pins. Drove me nuts trying to unsolder a row of pins before I knew solder wick or desoldering iron.
Logged


Oz
Offline Offline
God Member
*****
Karma: 3
Posts: 659
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, strange.

Even with the RTC - ok, no battery, it didn't tick.

However, I think the STRAP problem may be in there somewhere and if I didn't have the strap issue resolved - as in the other set of points there - it may have complicated the issue.  Though I am sure I did do testing with the points there, because I sent you a piccie.

Yeah, one of life's mysteries.

Now I shall go off and read the code where you pointed me to in the other post and see if I can get that part working better.

As a gesture of sharing my knowledge, I shall repeat the situation again without the EPROM and see if it spits the dummy.

It may be interesting to establish if it is a real problem or what - for possible future complaints from other customers.



Logged

Oz
Offline Offline
God Member
*****
Karma: 3
Posts: 659
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, shield only and battery, NO RTC, NO EPROM:
Garbage

Battery, RTC, NO EPROM:
Valid time, but not ticking.
(nowhere near real)

Battery, EPROM, NO RTC:
Garbage

Go figure.

Logged

Oz
Offline Offline
God Member
*****
Karma: 3
Posts: 659
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quick general question about this code:

It is an "easy programmable multi day alarm clock"

Ok, so question:
On which ever day, at the alarm time:  The buzzer buzzes, as it should.
As there is no "OFF" function for the alarm, how do you stop it sounding?

Yes, I haven't got as far as using it yet.  I have ONLY JUST finished getting it working and need to do a wee bit of code modification.

That aside, the question I just asked popped to mind.

Anyone - please.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6904
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Last time I looked, you have not soldered on the buttons yet. Any of those buttons will stop the alarm, including the reset button.
Logged


Oz
Offline Offline
God Member
*****
Karma: 3
Posts: 659
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hang on!

I was only asking.  I didn't say I couldn't.

The switches are going on when "practical".  Because of the mechanics of their position WRT the display, etc.

« Last Edit: May 22, 2012, 03:50:16 am by lost_and_confused » Logged

New Hampshire, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Keep an eye with the setup see if it loses time too quickly like a few minutes or more per day. I would appreciate a picture of the underside of the board. Oh, you can buy some solder wick to help with desoldering pins. Drove me nuts trying to unsolder a row of pins before I knew solder wick or desoldering iron.

I am running the Phi_2_testing_v3 and am losing time rather quickly.  First off, my computer takes 5+ minutes to compile the code, even after i hacked the IDE to skip previously compiled files.  Secondly, the time was 5 minutes behind when I uploaded it, and when I checked back half an hour later, it was 10 minutes behind.  I don't understand.

Also, I can compile or upload the alarm clock version 5.  The IDE returns about 200 lines of errors and lots of warnings.

Any help is appreciated.

Eric_R
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6904
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Eric,

10 minutes a day is a bit too much. Are you keeping the shield in doors with constant temperature? The time can only be accurate with DS1307 if the crystal is kept at constant in door temperature. The crystal oscillation frequency is a function of temperature.
Logged


New Hampshire, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Eric,

10 minutes a day is a bit too much. Are you keeping the shield in doors with constant temperature? The time can only be accurate with DS1307 if the crystal is kept at constant in door temperature. The crystal oscillation frequency is a function of temperature.

Yes, it is indoors all day.  I have a desk in my (finished) basement so room temperature is in the mid 60s.  I have the alarm clock uploaded and now I can set the time from the shield, meaning I can see exactly how quickly it is losing time.  I counted that for every one second the program "ticks", two real time seconds pass.  This means that after 5 minutes, the clock will be 10 minutes behind.

If I find a permanent location for this shield, and figure out how much time i is losing, can the code be easily modified to compensate for this?

Thanks,
Eric
Logged

Pages: 1 2 [3]   Go Up
Jump to: