Data Storage
USMCinfinity
Posts: 150
Hey guys, I need to do a really big project (BalloonSat) in which I want to use the BS2 for data storage, the problem is....how? How can I lets say for starters store the data taken from a photo-detector? as in intervals where it detected light and when it didn't?
Comments
You can't answer the how before you specify the what.
What are your other parameters? Is there a hard cost constraint? What about physical size?
Maybe a BS2 is not adequate for data storage. By the time you add a real-time-clock and some kind of external storage, you'd be better off with something else. Maybe a BS2pe would be perfect for the amount of storage you need to keep (about 30K bytes or less) and the data rate and resolution could be handled by using PAUSE statements for clock ticks (like once a second or less).
You can also find a clock object in the Object Exchange although it's trivial to track absolute times up to about 50 seconds with the Propeller. You normally use the system clock to produce 1 second clock ticks, then keep a count of those to produce the time and date.
EmeSystems sells dataloggers using a BS2pe. You might browse the website. There's a lot of excellent information there on the use of Stamps for all sorts of things. Check out the stuff at the "app-notes" link at the bottom of the page.
If you use the Parallax Memory Stick Datalogger, that's where the data would be stored (on the memory stick) and the BS2 would just need to hold the program that talks to the Datalogger and reads the sensors.
There's no sample code for datalogging using the HomeWork Board or the PDB/Propeller because they have limited storage by themselves and you'd need some additional hardware to hold the data and the hardware you'd need depends on what you want to store.
Really, figure out what your datalogging needs are first, then we can talk about best ways to implement it using what you've got.
Datalogging is not magic. It's simply the recording of streams of potentially useful data that you're trying to save for later, sometimes when things go wrong, sometimes just for analysis. Usually it's helpful to include some kind of time mark so you know when the data occurred. Sometimes datalogging needs to be done with low power, like if you're running the whole shebang off little bitty batteries that have to last a long time, but sometimes there's plenty of power available and it doesn't matter how much you use for the datalogging part of things.