I'm trying to build 2 focusers using this project, and my prototype isn't getting off the ground.
I'm using a 5v 28BYJ-48 stepper with a ULN2003 control board connected to a Teensy 2.0 compiled in Arduino IDE 1.8.16 with Teensyduino. I have confirmed all the hardware is working by running the example stepper motor file from Arduino, but when I compile myFP2_ULN2003_312 nothing seems to happen.
Reading through the code and a couple other similar posts on this forum, I tried to do some debugging, but I am getting no where. I have specified the correct pinouts in myBoards.h and disabled BUZZER and INOUTLEDS in focuserconfig.h. Once I started debugging, I also uncommented DEBUG and SERIAL_Debug in myDefines.h. Other than this, I have not made any code changes.
First, like another poster from a few weeks ago, I receive the following error when trying to connect to the correct COM port in myFocuserPro2 Windows Application:
Timeout Exception in ReceiveResponse: : No response from the controller
However, if I try again, I get a further error:
Exception occurred sending to controller. Possible wrong port or controller OFF or disconnected . Please Disconnect.
When I start the Arduino with the Serial Monitor open and both debugs I mentioned above enabled, I can see the setup() block execute:
Load DRVBRD
Load DRVBRD end
fcurrentposition=5000, ftargetposition=5000
Setup end
Config saved
However, it seems something is going wrong in loop(), because as I send commands to it (:04# and :GF# as mentioned in a previous thread) nothing happens. I went further to add a println inside the if ( queue.count() >= 1 ) block, but this print is never executed.
Any thoughts on this? The Teensy/Teensyduino is the only variable I can think of compared to the PDF documentation, but I have successfully compiled a few projects before to one with no issue. I don't have another type of Arduino available to test this however.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
I did point out in another thread that using the teensy or nano every is not recommended
The simplest way fo test if the controller is responding
Plug in the controller via usb cable
Start arduino ide
Open serial port monitor
Set to 9600, no line feed
In top text field, type :00# then click send
If you get Pxxxx# then it is talking.
I make no assurances re teensy or every
It is always good to start with things clean. Because that
eliminates old data from corrupting new data.
To do that with a Nano, I would suggest
1. use clear eeprom test program first to erase old data
2. use firmware 312
3. uninstall existing windows app using control panel
4. install windows app myFocuserPro2_2_4_8_8
5. uninstall ascom driver using control panel
6. install ascom driver myFP2ASCOMSetup281.exe
If using INDI then the latest myfocuserpro2 INDI driver works well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I bought some Arduino Nanos and now the sketch compiled great. Sending a bunch of commands through the serial monitor is working (including 05 to reposition). However, now the myFocuserPro2 application will not connect to the focuser. In case it matters, I am running your Arduino code version 312 and the App version 2.4.8.8.
I get no error when clicking connect in the Connection tab, however there is a message that indicates a timeout in the status tab. The log file tells a different story, however:
That looks very very odd. Little of that matches the code in the actua;l windows app.
You did not say what the name of the firmware file was, so a stab in the dark here
Please check your mydefines,h file
//-----------------------------------------------------------------------
// DEBUGGING
//-----------------------------------------------------------------------
// do not change - leave this commented out
//#define DEBUG 1
I did comment those back out, but I just compiled again and it seems to be working. I must have not reuploaded yesterday after commenting out those debug lines.
Thanks for all the help. Hopefully I don't need any more as I design and print a case and integrate with NINA.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to build 2 focusers using this project, and my prototype isn't getting off the ground.
I'm using a 5v 28BYJ-48 stepper with a ULN2003 control board connected to a Teensy 2.0 compiled in Arduino IDE 1.8.16 with Teensyduino. I have confirmed all the hardware is working by running the example stepper motor file from Arduino, but when I compile myFP2_ULN2003_312 nothing seems to happen.
Reading through the code and a couple other similar posts on this forum, I tried to do some debugging, but I am getting no where. I have specified the correct pinouts in myBoards.h and disabled BUZZER and INOUTLEDS in focuserconfig.h. Once I started debugging, I also uncommented DEBUG and SERIAL_Debug in myDefines.h. Other than this, I have not made any code changes.
First, like another poster from a few weeks ago, I receive the following error when trying to connect to the correct COM port in myFocuserPro2 Windows Application:
Timeout Exception in ReceiveResponse: : No response from the controller
However, if I try again, I get a further error:
Exception occurred sending to controller. Possible wrong port or controller OFF or disconnected . Please Disconnect.
When I start the Arduino with the Serial Monitor open and both debugs I mentioned above enabled, I can see the setup() block execute:
Load DRVBRD
Load DRVBRD end
fcurrentposition=5000, ftargetposition=5000
Setup end
Config saved
However, it seems something is going wrong in loop(), because as I send commands to it (:04# and :GF# as mentioned in a previous thread) nothing happens. I went further to add a println inside the if ( queue.count() >= 1 ) block, but this print is never executed.
Any thoughts on this? The Teensy/Teensyduino is the only variable I can think of compared to the PDF documentation, but I have successfully compiled a few projects before to one with no issue. I don't have another type of Arduino available to test this however.
Hi
I did point out in another thread that using the teensy or nano every is not recommended
The simplest way fo test if the controller is responding
Plug in the controller via usb cable
Start arduino ide
Open serial port monitor
Set to 9600, no line feed
In top text field, type :00# then click send
If you get Pxxxx# then it is talking.
I make no assurances re teensy or every
It is always good to start with things clean. Because that
eliminates old data from corrupting new data.
To do that with a Nano, I would suggest
1. use clear eeprom test program first to erase old data
2. use firmware 312
3. uninstall existing windows app using control panel
4. install windows app myFocuserPro2_2_4_8_8
5. uninstall ascom driver using control panel
6. install ascom driver myFP2ASCOMSetup281.exe
If using INDI then the latest myfocuserpro2 INDI driver works well.
Hi,
I bought some Arduino Nanos and now the sketch compiled great. Sending a bunch of commands through the serial monitor is working (including 05 to reposition). However, now the myFocuserPro2 application will not connect to the focuser. In case it matters, I am running your Arduino code version 312 and the App version 2.4.8.8.
I get no error when clicking connect in the Connection tab, however there is a message that indicates a timeout in the status tab. The log file tells a different story, however:
11/27/2021 9:49:32 PM: Connect: START=========================================================
11/27/2021 9:49:32 PM: ======CONNECT START TIME
11/27/2021 9:49:32 PM: Connect: Windows Application Version Number: myFocuserPro2 © R Brown 2014-2021: 2.4.8.8
11/27/2021 9:49:32 PM: Connect: Send nothing on connect selected.
11/27/2021 9:49:32 PM: Connect: Com Port Selected = COM5
11/27/2021 9:49:32 PM: Connect: comportbaudrate: 9600
11/27/2021 9:49:32 PM: Connect: Setting readtimeout to 5000
11/27/2021 9:49:32 PM: Connect: Attempting to Open COMPORT COM5
11/27/2021 9:49:32 PM: Connect: Check if serial port opened
11/27/2021 9:49:32 PM: Connect: Comport=isOpen
11/27/2021 9:49:32 PM: Connect: Serial port COM5 opened.
11/27/2021 9:49:34 PM: Connect: Test to see if controller connected
11/27/2021 9:49:34 PM: SendString: ==START====================================================
11/27/2021 9:49:34 PM: SendString: Connected
11/27/2021 9:49:34 PM: SendString: sending=:02#
11/27/2021 9:49:34 PM: SendString: sending=OK
11/27/2021 9:49:34 PM: SendString: =END===========================================================
11/27/2021 9:49:34 PM: ReceiveResponse: ==START====================================================
11/27/2021 9:49:34 PM: ReceiveResponse: Check if client is connected
11/27/2021 9:49:35 PM: ReceiveResponse: Controller response: recstr=02, cmdstr=02, WorkStr=
-Send:EOK
11/27/2021 9:49:35 PM: Connect: response = ecstr=02, cmdstr=02, WorkStr=
-Send:EOK
11/27/2021 9:49:35 PM: Connect: Invalid controller
That looks very very odd. Little of that matches the code in the actua;l windows app.
You did not say what the name of the firmware file was, so a stab in the dark here
Please check your mydefines,h file
//-----------------------------------------------------------------------
// DEBUGGING
//-----------------------------------------------------------------------
// do not change - leave this commented out
//#define DEBUG 1
//#define STEPMODE_Debug 1
//#define TEMP_Debug 1
//#define SERIAL_Debug 1
//#define HPSW_Debug 1
//#define BOARD_Debug 1
these should all be commented out like above
I did comment those back out, but I just compiled again and it seems to be working. I must have not reuploaded yesterday after commenting out those debug lines.
Thanks for all the help. Hopefully I don't need any more as I design and print a case and integrate with NINA.