Jump to content

Stargazers Lounge Uses Cookies

Like most websites, SGL uses cookies in order to deliver a secure, personalised service, to provide social media functions and to analyse our traffic. Continued use of SGL indicates your acceptance of our cookie policy.

sgl_imaging_challenge_banner_android_vs_ios_winners.thumb.jpg.803608cf7eedd5cfb31eedc3e3f357e9.jpg

tekkydave

Arduino Ascom focuser Mark2

Recommended Posts

Well I ordered the parts and started on this quite awhile ago.  Finally got around to finishing it. I went with the 12V 4-phase 5-wire Stepper Motor Gear Motor 28BYJ-48-12V  and ULN2003 ULN2003AN Stepper Motor Driver Board.

I added a 16x2 LCD I2C display and an IR Remote. So I can run it without the computer and without touching it. I made it so the +/- are one step, the fast forward fast back buttons increment/decrement by 50, the power button halts and you can key in a 4 digit position value and press button that I made the enter. Also made a clear button.  The change direction/loop button toggles the display of the temperature between Celsius and Fahrenheit.

I was thinking about adding sensors and a flag for the home position and the fully extended positions. This way you would never try and drive past the focuser limits.

 

FocuserSmall.jpg

  • Like 2

Share this post


Link to post
Share on other sites

Hi Paul can you give us details on your build...code etc.Thanks.Very nice by the way.

 

Share this post


Link to post
Share on other sites

Oh, whoops, wrong thread.  Too many tabs open!!

Edited by SteveBz
Wrong thread.

Share this post


Link to post
Share on other sites
On 12/17/2016 at 08:30, redtail said:

Hi Paul can you give us details on your build...code etc.Thanks.Very nice by the way.

 

I added a RED 16x2 LCD display, to which I added the I2C interface board. This changes the LCD display from a whole bunch of wires, down to just 4.

RX Data (SCL) - Analogue pin 5

TX Data (SDA) - Analogue pin 4

VCC +5V

Ground

 

IR sensor and remote, the sensor uses 3 wires: (The Uno 3 has a header with these 3 pins right in the middle of the board.)

Data (MOSI) - Digital pin 11

VCC +5V

Ground

Remote.jpg

 

I am using a Arduino Uno 3 clone.  Since I am using a 12V stepper motor and driver board, it needs to be powered off of the 12V connector on the Arduino. I have a Arduino Nano too, but that would require extra work to get the 12V to the motor driver. So that is a future change. Most of the parts where purchased off of ebay from China or Hong Kong, so cost was very minimal. I have a couple of dove tail clamps and I bought some aluminum bar stock to make a mounting bracket.

 

Attached is the modified 2.3.0 sketch. When I get some time I will integrate my changes into the latest 2.5 sketch.

AAF2_20161213.zip

Edited by Pauls72
  • Like 3

Share this post


Link to post
Share on other sites

@tekkydave - I need to modify the AAF2 ASCOM driver to poll for position - ie: send the P# command every 10s or similar - rather than just assuming the focuser has done as it’s told and that it’s ONLY being controlled via ASCOM (it isn’t - it can also be controlled by a local web interface)... any pointers?

Share this post


Link to post
Share on other sites

Yes - you don't need to modify the driver, you need to change your client. You don't mention what web technology you use but it needs to do the polling. The driver is just there to hide the complexity of the hardware from Ascom.

Share this post


Link to post
Share on other sites

Yup - figured that one out in the wee hours... was testing with POTH at the time. Ta!

Explanation: Have implemented the AAF2 drivers serial protocol in a node-red sketch to drive 28BYJ on UL2003 connected to RaspPi GPIO... no arduino. Currently takes commands via ASCOM (VCP to TCP), MQTT, OSC, websockets, http & HomeKit/Siri (although I had to convince Siri the focuser is a set of window blinds) & USB-HID. It's own 'native' interface is via node-red-dashboard / socket.io

Ultimately node-red's just translating between AAF2 serial commands / other protocols and my own Python CLI executable which does the local grunt work.

No-one else's drivers (moonlite, robofocus et alle) obeyed their own protocol docs (or docs not updated), so ended up going with yours!

Edited by Marci
  • Like 1

Share this post


Link to post
Share on other sites

Well, Happy New Year!

I'm onto this like a rat on cheese. I've downloaded the AAF2 to both Windows 10 operating PC's and both are checking out fine. Can't wait for the parts to arrive Monday.

Now, if the shipper at Amazon.com would just get off their duff and get my parts on the way. 3 days since placing my order and still waiting shipment.

