×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Indi compatable arduino firmware for filter wheel?

  • Posts: 257
  • Thank you received: 22
I'm working on motorizing a filter wheel using an arduino nano and one of those cheap little 28byj-48 stepper motors that come with the uln2003 driver board and one magnet for home. Mine is very similar to a project on thingverse except I didn't 3d print anything.

Does anybody know of or have some simple indi compatable protocols or an arduino .INO project file with them?

Web searches have come up empty so far. Any of the simpler wheels would do. I found some possible protocols to use to write one but thought I'd check around first. The version I have working standalone uses FILTER0# FILTER1#..etc. but the drivers I've tried have been using a much more cryptic method with symbols and such. If not I'l be trying to makesuch a thing happen using one of the existing drivers, so any protocols pages would also help.
thanks,
Ray
6 years 2 months ago #22603

Please Log in or Create an account to join the conversation.

  • Posts: 298
  • Thank you received: 46
Hi Ray,
You could take a look at this thread..
indilib.org/forum/general/283-moonlite-f...rotocol.html?start=6
It needs some explaining.. I made some (alot..) modifications to the code and used my old broken Xagyl filterwheel with a stepper motor to emulate the Xagyl protocol.. that was some years ago so I'm not sure if I still have sketch somewhere.. but I can try to find it if you are interested ?

Br
/Markku
The following user(s) said Thank You: Ray Wells
Last edit: 6 years 2 months ago by Markku.
6 years 2 months ago #22636

Please Log in or Create an account to join the conversation.

  • Posts: 257
  • Thank you received: 22
Yes please could you? That sketch sounds like just the thing I'm looking for.
re: other thread: that was interesting to read through anc covered many of the same things I worked out on my focuser. I've got the arduino moonlite setup on all my scopes. ..well one arduino nano in the mount box and connectors to steppers on each scope and it works pretty good.
Last edit: 6 years 2 months ago by Ray Wells.
6 years 2 months ago #22642

Please Log in or Create an account to join the conversation.

  • Posts: 298
  • Thank you received: 46
Yes, I found the code in my old laptop :) and it still compiles so all you have to do is some changes to the code to fit your needs.
I almost forgot that the original Xagyl wheel have a hall sensor for every filterslot but I think that you only need to detect first slot and then adjust the array to find rest of positions by counting steps for the stepper.
Sorry for my bad coding style but I'm not very good at it.. I hope it gets you going anyway.

File Attachment:

File Name: Xagyl_FW.txt
File Size:14 KB

Good luck with your project!
Br
/Markku
6 years 2 months ago #22657
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 257
  • Thank you received: 22
Got it thanks! I'm not sure what protocol i'm going with just yet. I got a few minutes to look over the wheels in the indi set to find some of the commands and it looks like some of them are pretty complex. I may even modify one of the simpler indi drivers to use the ascom friendly code my current system apparently has...if I can figure it out. Mine just has one magnet at "home" an offset to find filter0 then offsets for the others. seems to work pretty well in testing with a terminal.
Thanks for your help though and I'll be using this to compare with for sure!
ps. I think your code looks just fine. :D
6 years 2 months ago #22658

Please Log in or Create an account to join the conversation.

  • Posts: 298
  • Thank you received: 46
Glad to help you!
You can choose to use the Xagyl protocol as it is, there is also a ascom driver available here :
www.xagylastro.com/ascom-motorized-filter-wheel-5x125.html
Br
/Markku
The following user(s) said Thank You: Ray Wells
6 years 2 months ago #22670

Please Log in or Create an account to join the conversation.

  • Posts: 257
  • Thank you received: 22
@maxer
I finally got a stopping place on the OnStep stuff and worked on this some. I thought you might like to see the direction I took. I used one magnet and hall effect and got around the backlash issues by making it only go one way. Felt pretty good about that when I found out QHY did the same thing. It indexes and repeats very well. The only bug i' have is my magnet placement makes it fail when going from 5 -1 because it thinks it's already home but on the wrong edge of the magnetic field. I plan to make it run off the magnet and retry next time I work on it.

Cheers and thanks again for the code. It was a real booster.

github.com/Blueshawk/indi-wheel/tree/master/filterwheelZX
6 years 1 month ago #23418

