Does anyone know how I can cheaply rig up the following :-
2 x Temperature Sensors to be interfaced to a PC to enable monitoring and monitoring of temperatures from the two sensors? I am looking at a solution for less than £100 (and preferably around £50) if possible. The two sensors would not need to be particularly accurate but should both read the same temperature in the same location (+/- 0.1°)
not too sure if you will find that accuracy in the price range,
Do you need real time constant monitoring or just data logging?
these might help
http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=5363283 (http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=5363283)
http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=4901064 (http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=4901064)
this ones a bit expensive, but its 0.1C
http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=2890473 (http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=2890473)
mac.
Just found this one as well,
http://www.rapidonline.com/Tools-Fasteners-Production-Equipment/Test-Equipment/Data-Logging/USB-Real-time-data-logger-temperature-humidity-and-dew-point/82317/kw/ (http://www.rapidonline.com/Tools-Fasteners-Production-Equipment/Test-Equipment/Data-Logging/USB-Real-time-data-logger-temperature-humidity-and-dew-point/82317/kw/)
you can't post questions like that and not say what it's for. It's forum posting rule number 27a subsection 2 clause 4...
Mike, have a look at http://www.active-robots.com/products/phidgets/sensors-phidgets.shtml (http://www.active-robots.com/products/phidgets/sensors-phidgets.shtml) for diy, not sure what the resolution is though.
Mac it has to have real time monitoring (well as long as I can have updates from it every minute) and Ian it is for an idea I have for a cloud sensor. No idea ifd it would work, it would just be an experiment.
Robert thanks for that link. That appears to be the cheapest I have seen so far. They have lots of other nice stuff on that website too.
Mike... I realise that this is no use to you for your query, but did you get the e-mail I sent you about the cloud meter on the Fitzroy Barometer?? Check the link..if it worked.. about the barometer and you will see what I meant. Hope you manage to construct the gizmo.
Thanks for the info. guys.
I have found an even cheaper option - http://www.arduino.cc/
- About £25 attached to two of something like this - http://www.national.com/mpf/LM/LM35.html - about £5 each.
Doug - Yes I did thanks. Very interesting.
Sounds like a really good idea Mike. I take it you're measuring the difference in radiant heat energy (temperature) between sky and ground ? I expect you could use a peltier but I would imagine the generated current would be impossibly small to measure !
Had a hunt and thought this might help, it uses the National Semiconductors LM75 ... http://www.raphnet.net/electronique/usbtenki/index_en.php (http://www.raphnet.net/electronique/usbtenki/index_en.php)
Thanks for that Robert. The sensor is based on two thermometers, once measuring ambient and another doing the same, but placed inside a blacked out object (e.g. jar or tin painted black) to act as a 'black body' (i.e. one that would get colder at night due to radiation into space).
So, in theory, you can measure the difference between the two and if ambient and black body are approx. the same temp then it is cloudy. If the black body reading is colder by about a degree then it should be a clear night and anything in between partly cloudy.
It's all based on this thread I came across on Weather Watch... http://www.weather-watch.com/smf/index.php/topic,34244.0.html
Great idea! I reckon they should both be in jam jars but one black and the other white.
It reminds of a conversation I once had with a friend:
Me: In theory, central heating radiators should all be painted black, not white, because it makes them more efficient.
Friend: Really? How does the radiator know it has been painted black?
Me: [Too stunned to reply]
Makes a lot of sense but if you put your sensors in jam jars then they will have a relatively high thermal mass. It really depends on how responsive you want it to be to changes in cloud cover or not as the case may be.
On that forum there seemed to be two successful devices, one was a very small baby food jar so that a) there is no air flow over the sensor and b) there is a small amount of air inside the jar to heat up or cool down. The jar would need to be hermetically sealed. Another device was simply a piece of polystyrene with a hole cut in it to haf the depth of the block, the inside of the hole painted black and the sensor put inside, with a piece of clingfilm wrapped around it all to make it waterproof.
I like the sound of the second device personally. I am thinking maybe two pieces of PVC pipe, both with a polystyrene plug in the bottom and a piece of glass/perspex at the top. Sealed at either end. Sensors inside both but with one painted black inside the tube and both pointing at the sky.
Just found this, £99.
http://www.picotech.com/thermistor.html (http://www.picotech.com/thermistor.html)
resolution 0.003C
readout every second.
Interesting reading about the theory.
Yeah but that's £135.00 compared to about £30 for the Arduino plus bits !!
Plus with the Arduino and the Phidget you get full access to the raw data so can write your own programs to read data and do other stuff. I like the fact there are multiple digital/analog inputs so I could also couple it up with a light meter and maybe a wind speed indicator or something like that, to establish ideal observing/imaging conditions and then set off some kind of alarm.
Plus, the Arduino is dead cheap and also has a little CPU on board meaning you can upload programs to it and make it do things independant of the PC. There is even a bluetooth and radio version so you could make a completely wireless device if you wanted to.
I need to have a bit of a read, but you could make a thermocouple from some lengths of constantan and copper wire. A difference in temperature between them can be measured directly as a voltage, regardless of the absolute temperature. A microcontroller with an analogue input should be able to sense that voltage (particularly if it has a high input impedance). Don't forget if you're reading small signals, Op amps can be used as an amplifier quite easily.
Sounds like ahrd work Ian!
OK I have ordered :-
1 x Arduino Diecimila - http://www.arduino.cc/en/Main/ArduinoBoardDiecimila
3 x DS18B20 - http://www.maxim-ic.com/quick_view2.cfm?qv_pk=2812
I'll let you know how I get on.
Good luck, especially with the API programming !
I'm planning on extracting the data from it using Python and then getting the PC to set off alarms depending on set criteria. It will also log the data so I can create pretty graphs and keep a nice history of clear/cloudy skies.
A later project will be to post that information to a data stream on my website (probably using JSON) to allow other people in the Orpington Area to also run the program to set off alarms on their own PC's.
You should be ok doing it in Python. I want to learn that too one day but we don't use it much where I am at the moment - it's mainly perl.
I've been using Python for a while now and love it. Very easy and yet very powerful language. Recently learning Objective-C for OSX which is fun.... NOT!!
Scripting languages can be a headache. I've had to deal with stuff in JavaScript, PHP, Perl, Ruby, Python, sundry unix-ish shell-scripts, and then some... Never found one I really liked. It'd be nice to throw most of them away. :lipsrsealed:
Next step up (down? sideways?) is probably something like Java.
C#, C++, Objective C, and the rest are mainly for the rabidly insane*1, to be used only when nothing else will work. :twisted:
*1 Any inferrence drawn from this statement is entirely the product of a derranged immagination.
If you want to have a go in visual basic.
I can lend you visual studio.
Should be easy to get to grips with, and you can design some nice interfaces.
And if you are feeling insane, you can do it in visual c#
Mac.
I've got VS thanks. I was considering doing it in C# but Python would be easier. I am wondering if a web based app rather than one you install might be a better option. If so i'd use Python or Java.
Well the temperature sensors arrived last week and the Arduino board arrived today. Surprised how small it is.
So, will be tinkering around over the next few days to try and get a cloud sensor up and running. i will let you know how it goes.
I have been reading up on these Arduino boards and you can do an amazing amount of things with them. There are hundreds of websites with home built projects for all kinds of cool stuff using them. I will have to have a think about what kind of astronomical gadget I could make using one as well as the cloud sensor. Such as this device - http://www.cibomahto.com/?p=249 - for controlling the Nikon D70 via IR to give more than 30 seconds exposures.
There is a wireless board available for it so the Cloud Sensor could be installed anywhere and transmit it's data back to the PC via a wireless link (later project maybe).
If this cloud sensor is successful I will be happy to build one for anyone that wants one. I am guessing cost of the entire thing will be around £50 assembled.
I spent a few hours last night tinkering around with the Arduino and uploading some code to it. I started with the old electronic version of the "Hello World" program by getting it to flash an LED at different rates.
Then moved on to connecting up one of the DS18B20 temperature sensors and after about an hour of frustration ended up with getting a reading of 26 degrees C which went up if I put my finger on the sensor (I had failed to connected a pull-up resistor between the data line and the +5v). This was definately higher than the temp in the room but I was using code I found on the net for a DS18S20 sensor just to try out the sensor so I presume the values are slightly different. I will need to read the datasheet for the DS18B20 to be able to work out the hex values it gives off so I can modify the code to give accurate values.
Once that is successful I can connect up the other 2 sensors (I want 2 for the cloud sensor and one to give an internal temperature) and get readings from them. Then I need to write code to work out if it is cloudy/partly cloudy/clear and experiment with the settings.
QuoteIf this cloud sensor is successful I will be happy to build one for anyone that wants one. I am guessing cost of the entire thing will be around £50 assembled.
Might possibly take you up on that. Could form an excellent base for an observatory control system and could remotely power up the PSU I built since it has that capability.
Yea it would be easy to control any kind of electronic or electrical device from the Arduino, such as open/close a roof, power down kit, send signals to a PC, etc.
Might be an excuse to learn some Python, what's the API like to program with ?
I've yet to do any program on the PC to interface with the Arduino. So far I have just coded the Arduino microprocessor itself which you do using a C++ like language (though much simpler) on the Arduino IDE. The IDE has a Serial Monitor to allow you to read the serial data output from the device directly.
There are various libraries for most of the popular languages to allow you to interface with the device via serial - http://www.arduino.cc/playground/Main/InterfacingWithSoftware
I have also obtained some phototransistors as it would be nice to have graphs of daylight readings overlaid on the temperature graphs. Would be able to keep histories of cloudy/clear-ness along with light levels, i.e. moonlight, etc.
Also, speaking to Mike Rosseel from www.cloudwatch.net the outputs from the Boltwood Cloud Sensor are used with various kinds of observatory control software so if I make my sensor output the same format it will be compatible with that software also. Mike has a data book with the ASCII codes for teh Boltwood and is emailing it over to me.
Sounds like you've made a good start and a bit of good luck with contacts will help a lot.
Sounds a pretty interesting project, will you give us a sneak preview at the next imaging session?
Quote from: Whitters on Oct 14, 2008, 22:12:30
Sounds a pretty interesting project, will you give us a sneak preview at the next imaging session?
Sure!! :)
I have rigged up 3 x sensors now and have code to read data off each one. I am surprised how well close the readings are from 3 different sensors. Here is a data run with readings taken every 5 seconds. As you can see, each sensor is only a fw hundreds of a degree out from the others.
23.75 23.93 23.75
23.75 23.87 23.75
23.75 23.93 23.75
23.81 23.93 23.75
23.81 24.00 23.81
23.75 24.00 23.75
23.75 24.00 23.75
23.75 24.00 23.81
23.81 24.06 23.81
23.81 24.00 23.81
23.81 24.00 23.81
So my hardware is working correctly, the Arduino code is correctly reading sensor data and reporting it. So next is :-
a) Fit the sensors into the respective weatherproof crucibles to be fitted externally.
b) Write the code to read the serial data from the Arduino to the PC and run it through an algorithm to determine if it is clear or cloudy.
cheeky edit there Mike. So what was wrong with your code then? ;)
Fascinating project Mike. I'm looking forward to seeing the results.
Mark
Quote from: Ian on Oct 14, 2008, 23:59:17
cheeky edit there Mike. So what was wrong with your code then? ;)
Nothing, I did something stupid on the breadboard that's all. Works fine now. :oops:
I have bought some Osram SFH-3310 Phototransistors today so i can add measurements of ambient light into the mix.
Last night I only had about an hour free to do anything. I conencted the light sensor up to the Arduino and after much messing around finally managed to get a sensible reading from the device. It was only after putting a hefty amount of resistance (via two resistors in series) that the device started to give sensible readings. The Arduino analog input reads 0 - 5.5V dc as 0 - 1024 values. So that part is now working correctly.
Next I am going to write the PC code to take the serial output from the Arduino for the 4 sensors and to start with, simply log the data. Once that is working I can then mount the sensors inside their relevant containers and start comparing the data to actual sky conditions to work out how the algorithm will work.
I'll get some pictures of the gizsmo so far uploaded tonight.
I have decided to do the coding using Processing (www.processing.org) which is a Java based language as:-
a) it has some nice libraries for serial communication with the Arduino
b) it has some nice libraries for graphics, including 3d graphics to make it easy to produce pretty graphs, etc.
c) it can output source code in Java meaning a browser enabled interface would be easy.
d) it can also output in executable formats for Windows, OSX and Linux meaning a native cross-platform application will be easy to make. (A native app. would enable me to output the ASCII codes in the Boltwood Cloud Sensor format meaning it could 'talk' to Boltwood compatible applications.)
e) the IDE for the Arduino is Processing based and the Arduino language is Wiring which is an extension of Processing.
Ooohh apparently this is getting quite technical. :-?
Here is a picture of the test bed so far :-
(http://www.amateur-astronomy.org/Filez/CloudSensor1.jpg)
I have now written some code on the PC to read the temperature data over the USB port so I am now working out how to graph that data to the screen.
OK I have now made a prototype cloud sensor which is outside in the garden screwed to a post at the moment. This is what it looks like :-
(http://www.amateur-astronomy.org/Filez/CloudSensorPrototype.jpg)
It is current reading 12.31 Degrees C on both sensors for a 100% overcast sky. That is correct according to the theory. I now just need a clear sky to take the readings and ensure the theory works then too.
Still working on the software. This is a screenshot of what I have done so far. It is simply taking the sensor readings and plotting them on a graph over a 3 hour period so I can test out the theory.
(http://www.amateur-astronomy.org/Filez/CSScreen.JPG)
OK the sensor has been running for a few days now and I have not been getting the results I wanted. I have now found out why. Last night I scratched off the black paint at onyl the top part of the black bulb so there was a 'window' to teh sky and I managed to get a greater temperature difference.
However, talking to the weather guys the bottom sensor needs to be open to normal airflow. The weather guys use a 'Stevenson Screen' but for my purposes some kind of ventilated container would do.
I will come up with Mark II of the design over the next few days and let you know how it goes.
Mark II of the prototype is now up and running and under a clear sky it is measuring a temperature difference of anywhere between 0.5 and 0.75 degrees, which is good. Will keep it logging overnight to see what happens once the sun comes up and/or it clouds over.
After some minor modifications I am now getting a temperature difference of around 1 degree between cloudy and clear skies. I noticed over the weekend the difference went the other way during daylight so maybe it will be able to determine clear or cloudy during the daytime too. I must experiment further.
Worked out yesterday how to get the outputs from the sensors uploaded to the internet and I was also working on an applet that will run from my website to take that data and graph it. I will post it up over the next few days to my website and let you know the link so you can also view the output from the device.
I have sidelined this project for a little while as I have been working on another one. I am sick of foxes ripping up the bin bags in the garden. I don't want a wheelie bin as there is no way of getting it from the front of the house to the rear without it being wheeled through the house first, plus it will onyl get nicked if left out the front of hosue anyway.
So, I have made an anti-fox device. This is an infra-red beam (5m range) that is set just in front of where the rubbish bags are kept. When it detects the beam is broken two little flags drop down and wave vigorously scaring off the fox. That way it is silent and won't annoy the neighbours.
I will post up the Cloud Sensor website by end of the week.
This may give some ideas , do a google for 'AAG CloudWatcher cloud detector '. I particularly like the mounting hardware kit... ;)
Mike, how close did you get to the finished article ?
Nowhere. The book came along. I am working on the final chapter so will be finished in about a weeks time.
During the last 6 months though I have been thinking of a new version and will be using a different method for the next version which will be wireless. I will be using the same sensors they use in the long range contact less temperature measurement devices. I am pretty confident I can get the actual sensor down to a cigarette packet size.
Thanks for the update Mike, I'll be looking at some observatory automation next year and that's on my list. Let me know how you get on.
Cheers