{"action":"opened","issue":{"url":"https://api.github.com/repos/teemuatlut/TMC2208Stepper/issues/21","repository_url":"https://api.github.com/repos/teemuatlut/TMC2208Stepper","labels_url":"https://api.github.com/repos/teemuatlut/TMC2208Stepper/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/teemuatlut/TMC2208Stepper/issues/21/comments","events_url":"https://api.github.com/repos/teemuatlut/TMC2208Stepper/issues/21/events","html_url":"https://github.com/teemuatlut/TMC2208Stepper/issues/21","id":353887143,"node_id":"MDU6SXNzdWUzNTM4ODcxNDM=","number":21,"title":"Motors produce noise & vibration when getting closer to HYBRID_THRESHOLD value.","user":{"login":"Lefuneste83","id":42672717,"node_id":"MDQ6VXNlcjQyNjcyNzE3","avatar_url":"https://avatars2.githubusercontent.com/u/42672717?v=4","gravatar_id":"","url":"https://api.github.com/users/Lefuneste83","html_url":"https://github.com/Lefuneste83","followers_url":"https://api.github.com/users/Lefuneste83/followers","following_url":"https://api.github.com/users/Lefuneste83/following{/other_user}","gists_url":"https://api.github.com/users/Lefuneste83/gists{/gist_id}","starred_url":"https://api.github.com/users/Lefuneste83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lefuneste83/subscriptions","organizations_url":"https://api.github.com/users/Lefuneste83/orgs","repos_url":"https://api.github.com/users/Lefuneste83/repos","events_url":"https://api.github.com/users/Lefuneste83/events{/privacy}","received_events_url":"https://api.github.com/users/Lefuneste83/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-24T18:38:22Z","updated_at":"2018-08-24T18:38:22Z","closed_at":null,"author_association":"NONE","body":"Hello\r\nI post my problem here as I believe it is the most knowledgeable place to find a hint of the origin of this issue.\r\nI have a custom Prusa i3 made out of 6mm aluminium sheets and high strength 10mm steel bars. All kinematics are correct with very little frictions, and alignments are also proved correct.\r\nPower supply is a Meanwell 24V 350W brand new. Voltage does not swing under load.\r\nElectronics is a RAMPS 1.4 / Mega setup running Marlin 1.1.x latest bugfix (tried other versions with same behaviour). I use the latest (3 days ago) version of your library.\r\n\r\nI have 4 TMC2208 drivers (purchased from blkbox on ebay) with protection diodes (sockets), connected with Y jumper (with 1k resistor on TX) wires to software defined serial ports (standard pinout from pins_RAMPS).\r\nM122 gives:\r\nRecv: \t\tX\tY\tZ\tE0\r\nRecv: Enabled\t\ttrue\ttrue\tfalse\ttrue\r\nRecv: Set current\t1000\t1000\t1000\t1000\r\nRecv: RMS current\t994\t994\t994\t994\r\nRecv: MAX current\t1402\t1402\t1402\t1402\r\nRecv: Run current\t17/31\t17/31\t17/31\t17/31\r\nRecv: Hold current\t8/31\t8/31\t8/31\t8/31\r\nRecv: CS actual\t\t8/31\t8/31\t8/31\t8/31\r\nRecv: PWM scale\t\t0\t0\t16\t20\r\nRecv: vsense\t\t0=.325\t0=.325\t0=.325\t0=.325\r\nRecv: stealthChop\ttrue\ttrue\ttrue\tfalse\r\nRecv: msteps\t\t16\t16\t16\t16\r\nRecv: tstep\t\t0\t1048575\t1048575\t1048575\r\nRecv: pwm\r\nRecv: threshold\t\t109\t76\t248\t49\r\nRecv: [mm/s]\t\t90.61\t130.09\t2.01\t20.17\r\nRecv: OT prewarn\tfalse\tfalse\tfalse\tfalse\r\nRecv: OT prewarn has\r\nRecv: been triggered\tfalse\tfalse\tfalse\tfalse\r\nRecv: off time\t\t5\t5\t5\t5\r\nRecv: blank time\t24\t24\t24\t24\r\nRecv: hysteresis\r\nRecv: -end\t\t2\t2\t2\t2\r\nRecv: -start\t\t3\t3\t3\t3\r\nRecv: Stallguard thrs\r\nRecv: DRVSTATUS\tX\tY\tZ\tE0\r\nRecv: stst\t\tX\tX\tX\tX\r\nRecv: olb\r\nRecv: ola\r\nRecv: s2gb\r\nRecv: s2ga\r\nRecv: otpw\r\nRecv: ot\r\nRecv: 157C\r\nRecv: 150C\r\nRecv: 143C\r\nRecv: 120C\r\nRecv: s2vsa\r\nRecv: s2vsb\r\nRecv: Driver registers:\tX = 0xC0:08:00:00\r\nRecv: \tY = 0xC0:08:00:00\r\nRecv: \tZ = 0xC0:08:00:00\r\nRecv: \tE0 = 0xC0:08:00:00\r\n\r\nMy issue is linked to the HYBRID_THRESHOLD triggering.\r\n\r\n1/ If HYBRID_THRESHOLD is not set (commented out in firmware) I can run in STEALTHCHOP or SPREADCYCLE to more than 100 mm/s without any issue apart from an increasing heat output from the motors. Drivers are well cooled (forced airflow + dual copper heatsink). It is important to note that in my setup I can print fast in STEALTHCHOP or SPREADCYCLE without any issue (mode set in firmware) up to impressive speeds. The mode is properly set when I specify it in the firmware either to one or the other mode.\r\n\r\n2/ If I set the HYBRID_THRESHOLD to any value (tried several times between 60mm/s and 150mm/s) and my movement speed is more than the value set (ie 100mm/s for a 80mm/s threshold), the drivers run in SPREADCYCLE (I can hear the different sound regime), but everything is running fine. If the movement speed is WELL BELLOW the threshold value (ie 80mm/s for a 100mm/s threshold), the movement switches back to STEALTHCHOP. So HYBRID_THRESHOLD seems to work fine.\r\n\r\n3/ Now if I set HYBRID_THRESHOLD again to any value (between at least 60mm/s and 150mm/s) but my movement SPEED is SLIGHTLY BELLOW the threshold (ie 95mm/s for a 100mm/s threshold), the motors while moving correctly (no missing steps), produce a terrible ratcheting noise which translates into quite noticeable vibrations in the structure of the printer. Now after rechecking several times lots of parameters, I realised today that this ratcheting noise always happens in this case, no matter what value I set the HYBRID_THRESHOLD level to. For instance it occurs similarly if the move is 65mm/s for a 70mm/s value, 85 against 90, 95 against 100... Behaviour occurs on all 3 axis (with lower values for Z of course). The closer the move speed gets to the threshold value, the stronger the effect, and it seems to be linear (it appears progressively and increases until threshold value is reached). If I try to move with a value above threshold I switch to SPREADCYCLE and it runs smoothly again.\r\n\r\nMy hypothesis are as follow:\r\n-My motors could have a problem (They are original Kysan 42BYGH4806-DC rated up to 1.5A). The problem occurs on all 3 axis, so it would be a wiring issue or design issue from the manufacturer.\r\n-There is a parameter in Marlin which I have not seen and which has a link with PWM, switching frequency or another driving parameter. The behaviour I see would then be an indirect effect of this setting.\r\n-There is a problem in the way the movement is either coded or interpreted making the speed value jittery (I don't know how the driver detects the speed). \r\n-Rsense value, microsteps or other parameters are not properly programmed in the driver by the firmware\r\n\r\nThe effect is strong and noticeable and now completely reproducible.\r\nI have tried various values of Marlin.\r\n\r\nFor the moment I am going to disable hybrid mode completely as STEALTHCHOP is working fine up to 100+mm/s, but I have not been able to find a single post with this issue on the Internet...\r\n\r\nFor diagnostics purpose I can use an oscilloscope, but I don't have a logic analyser.\r\nI'll be glad to provide any settings if needed.\r\n\r\nThanks\r\n"}}
{"actor":{"display_login":"Lefuneste83"}}