Jump to content

sgl_imaging_challenge_6_banner_jupiter_2021.jpg.eacb9f0c2f90fdaafda890646b3fc199.jpg

 

 

BullsEye Focuser - DIY Arduino + Trinamic TMC2209 based focuser with temperature measurement


kbrown
 Share

Recommended Posts

Decided to make another DIY electronic focuser for my new WO FLT 91. It will be Arduino Nano based again but this time I'll be using a Trinamic TMC2209 based stepper driver (Same as in my Prusa Mk3). The focuser on the scope is a rack and pinion style and I'll be driving it with a flexible coupler directly on the focuser shaft. I'm hoping to utilise the Stall Guard feature of the TMC2209 to auto-home the focuser and also as sensorless limit switch. I'll be adding a Class A PT100 based RTD as well to measure the focuser temperature. I found one with M4 thread that I can bolt directly on the focuser body.

I've pretty much done with the mechanical design. Still need to finalise the electronics and solder it together + write the firmware and INDI driver.

IMG_20210523_083207.thumb.jpg.a003d1c70e8afc71638c446a872dd3ab.jpg

IMG_20210522_121702.thumb.jpg.3e9149a225d52f3419ece2ca21a9c09e.jpg

IMG_20210523_083143.thumb.jpg.a6e929797b0aa88cfa676cdffad96b06.jpg

 

 

  • Like 4
Link to comment
Share on other sites

Posted (edited)

Ouch. Ran into a bit of a road block with this. Turns out my chosen NEMA 11 12Ncm motor is not quite strong enough to drive the focuser attached directly on the (coarse side) of the focuser shaft. It very  nearly works with a bit of help by hand but not on its own. Not even with some over current and slow acceleration etc... Bummer...

So back to drawing board. A few options I can think of include:

  1. Use a bigger and stronger stepper (NEMA 17 for example) the same way on the coarse side of the focuser shaft.
  2. Use the existing NEMA 11 stepper on the 10:1 side of the focuser and deal with backlash in the arduino code.
  3. Use the existing NEMA 11 stepper with pulleys and a belt to gain better gear ratio while minimising backlash on the coarse side of the focuser.
  4. Use a NEMA 11 stepper with a gearbox on it to gain more torque on the coarse side of the focuser and deal with backlash in the arduino code.

Any other practical ideas you guys can think of?

Edited by kbrown
Link to comment
Share on other sites

3 hours ago, skybadger said:

Double the voltage and use current control. 

 

 

Had another look at the specs of the motor I have and it's rated 0.67A @ 6.2V so I'm already nearly double the voltage driving it with 12V. Increased the current going into it as much as I dared and it did start moving the focuser but it was occasionally skipping steps and got rather hot too.

Think I'll try a NEMA 17 stepper which I already have to see if it's better. Just need to print a new L-Bracket for it.

Link to comment
Share on other sites

Posted (edited)
2 hours ago, skybadger said:

Are you running microstepped or at the base step size ?

This is the first time I'm using a TMC2209 driver and the TMCStepper Arduino library so I'm not too familiar with it yet. I'm trying to configure it via the UART interface which gives me loads of options but in regards microstepping I haven't been able to really go below 8 microsteps as it seems to start misbehaving even without any load. So far I've had the best results with 16 or 32 microsteps.

 

I know in theory I should get more torque with native steps but I'm not sure if that's the case with the TMC2209.

Edited by kbrown
Link to comment
Share on other sites

Gave a NEMA 17 stepper a go and it's much better. Think I will go with it and re-design the enclosure around it. Here's a quick test:

 

Link to comment
Share on other sites

Did a bit more pondering and experimenting with this. The rated torque of the stepper motor in the above video is supposed to be 26Ncm which feels just about enough with the 16th microsteps I was running it with (AFAIR). But it didn't take much resistance by hand for it to start skipping steps which was a bit of a bummer. Just as an experiment I also tried with another NEMA17 motor that was rated about 19.8Ncm. This wasn't enough to move the focuser without helping it by hand at all so I guess I'm just above the threshold with the 26Ncm motor.

I'm currently waiting for a delivery for yet another NEMA17 motor that is supposed to be rated 45Ncm. I'm hoping that will be enough to drive the focuser at 32 microsteps. That's the sort of resolution I'm aiming for minimum without any sort of transmission. One microstep would be around 33 microns of travel while my worst case scenario critical focus zone is just above 50 microns.

Hope it works out okay. If not then I'll have to look into a geared stepper or a pulley and belt system. Feels a bit like I'm balancing on the edge of failure at the moment...

Link to comment
Share on other sites

