×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Indi compatable arduino firmware for filter wheel?

  • Posts: 301
  • 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: 301
  • 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 2 months ago #23418

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

  • Posts: 301
  • 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 4 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 4 months ago #46594

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

  • Posts: 27
  • Thank you received: 2
Thank you for fast replay. Problem is solved. I have to unsolder small capacistor (DTR Reset Capacistor). Arduino Nano clone v3 now don't reset on connect and respond to commands without delay. Filter wheel now works great.

https://cdn.instructables.com/FWD/5Q81/IAINHLRP/FWD5Q81IAINHLRP.LARGE.jpg?auto=webp&frame=1&width=1024&height=1024&fit=bounds
4 years 4 months ago #46595

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

  • Posts: 257
  • Thank you received: 22
OH yep. Missed that one. Glad you got it going.
4 years 4 months ago #46596

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

  • Posts: 334
  • Thank you received: 23
Hi Blueshawk,
do you have a list of parts required for this project? I read the code and i found that you use this motor 28BYJ-48 and an Hall sensor. How do you set the position, by moving the motor to a defined step or you read the Hall sensor. It is possible to have more then 5 filter position? I am planning to use an FLI wheel that is to old to be compatible with INDI and reuse it in this manner
4 years 2 months ago #49382

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

Time to create page: 1.065 seconds