Use Arduino to record data without USB plugged in to computer?

I am just starting out with Arduino (I've made it to project 11 so far, the LCD screen from the Arduino Starter Kit). I was thinking it'd be neat if I could record the temperature of my living room while at work. However, for learning's sake, I don't want to have to keep my Arduino plugged into my computer all day. I have a 9V connector, and have been able to load a sketch to the Arduino, then use the 9V battery (with connector into the GND and VIN) to light an LED, so I am briefly familiar with the fact that you can use a 9V battery to run a "pre-loaded" script.

Can I also use the 9V to run my Temperature logging script, but not have to leave it plugged into my computer to record the data? I am assuming I'll need a Micro SD shield (or some other type of SD card shield) and then run a program that logs the SERIAL data to that?

Am I correct in thinking this is how I'd have to do it? Are there any simple examples for a new person to use - or should I wait until I have more knowledge about the Arduino system/environment before I start taking my Arduino "away" from the computer?

Thanks for any input!

Yes you can save data to an SD Card - there is an SD Card library
Yes you can run an Arduino with a battery
BUT, a small 9v battery won't run it for very long. I suggest you get a battery holder for 6 x AA rechargeable NiMh batteries.

You should then study the various way there are for power saving with an Arduino.

...R

Essentially right, but a 9v battery isn't a good idea, and a 9v wall art is a much better one. If you must use batteries, 6 AAs, or even 5, are a better proposition. You will clearly need an SD of one sort or another. Note that they are usually included with Ethernet shields etc. You are also likely to need a clock.

I think taking Arduino away from the PC now is none too soon, if only because the power supply via the USB cable is marginal anyway. A wall wart is much more capable.

Hi,

Most Arduino have 1024 bytes of EEPROM memory built-in. This should be enough to record your room temperature every minute for 17 hours. Or every 5 minutes for 3.5 days. So you don't need an SD card for now. The Arduino can keep time reasonably well over those periods also without an RTC. If you know what time you started the recording process, you can work out the time of each temperature reading when you download the results.

For maximum battery life, I use 4 x AA NiMh cells. Bypass the Arduino's regulator (i.e. not using the barrel socket) by connecting the cells to the +5V and GND connectors. If using non-rechargeable cells, USE ONLY 3, NOT 4! Using 4 non-rechargeable cells would be 6 volts, which could damage the Arduino.

Paul

You could consider using a pair of nRF24L01+ transceivers to upload your data to the PC wirelessly in real time - ideally, you would log it in a database so it is accessible to whatever analysis/reporting tools you may want to use in future.

Another storage alternative is the 23lcv1024 SPI SRAM chip. Pretty easy to use, 128K bytes and, with a small watch battery attached, non-volatile.

PaulRB:
Hi,

Most Arduino have 1024 bytes of EEPROM memory built-in. This should be enough to record your room temperature every minute for 17 hours. Or every 5 minutes for 3.5 days. So you don't need an SD card for now. The Arduino can keep time reasonably well over those periods also without an RTC. If you know what time you started the recording process, you can work out the time of each temperature reading when you download the results.
...

Paul

Thanks everyone for your replies! In regard to using the on-board memory - instead of using Serial.print("hi"), I would just use EEPROM.write("hi"))? (I got this idea from here)

Instead of asking what I think are some already answered and simple questions, is the best topic for me to research something along the lines of "Stand alone Arduino" and/or "using Arduino's on board memory"?

Piethon:
, I would just use EEPROM.write("hi"))? (I got this idea from here)

I bet it isn't as simple as that and, while I was a bit fast in saying "clearly, you will need an SD", I also bet you will find after trying that an SD card module is about the best $2-50 you will ever spend.

If you must use batteries, I think the best, and probably only, topic for you to research is "sleep mode". Arduino spends most of its time doing nothing, and you are adding to the power load by using an SD card.