data logger project- where to start?

Nov 22, 2006 14 Replies

I want to make a simple data logger that will monitor 8 switch closures/5V logic levels. When any of the switches changes state, I want to record the time of day (to 0.01 sec. if possible) and the status of all



8 switches. I expect switches to change state no more than once every
100ms or so.

I am thinking this should be doable using the parallel port on a PC, and the PCs built-in RTC. I'd like the data to either be saved as a text file or have it go directly into a spreadsheet (Excel or Open Office equivalent).



I am not much of a PC guy in either hardware or programming, but I can learn. Where would I start to get this sort of thing going? Can the programming be done within Excel or do I need something like Visual Basic, or is there some other code development system I'd need? I have a bunch of info on the parallel port, but the programming examples for accessing it all look like they are written in C, which I do not yet understand. I have programmed uCs in assembly language, so I have no problem learning to program things.



Any suggestions?



Thanks, F


couple of random ideas, have a look at the AVR butterfly demo board, might fit the bill and have a look at python, a scripting thingummy for PC's, its seems rather good, and it doesnt seem to need any EULAs from micro$oft and also pyserial, guess what that does.....

martin

You would need to run it in DOS and disable interrupts.

You would need to find a PC that can be set to 8 bits parallel input modes. Older one can't be set to 8 bits input. Newer one sometimes don't have parallel port.

I am not aware of any input/output function in Excel.

Could be done, but ...

Visual C++ OCX.

Yes, XC9536 to serialize the switches. I can send you the preprogrammed chip.

Hi,

Here is my version...

formatting link

Luhan

...

It only has 6 inputs. )-;

Thanks, Rich

Rich,

Did you look at the schematic at all ?

The 8 inputs are there, just connect the lines !!!

donald

On a sunny day (Wed, 22 Nov 2006 15:52:52 -0700) it happened fugu wrote in :

The 10mS timing will be probelmatic, even with the PC connected to the internet, and synchronized with a timeserver, you may see the PC real time clock drift say >10 seconds a day. Also you would need fast interrupt response from the PC.

So you would need an atomic clock, on a separate controller board, sending the data at normal speed via for example RS232 in a format that holds time and switch status everytime a switch is pressed. If switches can be pressed within milliseconds of each other then you need to store and chain the data localy on that board, so it needs memory.

Not difficult to make, simple PIC can do it, except for the atomic clock.

Maybe somebody else will have away around the clock problem.

Ah, add a radio clock perhaps.

I can work the clock issue with a PIC. I don't need accurate absolute time, just relative intervals. This is very easy to do with a PIC and one of its built-in timers. I can use a 16 bit counter value as the time indicator. The events I want to time will occur in under a minute, so 16 bits is plenty for a 0.01 second intervals.

I've looked into RTC in a PC and it seems like the hardware clock is only able to indicate whole seconds, and the software clock generates interrupts in 58.xx ms intervals, also not very useful.

So now it looks like I need to send data from the PIC to a PC and store the data into a text file. Maybe the PIC has to buffer the data if the logic levels change state quickly.

Thanks, F

The is the closest thing I have seen to what I am trying to do. How is the timestamping done? Are you using the PCs RTC or are you generating an elapsed time value in the PIC?

Thanks, F

First you don't look at the schematic, now you don't bother to look at the code given on the web site.

donald

No, I was going by: "The unit is based on a PIC16F84. Six digital data lines are brought in via a 74hc165 shift regiser."

OK, I see it now. :-)

Thanks, Rich

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required