-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Motor Spin after M17 command #3
Comments
I have exactly the same problem in rotation after shutdown |
I'm ordering the MKS closed loop board. I'll let you know if MKS brand exhibits the same problem, in 2-3 weeks. Shipment has been really slow from China to U.S. |
I will wait for feedback from you. |
I ordered MKS from AliExpress. It hasn't arrived after more 2 months. I disputed this with AE but seller (MKS) keeps extending protection program. AE only allows dispute if the protection program is expiring in a day. The computer generated response from AE keeps saying my dispute is invalid. So, I call my bank to charge back. I gave up MKS. Anyway, I gave up with this closed loop stuff as it doesn't have the advanced smoothing feature like Trinamic drivers. It's loud and vibrates my print bed. Lowering the current seems to help but sacrifices max speed. Even after I found all the disable motor-off feature in Marlin and Klipper firmwares to avoid the jump from re-enabling, I think this closed loop solution gives worse bottom line result. To top it off, the magnet always gets loose. I used all different type of glues, cement, superglue, epoxy, etc. They don't help. Especially, the ones I used in the extruders with linear/pressure advance feature (linear advance causes the motor to spin back and forth very fast and for short distances, aka violent jerking). So, in the end I realized that closed loop motor this cheap ain't cut it. If you want to go closed loop, get one with $100s/axis. Plus, if your non-closed loop stepper is skipping steps, there is other fundamental issue that needs to be addressed. But for sure not going with closed loop. Back to Trinamic. |
Thank. But I need a device not for a 3D printer. |
Perhaps, you should use the more expensive version (about 3x more). They use more expensive components even down to the passive ones like bigger capacitor, tighter tolerance. When it comes to closed loop control, I re-learned (I started a company that designed and manufactured robots for semiconductor industry) that you get what you pay for. You can always keep track your steps with the software. The software is the one doing the stepping anyway. |
And if your usage include moving the motor with a lot of high accel and decel, the magnet could be another problem. |
I need to control the steps for a water pump system. Need high accuracy +/- 0.005 ml liquid |
I finally got my MKS boards but decided that the motion smoothness is more important when it comes 3D printing and decided not to bother with it. I have 1 board set with OLED and 4 just board set that I want to sell. If you are in US, I can sell them to you at cost + shipping. Cheaper than you find on eBay. |
Thank. |
Ukraine. Remind me of my a friend who told a story about Chernobyl cleanup when he was in the Army there. |
I experience the same issue for my FDM extruder after powerdown and enabling again. It always stripped my filament as it retracted with max speed x100m of filament. ;) Simple solution was to disconnect the enable-pin from the cable-connector and bridge the enable signal on the stepper PCB to GND (active low) with a dupont wire. |
I flashed today the latest firmware out of this repo to adjust the PID values a bit and now the enabling/disabling of the stepper driver does not result in any erratic spinning anymore. I guess, the issue got solved by the devs before uploading the code here. |
How did you upload the firmware? |
Took the pinout from here: https://github.com/bigtreetech/BIGTREETECH-S42B-V1.0/blob/master/Item-Pinmap.PDF SWCK, SDO, GND are required - you can also disconnect the board from the supply and plug in the 3v3 from the programmer. changed in main.c the D value for the PID loop to improve a tiny bit the extrusion performance: For later reference I downloaded the binary from the S42B before uploading the edited one. |
I hooked up those 3, plus 3.3V, pin for pin over to my generic STLink2 dongle. The dongle mounts in Windows, but beyond that, I can't get anything to talk. Should it show up as a com port? Do I need a driver for the motor controller board (S42B) itself? Do you upload firmware with the SerialPort Assistant, Arduino, VS, or what? I have a feeling I have a bad board, but trying to see if I can get it talking. It holds position, calibrates, works with the screen - but won't register steps from printer. I even recompiled to get the longer pulse widths, still a no go. Thanks - sorry for the off topic post - perhaps having the process more explicitly laid out will help others in the future. |
depending on the dongle you have, it should show up as a generic USB device "STM32 STlink" or as a "ST-Link Debug" (STLink v3) with an additional COM-port. Do not connect the 3V3 parallel to powering the board itself. There can only be one supply voltage and you could damage either supply (most likely the dongle, if it is a cheap clone). For coding, I work with platform.io in as a plugin from the market inside visual studio code (https://code.visualstudio.com/). You can upload the binary via visual studio itself if you configured your dongle correctly in the platformio.ini via upload_protocol. good luck. |
Thanks for the detailed response!
EDIT: I didn't have the +5V pin hooked up on the stepper driver socket in my printer. Apparently, while the unit will turn on, hold position, etc, you can't talk to it with the programmer that way, and you can't send steps from the printer that way. All fixed now, the rest of this post is pretty pointless and you can ignore it.
=====================================================================
1) I have the printer shut off, and the 3.3 line from the programmer
(programmer powered from usb) powering everything. Is this ok?
<B>NO! Power this from printer with both +5 and +12V</B>
2) I've had the OLED screen plugged in - is that an issue? I've tried both ways. I put the board in Open Loop mode (sw3 OFF) during this.
3) In Device Manager, under "Universal Serial Bus devices" I have "STM32
STLink", but I have no entries under "Ports" as I would expect with a
serial adapter plugged in. Do you feel that is because I don't have a
driver for the S42B on the computer, or because I may not have fully
installed the STLink?
<B>Some reading tells me it's a change in Windows10 where the virtual port isn't needed anymore. Not sure how it would work in Serial Assistant, but I was able to program it with STLink.</B>
|
Ah, ok. So I didn't have 5V run to the driver's socket, so the little adapter board wasn't sending said +5v to the S42B. I checked that I could talk to another SM32 board (one of those Arduino Nano looking deals). Your pinout was helpful. Now with that jumpered, I was able to flash your firmware onto it. Everything works including printer commanded moves. I just need to remove the jumper and Say It With Solder and I may actually be able to print stuff again. Thanks for all the help!!!! Does that have the bug fixed with the jumping when "enabled" is un-asserted? |
Still sufferings inconsistent connections. Sometimes it doesn't work without being plugged into printer, sometimes it doesn't work IF it's plugged into the printer, I'm getting a replacement programmer but I suspect it's the board. Aside from that, I need to change my PID values, and had some questions for @Quas7 :
Can you explain what you mean here - you mean the enable pin from the printer being asserted? So the bad state is dependant on the firmware settings? I've had the board unplugged from the motor and oled when programming. I don't think I have the same issue as you, mine gets the first line (initializing oled) then resetting, so it's just flashing that message at ~2 Hz.
Have you used this for any movement axis? I was getting run away oscillations on my CR-10 and wondering what good starting numbers might be.
Can you explain what that error is so I can verify it's removed from my firmware? |
@AbeFM You can set the "enabled active high or low" via the menu to switch the driver stage off during programming. My PID settings are only for my extruders and naturally they feature a quite heavy dampening that prevent oszillations. The "reset to zero bug after re-enabling" is fixed in this repo. But units currently sold (I have 3 of them bought over 3 month) seem to have an older firmware. |
Ah, thanks again for a good answer. I'm unfortunately reasonably versed in PIDs, but have never had a case I COULD just tune like that. I guess the problem is you're reading the pulley, not the stage, probably making things worse. Anyway, I'll try it when I managed to get it flashed - even if I didn't need to I've always wanted to use the phone accelerometer for something useful. Ah, ok, thanks for the answer: Making sure it's not enabled. Which pretty much means "does motor freewheel", if it's holding it, you'll know. It would be awesome if (along the lines of "it's not a design issue) they let you flip a DIP switch to get into reliable programming mode. :-) |
If they just broke-out the BOOT0 pin of the MCU to the DIP switch (or some extra jumper) we could have used the internal system bootloader to easily flash new firmware with only a normal USB to Serial bridge... |
After auto-disable timeout, sending M17 (enable) will cause motor to jump to almost the end of travel of an axis. Is there work around?
Thanks
The text was updated successfully, but these errors were encountered: