iscrutton
Posts: 3
Joined: Thu Jan 05, 2012 11:05 am

Re: Datalogging; RPi as a datalogger?

Thu Jan 12, 2012 8:48 am

Although I am interested in the RPi, I don"t have much experience of programming and so was after some help and advice. I work as a science teacher and one thing I"ve found in most Uk schools is that ICT is rarely used in actual science experiments, to record data. I use dataloggers when/if they"re available but commercial versions are usually prohibitively expensive for a class set. I am sure that simple light and temperature sensors are quite cheap (in terms of dependent resistors) and in theory the RPi should be able to read these and output a table (or .csv) of "results". However I"m not sure how to put all of this together.

I welcome any thoughts on this; suggestions of other sensors that could be put together, advice on the hardware/wiring/electronics needed, software/programming advice and any foreseeable issues.

greypower
Posts: 92
Joined: Sat Jan 07, 2012 10:00 am

Re: Datalogging; RPi as a datalogger?

Thu Jan 12, 2012 10:40 am

iscrutton said:


Although I am interested in the RPi, I don"t have much experience of programming and so was after some help and advice. I work as a science teacher and one thing I"ve found in most Uk schools is that ICT is rarely used in actual science experiments, to record data. I use dataloggers when/if they"re available but commercial versions are usually prohibitively expensive for a class set. I am sure that simple light and temperature sensors are quite cheap (in terms of dependent resistors) and in theory the RPi should be able to read these and output a table (or .csv) of "results". However I"m not sure how to put all of this together.

I welcome any thoughts on this; suggestions of other sensors that could be put together, advice on the hardware/wiring/electronics needed, software/programming advice and any foreseeable issues.



I think you should investigate this product for the "production" of simple and very cheap data logging:

http://www.picaxe.com/

mightygoose
Posts: 85
Joined: Mon Jan 02, 2012 1:53 pm
Contact: Website

Re: Datalogging; RPi as a datalogger?

Thu Jan 12, 2012 11:53 am

Is there no way to set up some form of control board off the GPIO pins and then use some debian based software to do it on RPi.

(that could be utter rubbish for all i know, but it sounds reasonable at this point in the development of my understanding of computer science.)

my slant, could such sensor data be converted using 1 RPi into a radio transmission, transmitted to a remote RPi2 where the data was decoded and logged?

richardp
Posts: 117
Joined: Thu Jan 12, 2012 11:46 am

Re: Datalogging; RPi as a datalogger?

Thu Jan 12, 2012 11:58 am

iscrutton said:


Although I am interested in the RPi, I don"t have much experience of programming and so was after some help and advice. I work as a science teacher and one thing I"ve found in most Uk schools is that ICT is rarely used in actual science experiments, to record data. I use dataloggers when/if they"re available but commercial versions are usually prohibitively expensive for a class set. I am sure that simple light and temperature sensors are quite cheap (in terms of dependent resistors) and in theory the RPi should be able to read these and output a table (or .csv) of "results". However I"m not sure how to put all of this together.

I welcome any thoughts on this; suggestions of other sensors that could be put together, advice on the hardware/wiring/electronics needed, software/programming advice and any foreseeable issues.


Althought not RPi dependant.. I use the Velleman USB experimenters kit. (unfortunately it costs than a RPi at this point!)

http://www.maplin.co.uk/usb-ex.....oard-42857. Its got linux API and using simple scripts it can be used to datalog (its not high speed, but it worked in the case where I wanted to to power monitoring)

Regards,

Richard
RaspberryPi's galore
Solid run CuBox
ODroid U2

User avatar
meltwater
Posts: 1014
Joined: Tue Oct 18, 2011 11:38 am

Re: Datalogging; RPi as a datalogger?

Thu Jan 12, 2012 12:02 pm

It's all totally possible.

Ideally you'll want some analogue inputs, such as the Gertboard will provide, or hopefully it will be easy enough to build your own (it's my hope that several circuits will be given as examples through wiki's etc - something I've been doing with limited skill so far).

That's the point of the thread I started:

http://www.raspberrypi.org/for.....-software/

As for mightygoose's slant...perhaps another thread I was asking about similar of sort thing (just via internet rather than by radio hardware)...

http://www.raspberrypi.org/for.....-internet/

Shouldn't be any reason why you couldn't monitor and control experiments remotely and log the results as you go, using suitable sensors etc.
______________
http://www.themagpi.com/
A Magazine for Raspberry Pi Users
Read Online or Download for Free.

My new book: goo.gl/dmVtsc

Meltwater's Pi Hardware - pihardware.com

Like the MagPi? @TheMagP1 @TheMagPiTeam

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Datalogging; RPi as a datalogger?

Thu Jan 12, 2012 12:02 pm

You would need:


A RPi that booted to some sort of datalogger program.
A datalogger program. Any language is suitable including, but by no means limited to, Python or a bash script.
Some I/O with the drivers to read it. That probably means the gertboard or similar.
Some sensors.
A model B so data can be saved on a file-server or otherwise extracted. You could run OO spreadsheet on the RPi, but you probably want to do the processing on a desktop PC.

The data you collect would be uncalibrated, so you would have to do the calibration yourself, probably in the analysis. That's basically a y=mx+c calculation based on a couple of known data points.

You would need either a gertboard variant with screw terminals or a soldering iron.

You would need basic programming ability and basic electronics ability or a couple of tame engineers.

You would also need to factor in a robust case that child-proofed both the boards and the sensors.

richardp
Posts: 117
Joined: Thu Jan 12, 2012 11:46 am

Re: Datalogging; RPi as a datalogger?

Thu Jan 12, 2012 12:04 pm

mightygoose said:


Is there no way to set up some form of control board off the GPIO pins and then use some debian based software to do it on RPi.

(that could be utter rubbish for all i know, but it sounds reasonable at this point in the development of my understanding of computer science.)

my slant, could such sensor data be converted using 1 RPi into a radio transmission, transmitted to a remote RPi2 where the data was decoded and logged?


Why not use USB Wifi or Bluetooth expansions (they are very inexpensive) - that way you can create a short range 'Mesh' of RPI devices all connecting a master.  As for controlling other devices, I saw on the demos that the driver uses simple commands to toggle pins (Gertboard demo video)

If you are handy with a soldering iron, I see the possibilities of using the SPI+IIC interface to expand to small LCD displays, DAC's, ADC's and other real-world sensors. (Dallas 1Wire thermo sensors are brilliant )

Richard
RaspberryPi's galore
Solid run CuBox
ODroid U2

mightygoose
Posts: 85
Joined: Mon Jan 02, 2012 1:53 pm
Contact: Website

Re: Datalogging; RPi as a datalogger?

Thu Jan 12, 2012 12:13 pm

i don't think wifi or Bluetooth can cater for what i have in mind.... unless they work at 109 000 ft range...

User avatar
meltwater
Posts: 1014
Joined: Tue Oct 18, 2011 11:38 am

Re: Datalogging; RPi as a datalogger?

Thu Jan 12, 2012 12:20 pm

Planning on putting a Pi in the sky?
______________
http://www.themagpi.com/
A Magazine for Raspberry Pi Users
Read Online or Download for Free.

My new book: goo.gl/dmVtsc

Meltwater's Pi Hardware - pihardware.com

Like the MagPi? @TheMagP1 @TheMagPiTeam

masterchippy
Posts: 2
Joined: Wed Aug 03, 2011 6:10 pm

Re: Datalogging; RPi as a datalogger?

Thu Jan 12, 2012 12:25 pm

Not sure about the RPi as the datalogger but as mentioned earlier the Picaxe is cheap and relatively easy to program/adapt and can be programmed through linux.

have a look at these

http://www.thebackshed.com/win.....PicLog.asp

http://www.picaxe.com/docs/axe110.pdf

but particularly this.

Brill that it could be used with linux and hopefully RPi

masterchippy
Posts: 2
Joined: Wed Aug 03, 2011 6:10 pm

Re: Datalogging; RPi as a datalogger?

Thu Jan 12, 2012 12:26 pm

Sorry forgot to paste

particularly this

http://www.instructables.com/i.....r-dummies/

Gets brain refitted

richardp
Posts: 117
Joined: Thu Jan 12, 2012 11:46 am

Re: Datalogging; RPi as a datalogger?

Thu Jan 12, 2012 12:31 pm

mightygoose said:


i don't think wifi or Bluetooth can cater for what i have in mind…. unless they work at 109 000 ft range…


hahaha I was expecting across a desk

I have done a 24KM wifi link before! (using only 100mW and a 1mtr Dish).. not really practical to launch in to space though.. 33km is not an easy ask
RaspberryPi's galore
Solid run CuBox
ODroid U2

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Datalogging; RPi as a datalogger?

Thu Jan 12, 2012 12:42 pm

It's also worth adding that you will get 8-bit data without trying too hard, 10-bit if you pay attention to shielding and do a little filtering. You can get 12-bit if you pay great attention to shielding and filtering both in hardware and software. Do not expect to get anything more.

Using a 3.3V ADC, 12-bit data is measuring accurate to 3.3/4096 = 0.8 millivolts. 16-bit data would be measuring accurate to 50 microvolts.

Also that assumes that the sensor output covers the whole range 0-3.3V. If it covers only, say, 1-2V, then the effective result would be fewer bits.

On the subject of 109,000 ft radio links: I doubt you can achieve that sort of range without a license. Your local Amateur Radio society may be able to help (AX25 packet radio over VHF would work,) otherwise use wires.

error404
Posts: 351
Joined: Wed Dec 21, 2011 11:49 pm

Re: Datalogging; RPi as a datalogger?

Fri Jan 13, 2012 1:13 am

Which dataloggers are you using today? How does the software work?

Personally I would probably base something around I2C, as there are already a large number of integrated sensors that don"t need calibration or fiddling, and Linux has good support. If you want to measure other things for which sensors aren"t widely available, you"ll have to design some hardware, but I2C ADCs are easy to find, so you can standardize the hardware and interface code and just modify slightly the logger.

You will probably have to write the software yourself, or find someone (comp-sci students?) to help with it. It should be pretty trivial to get a basic datalogger going, but there"s lots of room for expanding upon that.

Once you've got the data into a file (which can be a trivial shell script), you can do cool stuff like http://www.live-graph.org/

Pi doesn"t include an ADC though, so you will definitely need some sort of external hardware.

33km is quite doable with LoS, fixed endpoints and "cheap" WiFi gear e.g. Ubiquiti AirGrid.

rx8boi
Posts: 1
Joined: Sun Mar 11, 2012 9:20 am

Re: Datalogging; RPi as a datalogger?

Sun Mar 11, 2012 5:45 pm

Im far from up to speed with the rpi but am i right to believe that one of these will be easily connectable via bluetooth?

http://www.racedac.com/

I want to be able to record rpm, steering angle, wheel speed, lateral/longitudinal accel, pedal positions etc. at 100hz. Do some analysis on the fly in the rpi and light some leds depending on the inputs.

Can anyone point me in the right direction of what I'll be needing to do?

kasperl
Posts: 90
Joined: Fri Jan 06, 2012 6:20 pm

Re: Datalogging; RPi as a datalogger?

Sun Mar 11, 2012 6:39 pm

A USB Bluetooth dongle, and communication software that's either open source or has someone with source willing to compile for Linux ARM. Writing the software should be easy if it's really a BT Serial Port, but that device in itsself wouldn't add much.

I'd look at some I2C DAC's if I were you, and hook up those over the GPIO port. Direct communication with the Pi, no bandwidth issues and no wireless hassle. You'll still need custom software, but it'd be the exact same amount of work to write. Probably less, since there's no timing issues associated with Bluetooth and such.

There're also I2C GPS modules available, as are accelerometers and even compasses and such. That would  probably be a very easy way to get a lot of data out without using too many devices. Sparkfun.com has a lot of interesting toys on their sensors page, including flow meters for fuel and that kind of stuff.

RaceDAC
Posts: 1
Joined: Mon Mar 19, 2012 2:25 pm

Re: Datalogging; RPi as a datalogger?

Mon Mar 19, 2012 2:52 pm

Hi  rx8boi!

I noticed from my site stats that someone came via that link to my site and I was curious to find out what was the topic.

Yes, RaceDAC is very easy to connect via BlueTooth. And always when RDAC is on, it feeds the data automatically, no handshakes or other extra protocol needed. I.e. it work the same way as for example any GPS-BT-receiver does. Just connect the BT and you get the data from COM port.

The reason why it has BT; is Mobile phones. Easy to connect.

(To Kasperi; it really is a standard BT Serial Port.)

And RaceDAC firmware is also open source. So you can do what ever you like with it.

Anyhow, if you have more questions in your mind, reply to this thread or send them via email.

BR, "RaceDAC"

rx8boi said:


Im far from up to speed with the rpi but am i right to believe that one of these will be easily connectable via bluetooth?

http://www.racedac.com/

I want to be able to record rpm, steering angle, wheel speed, lateral/longitudinal accel, pedal positions etc. at 100hz. Do some analysis on the fly in the rpi and light some leds depending on the inputs.

Can anyone point me in the right direction of what I'll be needing to do?


User avatar
SN
Posts: 1014
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
Contact: Website

Re: Datalogging; RPi as a datalogger?

Mon Mar 19, 2012 4:00 pm

richardp said:


iscrutton said:


Although I am interested in the RPi, I don"t have much experience of programming and so was after some help and advice. I work as a science teacher and one thing I"ve found in most Uk schools is that ICT is rarely used in actual science experiments, to record data. I use dataloggers when/if they"re available but commercial versions are usually prohibitively expensive for a class set. I am sure that simple light and temperature sensors are quite cheap (in terms of dependent resistors) and in theory the RPi should be able to read these and output a table (or .csv) of "results". However I"m not sure how to put all of this together.

I welcome any thoughts on this; suggestions of other sensors that could be put together, advice on the hardware/wiring/electronics needed, software/programming advice and any foreseeable issues.


Althought not RPi dependant.. I use the Velleman USB experimenters kit. (unfortunately it costs than a RPi at this point!)

http://www.maplin.co.uk/usb-ex.....oard-42857. Its got linux API and using simple scripts it can be used to datalog (its not high speed, but it worked in the case where I wanted to to power monitoring)

Regards,

Richard


looks nice and simple - plus if there is a linux api it can be played with using a linux pc first - goes on my 'wishlist'
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?

Return to “Other projects”