Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

Arduino Focus control and Cloud sensor


ncjunk

Recommended Posts

How are you mounting the temperature sensor?

I fancy putting it outside the obs so I can monitor the sky while the roof is closed, but does it still work ok when inside / behind glass or plastic

Link to comment
Share on other sites

  • Replies 490
  • Created
  • Last Reply

I've got the sensor here but the Arduino hasn't arrived yet.

This particular sensor is IR based, so I would imagine that you can't put it behind something like glass or plastic. It would then probably measure the temperature of the glass/plastic, not the sky.

I was thinking of drilling a hole into acrylic just big enough to fit the sensor in and then glue in the sensor to seal it. I'd have to check though how long the wire can be for the I2C bus. The Arduino would have to be inside and the sensor outside. I need the Arduino inside because I plan on using it with an LCD shield that will also show the current temperature and other data from whatever sensors will be supported in future.

Link to comment
Share on other sites

Its this one:-

http://www.sparkfun.com/datasheets/Robotics/SM-42BYG011-25.pdf

533fe08f-7729-aa30.jpg

Make sure it is at most 1.8 degrees per step...less if possible but that is the most common.

You can get them off old printers and as long as you have a stepper driver like the easy driver you can alter the supplied current to suit.

Mine has been working for a couple of months and i love it...so much easier letting focus max do everything.

Link to comment
Share on other sites

Thanks Neil, I managed to get one from a local supplier

How are you coupling it with your focuser? I have a Moonlite and will have to connect it to the shaft somehow

The bracket to hold it won't be too bad I can just make something up

I got the temperature sensor as well, just waiting on the Arduino coming from China which might take a few weeks.

I was thinking about mounting it alongside my rain sensor inside a waterproof box with some kind of removable lid, so it can just be lifted or slid off to use

Link to comment
Share on other sites

Euan,

You can get a universal coupling with different size inserts which will attach to the focus shaft and the stepper shaft. The universal coupling will be able to cope with any inacuracies in alignment of the shafts.

I bought another shaft for the focuser and have stuck the original in a draw. I think they are 4 or 5 mm in diameter...possibly the stepper was 1mm bigger.

Heres a pic of the coupling..501b6526-6d5c-8147.jpg

Link to comment
Share on other sites

Great stuff, I managed to get that exact one on eBay

Is it possible to use 2 x Arduino's? I'm building a weather station some distance from the obs with the temperature sensor, then want to stick the focus control Arduino to the side of one of the scopes

Link to comment
Share on other sites

You could make both Arduinos talk to each other via I2C or serial. I believe serial (RS232) allows longer cable length...

My Arduino has arrived but I have the in-laws over for a week and a half, so didn't have time to switch it on even... :-/

Euan, you're also building a weather station? Shall we combine efforts instead of inventing the wheel twice or more? :)

Link to comment
Share on other sites

You could make both Arduinos talk to each other via I2C or serial. I believe serial (RS232) allows longer cable length...

Serial would be nice as I'm looking at using a Cat5e extender which would mean the Arduino would have to be USB 1.1 or I'm goosed. Does this need an additional board or do they support it straight off? I'm using this one:

Arduino Duemilanove 2009 AVR ATmega328 p-20PU+USB Cable on eBay (end time 25-Oct-10 15:37:04 BST)

Euan, you're also building a weather station? Shall we combine efforts instead of inventing the wheel twice or more? :)

Bad choice of words, "Weather Station" is actually a bit too grand a statement. I already have a rain sensor hooked up via a K8055 then into Homeseer, I just want to bundle it together with the sky temperature sensor in a nice box outside the obs

It's going to be closed when not is use, so not quite the full range of bits you are looking at. I'm might change my mind one day though :(

Link to comment
Share on other sites

The 2009 has 3 serial ports on-board as far as I remember (one of which is routed to the USB port). You could use one serial on each to connect them together but you'd need to program it accordingly (which you probably know.. ;-) )

OK, so I'm going ahead with my weather station project as soon as the in-laws have left. The plan was to support that sky and ambient temperature sensor and a rain sensor to start with. Maybe adding a humidity, air pressure and wind speed/direction sensor later. And this will all be readable via SNMP and therefore graphable (is that a word?) via Cacti. I'm probably repeating myself though... ;-))

Link to comment
Share on other sites

You couldnt describe SNMP in 3 lines or less using single sylible words could you? I got bored after 2 secs of reading about it....i will try again honest!

This week i hope to get the next version of the cloud sensor done if life doesn't interfere too much.

Link to comment
Share on other sites

Hmmm, let me try. SNMP stands for Simple Network Management Protocol. There's 2 modes.

