DS1921H Time Reading

jopooze

Member
On the Picaxe website the DS1921H reads "the clock measures seconds to years". I have an AXE091U experimental board hooked up with a 28X2. How would do I read the time from which my iButton is detected by the reader and present it onto an LED screen.
 

Technical

Technical Support
Staff member
The thermochron iButtons are fully self contained dataloggers, normally used with the iButton datalogger software for datalogging missions.

http://www.picaxestore.com/index.php/en_gb/log001.html

It is not common to try and directly read data such as time from this type of iButton using a PICAXE.

Although it is possible to read the time off a thermochron using owin/owout commands it is a fairly complex job. For time stamping most PICAXE users would use a RTC chip like a DS1307 instead - there is a socket at the bottom of your AXE091 to fit a DS1307 directly to the board - for instance you could use readowsn to detect the iButton hit/serial number and then the DS1307 to get the time/date.

Perhaps you can specify your project requirements a bit more clearly?
 

jopooze

Member
My project is to create an orienteering participant tracking and anti-cheat system. I am using the iButton to detect the person and need it to store the time in which they are detected. The data will then be wirelessly transmitted to another Picaxe (Still figuring that out). I'm thinking of using the XRF module for this.
 

rossko57

Senior Member
Maintaining your own on-board clock would be better for that use. All the participants are then being measured against the same yardstick. No opportunity for confusion, accidental or deliberate, if the iButton clocks are not in synch.
 

hippy

Technical Support
Staff member
I am using the iButton to detect the person and need it to store the time in which they are detected.
Are you intending to record the time they reach the monitoring station in the PICAXE or in the iButton ?

Is there just a single monitoring station at the end of the course, a start and end station, or multiple monitoring stations along the course ?

It may be helpful to describe how things will work on an orienteering day, how the iButton is to be used before handing to a participant, throughout the course, and at the end. It is usually best to define what you want to achieve and then work out to how best to achieve that.
 

jopooze

Member
The course will have multiple 'checkpoints'/monitoring stations that will record the time on the Picaxe as the participant places their iButton on the reader. The information from all checkpoints along the course will then be transferred to a main hub which will display the times in which they reached each point.

It's still a work in progress obviously and I need to know how to read the time first before anything else. Having the iButton clock not being in sync is not a problem right now, if it is then I can write about it in my work and buy actual in built clocks.
 

Technical

Technical Support
Staff member
The theromchron (one per competitor) is very expensive compared to the serial number only ibutton (DS1990A)
To read the time reliable from a thermochron you will need to clip it in position for a second or so, not just a quick tap as with a serial number read.

All in all it will be much simpler and more reliable to have the RTC (e.g. DS1307) on the PICAXE board and just record the DS1990A serial number when touched on the PICAXE using readowsn.
 

techElder

Well-known member
... will then be wirelessly transmitted to another Picaxe (Still figuring that out). I'm thinking of using the XRF module for this.
How large is this course? The "wirelessly" may be your biggest challenge.
 

hippy

Technical Support
Staff member
If each checkpoint simply reads the iButton RTC, then records that and checkpoint number to the iButton NVRAM, there should not be any need for wireless; all the data required will be on each participant's iButton at the finish line.

That probably would be the ideal solution but has the difficulty of reading the time and cost of iButton.

An alternative may be to use an iButton with NVRAM or EEPROM and have the RTC with the PICAXE at the checkpoint. One could perhaps forego a real RTC and rely on the PICAXE counting free-running time, which can be made reasonably accurate with a 32kHz watch crystal. That should be enough to detect cheating using order of arrival and relative time values compared to other participants.
 

jopooze

Member
The main priority for the system and reason for the wireless part is for safety. The checkpoints will communicate with the main hub in order to show supervisors where people were last checked in.
 

jopooze

Member
So how do I read the time from the iButton and display it on a screen. People have said to use the owout/owin command but I have no idea how to do that and there's little help online.
 

BESQUEUT

Senior Member
So how do I read the time from the iButton and display it on a screen. People have said to use the owout/owin command but I have no idea how to do that and there's little help online.
Do not read time from the iButton but from the local DS1307 : I2C-Real-Time-Clock-DS1307/
All in all it will be much simpler and more reliable to have the RTC (e.g. DS1307) on the PICAXE board and just record the DS1990A serial number when touched on the PICAXE using readowsn.
Example readowsn/
The main priority for the system and reason for the wireless part is for safety. The checkpoints will communicate with the main hub in order to show supervisors where people were last checked in.
If the wireless part is failproof, you will need only one clock on the main hub.
How will you show "when and where people were last checked in" ?
(If with a Windows or Linux computer, simply use the computer clock...)
How large is this course? The "wirelessly" may be your biggest challenge.
+1
Are every checkPoints "inSight" from the main hub ?
If not, you may need a mesh network...

How many participants ?
(if many, there is chance that few of them check at the same time... and interfere each others )
 
Last edited:

rossko57

Senior Member
That makes sense. Means you need reliable wireless, needs to be chosen carefully; so you'll need to specify the required range/environment properly e.g. "2km in hilly terrain" etc. Probably going to be a challenge. Directional antenna on poles might help, or might defeat the object of the competition.

Given reliable wireless checking people in, you only need a 'clock' at the central monitor point. Having a fallback clock at each checkpoint might be useful for the competition in case of problems, but useless for safety,

EDIT - missed the previous post, already dealt with!
 
Top