For quite some time I was using my own simple focuser electronics design (without processor, schematic attached).
It was working OK for me for years, but after building my permanent setup, I wanted remote focus control.. and Ascom focuser is ideal solution.
However, I am wondering now if using the encoder as input device instead of buttons for stand-alone use would be beneficial (for me it would be)? How hard would it be to modify the code for this ?
Sorry I cannot read the dxf file
There is a myfp2 build that uses a rotary encoder for manual movement of the motor.
For manual moving push buttons are in my opinion hopeless
the two systems I like the most for manual operation are the keypad 4x4 version or the Nextion display version. Both of which I use for manual and automated control via ASCOM
Robert,
sorry for dxf (sent in error), here is jpg.
I just found rotary encoder mentioned in configuration file, but apparently it is not available in ULN2003 build.
I can see that encoder is connected to pins 9, 10, 11, so I can't have buttons at the same. which is fine. How can I activate it?
Robert,
I managed to "marry" ULN2003 board and rotary encoder - it is a bit of a patchwork, but it reads encoder and moves the motor accordingly, apart from other functionality relevant to ULN2003 board.
I noticed it doesn't automatically update the focuser position as encoder is moved, to do it I have to click on "Get Position" button. Is this is how the other variants of f/w behave, or should I try to implement this as well?
Robert,
Thank you.. I tried your suggestion, but it still works only if I click "Get Position" on Main tab, so something is still missing in that code. Never mind, what I have now (remote via USB and local encoder) is quite sufficient for my needs at the moment.
BTW, I don't have LCD display, the circuit is very basic - I have only ULN2003 and encoder connected to Nano board.
Thanks again,
Bojan
When connected
On the logging tab you will see a group "Position update"
set the time to 5s by clicking the 5s radio button
Check refresh position checkbox
and it will update position every 5s
It is worth noting, that if you were to do the following
1. use +500 to goto 5500
2. wait for the move to end
3. use the rotary encoder to move +20 steps
4. use +500 again
the focuser should end up 6200
Before any move request is done using the windows app, the position is read from the controller first, and does not use the position in the text box. . It does it that way for exactly that reason (push buttons, rotary encoder, infra-red remote, joystick) all alter the position without the application knowing.
The application also queries the ismoving state from the controller before deciding if it should send the move request. This is so that if the focuser is moving because of some other reason (rotary encoder), it does not cause a conflict.
There are three properties that can be returned at any time (even if the focuser is moving), These are
temperature
ismoving
position
Most of the Arduino type implementations use a simple send response exchange
The application sends a command, the arduino responds with an answer
This makes code easy to write. However, if you want the Arduino to be able to send data at any time (indicating a change) then it becomes more complicated (not impossible - just more code)
Regards
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Robert,
Final position is displayed correctly after clicking "Get" or jog or "Go to", but when I set logging to 5s and move encoder, after some time (longer than 5 sec) there is a message displayed "Focuser is moving, update ignored".
So it seems my "patchwork" is still not complete, app thinks motor is moving but this is definitely not the case. I have to have another look into the code...
But... as I mentioned earlier, it OK as it is.
I asked the question only because I think the position was updated after pressing a button.. and now there is no change when encoder stops moving.
Thanks for adding the RE code. It will be part of the next update.
I added a few checks - RE uses the same pins as Nokia Display, InfraRed remote and Bluetooth so that needed to be done. I also added the full Rotary Encode support in there as well.
Attached is what will be available with the next update
For quite some time I was using my own simple focuser electronics design (without processor, schematic attached).
It was working OK for me for years, but after building my permanent setup, I wanted remote focus control.. and Ascom focuser is ideal solution.
However, I am wondering now if using the encoder as input device instead of buttons for stand-alone use would be beneficial (for me it would be)? How hard would it be to modify the code for this ?
Sorry I cannot read the dxf file
There is a myfp2 build that uses a rotary encoder for manual movement of the motor.
For manual moving push buttons are in my opinion hopeless
the two systems I like the most for manual operation are the keypad 4x4 version or the Nextion display version. Both of which I use for manual and automated control via ASCOM
regards
Robert
Nextion Display version
https://sourceforge.net/projects/arduinoascomfocuserpro2diy/files/myFocuserPro2N%20NEXTION%20TFT%20DISPLAY/
Keypad Version
https://sourceforge.net/projects/arduinoascomfocuserpro2diy/files/Gerber%20Files/DRV8825HW203/DRV8825HW203_FIRBT/
and
https://sourceforge.net/projects/arduinoascomfocuserpro2diy/files/OPTIONS/Keypad%204x4%20Matrix%20Membrane%20using%20I2C%20and%20PCF8574/
Robert,
sorry for dxf (sent in error), here is jpg.
I just found rotary encoder mentioned in configuration file, but apparently it is not available in ULN2003 build.
I can see that encoder is connected to pins 9, 10, 11, so I can't have buttons at the same. which is fine. How can I activate it?
Last edit: Bojan Stajcar 2021-08-07
I did not make a rotary encoder version for ULN2003, so you would have to make your own design + code.
OK, thank you.
I am working on it now, if/when done I will put it here.
Robert,
I managed to "marry" ULN2003 board and rotary encoder - it is a bit of a patchwork, but it reads encoder and moves the motor accordingly, apart from other functionality relevant to ULN2003 board.
I noticed it doesn't automatically update the focuser position as encoder is moved, to do it I have to click on "Get Position" button. Is this is how the other variants of f/w behave, or should I try to implement this as well?
You have to change the state of
myfocuser.lcdupdateonmove
You can do this on the Windows app-
on the Display Tab, by Checking this
Update Position When Moving (Controller)
Once checked, the position will update on the Display of the controller when moving.
Robert,
Thank you.. I tried your suggestion, but it still works only if I click "Get Position" on Main tab, so something is still missing in that code. Never mind, what I have now (remote via USB and local encoder) is quite sufficient for my needs at the moment.
BTW, I don't have LCD display, the circuit is very basic - I have only ULN2003 and encoder connected to Nano board.
Thanks again,
Bojan
Last edit: Bojan Stajcar 2021-08-24
When connected
On the logging tab you will see a group "Position update"
set the time to 5s by clicking the 5s radio button
Check refresh position checkbox
and it will update position every 5s
It is worth noting, that if you were to do the following
1. use +500 to goto 5500
2. wait for the move to end
3. use the rotary encoder to move +20 steps
4. use +500 again
the focuser should end up 6200
Before any move request is done using the windows app, the position is read from the controller first, and does not use the position in the text box. . It does it that way for exactly that reason (push buttons, rotary encoder, infra-red remote, joystick) all alter the position without the application knowing.
The application also queries the ismoving state from the controller before deciding if it should send the move request. This is so that if the focuser is moving because of some other reason (rotary encoder), it does not cause a conflict.
There are three properties that can be returned at any time (even if the focuser is moving), These are
temperature
ismoving
position
Most of the Arduino type implementations use a simple send response exchange
The application sends a command, the arduino responds with an answer
This makes code easy to write. However, if you want the Arduino to be able to send data at any time (indicating a change) then it becomes more complicated (not impossible - just more code)
Regards
Robert
Robert,
Final position is displayed correctly after clicking "Get" or jog or "Go to", but when I set logging to 5s and move encoder, after some time (longer than 5 sec) there is a message displayed "Focuser is moving, update ignored".
So it seems my "patchwork" is still not complete, app thinks motor is moving but this is definitely not the case. I have to have another look into the code...
But... as I mentioned earlier, it OK as it is.
I asked the question only because I think the position was updated after pressing a button.. and now there is no change when encoder stops moving.
Last edit: Bojan Stajcar 2021-08-25
Well, now it works, refreshing position every 5 sec. Not sure why it didn't work last time....
Maybe my PC is playing me.
Thanks again,
Bojan
Hi Bojan
Thanks for adding the RE code. It will be part of the next update.
I added a few checks - RE uses the same pins as Nokia Display, InfraRed remote and Bluetooth so that needed to be done. I also added the full Rotary Encode support in there as well.
Attached is what will be available with the next update
Cheers
Robert
Thank you!