Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Arduino Focus control and Cloud sensor


ncjunk

Recommended Posts

Appologies for not answering, I am a bit busy right now but should have some spare time at the end of the month to do more.

I did another version removing the loops and cleaning it up a bit but its just sitting on my pc untested....<sigh>.

I'll dig out the stepper i am using...i am sure its in this thread somewhere.

I had no problems attaching mine using universal couplings to the focusing shaft/rod on the ed80 focuser but someone else had a duel speed focuser and the stepper couldn't drive one of the speeds so had to be attached to the other. (basically you will need to play about with the mechanics of how you are connecting the stepper to the focuser).

I recently had problems focusing, turns out the shaft had worked a bit loose. Its worth remembering to check the setup every now and again to make sure everythings still tight enough. The hot whether here recently must have caused it to loosen.

I have some work to finish over the next couple of weeks then aim to review my software and get a new version out with instructions...

Oh and for the Arduino i agree with yesyes, i have bought a couple of things from hong kong/china and if your not in a rush it can save a bit of money...remember to factor in any postage..

Saludos

Neil c

Link to comment
Share on other sites

  • Replies 490
  • Created
  • Last Reply

Wow this thread is just what I need.

I have been looking for a cheaper alternative to a Boltwood or aurora cloud sensor for ages & finally it looks like I've found one!

I'm not the best at electronics, but I usually manage with a little help, so I might be asking one or two questions as I get going, but the one thing I really am not good at is writing code... I don’t know why but it confuses the hell out of me!

For my build I would like to have the Melexis IR thermometer, & sensors for, Light level, Rain, & humidity. I would also like to incorporate a heater in to the head to prevent dew/frost collecting on the top and triggering the rain sensor, in order to prevent issues with this heater producing strange readings on the IR thermometer's ambient sensor I would probably incorporate an additional temperature sensor located at the bottom of the unit away from any heat source.

It would also be nice to have the option of wind speed & direction, as well as the option for adding multiple standalone rain sensors that can be placed at points around the perimeter of the site giving more accurate warnings of precipitation

I was thinking of using the SHT15 for humidity & ambient temperature, a 10k LDR for the light sensor, obviously the Melexis MLX90614 for sky temp. For the wind speed & direction I was thinking of using something like the sparkfun weather meter kit with anemometer, wind vane & moving bucket rain sensor.

But I don’t like the idea of using a moving bucket type rain sensor; I would prefer something electronic to help keep size down to a minimum, so I’m looking for suggestions for a rain sensor.

I'm also looking for suggestions for the heating element, I don't really know how to go about this, my two ideas so far are: use a TEC, resistors or nichrome wire, using a TEC seems expensive and inefficient, Nichrome wire seems a bit messy, so resistors seem like a pretty good option.

So that sums up what inputs I need, but I don’t know which arduino to go for, I don’t plan on using anything like an LCD shield or Ethernet shield, but I may need something to handle the extra current required by the heater & a couple relay outputs for observatory roof control. Would the arduino nano be sufficient for my requirements or will I need a bigger arduino with more input output pins or even the arduino mega with its larger EEPROM memory.

Finally it’s on to the software requirements; this hopefully shouldn't be too difficult as all I require is a single line txt file which should mimic the Boltwood system. I've attached a section of the Boltwood manual showing the protocol

YesYes, can Cacti be set to produce a single line text file for this purpose?

So first of all if any of you could offer me some advice on which hardware would be best I’ll get it on order.

Boltwood.txt

Link to comment
Share on other sites

  • 3 weeks later...

Ryan, I use a script in Homeseer to fake the Boltwood text file, as CCD Commander accepts it as a real weather sensor, here it is just in case it comes in handy, all I'm changing is the rain status, but once the Julian date updates are there it can be used to do anything on that line:

sub main()

Dim fso

Dim ts

Dim f1

Dim f2

Dim JulianDate

Dim JulianDateCalc

Dim JulianTime

Dim JulianTimeCalc

Const OpenFileForReading = 1

Const OpenFileForWriting = 2

Const OpenFileForAppending = 8

Const ForWriting = 2

Const RainSensor1 = 2

Const RainSensor2 = 2

Const RoofClose = 0

JulianDateCalc = DatePart("y",Now)

JulianDate = 40177 + JulianDateCalc