Please Log in or Create an account to join the conversation.

  • Posts: 298
  • Thank you received: 46
Hi Blueshawk,

Your coding looks good and a lot more comments than I had so it's easier to undeerstand.
I also had some problems that was caused by the hall sensor giving unexpected values depending on what direction the magnet came from but nice that you sorted it out, I don't remember what hall sensors I used but it evenually worked.
You're welcome!
/Markku
6 years 1 month ago #23433

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
Hi Blueshawk,

that sounds good. Keep us updated.

Markus
6 years 1 month ago #23504

Please Log in or Create an account to join the conversation.

  • Posts: 257
  • Thank you received: 22
Sure thing Hy-Fye1. :)
Current status on this driver is a bit up in the air while I get around my use of too many "cheapduinos" at once via head scratching and udev rules.
Overall the version at the above github link was working with the Xagyl filter wheel when plugged by itself at my desk pc. I got around the magnet placement and the fix should work for any wheel now. This version is for the cheap little 5v gearhead byj motors with ULN2003 driver boards you can get at ebay or Amazon. after removing the screw, I drilled and tapped mount holes in one cover for the motor, then glued the motor into the threaded hole left by the screw by filling it with epoxy from the other side then screwing the screw back in a bit with the motor in place. Be careful you don't let glued into the motor. I used a bit of tape on it and then just left it in there. The motor runs in unipolar mode. Just plug the motor connector into board and install with a header or wires to the pins on the Arduino. The magnet placement isn't critical but make sure when you mount the hall effect that the board will clear filters and magnet. Placing the magnet anywhere between 4 and 0 (5 and 1) does the trick. The rest is just a process of figuring out steps by trial and error, change and download, until each filter lines up. since they all reference from a known home position the filter positions will be increased by about the amount of of the distance of the first one to the second so after that point things go a bit faster. The distance from the home position sets filter 1. I plan to get the offsets in the indi xagyl driver to actually work at some point which will be great for fine tuning position but right now that part as well as much of the info screen is just placeholders.
Rather than go reverse to get to lower numbers, I chose to eliminate lash issues by having the motor only run one way as much as possible. a lower value (i.e. from 4 to 2) will make the wheel run on around and find home, then run to the stored value of the filter requested. The wheel self calibrates any time it passes home or goes to a filter of a lower position value.

Once on the mount in mixed skies, mine is currently telling me filter_0 not defined and other great errors...I think I've been trying to change the color of my focuser. :P
Last edit: 6 years 1 month ago by Ray Wells. Reason: Because spelling.
6 years 1 month ago #23532

Please Log in or Create an account to join the conversation.

  • Posts: 27
  • Thank you received: 2
Helo,

I have made hardware. Commands works from Arduino Ide Serial Monitor (on PC and RPI). I can't connect from Ekos with Xagyl wheel driver. System is Raspberry pi 3B.

: Connecting to /dev/ttyUSB1 @ 9600
DEBUG 22.912000 sec : Port FD 3
DEBUG 22.912213 sec : Connection successful, attempting handshake...
DEBUG 22.912324 sec : CMD <I1>
ERROR 54.930461 sec : I1: Timeout error.
INFO 54.930725 sec : Error retreiving data from XAGYL Filter Wheel, please ensure filter wheel is powered and the port is correct.
DEBUG 54.930860 sec : Handshake failed.

There is no response for I1 command. In ino code firmware version is "FW3.1.5." Any clue ?
4 years 3 months ago #46592

Please Log in or Create an account to join the conversation.

  • Posts: 257
  • Thank you received: 22
Quick pass attempt to help. You might make a new thread for this to get more folks to see it.
Make sure you close the arduino IDE before trying to connect. it likes to hold the port open once opened. Make sure you are attaching the usb port it's on. Turn off scanning as handshake attemps can dork other ports until you get the order correct. I have the best results when I make a udev rule that identifies the arduino by vender code or serial#(if not 0). There's some info on that in the tutorials somewhere. I remember it does handshake on the 3.1.5 so if you get that from If in serial monitor then it should go, at least that far. Good luck!
The following user(s) said Thank You: Long Jon
4 years 3 months ago #46594

Please Log in or Create an account to join the conversation.

Time to create page: 1.077 seconds