Looking for some examples.
Speedy
Posts: 2
Hello All,
I'm new to the program writing for Basic stamps and I'm trying to find a few coding and build·examples.
What I'm trying to do, is build my Homework stamp to connect too and record too Excel the following.
1). Record Temperature via thermalcouple or LM 35·one hundered times per·seconds.
2). Record Pressure readings from a transducer·one hundered times per·seconds. " 30mv Max output "
3). Record Postions via wiper potentiometer·at least one hundered time per second. " 0 to 5v "
·I have gone through the owners build manual and completed all the projects. Now its time to put this thing to work and I'm struggling. Anything, web site ect.. that you could point me to would be greatly app.
[noparse]:)[/noparse]
·
I'm new to the program writing for Basic stamps and I'm trying to find a few coding and build·examples.
What I'm trying to do, is build my Homework stamp to connect too and record too Excel the following.
1). Record Temperature via thermalcouple or LM 35·one hundered times per·seconds.
2). Record Pressure readings from a transducer·one hundered times per·seconds. " 30mv Max output "
3). Record Postions via wiper potentiometer·at least one hundered time per second. " 0 to 5v "
·I have gone through the owners build manual and completed all the projects. Now its time to put this thing to work and I'm struggling. Anything, web site ect.. that you could point me to would be greatly app.
[noparse]:)[/noparse]
·
Comments
The easiest way to use RCtime is with·variable resistance sensors, but the execution time varies. Lower resistance=faster execution; higher resistance= slower execution, since you're timing the voltage in a capacitor bleeding off through a resistor. So to minimize execution time, you want small cap and resistance values, which will require some experimentation. You could speed up execution time by lowering your resolution, but that's counterproductive.
Remember that·every RCtime starts with a 1 ms delay to charge the capacitor, leaving you·(at most)·2 ms for·reading and writing or serially transmitting the data, both time-intensive processes for a BS2 chip.··I'm sure a Propeller chip will be better able to support your high·sample rate.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
First step is to calculate how much memory you need for the amount of data you wish to collect. That depends on how many bytes you will need to store for each reading. If you are using 16 bit numbers you will need 6 bytes x 100 = 600 bytes per second. If you collect 10 seconds you need 6000 bytes.
A BS2 can only exectute about 2000 instructions per second.
Even if you could get a 16 bit number from 3 sensors with one line of code for each sensor·you still need to store the data with another line of code. Of course you will need many more lines to increment data pointers and store those numbers in memory. That would be 6 lines of code times 600 or 3600 lines of code per second. So the BS2 clearly will not work. You also would need 600 bytes of memory for every second of data you need. The memory will also have to be fast enough to allow this rate.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
I could slow thinks down a bit I'm sure.
What·I was hoping for, is that someone could point me to a web site with information about how to put together, both hardware and programing side, a stamp that would perform the measurments I had listed.
Much thanx just the same.
http://www.c-sharpcorner.com/UploadFile/mgold/FlashingStockAlert09152006184241PM/FlashingStockAlert.aspx
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner