navitron
 
Renewable Energy and Sustainability Forum
UK's most popular Renewable Energy Forum May 23, 2012, 09:53:47 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Anyone wishing to register as a new member on the forum is strongly recommended to use a "proper" email address - following recent spam/hack attempts on the forum, all security is set to "high", and "disposable" email addresses like Gmail, Yahoo and Hotmail tend to be viewed with suspicion, and the application rejected if there is any doubt whatsoever
 
Recent Articles: UPDATE ON DECC APPLICATION FOR LEAVE TO APPEAL TO THE SUPREME COURT | Yingli Green Energy's PV Module Ranks No.2 in TUV Rheinland Energy Yield Test | Navitron Solar Showers at Glastonbury for Year 5!
   Home   Help Search Login Register  
Pages: [1] 2 3 4 5 6   Go Down
  Print  
Author Topic: No frills low cost standalone 1 wire datalogger  (Read 8340 times)
ericw
Hero Member
*****
Offline Offline

Posts: 735


« on: October 12, 2010, 08:48:18 PM »

A simple low cost (about £30) standalone 1 wire datalogger for those who want to collect information from DS18B20's and HalfBees without having a PC (or equivalent) running continually.

The hardware consists of an Arduino (386) with the Nuelectronics  SD card /RTC shield . The only modification is the addition of the 1 wire pull-up resistor which can be plugged into the sockets on top of the shield.

Data is written to CSV files on an SD card, which can be removed and put into a PC when access to the data is required. The data is also spewed out of the serial port.

Up to 2Gbyte SD cards are supported by the FAT16 filesystem and the software could handle 64 sensors, but this is probably more than practical for the hardware.

Once the Arduino has been programed it can used sandalone by just applying external power or run within the Arduino environment. The required files are created automatically on first start-up.

The MK I version of the software is in the attachment. To use it it needs to be copied/renamed to an Arduino sketch. A couple of additional libraries noted in the sketch need to be added to the Arduino environment before it is compiled and uploaded.

While in principle it is possible to read the data in a search rom loop if for any reason a sensor reading is missed, the data file can be difficult to repair, so a CSV file of ROMID's is created and stored on the card, and used to drive the selection of the sensors.

Usefully this file can be edited externally to restrict/change the search order. Its also possible to add another line to store the mapping between a sensor romID and something more user friendly. This file can be used as the header line for a Exceed type spreadsheet to analyse the data.

It would have been nice to make it battery powerable but the supply current of the Arduino board (mainly the USB interface + power on leds) make it impracticable. It would be possible to do a custom stripped down board to do this.

The current software generates a new file every month with interval between sample runs set at the top of the file.
If anyone would like a different frequency then its fairly easy to alter.
It’s the initial version so if anyone has and useful comments/requests for improvements please speak up.


* dlog_1.txt (7.31 KB - downloaded 221 times.)
Logged
KLD
Hero Member
*****
Offline Offline

Posts: 1340


« Reply #1 on: October 13, 2010, 10:35:12 PM »

Eric,
One could think you spend all day developing new RE gadgets! Well done. Have (another) applaud.
Do you think it would be possible to add the Ethernet shield as well? Since there has to be a power supply anyway, tagging on another cable wouldn't be too cumbersome. Maybe there even is a way of PoE for the Arduino? With Ethernet connection, the unit could be used like in Ken's model as one of the satellites, reporting complete sets of data to a central data station.

Klaus
Logged
desperate
Guest
« Reply #2 on: October 13, 2010, 10:48:44 PM »

Eric

It certainly looks good to me (thats doesn,t mean much) is it possible to post a "Complete numptys guide" to setting it up?
in words of less than one syllable if poss,

Desperate
Logged
roscoe
Full Member
***
Offline Offline

Posts: 151



« Reply #3 on: October 14, 2010, 12:47:56 AM »

Eric,

Sterling job, thanks for sharing a great solution.  Just for clarification
? did you use 3 wires or 2 for parastic
? any tips on a cheap enclosure, something refuse perhaps some old margarine tub ?

Klaus,

The 'official' latest arduino ethernet shield is good value if you can use its extra functionality, not used it myself but it is supposed to have...
poe, remote tftp downloads (like this one), microsd card, better reset ? dont know aout a rtc.  The arduino people were quite excited about this at a recent launch but I haven't seen all details fully confirmed. At £35 its a bit pricey, but nice.
http://arduino.cc/en/Main/ArduinoEthernetShield
Still can't beat KenB's concept on price...
http://www.navitron.org.uk/forum/index.php/topic,11558.0.html
« Last Edit: October 14, 2010, 12:51:49 AM by roscoe » Logged
stephendv
Sr. Member
****
Offline Offline

Posts: 439



WWW
« Reply #4 on: October 14, 2010, 08:49:29 AM »

Great stuff ericw! 
Klaus, I've been looking for a small board that supports ethernet, RS485 and SD card and although you can build something like this from arduino shields it starts becoming expensive compared to fully functioning ARM computers running linux, e.g.: http://www.shop.kristech.eu/product_info.php?products_id=283&language=EN
70 Euro's get you a full linux pc with SD, usb, ethernet and a lot more processing power than arduino.
Also on the horizon is going to be a slew of cheap android tablets that could be used for this sort of thing: http://www.reghardware.com/2010/10/08/dixons_advent_vega_amico/

Logged

http://www.casanogaldelasbrujas.com
2.8kW PV, SMA Sunny Island 5048, 5 PzS 700 battery bank, stinky diesel.
roscoe
Full Member
***
Offline Offline

Posts: 151



« Reply #5 on: October 14, 2010, 09:32:05 AM »

Stephen,
Nice hardware, but I continue to be impressed with the community spirit of the arduino (and will probably even start soldering again).  What I like is people like eric and many others that share their efforts, so it makes possible for the less involved (ie me) to grab libraries/code and get simple stuff going quickly without the baggage of a PC (win or linux).  I quite enjoy this different approach and it does make me giggle at what you can do with a small, cheap, restricted processor like the arduino.  The absence of learning curve is the big attraction for me.
Logged
Baz
Hero Member
*****
Offline Offline

Posts: 1386


« Reply #6 on: October 14, 2010, 12:26:28 PM »

Well done Eric

For any new users, note the nuelectronics sd card shield uses confusing terminology as what it advertises as 1wire connectors are actually the analogue pins and their 4 wire connector has 2 plain i/o pins.
The analogue pins can be used for 1-wire of course and in eric's software it refers to P4 (connector label on the nuelectronics board) which in a 'normal' arduino is both analogue 0 and digital pin 14.
I assume you could move the pin used to another i/o pin to free up all analogues for thermistors or does the 1-wire routine need the analogue levels to set thresholds rather than plain i/o?
BTW nuelectronics have the ethernet shield back in stock.
Logged
KLD
Hero Member
*****
Offline Offline

Posts: 1340


« Reply #7 on: October 14, 2010, 02:28:38 PM »

Stephen

Using an ARM based board is exactly what I'm doing now: the NSLU2. Works a treat, but wasn't easy to set up.
Eric's new toy fills the gap for say installers who need to leave a data logger at a customer site. After a few weeks, you just pop in, exchange the SD card, and analyse the data back at the office. It would have been ideal to have such a unit battery powered, but hey! 
My original question was about whether this would make a replacement for my slug, should that ever break down. The polish ARM9 board could almost be a drop-in replacement. I believe, Wookey works on similar hardware with the baloon board?

Klaus
Logged
ericw
Hero Member
*****
Offline Offline

Posts: 735


« Reply #8 on: October 14, 2010, 02:36:07 PM »

Baz,
The software defines the 1 wire pin as being digital and uses it in digital mode, so you could use any pin that can be defined as digital.

I just chose P4 /pin 14 as being convenient and brought out on a socket with gnd & +5v, it also means that you can conveniently plug the pullup resistor into its analog pin socket with its nearby  +5v.

Although it's entirely possible, why would you want to use thermistors as well, you might as well let Maxim do all the hard work in converting the temperature to something useful.
Logged
StBarnabas
Hero Member
*****
Offline Offline

Posts: 2111


St Barnabas Chapel (2009)


« Reply #9 on: October 14, 2010, 02:48:44 PM »

Eric

Where do you get the time? At this moment lying by my PC is an Arduino which has not even been plugged in yet. Great bit of work as usual. I will try to have a go within the next few weeks.

Sean
Logged


Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
Baz
Hero Member
*****
Offline Offline

Posts: 1386


« Reply #10 on: October 14, 2010, 05:27:25 PM »

You guys keep costing me money. 'nother order placed with nuelectronics and elsewhere for sd card.
I was wrong about the 4pin connector in my last post, it has 2 analogues on it but the normal Arduino headers still have 5 unused digital pins if wanted.
I was only thinking of analogues for other stuff like the pipe clip thermistors posted on another thread, or battery voltage etc, but will start off on P4 like you say it's convenient.

Logged
StBarnabas
Hero Member
*****
Offline Offline

Posts: 2111


St Barnabas Chapel (2009)


« Reply #11 on: October 14, 2010, 05:45:34 PM »

You guys keep costing me money. 'nother order placed with nuelectronics and elsewhere for sd card.
I was wrong about the 4pin connector in my last post, it has 2 analogues on it but the normal Arduino headers still have 5 unused digital pins if wanted.
I was only thinking of analogues for other stuff like the pipe clip thermistors posted on another thread, or battery voltage etc, but will start off on P4 like you say it's convenient.



Baz

you too! Eric is a bad influence! So far today I have purchased a batch of phone extension cables, a Nuelectronic SD card shield, a Neutronics relay and a few more humidity/temperature sensors and 10 DS18B20's from HongKong.


Have also got my Arduino Duemilanove working - just the flashing LED program so far. The Arduino code is very C like (though not quite Kernighan and Richie) so the learning curve should be easy.

Sean
Logged


Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
stephendv
Sr. Member
****
Offline Offline

Posts: 439



WWW
« Reply #12 on: October 14, 2010, 07:39:09 PM »

The seeeduinio stalker is also an interesting board for this type of thing: arduino + real time clock + sd card all on one board, no need for extra shields.
Available in UK here: http://www.airsensor.co.uk/shop.html?page=shop.product_details&flypage=flypage.tpl&product_id=1&category_id=3
and http://www.coolcomponents.co.uk/catalog/product_info.php?products_id=562

Logged

http://www.casanogaldelasbrujas.com
2.8kW PV, SMA Sunny Island 5048, 5 PzS 700 battery bank, stinky diesel.
KenB
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2691


Energy Self Enlightenment


WWW
« Reply #13 on: October 14, 2010, 08:58:38 PM »

Welcome aboard the good ship "Arduino" Gentlemen.

I should be on commission to NuElectronics at this rate ;-)

I found the learning curve to be nice and gentle, and with a bit of C under my belt I'm now programming PID control algorthms into 150MHz 32-bit DSPs.

BTW, I agree with Stephen that the Seeeduino Stalker is certainly an interesting and low cost board, and you can now buy a Mega from Hong Kong for under £24

http://cgi.ebay.co.uk/Arduino-Mega-ATMega1280-16AU-USB-Cable-ATMega-1280-/220614536612

However they have just released a new Mega IC with 256K of rom.

Meanwhile, the official Arduino folks are about to release a new Arduino with PoE and ethernet on board.

If it's of any use, you can take the NuElectronics SDcard shield and port the OpenLog firmware onto it. Just have to hardwire digital 5 to digital 10 and you have a datalogger that will record all serial input to file.



Ken
Logged
Kombi
Sr. Member
****
Offline Offline

Posts: 430


« Reply #14 on: October 14, 2010, 09:39:31 PM »

is it possible to post a "Complete numptys guide" to setting it up?
I'd go one step further: what about an off the shelf version for complete dummies (ie me!)??
Logged
Pages: [1] 2 3 4 5 6   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!