Hi, I've had a problem since updating to v334. My build previously worked fine (I guess there's a lesson there about "if it ain't broke..."
The board is a DRV8825-HW203 (M-MT-F-BT configuration).
Anyway, since updating the firmware everything looks okay when I connect to my focuser using the INDI driver, and it reports step changes, but the motor doesn't move. When updating I only touched the firmware, no hardware changes (except for unplugging to put on my desk, and I've checked all the cables are secure and the motor resistances are correct at 27 ohms per coil). I've updated all the modified libraries in my Arduino/libraries folder, and I've checked the settings in config.h are correct, but nothing makes a difference.
I'm a bit baffled. Just after suggestions for any other things to check that I've got correct when doing the update.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would look at the TimerOne library if I were you.
Find it and delete it
then replace it with the TimerOne library supplied in the Firmware.
When you unzip the firmware, it creates a sub folder called Libraries_To_Install
You will find the TimeOne library in that folder.
Regards
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Adrian,
Did you check the coils are powered ?
By default, the firmware set coil power to 0 (.ino, line 186 -> myfocuser.coilpower = 0;)
Power can be enabled in INDI configuration
Pierre-Yves
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, strange...
One clue: CPwr = 1 if coil power enabled but that doesn't mean 12 V is applied to the DRV8825. Did you try to manually rotate the motor axis to judge if current is present in the coils ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No - I can't really rotate it manually anyway, as I'm using the recommended stepper with a pretty hefty gearing ratio in the gearbox. But when you say judge if current is present in the coils, do you mean there should always be a voltage across the coils even when they aren't moving? I could check that with a voltmeter across the relevant pins on the DRV8825 board. (I don't have an oscilloscope, so it's harder for me to check voltages during movement as I assume the pulses are pretty short and won't show up properly on a voltmeter, but I could check DC voltages much more easily.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, in my case, the stepping motor is directly linked to the focuser axis via pulleys and belt so that I can make the test I proposed. Obviously, it is not possible with a geared motor.
To answer your question : yes, on a stepping motor the coils are permanently energized. The moving of one step to the following results from current polarity commutations (and also intensity if using micro-stepping). Thus you should have a DC voltage between the pins of the coils if they are fed, even if the motor do not move.
PY
Last edit: PyB 2024-06-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have 0V across the pins of my coils (and changing between coil power off and coil power on doesn't alter it). I can measure 12V across pins 15 and 16 of the DRV8825, but nothing across the coil pins.
I just remembered there is a test program, so I compiled and ran that and it successfully rotates the stepper motor. At least it rules out a hardware issue, so there's definitely something up with the config I guess.
//-----------------------------------------------------------------------// SET MOTOR POWER// turn coil power on, turn coil power off//-----------------------------------------------------------------------void DriverBoard::set_motorpower(byte state) { if (state == true) { // power on digitalWrite(DRV8825ENABLE, HIGH); delay(1); // need to wait 1ms before driver chip is ready for stepping } else { // power off digitalWrite(DRV8825ENABLE, HIGH); }}
The power on and power off lines do the same thing. The DRV8825 uses an inverted enable pin so the power on line should be:
digitalWrite(DRV8825ENABLE, LOW);
Making that change fixes the problem for me, my stepper motor once again powers up and works properly.
Last edit: Adrian K-B 2024-06-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I've had a problem since updating to v334. My build previously worked fine (I guess there's a lesson there about "if it ain't broke..."
The board is a DRV8825-HW203 (M-MT-F-BT configuration).
Anyway, since updating the firmware everything looks okay when I connect to my focuser using the INDI driver, and it reports step changes, but the motor doesn't move. When updating I only touched the firmware, no hardware changes (except for unplugging to put on my desk, and I've checked all the cables are secure and the motor resistances are correct at 27 ohms per coil). I've updated all the modified libraries in my Arduino/libraries folder, and I've checked the settings in config.h are correct, but nothing makes a difference.
I'm a bit baffled. Just after suggestions for any other things to check that I've got correct when doing the update.
I would look at the TimerOne library if I were you.
Find it and delete it
then replace it with the TimerOne library supplied in the Firmware.
When you unzip the firmware, it creates a sub folder called Libraries_To_Install
You will find the TimeOne library in that folder.
Regards
Robert
Hi Adrian,
Did you check the coils are powered ?
By default, the firmware set coil power to 0 (.ino, line 186 -> myfocuser.coilpower = 0;)
Power can be enabled in INDI configuration
Pierre-Yves
Thanks - yes, coil power is enabled in the INDI config. The oled display also says CPwr = 1 which I assume is coil power.
Ok, strange...
One clue: CPwr = 1 if coil power enabled but that doesn't mean 12 V is applied to the DRV8825. Did you try to manually rotate the motor axis to judge if current is present in the coils ?
No - I can't really rotate it manually anyway, as I'm using the recommended stepper with a pretty hefty gearing ratio in the gearbox. But when you say judge if current is present in the coils, do you mean there should always be a voltage across the coils even when they aren't moving? I could check that with a voltmeter across the relevant pins on the DRV8825 board. (I don't have an oscilloscope, so it's harder for me to check voltages during movement as I assume the pulses are pretty short and won't show up properly on a voltmeter, but I could check DC voltages much more easily.)
Ok, in my case, the stepping motor is directly linked to the focuser axis via pulleys and belt so that I can make the test I proposed. Obviously, it is not possible with a geared motor.
To answer your question : yes, on a stepping motor the coils are permanently energized. The moving of one step to the following results from current polarity commutations (and also intensity if using micro-stepping). Thus you should have a DC voltage between the pins of the coils if they are fed, even if the motor do not move.
PY
Last edit: PyB 2024-06-02
I have 0V across the pins of my coils (and changing between coil power off and coil power on doesn't alter it). I can measure 12V across pins 15 and 16 of the DRV8825, but nothing across the coil pins.
I just remembered there is a test program, so I compiled and ran that and it successfully rotates the stepper motor. At least it rules out a hardware issue, so there's definitely something up with the config I guess.
This is the user-editable part of my config.h:
Last edit: Adrian K-B 2024-06-02
This issue was fixed in firmware 335
@brownrb I found a bug in myBoards.cpp...
The power on and power off lines do the same thing. The DRV8825 uses an inverted enable pin so the power on line should be:
Making that change fixes the problem for me, my stepper motor once again powers up and works properly.
Last edit: Adrian K-B 2024-06-02
Bingo! Classic forgetting when copying/pasting ;-)
Thanks for the pointers along the way @pyb :) you definitely helped me narrow it down.