Simple data logger for newbie

Hello community,

I would like to make a standalone data logger connected to a simple switch or sensor. I want the device to save date and time for when the switch is on/off. Then I want the data in .csv on my computer.

I'm not an engineer, computer scientist, programmer or even hobbyist. I just wanna get data quick and easy but I can't find any commercial product for this. After intense googling, I can only conclude that Arduino is the way to do it. So how would you explain to a ten year old girl how one might build and program this device, as small, simple and cheap as possible? What hardware must I have?

Thanks!

Explanation for a ten year girl: nag daddy till he buys one for you.

I use thew lascar USB devices for data logging and can certainly recommend them. 32000 bits of data are stored. fastest sample rate is 1/second which gives 8 hours worth. I normally use 1/minute on my wind turbine, which gives me around 21 days.

So... are you saying I need a voltage meter? What would I need that for? I'm not interested in measuring the level or strength or whatever of electricity. How would I connect it to the switch and what would it print for me?

I want the device to save date and time for when the switch is on/off.

I'm not interested in measuring the level or strength or whatever of electricity.

I wonder how with such little knowledge you would even think of implementing this with an Arduino. A switch is a device intended for use with electricity.

So here is how it works:

Use a battery, your switch and a voltage data logger. All of these devices should have 2 connections:
Battery: positive and negative. Let's call them B+ and B-

Voltage logger: positive and negative (but does not matter since you are not interested in any values, only if the switch is on or off). Let's call them M+ and M-

Switch: 2 identical connections, let's call them S1 and S2.

Connect B- to M-
Connect B+ to S1
Connect S1 to M+

For gould measure you could add a 1M resistor between M+ and M- but this should be not necessary.

Once you have this setup completed the voltage meter should log 0V for switch open and the battery voltage for switch closed.

Ok. I think I get it know. At least I know what to buy and how to start experimenting. So thank you for that very clear explanation Udo Klein!

If you buy this for $10, I will write the Sketch for you to log switch changes:
http://www.ebay.com/itm/270921982348?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

sbright33,

In that case I most definitely will buy it. $10 beats $70+shipment. Gotta love Hong Kong.

If you can write a sketch, tell me what else I need and give me a link showing how to interpret these types of sketches I would be very grateful !

This board without external memory will not log to many events though. However if you log only the on/off times it might be sufficient.

It will log about 1000 events if you are not concerned with 1-second accuracy.
With an SD card millions.

If I remember it right 168 has 1k EEProm --> ~1byte per Event. So the events must not be more than 256 seconds separated. --> You can log for about 4000 minutes or 2-3 days or am I missing something?

Only 512 EEPROM. Sorry I was thinking 328 with 2k Ram. 300 events would be more realistic with 1k. Unless you only wanted 30 seconds accuracy. Then I could do events that are 2 hours apart. 4 hours apart would take an extra byte. That is not a limitation. If you wanted it to standalone for 10 days then it would only be able to log about 4 events per hour, assuming none happen while you're sleeping. Seems a little tight for 1k of Ram. How about 1 minute resolution? Or 328. Or SD card.

Best way is probably something like an arduino nano, sd card + slot, then just plug the sd in the computer and read your data, you probably could do the whole thing for 30$, and the time would depend on the size of the sd card
say you get a 2gb card which is like 2.1 billion bytes or something like that, and every event is something like
3/30/12 12:07 off,
3/31/12 14:08 on,
So that'd be about 2147483648/16== 134217728 events which I think if it switched every minute it'd last you 255 years, longer if its not done every minute, assuming if my math is right,
but at that point I think you would need a more accurate clock to be even close to good

The battery is the practical limit if there is no AC nearby.