1) You can read and write pre-defined values from and to SNMP enabled devices. More common is only reading (GET command) from a device. For example you could read the current amount of traffic from your internet router. If you do that, say, every second, you can generate a nice traffic graph showing you your internet traffic over time, say, a day or a week.

If a device supports writing (SET command), you can use SNMP to configure that device. For example you could enable or disable the Wireless networking part of your router.

These communications are always initiated remotely. So an external source sends a command (GET or SET) to the SNMP device and the device responds.

2) An SNMP device can generate so-called Traps. These are triggered by the device, usually when a certain condition occurs. For example if your internet connection on your router goes down, the router could send a Trap to your main computer to inform you of that event.

So these are like alarms.

There are a lot of programs that do different things with SNMP. They could be the "control centre" of network administrators. Or graphing tools like Cacti. Cacti would read certain values every 5 minutes and stores them in a database. Via a web page you can then view this data in graph form.

For a start I was planning to implement only GET to get the values from the different sensors. But SET could also be implemented to configure certain things in the Arduino program (sketch?), for example set the time and date, set the IP address and so on.

The Arduino SNMP library does not seem to support Traps yet but when it does, it would even be possible to send traps when it rains or when there's clouds and so on.

Link to comment
Share on other sites

Sounds interesting,

At the moment the focus software is using 3 letters for the commands and then a number for steps..a similar but more basic method. The three letters then trigger the relevent function in the Arduino.

I like it because as long as you know the make up of the commands you can write any old software to interface on the serial line or manually send the commands...done that before.

Link to comment
Share on other sites

Yeah, apart from the traps SNMP works in a similar way as I2C. Only that the values have a much longer ID, called OID, which is arranged in a hirarchical order. So, to use the same example (internet router), the router could be OID 1.2.3.4.5.6, the internet traffic "sensor" would be for example 1.2.3.4.5.6.1. This could then be split into inbound traffic 1.2.3.4.5.6.1.1 and outbound traffic 1.2.3.4.5.6.1.2.

On the Arduino I would receive a GET for, say 1.2.3.4.5.6.3.5. The Arduino software would know that this is the sky temperature sensor OID, read the sensor value, convert to degrees celsius and then reply to the SNMP GET request.

Then the remote SNMP software would request the value of the next sensor and so on.

Link to comment
Share on other sites

How are you mounting the temperature sensor?

I fancy putting it outside the obs so I can monitor the sky while the roof is closed, but does it still work ok when inside / behind glass or plastic

The MXL90614 is weatherproof, I plan to drill a hole just big enough for the MXL90614 to fit thru and secure with some silicon sealant.

BTW Neil what is the purpose of the capacitor & resistor in the schematic you posted?

Ive also sent you some links of interest via email :)

Link to comment
Share on other sites

George,

Thanks for the links i found that cloud detector after i found the mx so it confirmed i was using a correct ir sensor.

Spent the last couple of days fault finding errors in the stepper code, it hopefully now registers correctly with Ascom.

Oopps late for work...

Link to comment
Share on other sites

Pin out is attached, I used word so there are no little dots signifying that there is an electrical connection between the wires but I think it is still obvious...hopefully!

If you need the code I can send you that as well...I have added it to the Arduino focus control driver.

Did you, by any chance, confuse pins 3 and 4 on the sensor in that schematic? I'm building this circuit now and it looks like pin 4 should be ground and pin 3 is Vdd.

Which version of the sensor did you use? I just noticed that I got the BAA version, which requires 3V Vdd, not 5V. Do you just wire it to the 3V supply from the Arduino? I couldn't find whether the I2C bus on the Arduino uses 5V or 3V...

Link to comment
Share on other sites

Bollards! I happen to agree with you it looks like I got them confused...and its an MLX90614 not an MXL90614 <hangs head in shame>.....I didn´t get much of that around the right way.

I would wire it to the 3v line and connect up the comms and see if it works. From the data sheet its 2.6 to 3.6 operating voltage on the supply.

The inputs appear to only have a min V stated for a high input signal I can´t see anything that suggests 5v on the signal line may break it.

Definately try with the 3v on the power supply.

Link to comment
Share on other sites

Looking at that last thread it looks like you would need to disable the internal pull up resisters that are enabled by default in the Arduino Wire Library and then use the pull up resisters in the circuit.

Sorry but I am still away from home so don´t have any software to check it. (and the IC2 library we are using).

Link to comment
Share on other sites

Thats the description I would have written if I had been more eloquent in my elucidation! (just trying to be a smart **** now...it is late and I will go and annoy someone else now!)

I will upload my software tomorrow night that is recording the temperature data along with some other information that I have.

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.