Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

YARF - Yet Another Robo Focuser.


NickK

Recommended Posts

Visit to Marlins this morning.. got a few things including some strip board. Final testing configuration for the focuser put together and running off 13.5V PSU input.

I decided to put the Arduino on the 12V line as there's plenty of juice to power both the stepper and the arduino. The 5V 4A line can then power one of the hubs.

 

IMG_2570.jpg

Link to comment
Share on other sites

  • Replies 81
  • Created
  • Last Reply

Lol yep could have - I saw the nano and though yeah but the £20 would have raised additional questions lol

The alloy box will act to cool things a little more.. although the UBEC doesn't get hot and so it's been moved to the main box.

IMG_2576.jpg

 

I still need to put in the limit switches and add to the driver and cut the box(es if you including the main box) tomorrow.. 

 

Link to comment
Share on other sites

I made a little vid of a simulated autofocus run, it uses SGPro plus camera simulator (using a random image + added synthetic noise - thus calculated focus position is meaningless!). However it does show it in real time. Note right at the end is backlash compensation kicking in - a little jog of 20 steps which ensures last focus movement is always approached from the same direction and takes up the backlash.

ChrisH

Link to comment
Share on other sites

4 minutes ago, hughgilhespie said:

Nano's at £20.00?? Must be the diamond plated type. Try Ebay, usually around £2.50 each or cheaper if you buy a bunch.

Precisely.. Maplins is easy for some things like bits and pieces but for resold components they charge a premium.

My ODroid C2 only cost £40..

Link to comment
Share on other sites

I decided against using the 3mm thick steel piece on both weight and how hard it is to bend, instead I have some 1mm that is wider and I've bent accurately(!) around the scope and focuser. With the focuser coupling directly it will provide a second point of rigidity but if need be I can add some aluminium support struts and rivet those to the steel. Rivets are awesome :D

Behind on the timescales due to weather and other things but I should have the focuser box finished tonight I hope - that's a case of power hookup, spacing to prevent shorting and the addition of limit switches which should be easy enough.

I'm currently attempting to decide the mounting points of the control boxes of he focuser and main box to ensure that the centre of gravity doesn't move back any further. It's looking like the boxes may sit forward of the mount point to provide some balancing.

Link to comment
Share on other sites

Well focuser box has been completed, just sorting out the power from the main box at the moment - this will operate without needing the data lines setup.

I've managed to drop the 70W propane powered soldering iron onto my left hand.. ouch. Burn plaster on.. onwards :D

 

Link to comment
Share on other sites

Focuser powered up (grey alloy box on the desk with wire connectors on it) with the automation project (ODroid C2 running ARM - see automation thread) and running off the 12V UBEC.

IMG_2583.jpg

Link to comment
Share on other sites

There's a nice pinMode() with the arduino that allows you to set the digital pin as INPUT_PULLUP. This means it uses internal pull up resistors to prevent floating input. Using this mode means the input is held high by the internal resistor circuit and the switch is then is connected to ground (GND) so when the switch is closed the pin level drops to LOW. This means you don't have to find the resistor values :) but the power must be within 3.3V or 5V depending on the operating voltage of your arduino.

I've added this to the code this morning and it works nicely with the arduino detecting the limit switches closing. I'll add this to the driver and so the system will halt any current movement if the switch is closed but allow a new movement the opposite way if the switch is closed..

 

 

Link to comment
Share on other sites

I'm happy with the focuser behaviour now on the test rig (few bugs fixed) - I've thought about putting an automatic stepper speed control class similar to the one I've developed before. Almost like an automatic gear box on the car it will look at the acceleration and velocity then select the best stepping (full/half/...1/32) at the point when it would be beneficial and the step points on the DRV8825 align (i.e. full step #1 = 1/32 step #17) as laid out on the DRV data sheet. Then just expose the positioning as 1/32 and let the class drive the motor at the appropriate rate. However this is an improvement later ... not really needed to get the system running.

The electronics inside the alloy box sit in plastic containers (just the plastic your normal shop containers) to prevent shorting against the alloy case.

 

The next steps for the focuser are mounting it on the bracket and getting the alignment of the shafts in preparation for the arrival of the CNC flexible coupler from china. The other task is to make a mounting beam for the limit switches (which now stop and block the focuser travel in that direction).

This is the end shot of the scope with the fabricated bracket in place. At the moment I've left the two sides available however once fitted I'll probably remove the opposite side for weight reasons. The focuser will go on the left (bottom) side as the mounting point is closer. If it needs additional stiffening I'll rivet U cross section aluminium to it.

IMG_2585.jpg

Link to comment
Share on other sites