Supposedly due Monday. But you can't ship Monday for a Monday delivery.

Meanwhile, I've been reading this immense thread trying to follow the developments. And have the DS18B20 waterproof probe on the way as well, via Ebay.

Thank You, Tekkydave for your development and continued support toward this electronic focuser!

My direction is a direct drive to my 11:1 Crayford focuser stem. My focusing is very touchy and so I'm hoping the direct connection works out, without wanting to gear it down more.

 

Edit in: I found and bought the waterproof temperature probe on Ebay. I was pleasantly surprised that my item was shipped within the hour of buying it. I'm really rethinking my buying options concerning Amazon.com. As in, Forget you Amazon. (My items from Amazon still aren't shipped yet.)

Edited by SonnyE
Shipping update. Thumbs up to Ebay.
  • Like 1

Share this post


Link to post
Share on other sites

It's alive! ALIVE!

First off, I'm certainly not a Programmer kind of guy. Like I told Dave, I'm an Analog guy in a Digital world.:lol:

But I'm persistent. And with help from Dave pointing me to things I missed, he got me going. And I've begun to understand the magic of Arduino.

So much so, I have my next quest ahead. (Yes, I am a glutton for punishment) I'm going to automate my 9 position manual filter wheel with a stepper motor.

I love the challenges added when you can undertake some (or a lot) of "DIY" astronomy. And the help of Friends all around this big World we are sitting on.

Still have a few bits coming, hook up wires today, and two project boxes maybe next week.

But... IT'S ALIVE! Thank You Dave! :hello2:

 

Edit in:

And complete, Finished and working. Great job Dave!

OK, so the connector cables arrived today, as expected. But there was another bag in the mailbox...

The cases! So I went to work and finished my build.

It takes 12, 200 steps to get to where my telescope normally focuses (Around 400 mm of draw-tube extended.) I'd go out back to really put it through it's paces, but I'm too pooped to pop.

Edited by SonnyE
And complete....
  • Like 2

Share this post


Link to post
Share on other sites

A question from the hardware ignorant: Given that the Nano spec say that pin 30 can take 6-20V, and the ULN2003 wil take upto 12V. If I use a 12V stepper motor as Pauls72 did; is there any reason why I can not run this off of a 12V DC power supply rather than a 9V battery?

Share this post


Link to post
Share on other sites

ebay, here I come...

PS - Thanks Dave.

Edited by frugal

Share this post


Link to post
Share on other sites
1 minute ago, frugal said:

A question from the hardware ignorant: Given that the Nano spec say that pin 30 can take 6-20V, and the ULN2003 wil take upto 12V. If I use a 12V stepper motor as Pauls72 did; is there any reason why I can not run this off of a 12V DC power supply rather than a 9V battery?

That is what I am doing. The motor input connectors for the ULN2003 motor board are connected to my 12 volt battery supply.

The Nano is USB powered. The + and - of the ULN2003 are connected to my 12 volt DC circuit. And I bought 12 volt 28BJY-48 motors for my focuser, and my filter wheel (In progress).

When I tried applying 12 V to pin 29 & 30 (of the UNO), I found the voltage divider built into my Arduino boards got uncomfortably warm. So I went the route of USB power for the Nano, and letting the ULN2003 board feed the motor the 12 volt.

I use a very scientific method to determine if the changes have been of benefit. I pinch the output shaft and try to stop it. Yep, it takes more effort to stop the 12 volt motor than the 5 volt. So I consider the 12 volt to be better and to give me a bit more torque.

What I find pleasing is the small cost for these. I ordered a 5 pack of motors and ULN2003 motor boards for about double the price for a single motor and drive board.

  • Like 2

Share this post


Link to post
Share on other sites

If you are using Chinese Nano clones they don't like voltages much over 9 volts on Vin. You MAY be OK with 12 volts but it would definitely be better to add a regulator to your board. Something like will give you 8 volts and it only needs the regulator and a couple of small ceramic capacitors.

Regards, Hugh

Share this post


Link to post
Share on other sites

Hmmm. I was hoping to go down the Bluetooth route in order to save on precious USB ports, and only have the focuser connected to the 12V input supply. I shall have to consult with Herself as the resident Electrical Engineer to figure out how to wire a voltage regulator in safely ;)

Share this post


Link to post
Share on other sites
25 minutes ago, frugal said:

Hmmm. I was hoping to go down the Bluetooth route in order to save on precious USB ports, and only have the focuser connected to the 12V input supply. I shall have to consult with Herself as the resident Electrical Engineer to figure out how to wire a voltage regulator in safely ;)

