Hey Robert! I sent you an email about test code for another issue and talked about this in it, but figured this might be better place to bring it up and with some more info.
I ordered some Nano's and they are the newer USB C version. I created a stripboard with the Nano and a DRV8825. It was working fine and then all the sudden when trying to connect I get an error on the GUI of " Error invalid data", the log is showing it to be a associated with Case 25 Get StepSize. I thought that maybe my controller was fried, tried a new one and a different Nano, but still getting the same error.
These new USB C Nano's do not use the Old Bootloader as far as I can tell, I get an error when that's selected, and no error when I use the other option is selected. Not sure if that has anything to do with it.
One issue was my Nano wasn't taking new code even though IDE was showing successful for some reason.
The second issue is on myrotator_config.h line 24-25 I believe
Since Im using a DRV8825 driver and stripboard I had uncommented line 25, but unable to connect with that to the GUI. I tried to use line 22 "DRV8825 driver with a NEMA stepper motor" and no more errors. I was reading it as line 22 is for when you are using a PCB and line 25 is for when you are using a stripboard.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Run the program ClearEEPROM in the tests folder when the firmware zip file is unzipped
wait for program to finish (writes to the serial port) takes around 1minute to complete
Next, reprogram the chip with the firmware.
Then run the Windows app
Before connection. logging tab, check Messages, then goto the connection tab, set comport and comport speed (9600) and connect to the controller.
If it fails please send me the windows log file.
regards
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey Robert! I sent you an email about test code for another issue and talked about this in it, but figured this might be better place to bring it up and with some more info.
I ordered some Nano's and they are the newer USB C version. I created a stripboard with the Nano and a DRV8825. It was working fine and then all the sudden when trying to connect I get an error on the GUI of " Error invalid data", the log is showing it to be a associated with Case 25 Get StepSize. I thought that maybe my controller was fried, tried a new one and a different Nano, but still getting the same error.
These new USB C Nano's do not use the Old Bootloader as far as I can tell, I get an error when that's selected, and no error when I use the other option is selected. Not sure if that has anything to do with it.
Thanks!
Log:
7/8/2024 6:18:57 PM: ConnectBtn_Click START
7/8/2024 6:18:57 PM: ConnectBtn_Click Connecting to Controller
7/8/2024 6:18:57 PM: ConnectBtn_Click Com Port Selected = COM30
7/8/2024 6:18:57 PM: ConnectBtn_Click COM Port Speed: 9600
7/8/2024 6:18:57 PM: ConnectBtn_Click Set readtimeout to 5000
7/8/2024 6:18:57 PM: ConnectBtn_Click Attempting to Open COMPORT COM30
7/8/2024 6:18:57 PM: ConnectBtn_Click Check if serial port opened
7/8/2024 6:18:57 PM: ConnectBtn_Click Comport=isOpen
7/8/2024 6:18:57 PM: ConnectBtn_Click COM Port Opened
7/8/2024 6:18:57 PM: ConnectBtn_Click Serial port COM30 opened.
7/8/2024 6:18:59 PM: ConnectBtn_Click Query controller
7/8/2024 6:18:59 PM: Read_CheckConnection START
7/8/2024 6:18:59 PM: Read_CheckConnection Connected
7/8/2024 6:18:59 PM: SendString START
7/8/2024 6:18:59 PM: SendString Sending=:28#
7/8/2024 6:18:59 PM: SendString END
7/8/2024 6:18:59 PM: ReceiveResponse START
7/8/2024 6:18:59 PM: ReceiveResponse Connected
7/8/2024 6:18:59 PM: ReceiveResponse Controller response: $OK
7/8/2024 6:18:59 PM: Read_CheckConnection response = OK
7/8/2024 6:18:59 PM: Read_CheckConnection Connected
7/8/2024 6:18:59 PM: ConnectBtn_Click Connected
7/8/2024 6:18:59 PM: ConnectBtn_Click Connected
7/8/2024 6:18:59 PM: Read_FirmwareName START
7/8/2024 6:18:59 PM: Read_FirmwareName Connected
7/8/2024 6:18:59 PM: SendString START
7/8/2024 6:18:59 PM: SendString Sending=:11#
7/8/2024 6:18:59 PM: SendString END
7/8/2024 6:18:59 PM: ReceiveResponse START
7/8/2024 6:18:59 PM: ReceiveResponse Connected
7/8/2024 6:18:59 PM: ReceiveResponse Controller response: $myRotator-DRV8825
7/8/2024 6:18:59 PM: Read_FirmwareName response: myRotator-DRV8825
7/8/2024 6:18:59 PM: Read_FirmwareVersion START
7/8/2024 6:18:59 PM: Read_FirmwareVersion Connected
7/8/2024 6:18:59 PM: SendString START
7/8/2024 6:18:59 PM: SendString Sending=:10#
7/8/2024 6:18:59 PM: SendString END
7/8/2024 6:18:59 PM: ReceiveResponse START
7/8/2024 6:18:59 PM: ReceiveResponse Connected
7/8/2024 6:18:59 PM: ReceiveResponse Controller response: $2024,06
7/8/2024 6:18:59 PM: Read_FirmwareVersion response: 2024,06
7/8/2024 6:18:59 PM: Read_FirmwareVersion Firmware Major Version: 2024
7/8/2024 6:18:59 PM: Read_FirmwareVersion Firmware Minor Version: 06
7/8/2024 6:18:59 PM: GetSettingsbtn_Click
7/8/2024 6:18:59 PM: GetSettingsbtn_Click Connected
7/8/2024 6:18:59 PM: GetSettingsbtn_Click Connected
7/8/2024 6:18:59 PM: GetSettingsbtn_Click Get Angle
7/8/2024 6:18:59 PM: Read_Angle START
7/8/2024 6:18:59 PM: Read_Angle Connected
7/8/2024 6:18:59 PM: SendString START
7/8/2024 6:18:59 PM: SendString Sending=:00#
7/8/2024 6:18:59 PM: SendString END
7/8/2024 6:18:59 PM: ReceiveResponse START
7/8/2024 6:18:59 PM: ReceiveResponse Connected
7/8/2024 6:18:59 PM: ReceiveResponse Controller response: $0
7/8/2024 6:18:59 PM: Read_Angle response = 0
7/8/2024 6:18:59 PM: GetSettingsbtn_Click Get motor shaft 360
7/8/2024 6:18:59 PM: Read_STEPSPERMOTORSHAFT360 START
7/8/2024 6:18:59 PM: Read_STEPSPERMOTORSHAFT360 Connected
7/8/2024 6:18:59 PM: SendString START
7/8/2024 6:18:59 PM: SendString Sending=:22#
7/8/2024 6:18:59 PM: SendString END
7/8/2024 6:18:59 PM: ReceiveResponse START
7/8/2024 6:18:59 PM: ReceiveResponse Connected
7/8/2024 6:18:59 PM: ReceiveResponse Controller response: $400
7/8/2024 6:18:59 PM: Read_STEPSPERMOTORSHAFT360 response = 400
7/8/2024 6:18:59 PM: GetSettingsbtn_Click Get rotator 360
7/8/2024 6:18:59 PM: Read_STEPSPERROTATOR360 START
7/8/2024 6:18:59 PM: Read_STEPSPERROTATOR360 Connected
7/8/2024 6:18:59 PM: Read_STEPSPERROTATOR360 Connected
7/8/2024 6:18:59 PM: SendString START
7/8/2024 6:18:59 PM: SendString Sending=:20#
7/8/2024 6:18:59 PM: SendString END
7/8/2024 6:18:59 PM: ReceiveResponse START
7/8/2024 6:18:59 PM: ReceiveResponse Connected
7/8/2024 6:18:59 PM: ReceiveResponse Controller response: $-55536
7/8/2024 6:18:59 PM: Read_STEPSPERROTATOR360 response = -55536
7/8/2024 6:18:59 PM: GetSettingsbtn_Click Get steps per degree
7/8/2024 6:18:59 PM: Read_MotorStepsPerDegree START
7/8/2024 6:18:59 PM: Read_MotorStepsPerDegree Connected
7/8/2024 6:18:59 PM: SendString START
7/8/2024 6:18:59 PM: SendString Sending=:24#
7/8/2024 6:18:59 PM: SendString END
7/8/2024 6:18:59 PM: ReceiveResponse START
7/8/2024 6:18:59 PM: ReceiveResponse Connected
7/8/2024 6:18:59 PM: ReceiveResponse Controller response: $-154.27
7/8/2024 6:18:59 PM: Read_MotorStepsPerDegree response = -154.27
7/8/2024 6:18:59 PM: GetSettingsbtn_Click Get StepSize
7/8/2024 6:18:59 PM: Read_StepSize START
7/8/2024 6:18:59 PM: Read_StepSize Connected
7/8/2024 6:18:59 PM: SendString START
7/8/2024 6:18:59 PM: SendString Sending=:25#
7/8/2024 6:18:59 PM: SendString END
7/8/2024 6:18:59 PM: ReceiveResponse START
7/8/2024 6:18:59 PM: ReceiveResponse Connected
7/8/2024 6:18:59 PM: ReceiveResponse Controller response: $nan
7/8/2024 6:18:59 PM: Read_StepSize response = nan
7/8/2024 6:18:59 PM: Read_StepSize Error invalid data nan
7/8/2024 6:18:59 PM: GetSettingsbtn_Click Error invalid data
7/8/2024 6:18:59 PM: Comms_Issue START
7/8/2024 6:18:59 PM: Comms_Issue Error Error invalid data
7/8/2024 6:18:59 PM: Comms_Issue Last command was Send :25#
7/8/2024 6:18:59 PM: Comms_Issue Serial port closed
7/8/2024 6:18:59 PM: Comms_Issue END
7/8/2024 6:18:59 PM: ConnectBtn_Click Error calling GetSettings
I ended up figuring it out!
One issue was my Nano wasn't taking new code even though IDE was showing successful for some reason.
The second issue is on myrotator_config.h line 24-25 I believe
Since Im using a DRV8825 driver and stripboard I had uncommented line 25, but unable to connect with that to the GUI. I tried to use line 22 "DRV8825 driver with a NEMA stepper motor" and no more errors. I was reading it as line 22 is for when you are using a PCB and line 25 is for when you are using a stripboard.
Hi Brannon
From the log,
7/8/2024 6:18:59 PM: GetSettingsbtn_Click Get StepSize
7/8/2024 6:18:59 PM: SendString Sending=:25#
7/8/2024 6:18:59 PM: ReceiveResponse Controller response: $nan
7/8/2024 6:18:59 PM: Read_StepSize response = nan
7/8/2024 6:18:59 PM: Read_StepSize Error invalid data nan
7/8/2024 6:18:59 PM: GetSettingsbtn_Click Error invalid data
Error reponse for get stepsize: nan returned,
Did you run the post config as described in the PDF and set stepsize?
Using PCB
// If using a DRV8825 driver with a NEMA stepper motor, uncomment next line
#define DRVBRD ROTATORDRV8825
Using StripBoard
// If using a DRV8825 driver and stripboard, uncomment next line
#define DRVBRD ROTATORDRV8825_SBRD
reqards
Robert
Hey Robert,
What page talks about the post config for setting stepsize?
Hi Brannon
myRotator-User-Guide-24-09.pdf
ROTATOR SETUP
pgs41 to 44
StepSize is a constant and should not be changed. It does not have the same meaning as in a focuser. In a rotator stepsize refers to (from pg 52)
STEPSIZE
Is the minimum movement of the rotator expressed as an angle (1 degree), as set as 1 degree
The current firmware only supports 1 degree, there is no support for sub-degree resolution at this time.
Regards
Robert
Robert,
Wouldn't I need to be connected to the app to be able to set this? The error Im getting is upon connecting.
I discussed the windows application log file,
You appear to have a corrupted firmware settings
Next, reprogram the chip with the firmware.
Then run the Windows app
Before connection. logging tab, check Messages, then goto the connection tab, set comport and comport speed (9600) and connect to the controller.
If it fails please send me the windows log file.
regards
Robert