Data logger questions

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Data logger questions

Postby stefan.wiswedel » Thu Nov 29, 2012 1: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 11:18 am

Re: Data logger questions

Postby adafruit_support_bill » Thu Nov 29, 2012 7: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.
User avatar
adafruit_support_bill
 
Posts: 16016
Joined: Sat Feb 07, 2009 9:11 am


Return to Arduino Shields from Adafruit

Who is online

Users browsing this forum: mibignistinly and 18 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [102]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[109]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]