Memorial day is 05/25/2015 – Orders will ship out on May 26th. There will not be any deliveries or shipping on Monday. Any order placed after 11am ET on Friday May 22nd will not start to ship out until Tuesday May 26th.

Data logger questions
Moderators: adafruit_support_bill, adafruit

Data logger questions

by stefan.wiswedel on Thu Nov 29, 2012 2:02 am

Hey all,

I have recently built a temperature controller. I am using it for beer brewing for two things, first is to control my mini-fridge as a temperature controlled fermenter (i.e. turns on a relay when temp goes above setpoint). Second I use it to control the temperature of my mash using a single plate stove (i.e. turns on the relay when temp goes below setpoint).

I am using arduino with the LCD shield and data shield from adafruit. I like having the option to log my data so it's a really neat feature. Especially while I am refining my code etc.. but I have a few questions.

First, when it is logging the fermentation chamber, having a reading and sync every second is a bit too often. The file gets very big and unwieldy very quickly. I tried setting the log_interval to 10sec but then it makes the buttons etc.. un-usable on the LCD shield as there is a 10 second delay between loops! What is the best way to reduce file size and shear number of data points but not delay the whole system?

Second, is there a way I can either have a physical switch or a software option to disable the data logger? Ideally I would like it that I would be able to turn on the system with no SD card attached and then only if I want to log, insert a data log and either flip a switch or select the option in a menu. At the moment every time it reboots it HAS to have an SD card inserted and also makes a new log file every time. Is there a way around this?

Any help would be great.

SW
stefan.wiswedel
 
Posts: 3
Joined: Mon Jul 16, 2012 12:18 pm

Re: Data logger questions

by adafruit_support_bill on Thu Nov 29, 2012 8:17 am

I tried setting the log_interval to 10sec but then it makes the buttons etc.. un-usable on the LCD shield

I am assuming you are using 'delay()' to time your logging loop. This is a problem for all but very simple-minded logging applications because nothing else can happen during the delay.

A better way to do it is to let the loop run as fast as it wants, and base your logging on a time-check: If 10 seconds have elapsed since the last log, remember the time and do another log.

Second, is there a way I can either have a physical switch or a software option to disable the data logger?

Just wire the switch to a digital input and check the state of that when you do the time-check mentioned above.

At the moment every time it reboots it HAS to have an SD card inserted and also makes a new log file every time. Is there a way around this?

Most likely. Post the code you are using and we'll take a look.

adafruit_support_bill
 
Posts: 37568
Joined: Sat Feb 07, 2009 10:11 am