Getting shaft alignment is going to be fun.. I think it may be better to make a bracket that holds the stepper and can be moved then clamped by bolts into the main bracket with some slots means that the alignment can be altered and the bolts retightened. Well, when you don't loose one of the bolts you made for the scope lol. It's on the floor.. I heard it..

 

Link to comment
Share on other sites

I've made an adjustable bracket to aid alignment and it seems to work although the electrical tape isn't great substitute for the awaited coupling.

I'll need to find a solution to keeping the fragile stepper wires (where they enter) safe. Sometimes I wish they'd have big solder pads instead.. I'll do a solid connector block next to the stepper so the wires aren't being flexed.

Happy with the progress so far.

The movement with full stepping is slow (as you'd expect) but actually that's a good thing as full stepping is more torque. I can switch to 1/32 if need be ;) although it's hard to get a good feeling for the speed at the moment because the tape slips a little but it's usable. It's not rocket powered in full step but the system also has very accurate stepping if needed.

IMG_2586.jpg

 

Link to comment
Share on other sites

I think that the moonlite INDI driver is a good starting point but I will create a YARF focuser driver that copes with limit switches.

Currently the YARF arduino firmware will halt the requested travel if the limit switch is engaged. However if the computer side (i.e. INDI driver) doesn't understand that then it's pointless (and dangerous).

So the only things needed are:

* captive wire block for the stepper wires - then use a better wire between the focuser block and the controller block.

* limit switch boom and installation - that will be a pop rivet job to connect a piece of aluminium U section to hold the switches.

* coupling installation once arrived..

* rigidity of the bracket if required

* mount controller on the other side of the mount axis - the same metal will hold the main box of the automation project. This will balance out the astro camera kit on the focuser side.

* possibly a box for the stepper

* cut the other side of the bracket so it's lighter - I don't think I'll have the balance to use that side to be honest.

* test with the astro kit attached for weight and usability.

* upload the arduino firmware and the INDI driver files.

Link to comment
Share on other sites

As it's a nice day and I'm likely to be banned from using the computer .. to work in the garden (not a bad thing!) .. apart from the pond, the grass etc I think I may look at melting down the 40+ aluminium cans in my DIY furnace. If I make a wood block mould for a single use I could make a solid aluminium block ingot then drill/mill out the inside, cut two holes and it can then fit between the stepper and the scope with the coupler inside. The result is that the stepper would sit more firmly with less moment and the existing bracket can provide additional support.. 

Link to comment
Share on other sites

So with 1/32 as suggested on the video I think I would need to increase the power to the stepper to ensure a stepping. At the moment 1/16 works but 1/32 has no movement from the stepper so this could be down to the torque required is greater than the 3.8v*0.670A (2.5W per coil) that the stepper is providing. As the stepper is stone cold I think it's possible to increase the current delivery a bit to experiment. Another option is to use 13.5V direct rather than the 12V through the UBEC (that has a max power of 48W). More current = more heat, more voltage = more stepper force to move but again would increase the heating..

Let's see how 1/16 works in reality and go from there.

It seems that the youtube streaming is choking - if you have a problem with playback set the quality to 144p (lowest) and then it should play back smoothly.

Link to comment
Share on other sites

I'll sort out the load using the full equipment + cables as that represents the heaviest load it will be carrying. There's no way to do a test like that unless I sit the pentax on it's objective dew shield.. hmm I think not :)

I was holding on to one end and it seemed happy pulling so.. that's good enough for me atm.

Next steps are getting things cut and mounted into the final configuration. Not easy I have very little time atm..

Link to comment
Share on other sites

  • 3 weeks later...

So I've decided to replace the moonlite focuser front indi driver. There's some random stuff in there that really causes problems.

Initially it won't have some of the things like temperature compensation but it will have support for the limit switches.

 

Link to comment
Share on other sites

Hmm figured out some of the issues:

1. Arduino's Serial.flush() is good for sync but will delay the loop() main loop and cause gaps in the servo pulses.

2. Arduino's SerialEvent() method is called between loop() calls when serial data is incoming. So if the moonlite focuser calls :GP# (get position) continuously then there is heavy impact on the server STEP pulse polling.

The moonlite focuser driver in indi does not limit it's get position calls and so with a fast system will continuously poll the driver causing the stepper drives r (run off loop()) to be starved and so the stepper makes a noise but doesn't step properly with full stepping. The calls direct to the arduino without the mass of calls get position calls results in the stepper and the focuser moving without a problem.

Switch on INDI driver debug for the moonlite driver (the standard one in INDI) and the stepper & focuser move flawlessly.

 

Link to comment
Share on other sites

The answer to this is to move the code for serial and stepper drives to an interrupt handler and just use the main loop to respond to flags set by the handler. Nothing kills code like a serial poll loop.

Mike

 

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.