×

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

  • Posts: 257
  • Thank you received: 22

When I was researching this project, I found many different routines to attempt to stop position creep and backlash, including multiple hall effects and mutiple magnets but I thought these seemed redundant and difficult to build/wire so I came up with this one.
The hall effect(or reed relay if you can still get them) sets a HOME position and then everything is a set number of steps from there. So from home, the first filter is offset nnn steps to run clockwise and line it up, then the rest are further along this line. My unit always runs CW so to get back to a filter that has already passed(lower offset), and prevent step creep from backlash or missed steps, when the unit sees the lower(cw) filter request, runs back around to home, and then steps off the new offset.

That sounds like a good project and your wheel is probably already better than what I started with, a noname ebay special from china. There are lots of motor options for friction edge drive if the fli has access and a round outer edge, I recommend edge mounting over the center shaft/gearhead I did because it gets in the way of extensions and cameras and has lots of backlash. The .ino should work for pretty much any stepper/wheel. You will need to tweak the offsets from the home position and pay attention to pin assignments. To get more spots you'll need to edit the code and add more offsets to the array, and other code as well. You can probably copy/edit the filter(x) in the protocol routine to add them. A way to select how many you have in setup might be a good trick to code in...:ponder: I used an arduino nano(cinese cheapduino) initially but rebuilt it using a newer model teensy since it has better usb identifiers for the udev rule. I also used the little uln2003 driver board that comes with the units.

I'll try to get my Github polished a bit more on this project, and update the ino file to my latest with the serial offset commands when I get some more time.

Hope this helps!

github.com/Blueshawk/indi-wheel
[edit: if you check the testing branch that one appears to be fairly up to date. ymmv]
Last edit: 4 years 2 months ago by Ray Wells. Reason: checked git, noticed more code edits will be needed for bigger wheels
4 years 2 months ago #49409

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

  • Posts: 257
  • Thank you received: 22
I should probably do a protocol sheet on this, most of it is the same as the xagyl but I made the go cw and go ccw change the stored calibration offset for the currently selected filter --Handy for quick offset calibration adjustments if needed. I think it's working with indi but it's been a while since I messed with it. Winter is dslr season...also apparently known as many months of rain.


Just remembered where I posted a video of it!
Last edit: 4 years 2 months ago by Ray Wells. Reason: found those tweak commands
4 years 2 months ago #49411

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

  • Posts: 118
  • Thank you received: 19
I use that driver modified to suit my home modified ZWO manual filter wheel, I use a small 4 wire stepper & a DRV 8825 stepper driver board with a Hall Effect Switch that I had originally developed for an ASCOM setup. I just reprogrammed the Arduino to use the sketch modified to suit my home tweaked filter wheel based on the XAGYL protocol works faultlessly, with the indi XAGYL driver, just make sure the capacitor modification to the reset pin on the Arduino is fitted and you’ll have no issues.

Regards

Alan
The following user(s) said Thank You: Ray Wells
4 years 2 months ago #49425

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

Time to create page: 0.748 seconds