Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Arduino Ascom focuser Mark2


tekkydave

Recommended Posts

Would it be much extra work to include temperature monitoring? I know it's pretty straight forward, and cheap, to add a sensor to the arduino. I'm just not sure about the ASCOM driver side of things!

It ought to be fairly simple. I use 1-wire sensors for my weather station but I've never used them with Arduinos. I know Gina has so I'll have to look through some of her posts. From the Ascom side it will be simple to modify the Arduino sketch to add an extra interface command to read the temperature. The Ascom driver already has the correct methods built in as it is part of the focuser class already.

I'll look into it :grin:

  • Like 1
Link to comment
Share on other sites

Sounds good. Also, I knew nothing about arduino programming but was able to get a TEC cooler program up and running quite quickly, the arduino site is very helpful.

The common temp sensor is the DS18B20 and there's a good example on the arduino website:

http://playground.arduino.cc/Learning/OneWire

Also, the DHT22 is a good, cheap temperature and humidity sensor that works well with arduino. Though you might have to get the humidity outside of the focuser driver?

Link to comment
Share on other sites

Sounds good. Also, I knew nothing about arduino programming but was able to get a TEC cooler program up and running quite quickly, the arduino site is very helpful.

The common temp sensor is the DS18B20 and there's a good example on the arduino website:

http://playground.arduino.cc/Learning/OneWire

Also, the DHT22 is a good, cheap temperature and humidity sensor that works well with arduino. Though you might have to get the humidity outside of the focuser driver?

Just did a bit of research and there is a 1-wire arduino library ready to use. It doesn't need any extra electronics such as a 1-wire adapter or bridge chip which is usual in other applications. It works by so-called 'bit-banging' on an i/o port so will work for a limited number of sensors. As we only need one that's not an issue. In terms of humidity - is that something that would be useful for a focuser? If so I could look at the DHT22 as an alternative approach.

Link to comment
Share on other sites

I'm not sure how useful it would be for a focuser, but if you're going to have an arduino on the mount anyway, then it would be handy to have a humidity sensor on it to monitor viewing conditions.

Yet to test how effective automatic temp compensation is, but theory suggests that for my setup (C11/HyperStar), with its tight focus requirement, it's probably worth while. I also chose to use a sensor which reads humidity, so that I can keep an eye on how close I am to the dew point...

Good thread, everyone, and thanks, Dave, for inspiring me to build an auto focuser.

  • Like 1
Link to comment
Share on other sites

I just read the sensor directly, calculate the dew point, and report it on an LCD that I've attached; that will be located in my warn room.

I don't really want to connect an LCD to the focuser. The nano's serial connection is fully occupied by the Ascom driver so another program would not be able to access it without disconnecting the client program first then reconnecting again to use the focuser.

Link to comment
Share on other sites

Now you've inspired me Dave,(and done all the hard graft) :)  I'm going to have a stab at making a focuser for my Lunt LS60.

You appear to be using a 9v stepper motor but I can only find 5v and 12v on EBay.

Is this suitable ?

Dave

http://www.ebay.co.uk/itm/New-5V-Stepper-Motor-With-ULN2003-Board-5-Line-cable-for-Arduino-Raspberry-Pi-/131070819595?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item1e846dfd0b

Link to comment
Share on other sites

Now you've inspired me Dave,(and done all the hard graft) :)  I'm going to have a stab at making a focuser for my Lunt LS60.

You appear to be using a 9v stepper motor but I can only find 5v and 12v on EBay.

Is this suitable ?

Dave

http://www.ebay.co.uk/itm/New-5V-Stepper-Motor-With-ULN2003-Board-5-Line-cable-for-Arduino-Raspberry-Pi-/131070819595?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item1e846dfd0b

That board is the same one I used. It will work fine connected directly to the Arduino with no extra external power supply. The torque is not so high like that so adding adding an external supply on the pins marked 5-12V will give it a bit of a boost. I used 9V as it was convenient to use a PP3 battery in the focuser box.

Good luck with the build and feel free to fire any questions at me if you get stuck.

Link to comment
Share on other sites

I don't really want to connect an LCD to the focuser. The nano's serial connection is fully occupied by the Ascom driver so another program would not be able to access it without disconnecting the client program first then reconnecting again to use the focuser.

I2c bus - with a repeater from NXP ...

I'm also using i2c for a couple of temp sensors, to control a 40mm fan on the stepper heat sink - without cooling, it gets rather hot when position holding, but it's prone to jump if I de-energise the coils.

Link to comment
Share on other sites

That board is the same one I used. It will work fine connected directly to the Arduino with no extra external power supply. The torque is not so high like that so adding adding an external supply on the pins marked 5-12V will give it a bit of a boost. I used 9V as it was convenient to use a PP3 battery in the focuser box.

Good luck with the build and feel free to fire any questions at me if you get stuck.

Thanks Dave, will order bits.

By the way what is the programming language like ? haven't programmed since Delphi 2 and Win 98 and a bit of Access 2003

Dave

Edited by Davey-T
Link to comment
Share on other sites

