View Full Version : Data logging temp with BS2 Home A/C
08-01-2005, 11:14 AM
Can some one direct me to a place that might have some exaples of code for data logging temperature and one or two inputs connected to a computer runing a Visual Basic GUI. I wanto data log the cooling efficiency of my house ( I live in Florida) . I'll try to make it long inside temp. out side temp. when the ac is on and maybe humidity. Hope I can make it log for about a week or so on the pc. Or if there is a way to have the stamp write a excel file while logging?
Post Edited (Dennis240) : 8/6/2005 1:40:23 AM GMT
08-01-2005, 11:31 AM
I just went to www.google.com (http://www.google.com) and type in "BASIC Stamp/Visual Basic" and found several articles·related to the BASIC Stamp using a Visual Basic interface.· This may help you get started?
08-01-2005, 11:47 AM
We have exactly what you need:
StampDAQ is presented as a real-time data acquisition tool for the BASIC Stamp, but there's nothing preventing you from using WRITE commands while the BASIC Stamp is being used in the field to store the data in EEPROM, then READ and SEROUT to stream it into Excel when you return.
For another comparison, see our "Remote Controlled Airplane Projects" with the BASIC Stamp video:
In this video we demonstrate the storage of GPS data in a BS2p EEPROM, with subsequent flight analysis in Excel. This doesn't use StampDAQ, but it could have just as easy as what we did (copy from the DEBUG window).
Your project is entirely feasible and there is no need to write custom VB software to achieve your goals. Use Hypertermal, the Stamp DEBUG terminal, or StampDAQ.
08-01-2005, 12:21 PM
The Stamp DAQ is perfect!! Thanks a lot Ken!!
How much data can a BS2 store reading 3 channels about a minute apart? Or is this not enought information to give an answer?
Post Edited (Dennis240) : 8/1/2005 4:26:52 AM GMT
08-01-2005, 12:39 PM
The BS2 has a 2K EEPROM, which could store 2048 bytes of data if you had NO PBASIC program in the EEPROM. Your PBASIC code and data is stored in the same EEPROM. Normally, your data will store from location 0 up, and the PBASIC program stores from 2048 down.
If your PBASIC program uses 1/4 of the EEPROM, then you've got about 1500 bytes left.
Three byte records with 1500 bytes is 500 records. That's 500 minutes, or 8.3 hours.
But you can use a BS2p24 and access all 2K x 8 program banks from your main PBASIC program. Then you'll have enough EEPROM for over 5,000 records of 3 bytes each - 83 hours. Of course, you can use an external EEPROM also, but there's a certain convenience about using READ/WRITE with the Stamp's internal EEPROM.
Make sense? I didn't double-check my math because I have guests here and we're starting the movie "Napoleon Dynamite" right now.
08-01-2005, 11:06 PM
I've been doing a little research over the past few days and I discovered that MMC and SD memory cards can easily be interfaced with using SPI.· You could pick up a 16mb card for next to nothing and have an effectively infinite amount of logging space.· Check out http://www.captain.at/electronics/pic-mmc/.· From what I've been able to figure out, if you want to then be able to remove the card, stick it in your computer, and be able to pull an excel file off the card (which isn't impossible), you have to make the stamp use FAT16 or FAT32.· That sounds hard.· But just writing raw data should be simple.
08-01-2005, 11:19 PM
Do a google for "alfat" .... Ghi has a interface for fat sd mmc cf and ide that after you write the data it can be read by a computer.
08-03-2005, 01:35 AM
The stampDAQ is good for now, I need it simple in the beggning:)
Did you see the box office that movie made, like 45M http://forums.parallax.com/images/smilies/shocked.gif
08-06-2005, 07:31 AM
I live in Houston and AC efficiency is important here also. I just wanted to suggest that temperature and humidity pre probably the slowest rate of change variables around. I don't think it would hurt your data to log 15 to 30 minutes apart, aside from clouds and showers, i wouldn't think you'd miss much.
08-06-2005, 09:40 AM
I will experiment with different log periods. I got all the parts on the way, will be here shortly and logging will begin. I'm mostly doing this bacause I will be building a custom a/c system and want to see if there was any improvent in the use of power.
I realize you have already purchased your stamp, but you did not mention which one you purhcased. Wouldn't the BS2PE be a better choice than the BS2p24 as stated above? Since the BS2PE is adapted for logging it has half the speed and twice the memory as the BSPp24 it looks like the obvious choice here, especially after reading Philip's comment about the rate of change then speed would not be a necessity.