Page 3 of 5

Re: Data Logger Shield (HCARDU0093)

Posted: Mon Apr 25, 2016 7:40 pm
by AndreTarta
Yes, also the second are always the same.
When I try to set the time I obtain a result that make no sense, time and data are not setted usual starting point such as 1.1.1970 0:0:0.
I attach a screen of result, I also try to write data and time in different way (ex: 16,4,25,21,38,00,1 - 16,4,25,21,38,0,1 - 16, 4, 25, 21, 38, 0, 1).
I think that the product is exactly this one, it is signed Deek-Robot and use DS1307z.

Re: Data Logger Shield (HCARDU0093)

Posted: Tue Apr 26, 2016 9:42 am
by andrew
I've not seen that kind of a response before. It's not what I'd expect to see from a working shield and not even what I'd expect to see if it wasn't communicating with it either. The first thing I would suggest is to check your connections and power supply but if it is a shield then it's unlikely that's the issue.

I can only guess at the problem but it looks to me like the crystal isn't running, hence why the seconds are not counting up. If it was one of ours and our example sketch didn't work it would be very likely that it is due to a faulty shield. I'd suggest contacting the supplier and report it as faulty.

Re: Data Logger Shield (HCARDU0093)

Posted: Tue May 31, 2016 8:54 am
by pemby
If anyone else has problems getting this going on the mega i found this link https://learn.adafruit.com/adafruit-dat ... d-leonardo valuable, all you need to do is change the lines as mentioned here.
Using this method you don't need to use pins 51,52,&53 you can just use the default 10,11&12. might also need to use their library (i had already downloaded it so not 100% sure on this)

Another trick i learnt was to bend the pins A4 & A5 out so when you plug the shield in they dont make contact, then run jumpers;
Mega Pin 21 (SCL) -> shield pin A5
Mega Pin 20 (SDA) -> shield Pin A4

Re: Data Logger Shield (HCARDU0093)

Posted: Sun Jul 24, 2016 9:59 pm
by DIY_Monster
Hello, The supplied sketch does not compile with Arduino 1.6.9. It seems to dislike "SDFile" so i changed it to "mySDFile". now it compiles but does not save proper data to file, instead it's just a sting of zeros in binary. Please could you have a look?
I don't know which version of Arduino compiler you used to create the library but I suspect they have changed something that stops your sketch from working.
Thank you.

Wm.

Re: Data Logger Shield (HCARDU0093)

Posted: Sun Jul 24, 2016 9:59 pm
by DIY_Monster
Hello, The supplied sketch does not compile with Arduino 1.6.9. It seems to dislike "SDFile" so i changed it to "mySDFile". now it compiles but does not save proper data to file, instead it's just a sting of zeros in binary. Please could you have a look?
I don't know which version of Arduino compiler you used to create the library but I suspect they have changed something that stops your sketch from working.
Thank you.

Wm.

Re: Data Logger Shield (HCARDU0093)

Posted: Mon Jul 25, 2016 8:41 am
by andrew
Yes something seems to have changed. It looks like by pure chance it's being used as a name for some class. I've simply changed it from SDFile to DataFile and everything compiled and ran fine with data being correctly stored to the file. I've updated the sketch in the first post, can you give it another try. If you're still seeing the same thing being stored in the file there must be something else going on.

Re: Data Logger Shield (HCARDU0093)

Posted: Sat Oct 22, 2016 9:34 pm
by chrisbw66
Hello
I purchased a Data Logger Shield from you about a week ago through Amazon. I have just got round to trying to test it.
I am new to using the Arduino - I am using an Arduino Uno R3 with your shield plugged in to it, CR1220 battery (supplied) is loaded and also an Agfa 1GB SD Card.

