x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Using a pda for data collecting

pengyou Page Icon Posted 2005-07-09 7:15 PM
#
Avatar image of pengyou
H/PC Philosopher

Posts:
355
Location:
Shanghai, China
Status:
I am in the middle of testing some solar oven designs for use in rural China. I wish I had a cheap way to collect data about temperature. I need to be able to collect temp data for outside the oven and for inside. I have done some googling and keep coming up with $300+ for a control unit, not including sensors. Will a pda with a serial port be able to do this? What kinds of words should I google on to get more info. I am not a programmer but have enough technical sense to be able to figure something out if it is already in the ballpark.

T
 Top of the page
Zapper Page Icon Posted 2005-07-09 8:26 PM
#
Avatar image of Zapper
Factorite (Elite)

Posts:
138
Status:
Hello Pengyou,

A cheap programmable PDA with a serial port is the hardware hacker's dream. All you need to turn it into a data collector is a device that takes in an 8-bit binary word, and send it to your serial port.

In the specific example of a thermal monitoring application, you can use a regular thermistor, a device that acts as a temperature controlled variable resistor. They cost about $0.50 each.

Now you have to turn the changing resistance value into serial data. You can use a 555 timer IC with the R/C tank hooked up to your thermistor. This will produce a variable frequency oscillator, with the frequency determined by the temperature.

Now you use an 8-bit binary counter (74HC590A), that is clocked by this oscillator. You connect the output to a 16 bit parallel to serial shift register and pad the lead and tail bits with resistors tied to either ground or source. This formats the serial 'word'. You can use a 74HC676 for this function. You will also need another oscillator acting as the master clock.

Lastly, you need to convert the levels from TTL/CMOS to RS232. This can be done with a 1488 RS-232 Driver.

It goes like this: The 555 timer will be acting as a variable frequency clock, with the number of ticks per sample period changing depending on the temperature. The master clock determines this sampling period, probably through a frequency divider, and you can adjust it for best results. You use the counter to count the number of 'ticks' the 555 generates in this sample period. At every tick of the master clock, the counter dumps it's data to the parallel to serial shift register, which then resets and starts counting again. The shift register is hooked up to the master clock as well. The serialized data stream is then fed through the level converter and off it goes to your serial port as an 8-bit word.

Then all you need is a simple program to monitor the comm port and translate these frequency counts to temperature readings. The conversion factor of course needs to be calibrated first with the use of a regular thermometer. It could even be analog.


You can immediately see that this is not limited to just temperature. Change the thermistor into a photoresistor and you can measure light. Or you can couple an acoustic transducer directly into the frequency input and count decibels. Or a photodiode and count light/dark transitions (like the number of people breaking an IR barrier beam). Or stick a slotted disk in front of the light beam and you can count engine RPM.

Or interpose a tristate data buffer in front of the shift register and you suddenly gain the ability to read digital inputs. Like door and window intrusion switches.

Build the simple frequency-to-RS232 board just once and the whole world of data collection opens up to you.

Total cost in parts, less than $20.

Have fun!
 Top of the page
Snappy! Page Icon Posted 2005-07-09 10:53 PM
#
Avatar image of Snappy!
H/PC Elder

Posts:
1,712
Location:
New Mexico, US
Status:
Cool!

How about a ADC to convert the value from the thermistor (or whatever sampler like a LDR etc) and you can then read the (uncalibrated) values and then perform calibration from within a app?

Hey Zapper, this sounds like fun! PengYou, let us know how it works out.
 Top of the page
Zapper Page Icon Posted 2005-07-09 11:10 PM
#
Avatar image of Zapper
Factorite (Elite)

Posts:
138
Status:
Absolutely. Lots of cheap and cheerful microcontrollers available nowadays with both ADCs and UARTS. The 80CE558 series, ST52E301 series, PIC16C63A, PIC16F627, PIC16F870, PIC16F873, and my favorites, the Atmel AVR family. The last primarily because they are cheap, fast, feature rich, very easy to program, and did I mention cheap?

I was concerned though that Pengyou might have more difficulty sourcing these chips in rural China whereas the good old 74LS/HC series of discrete logic are pretty much unkillable. (alright, stop snickering, I know I'm behind the times..) The above mentioned circuit, though not as physically simple from a hardware perspective (higher chipcount) does allow a great deal of flexibility and robustness without needing to learn microcontroller programming, or having to acquire a dedicated flash programing board.

There is great merit though in Snappy's suggestion. It is always *MUCH* easier to calibrate in software than in hardware!
 Top of the page
Snappy! Page Icon Posted 2005-07-09 11:49 PM
#
Avatar image of Snappy!
H/PC Elder

Posts:
1,712
Location:
New Mexico, US
Status:
Back in college, we had a project dealing with ADC and DACs!

oh, and you need easy calibration, because transistor performance can vary with temperature extremes.
 Top of the page
Jump to forum:
Seconds to generate: 0.140 - Cached queries : 62 - Executed queries : 9