Thanks Dave, will order bits.

By the way what is the programming language like ? haven't programmed since Delphi 2 and Win 98 and a bit of Access 2003

Dave

The Arduino is programmed in a simplified version of C/C++ which is easy to pick up. There is a java-based ide on the arduino web-site which lets you write the programs (called sketches) and upload them to the arduino. The Ascom driver is written in C# which is a bit more complex but has many elements in common with C and Java. To write these you will need the Visual Studio ide. There is a cut-down free version you can download.

If you are building my focuser and using the arduino sketch and driver on the sourceforge site you won't need to do any programming unless you want to modify the way it works.

Link to comment
Share on other sites

Thanks Dave,

Is it obvious what the lines in your prog' do or is it annotated, used to do endless annotating as my memory wasn't that good and it's a lot worse now :)

Dave

I think you will find them well annotated. I always do lots of comments. Programs are for people to read not computers :grin:

My memory is getting worse these days and it makes life easier if you need to go back to a program after a period of time.

The arduino sketch is written by me so I have had free-rein to structure and write it how I like. The ascom driver uses a template provided by ascom and has fixed methods and properties so cannot easily be customized. I have moved any custom code, wherever possible into a separate class called AAF2. This makes it easier to maintain and also simpler to re-implement if the ascom template is changed in the future.

Edited by tekkydave
Link to comment
Share on other sites

Regarding the temperature/humidity question - does anyone know of an ascom-based program that displays or uses humidity? I want to keep the focuser as a self-contained device with all communication via the ascom driver. If humidity is not useable by ascom I will restrict it to temperature only. I have some DS18B20s ics already from previous 1-wire projects so I can have a go with those.

Link to comment
Share on other sites

Regarding the temperature/humidity question - does anyone know of an ascom-based program that displays or uses humidity? I want to keep the focuser as a self-contained device with all communication via the ascom driver. If humidity is not useable by ascom I will restrict it to temperature only. I have some DS18B20s ics already from previous 1-wire projects so I can have a go with those.

I don't know about ascom-based programs but I used an Arduino Nano to control cooling for a cold finger cooled 1100D DSLR a while back with an LCD display running off digital I/O lines and using a DHT22 to read temperature and humidity near the image sensor to display dew point.  Cold finger temperature was read with a DS18B20.  The serial I/O was assigned to computer readout.

BTW - you can use 1-wire to control the stepper motor.  I am doing that for my multiple CCTV project for pan & tilt control though I haven't written the Arduino sketch that controls the whole system yet.  It's yet another project in progress :D

Edited by Gina
Link to comment
Share on other sites

I don't know about ascom-based programs but I used an Arduino Nano to control cooling for a cold finger cooled 1100D DSLR a while back with an LCD display running off digital I/O lines and using a DHT22 to read temperature and humidity near the image sensor to display dew point.  Cold finger temperature was read with a DS18B20.  The serial I/O was assigned to computer readout.

BTW - you can use 1-wire to control the stepper motor.  I am doing that for my multiple CCTV project for pan & tilt control though I haven't written the Arduino sketch that controls the whole system yet.  It's yet another project in progress :D

Thanks Gina, I am following your 1-wire CCTV project with interest. I already have the focuser working quite happily just using the nano and stepper driver. I want to 'K-I-S-S' and stick to the design I already have, just adding the temperature sensor. No extra hardware or software will be involved apart from the DS18B20 i.c. and a few simple mods to the sketch and driver code.

  • Like 2
Link to comment
Share on other sites

This may be a silly questions, but why does a change in temperature change the focus? I assume it's because it causes the OTA to contract and expand, if that's the case then would it be better to mount the temperature sensor somewhere on the OTA, or is air temperature sufficient? What do the professional do?

The reason I ask, it's a trivial task to mount a DS18B20 sensor anywhere you want. So let's get it in the best place.

  • Like 1
Link to comment
Share on other sites

Thanks Gina, I am following your 1-wire CCTV project with interest. I already have the focuser working quite happily just using the nano and stepper driver. I want to 'K-I-S-S' and stick to the design I already have, just adding the temperature sensor. No extra hardware or software will be involved apart from the DS18B20 i.c. and a few simple mods to the sketch and driver code.

Very sensible :)  I'm only using 1-wire stepper control to reduce and simplify the kit at each camera.  It's mainly the built-in ID code in the 1-wire devices that make the difference - I can stick them all on the same pair of wires.  No need for special selection circuitry :)

Link to comment
Share on other sites

This may be a silly questions, but why does a change in temperature change the focus? I assume it's because it causes the OTA to contract and expand, if that's the case then would it be better to mount the temperature sensor somewhere on the OTA, or is air temperature sufficient? What do the professional do?

The reason I ask, it's a trivial task to mount a DS18B20 sensor anywhere you want. So let's get it in the best place.

Maybe I've answered my own question, looks like these guys use a temperature probe that you attach to the telescope tube:

http://www.optecinc.com/astronomy/catalog/tcf/tcf-s.htm

And at $800 a piece, that's a professional piece of kit who's designer has probably done their homework. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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.