JulianTimeCalc = (Hour(Now)*3600) + (Minute(Now)*60) + Second(Now)

JulianTime = Fix((JulianTimeCalc / 86400) * 10000)

Path = "c:\ClarityII.txt"

Set fso = CreateObject("Scripting.FileSystemObject")

Set ts = fso.OpenTextFile(path, ForWriting, True)

ts.WriteLine(now() & ".13 F M -45.9 74.7 86.9 3.9 46 52.3 0 " & RainSensor1 & " 0 00004 0" & JulianDate & ".0" & JulianTime & " 1 1 " & RainSensor2 & " 1 " & RoofClose)

'038506.08847

ts.Close

end sub

Link to comment
Share on other sites

Thanks Euanin the last few weeks sinc my first post i've purchased an arduino, a BMP085 sensor, the MLX96014, a SHT15 & an LDR, after a bit of huting i found sample codes for each of the sensors and have managed to stitch them all together and have them sending data out in a format readable by the Open Observatory Control System software, which can in turn create a .txt file mimicking that of the boltwood sensor.

For a while i was having dificulties in combining the diffrent sections of code but after a chat with a member of my astrosoc who is a pretty good C++ programmer, i finally managed to get it all working.

the only issue i have is that negative values from the MLX96014 seem to be formatted incorrectly. so once i have figured that out i will almost be there.

i still need to work out some code to read a wind speed sensor, moisture sensor & control a heater to warm up the MLX96014 to prevent false readings due to moisture on the IR sensor.

I'm going to use the temperature sensor in the SHT15 to monitor the environment ambient temp and then use the ambient temp sensor in the MLX96014 to regulate the heater to keep the IR sensor body a few degrees above freezing/dew point, combined with an additional trigger from the moisture sensor that will kick the heater in to action if moisture is detected.

At this stage i am unsure about the specifics of the heater control and whether to heat the moisture sensor as well. I dont want to heat the moisture sensor so much that it evaporates all the moisture caused by dew, in turn causing the heater to shut down again, this could cause the heater to switch on and off repeatedly, however i don't want moisture from rain drops around too long that it causes the sensor to be detecting wet for a long time after it has stopped raining.

anyone got any ideas?

Link to comment
Share on other sites

  • 2 weeks later...

Hi All

Is there a plan/project/kit list for the focuser hardware at all?

I'm no electronics engineer but can solder reasonably well, so building something is not scary, but I wouldn't know where to start with a list of parts....

Cheers!

Link to comment
Share on other sites

What an amazing thread. I have the capabilities of making (not designing) something like this (with my son to program the Arduino) but my astronomy knowledge is rather limited, as is my equipment. I more take the system outside during the day and set it up, then pray it doesn't rain or become overcast.

On a side note, the Arduino is such an amazing little piece of kit for an amazingly low price.

I have a rock hanging from a tree on a piece of string and it works fine as a sensor.

If the rock is wet, it's raining, if the rock is hot and dry, it's sunny, if the rock is dull, it's cloudy, if the rock is white, it's snowing and if it's swinging, it's windy.

Not as elaborate as your system, but I highly doubt I'm near as knowledgeable as you.

Link to comment
Share on other sites

Hi All

Is there a plan/project/kit list for the focuser hardware at all?

I'm no electronics engineer but can solder reasonably well, so building something is not scary, but I wouldn't know where to start with a list of parts....

Cheers!

Daz if you go to the yahoo group there's a parts list and Ive put up a build pictorial, think you have to join the group to see these tho.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

On the subject of rain sensors Ive found an alternative to the Brocott

These are half the price and look identical :)

Also for people using the Arduino and are finding plugging in pins and wires a problem I'm using a screw shield which still gives you the female sockets plus additional screw blocks which are much easier to secure cables too.

Link to comment
Share on other sites

Re-built my cloud detector today, had to start from scratch including getting a new MLX96014 as the old one had corroded badly after the project box had filled with water :( Also fitted a LDR in anticipation of Neil adding the code for this at some future point, everything was coated in hotmelt glue this time in case the new case develops a leak. Also Ive mounted it this time on the side of the observatory rather on a stick stuck in the lawn, eventually I'll be putting it on the weather station mast when everything is finalised. Pictures to follow tomorrow.

Here's some output from Neil's latest beta software which now has graphing capabilities :)

post-13224-133877654909_thumb.jpg

As you can see its been clear here with just a touch of high thin cloud which shows on the graph.

Link to comment
Share on other sites

Cor a graph!

I feel your pain George! I suspect i may be close to breaking one of my legs as it is bent but i've decided not to bother straightening it...better save than sorry!

I'll add in the ldr code some time...i might chuck it all in a box tonight.

What resistance ldr do you have and how are you planning to connect it?

Fixed resistor below, ldr above, 5v source and taking a wire from between the two to an analogue per chance??

Link to comment
Share on other sites

Cor a graph!

I feel your pain George! I suspect i may be close to breaking one of my legs as it is bent but i've decided not to bother straightening it...better save than sorry!

I'll add in the ldr code some time...i might chuck it all in a box tonight.

What resistance ldr do you have and how are you planning to connect it?

Fixed resistor below, ldr above, 5v source and taking a wire from between the two to an analogue per chance??

There's a interesting LDR thread here so Im guessing this is a good place to start with regards wiring and testing the code that was posted to get some output :) also I think YesYes may have the LDR working, I'll check this thread and see if I can find it :(

I rebuilt the cloud sensor AGAIN last night after the failed lemon I got from RS packed in. I have 12 hours of data now :D been interesting watching the values change as this active low races overhead bringing clear, cloudy weather in the space of minutes.

Can you explain again what changing setpoint 1 & 2 should do? and do you need to close the program down between changing settings?

Anyway another data screenshot :

post-13224-133877656571_thumb.jpg

Thanks for all your hard work on the coding Neil its much appreciated :)

Found a nice link for LDR's http://www.ladyada.net/learn/sensors/cds.html

Link to comment
Share on other sites

Setpoint 1 and 2 just change the traffic light colours and you can change them on the fly.

The text to the left says what they do.

If the temperature difference is higher than both setpoints we have clear sky.

If it is higher than one setpoint but lower than the other we have some cloud.

And lower than both i.e sky temp is close to Ambient then we have cloud.

The values for these depend on the night.

Link to comment
Share on other sites

Thats a great graph George! Did you get to compare visually with the reading?

Thanks for the LDR thread, i know how that all works anyway but the thread will save valuable brain cells from overloading.

At night time (which is what we are really interested in) what I'm seeing outside is pretty much corresponding with what's being shown on the graph......pretty accurate, daytime its bouncing all over the place because the ambient is changing rapidly due to solar exposure :( traffic lights end up like being in a disco :)

I know last winter when we had those extremely cold ambients even when it was cloudy it was reporting clear dont know what can be done about that altho I remember yesyes saying someone had a lookup table which was used when ambients and sky were close on temps when clear

Ambient temperatures are very accurate when there compared to my weather station to within 0.5C.

I'd like to be able to play with the graph output and maybe upload in realtime to my weathersite, had a play with excel and you get some nice visual graphs.

Link to comment
Share on other sites

I think you can create a correction table based on ambient temp and time of year?

We will have to have a think as i have seen something on this.

At the moment its a case manually set the setpoints at the start of the night or watch the temps. The ambient temp also rises as cloud cover rolls in during the winter.

If i am lucky and my son has a siesta i will add tge ldr code in and put it on the graph with a button to show and hide it.

Link to comment
Share on other sites

I think you can create a correction table based on ambient temp and time of year?

We will have to have a think as i have seen something on this.

At the moment its a case manually set the setpoints at the start of the night or watch the temps. The ambient temp also rises as cloud cover rolls in during the winter.

If i am lucky and my son has a siesta i will add tge ldr code in and put it on the graph with a button to show and hide it.

That would be cool, just had a thought perhaps the LDR could be used to switch on and off the graphing and logging, after all we are interested in what happens when its dark.

Oh and here's a link to that correction algorithm http://www.aagware.eu/aag/cloudwatcherNetwork/TechInfo/SkyTemperatureModel.pdf

Link to comment
Share on other sites

also I think YesYes may have the LDR working, I'll check this thread and see if I can find it :)

yesyes, I have. ;-)

It's the simplest part of the whole weather station...

It's a 10k LDR connected exactly as Neil described a few posts up...

The LDR "code" is a single line:

value = analogRead(LDR_pin_number);

This gives a value between 0 (darkest) and 1023 (brightest).

post-14790-133877656634_thumb.png

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.