The new stepper arrived today and does seem to do the job well even at 32 microsteps. I had this test running for several minutes and the dial gauge always stopped at the same spots. Feels like this will work nicely now! :)

 

Link to comment
Share on other sites

  • 3 weeks later...

Been trying to source a Baader Diamond Steeltrack focuser for my Newt for over 9 months and now I finally got one as it was back in stock for a brief moment at FLO. Turns out my first NEMA 11 version of my DIY autofocuser is perfect for this. Just had to design and print a new bracket and get a HTD 3M pulley and belt. Work is keeping me too busy from writing the arduino code and indi driver though. Only should have to do it once though as the electronics on these two are pretty much the same.

IMG_20210602_125624.thumb.jpg.c2d8b88a0eb4fa34f501c15363e14042.jpg

IMG_20210623_123832.thumb.jpg.c57b96f925f3dac964d90206944d2e8f.jpg

IMG_20210623_123905.thumb.jpg.b403321ad1a456abad62f7b780987518.jpg

Link to comment
Share on other sites

  • 3 weeks later...
Posted (edited)

Finally I've had some time to mess about the arduino code for this focuser. Took a bit of trial and error plus some black magic voodoo to get the auto homing dialled in but it is working fairly well now. What it does is upon powerup it will rack the focuser out as far as it can. Once it reaches the mechanical limit the TMC2209 stall guard will indicate an error. From there it will rack the focuser back in to the other extreme while measuring the length of the travel. Once it reaches the inward mechanical limit it'll back out a tiny bit and call that home or the zero position. Here's a little demo of it:

 

Edited by kbrown
  • Like 4
Link to comment
Share on other sites

I love your project. I’m hoping to start tinkering around with raspberry pico in next few days. Can’t wait to see how your Focuser develops. You’ve made a great progress so far, keep it up!

  • Thanks 1
Link to comment
Share on other sites

  • 3 weeks later...

Finally got this thing together physically. Had to reprint the enclosure to make some more space for the wires etc. I also had to ditch the idea of using the PT100 sensor I intended due to not being able to read it accurately enough with just a voltage divider using a precision resistor. The resolution of the analogue reads would have not been enough and I didn't have space inside the enclosure for a dedicated RTD to digital converter such as the MAX31865. Instead I decided to use the DS18B20 sensor which can be read with the OneWire and DallasTemperature libraries.

I've now also got the INDI driver in a decent state so I can call this whole thing as Alpha. I'm sure there will be some unexpected bugs but I believe it's stable enough to start field testing. I'm planning to document and publish this as open source / hardware at some point. Just need to figure out how as I don't have a website any more.

Here's the whole thing assembled and installed:

IMG_20210731_185739.thumb.jpg.22bd70bd298a6b65720a50b959f403d8.jpg

 

The DS18B20 based temperature sensor inside a 3D printed enclosure along with an M4 screw so it can be bolted directly onto the focuser.

IMG_20210731_185544.thumb.jpg.239651ecd1477557a274e1b914bf509c.jpg

 

The temperature sensor exposed.

IMG_20210731_185424.thumb.jpg.541c5a06661c56f9504aef434343a7ca.jpg

 

I decided to solder the few odd pieces of resistors and capacitors directly onto the Arduino along with the wiring.

IMG_20210730_173908__01.thumb.jpg.e6cea61e3a612b5be9e7a7c448672bb2.jpg

 

The TMC2209 silent step stick with a heat sink and a 100uF cap.

IMG_20210730_000839__01.thumb.jpg.16abc797ddce70c503553c5089bbab96.jpg

 

With some gentle persuasion everything fits nicely inside the enclosure.

IMG_20210731_113152__01.thumb.jpg.0e0c70fdb1d0ae3e0aa3adb9d8226446.jpg

 

Here's what the main control page of the INDI driver looks like in KStars.

main_control.png.5895371a7f05c4ea5841af54b116e4c7.png

 

Here are the settings I've currently exposed to the user:

settings.png.ac341683acf67b8d550889439e62ab66.png

 

Can't wait to start testing this under clear skies!

  • Like 3
Link to comment
Share on other sites

1 hour ago, fozzybear said:

are you going to make the code public and schematics? for the arduino

Short answer is yes... Eventually...I've already started documenting my code. Will take some time to get it cleaned up and ready to publish. Not quite sure where to put everything though as I don't have a web site any more. Maybe GitLab...

  • Thanks 1
Link to comment
Share on other sites

20 hours ago, kbrown said:

Short answer is yes... Eventually...I've already started documenting my code. Will take some time to get it cleaned up and ready to publish. Not quite sure where to put everything though as I don't have a web site any more. Maybe GitLab...

Many thanks 

Link to comment
Share on other sites

  • 2 weeks later...
Posted (edited)
On 13/08/2021 at 00:08, fozzybear said:

any news on the code?

Apologies for the delay. I've still been in full testing and developing mode as I ran into some issues. I attached my heaviest imaging train onto the NEMA 17 version focuser and pointed the scope straight up and found that it wasn't able to lift the weight up when acceleration was used. With acceleration turned off it works ok.

I also finished assembling the NEMA 11 version and installed it on the Baader Diamond Steeltrack focuser. Initially the auto homing worked okay with it but after a while the focuser mechanism started slipping when it racked it fully in. This is due to the fact that I have a pretty high gear ratio with the timing belt attached to the fine tune side of the focuser. Was practically impossible to have the stall detection sensitive enough. I don't think it would work with a normal crayford focuser at all.

So with these in mind I implemented a way to turn the acceleration and autohoming on and off from the INDI driver along with the ability to invert the motor direction. The device now also measures and reports the input voltage to the driver.

Another annoying issue I ran into was due to the cheap Arduino Nano clones I'm using. They use CH341 serial communication chips instead of FTDI chips the original have. The CH341 chips don't report unique serial numbers to the host. Just a vendor and product Id which are the same for all of the chips. This means that there's no easy way distinguish multiple cheapduinos from each other using basic UDEV rules and I have a few of them on my system. To mitigate this I coded a python script gets triggered by the UDEV mechanism on connection and communicates with the devices to find out what they actually are and then creates unique and identifiable symlinks to the ttyUSB ports.

I still haven't used these focusers for real yet but I'm sure I'll be ready when the next clear skies arrive.

Again, apologies it's taken so long. I'll get there eventually :)

Edited by kbrown
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

51 minutes ago, kbrown said:

Apologies for the delay. I've still been in full testing and developing mode as I ran into some issues. I attached my heaviest imaging train onto the NEMA 17 version focuser and pointed the scope straight up and found that it wasn't able to lift the weight up when acceleration was used. With acceleration turned off it works ok.

I also finished assembling the NEMA 11 version and installed it on the Baader Diamond Steeltrack focuser. Initially the auto homing worked okay with it but after a while the focuser mechanism started slipping when it racked it fully in. This is due to the fact that I have a pretty high gear ratio with the timing belt attached to the fine tune side of the focuser. Was practically impossible to have the stall detection sensitive enough. I don't think it would work with a normal crayford focuser at all.

So with these in mind I implemented a way to turn the acceleration and autohoming on and off from the INDI driver along with the ability to invert the motor direction. The device now also measures and reports the input voltage to the driver.

Another annoying issue I ran into was due to the cheap Arduino Nano clones I'm using. They use CH341 serial communication chips instead of FTDI chips the original have. The CH341 chips don't report unique serial numbers to the host. Just a vendor and product Id which are the same for all of the chips. This means that there's no easy way distinguish multiple cheapduinos from each other using basic UDEV rules and I have a few of them on my system. To mitigate this I coded a python script gets triggered by the UDEV mechanism on connection and communicates with the devices to find out what they actually are and then creates unique and identifiable symlinks to the ttyUSB ports.

I still haven't used these focusers for real yet but I'm sure I'll be ready when the next clear skies arrive.

Again, apologies it's taken so long. I'll get there eventually :)

Many thanks for the update

Andy

Link to comment
Share on other sites

  • 3 weeks later...
On 01/09/2021 at 20:42, fozzybear said:

Any update how is it going

Happy to announce it is going well, thank you! I've now finally had a chance to use the NEMA17 version of the focuser for a few nights and it is working really well. Here's a SHO false colour rendition of The Pelican Nebula I took over the past few clear sky nights using my William Optics Fluorostar FLT91 and this focuser:

IC5070_01.thumb.jpg.11aa7a93cbe9ca5d6a620126cf82ec9d.jpg

 

I've also made an initial publish on the project files on my Website and GitLab. It's all still a bit raw but at least you'll be able to get your hands on it. I'll be updating this further once I get a chance. Please don't hesitate to ask here or on my website if anything is unclear.

Edited by kbrown
  • Thanks 1
Link to comment
Share on other sites

2 hours ago, fozzybear said:

Stunning image by the way :) 

Thank you. I'm pleased with it. It's basically the first I've done with this scope. Auto focus worked great with Ekos btw.

  • Thanks 1
Link to comment
Share on other sites

  • 3 weeks later...

Hi All,

Just wanted to let you know I've now posted a blog post about how I assembled this thing together. You can find it over here. Do let me know if something doesn't quite make sense :)

 

Cheers,

Kari

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
 Share

  • 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.