picaxe datalogger

del555

New Member
G'day all..my first post as a complete newbie, just about to take the plunge into picaxe!....I'd like to start with the datalogger, but have a question that I hope someone can help with.
What is the fastest rate at which I can take samples?..the Options dialogue implies that 1 second is the highest rate..is that correct?...I'd like to be able to sample at say 20 or 50 millisecond intervals for a few seconds (assume plenty of memory!)....is this possible, or would I need to be looking at a DIY job with a 28X?.....sorry if this is a bit elementary, but any guidance would be appreciated....many thanks......Derek
 

manuka

Senior Member
Welcome- you can certainly work more rapidly than a second, & that 50msec may be doable, but what variables are trying to log? DIY PICAXE data loggers abound ( I've several at => www.picaxe.orcon.net.nz), but limited memory usually means slow logging ( say temps. every minute for ~ an hour) may be more useful. Some sensors are slow reading anyway - DS18B20 take 750msec per reading.

It's usually recommended to "flash a few LEDs" for your first project by the way ! Stan
 

womai

Senior Member
There have been many forum threads on the past about dataloggers, and I can remember at least one about how to maximize sample rate.

Depending on clock speed etc., the Picaxe can sample up to well over 1000 samples/sec. One other limitation is storage speed - if you write your samples to an EEPROM (eg. Microchip 24LC512), that needs some wait time before you can write more data (typically 5ms between writes); modern EEPROMs (the 24LC512 included) have page write modes where with some restrictions you can write a block of several bytes at once, but you still need the wait time between block writes. One workaround is to use more than one EEPROM and distribute subsequent writes between them.

For short bursts of fast samples the most straightforward solution (which uses also a minimal number of components) would be to use the 28X2 and have it write the data to the scratchpad (which is SRAM and allows very fast writes). That gives you 1024 bytes of storage or about 20sec sample time at 50 samples/sec (that speed is easy to reach in this case).

What type of data are you trying to log?

Wolfgang
 

westaust55

Moderator
Firstly, welcome to the PICAXE forum.

It will certainly help if we better understand what you are trying to log.

Also an idea on your actual general electronics experience. Kit building experience and programming experience (such as in BASIC).

Are you intending to use the “standard sesors plus a couple of extra others?

The PICAXE datalogger from recollection includes a DS18B20 temperature sensor.
To initiate a sample and read back the data takes around 750ms.

Another issue with some sensors is that frequent/rapid reading causes the sensor to warm up and produce erroneous results.
 

MFB

Senior Member
FRAM based logger

A simple a relatively speedy data logger was featured in Nuts & Volts magazines article about instrumentation for model rocketry (Aug & Sept 2007 issues, plus Jan 2009). Using an 18X at 8MHz, together with a 32Kbyte 8-pin FRAM chip, gave sample rates in the hundreds of Hz. Software details about storing a mix of 8 & 10 bit measurements and exporting data to Excel was included, together with schematics showing how to interface a range of sensors. Should be possible to use this information to produce a 20X2 based design if need to sample at even higher rates.
 

del555

New Member
Thanks for the comments fella's...some stuff to think about there...I hadn't considered the time needed to write to memory, so lots to investigate !...I'm an experienced constructor, but don't have any design or formal electronics training (in other words it's a hobby!) and I did some Basic in the 80's when it was first popular but I struggle with PIC assembler.

My reason for asking about fast sampling is that I've used a commercial logger (as a school science technician before retiring recently), and one experiment was to log the oscillations of a spring for a few seconds, and display the results as a graph, the sensor was an ultrasonic Tx & Rx. Still, even if I can't do that one, there's still lots more to play with!.....thanks again for the help everyone.....I'll be back!:)
 
Top