If you were to go the route I did with my Intel Stick Computer it has Bluetooth 4.0, and dual band WiFi built into it. I did have to add an external antenna to get all smiles at the inside desktop for a click and POP operation.

I use a powered USB hub on the mount that connects to my Stick computer. 7 USB ports, 3000 Ma. I use 4 ports.

If you have a dual band router (2.4 GHz and 5 GHz), chances are you won't need the antenna.

I have an older 2.4 GHz router. Most of my stuff, and particularly my Astro stuff is USB2, so it isn't worthy of a new router. But the antenna sure did the trick.

Edited by SonnyE

Share this post


Link to post
Share on other sites

I use these buck converters. They are very cheap and compact and also generate no waste heat.

Just supply 12v to the input pins and adjust the output to whatever you need for the nano. You can feed the full 12v to the motor driver.

  • Like 2

Share this post


Link to post
Share on other sites
6 minutes ago, tekkydave said:

I use these buck converters. They are very cheap and compact and also generate no waste heat.

Just supply 12v to the input pins and adjust the output to whatever you need for the nano. You can feed the full 12v to the motor driver.

" No sellers are currently delivering this item to the United States. "

:cry:

Share this post


Link to post
Share on other sites
10 minutes ago, SonnyE said:

" No sellers are currently delivering this item to the United States. "

:cry:

http://www.ebay.com/sch/i.html?_odkw=dc-dc+step+down+5a&_sop=15&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR2.TRC1.A0&_nkw=dc-dc+step+down+5a&_sacat=0

Funny thing when I browse these the price is in dollars but when I post a link and click on it the price is in GBP

Dave

Edited by Davey-T
  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, Davey-T said:

http://www.ebay.com/sch/i.html?_odkw=dc-dc+step+down+5a&_sop=15&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR2.TRC1.A0&_nkw=dc-dc+step+down+5a&_sacat=0

Funny thing when I browse these the price is in dollars but when I post a link and click on it the price is in GBP

Dave

Hi Dave,

I was being lazy. I found them here on Ebay.

I'm a sucker for the "5 for $ price". I figure if I'm getting one, a handful is better. In case I get a bad one.

One reason (Probably the biggest reason) I got what I did was the cord to plug in to my Stick computer. But I think I would have preferred TekkyDave's solution.

Edited by SonnyE
  • Like 1

Share this post


Link to post
Share on other sites

Having just got an arduino kit in the attempt to make something like this along few a few other bits, I was over the moon when I found this.
I was even more so when I found 90% of the bits required are included in the getting started kit I purchased.

I have this afternoon built the initial prototype and everything seems to be working. I need to build a nice tidy final version and then see about trying to connect the motor to focuser of a 130PDS.

Thankyou very much indeed for all the hard work and taking the time to share this.

  • Like 2

Share this post


Link to post
Share on other sites

I hope you dont mind me asking. I am using the 5v 28YBJ-48 Stepper Motor but to directly drive a crayford on a 130PDS.
Having done the first test today I noted that it took 1500 unit steps to cover the full throw of the focuser.
Is this enough or would I need to increase the number of steps? What should I be aiming for?
I noticed that in the code you use 8 steps for every ascom unit, as I am using a direct connection to the focuser would I be better to reduce the number of steps per unit to allow for finer control?

Share this post


Link to post
Share on other sites
43 minutes ago, dyfiastro said:

I hope you dont mind me asking. I am using the 5v 28YBJ-48 Stepper Motor but to directly drive a crayford on a 130PDS.
Having done the first test today I noted that it took 1500 unit steps to cover the full throw of the focuser.
Is this enough or would I need to increase the number of steps? What should I be aiming for?
I noticed that in the code you use 8 steps for every ascom unit, as I am using a direct connection to the focuser would I be better to reduce the number of steps per unit to allow for finer control?

I'm not familiar with that focuser, but there's something weird with that number. If the motor you are using is similar to this one:
https://arduino-info.wikispaces.com/SmallSteppers
 

...it mentions a (close to) 64:1 reduction at the output, with at least 2048 steps per revolution. Does that mean your focuser takes 3/4 of a turn for full travel?
How long is the in-out travel of the focuser?

Share this post


Link to post
Share on other sites

Thanks this is something I was not sure about.
The motor is labels the same as the one in the link and as per the parts list but I have a feeling there is a variation here somewhere.
I went ahead and changed the ascom motor steps from 8 down to 4 and I can confirm that it now take just over 3000 to reach full throw.

I intend getting the 12v version of this motor as the 5v does not seem to have enough torque and struggles, I will see how it compares once it comes.
 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.