I have tried a number of the supplied sketches - example from your HCRTC library, some from this forum and also from the Adafruit DS1307 RTC pages. I have tried your Data Logger Script but as I dont have a LM35 temperature sensor module I have just amended the code to output 18.0 as the temperature.
I am OK with coding, I have got Arduino IDE 1.6.12 working Ok and it will compile and upload the sketches Ok. However, I am having very little joy with this shield at all. It wont write to the SD Card - and I have reformatted it in linux using the appropriate mkdosfs command. I did get it to write something to EEPROM but only numbers from what I recall - no dates or times. I can't seem to get any dates and times to appear in the console window either - just some text - quite rarely too !
Is it likely that I have a duff board or is there something else which I should be trying. I've never found using Raspberry Pi's to be this arduous - perhaps I should stick to those !

Any help would be very much appreciated.
Thanks
Chris :|

Re: Data Logger Shield (HCARDU0093)

Posted: Mon Oct 24, 2016 8:43 am
by andrew
It wont write to the SD Card
Have you tried reading from the card? This would at least tell us if its able to access the card. You can try the example 'read' sketch in the first post of this thread:

http://forum.hobbycomponents.com/viewtopic.php?f=79&t=5

Just remember to change this line:

#define SD_CARD_CD_DIO 4

to this:

#define SD_CARD_CD_DIO 10

See if you get any message via the serial monitor.

I can't seem to get any dates and times to appear in the console window either - just some text - quite rarely too !
If it can't access the SD card for some reason it could cause the sketch to lock up. However when using the data logger example I would expect it to at least output the message "ERROR: SD card failed to initialise" to the serial monitor. Was this by any chance the text you where occasionally seeing?

is it likely that I have a duff board
It's certainly a possibility but have you tried any other SD cards? Assuming you have a spare one to try it is worth checking in case there is a compatibility issue with your card. It's unlikely but not impossible. Also I assume you have the card formatted to FAT32?

Re: Data Logger Shield (HCARDU0093)

Posted: Thu Nov 03, 2016 6:24 pm
by chrisbw66
Thank you for your speedy reply. I don't have time very often to look at this so my reply is very late !

I have got the sd card working now and using the programs from the start of this thread - SD CARD write and SD CARD read - I have managed to write the TEST.txt file containing the text 'It worked!'.

The read program also reads the file and displays this output in the Serial Window (/dev/ttyACM0)
SD Card OK
test.txt exists, attempting to read file...
It worked !!!

I have tried the RTC programs many times though without seeing any output to my screen ! I thought that it might be because I hadnt got any power supplied to my Arduino board except for the USB cable from the PC but I have now made a power supply with a 9V PP3 battery attached and it hasnt made any difference. I do of course have the CR1220 battery in the holder for the RTC and its face down as I have observed online somewhere - so thats OK !

I have also now tried installing the Arduino IDE 1.6.12 on Centos 7.1 (I think) and it all seems to work there but not the RTC so its definitely consistent.

There arent any changes I should make to the program - like your pin change from 4 to 10 on the SD CARD program are there ?

Thanks for your help.
:)

Re: Data Logger Shield (HCARDU0093)

Posted: Fri Nov 04, 2016 9:08 am
by andrew
! I thought that it might be because I hadnt got any power supplied to my Arduino board except for the USB cable
The 5V from the USB port is fine, no need to add external power.
I do of course have the CR1220 battery in the holder for the RTC and its face down as I have observed online somewhere
The '+' symbol on the battery should be facing up.

I've cut down the sketch in the first post so that it will only read from the RTC. This will help rule out anything else stopping it from working. Can you give it a try. It should simply output whatever time and date the RTC is set to. Can you also make sure that you have the BAUD rate in the monitor window set to 9600 BAUD otherwise you won't see anything. It should be in the bottom right hand corner of the window.

Code: Select all

#include <Wire.h>
#include <HCRTC.h>

#define I2CDS1307Add 0x68

HCRTC HCRTC;

void setup()
{
  Serial.begin(9600);
 // HCRTC.RTCWrite(I2CDS1307Add, 15, 2, 24, 14, 21, 0, 2);
}

/* Main Loop */
void loop()
{
  HCRTC.RTCRead(I2CDS1307Add);
    
  Serial.print(HCRTC.GetDateString());
  Serial.print(", ");
  Serial.println(HCRTC.GetTimeString());

  delay(1000);
}