Uncategorized


tlfong014319
Sat 18:11Yes, good idea to use RpiZ2W for swap troubleshooting.Now I am making some reading summary.

user image

Ah, locking up supper time. See you later.  1 day later… tlfong014319Sun 21:12Hi there, I am back. Now I am reading this document:TMC2130-V3.0 Module User Manual – Shen Zhen Big Tree Tech
grobotronics.com/images/…I am reading the following product at the same time:TMC2130 V3.0 SPI Stepper Motor StepStick Mute Silent Driver with Heatsink for 3D Printer Control Board 4 Packs – KingPrint, Amazon, £31 for 4 (£7.8 each)
amazon.co.uk/gp/product/…tlfong014319Sun 21:30The product sheet includes something like an “Evaluation Board”. We might need to read the boards’ documents later:

user image

tlfong014319Sun 21:46The user manual is not very clear. But I think the most important thing is this:To select Step/Dir mode, short (solder 0Ω across) the SPI jumper.

user image

Ah, bed time. See you tomorrow.  6 hours later… johnMon 3:31I have asked the Amazon seller for clarification on which mode I can use. I’ve tried on the new RaspPi Zero 2 and there’s no change.  7 hours later… tlfong01Mon 10:18I just got this msg: “This account is temporarily suspended to cool down. The suspension period ends in 7 days.” tlfong014319Mon 10:40The following article describe how to wire the TMC2160 to do standalone operation mode:elektormagazine.com/news/…And this tmc2160 board looks good:Makerbase MKS TMC2160-OC Motor Driver for 3D printing, big current, super silent ¥77
item.taobao.com/…  5 hours later… tlfong014319Mon 16:18And just now I placed my tmc2160 order.

user image

  2 hours later… tlfong014319Mon 17:51AliExpress is also selling this MakerBase MKS2160 driver, at US$14:Makerbase – MKS TMC2160 Stepper Motor, 3D Printer Driver, High Torque Parts, Ultra Quiet for Gen L SGen – AliExpress US$14
fr.aliexpress.com/item/…tlfong014319Mon 18:06I never heard of MKS Sgen L. So I googled:MKS SgenL – AliExpress
aliexpress.com/w/…

BIGTREETECH – TMC2130 V3.0 SPI TMC2208 UART Stepper Motor 3D Printer Driver Parts For SKR V1.3 V1.4 PRO MKS sGEN L A4988 TMC2209 – US$5.25
fr.aliexpress.com/item/…tlfong014319Mon 18:27Yesterday I wrongly thought that the MKS SGen L board was the TMC2209 official eval board and should be very expensive. Now I know that MKS SGen L board is not too expensive, only US$22.Makerbase 3D Printer Parts MKS Gen_L 2.1 Control Board Support TMC2209 2208 Uart Gen L Mode – AliExpress US$22
fr.aliexpress.com/item/…

Drivers_MKS_TMC2209 makerbase edited this page on Aug 31, 2020
github.com/makerbase-mks/…Ah, locking down supper time! See you later. johnIt seems 2209 would be a good option but I want to control multiple steppers and be able to select which ones are moving, so SPI seems like the best(only?) way to go.  2 hours later… tlfong01Mon 20:11Ah, actually both the 2209 UART and 2160 SPI method can handle at least 512 motors. Let me start with the 2209 and show you how the 2209 datasheet suggests a way to handle more that 4 motors. tlfong014319Mon 20:25The following two figures from the 2209 datasheet shows how to (a) address 4 motors, (b) address more than 4 motors with one port (GPIO pin) to select one of multiple motors. Actually if you are running out of GPIO pins, you can easily use GPIO port expanders such as MCP23x17 to expand to 16, 32, 64, 128, 256 ports to select one of many motors.

user image

Similarly, for SPI, you can use your own CSn (not Rpi built in) ports (GPIO) pins to select as many motors as you have Cn ports/signal lines. johnIs there SPI on the 2209? tlfong014319SPI addressing multiple devices:forums.raspberrypi.com/…Ha, that is the problem. 2209 has only UART, and 2160 has only SPI. One problem with SPI is that you cannot do long distance, perhaps less than 2 meters, over which the system would be unstable. One the other hand, UART can usually do 200 feet or longer. johnYes I’d read that previously. I’m happy to use UART but it’s slower, right? I want to be able to control 4 motors independantly. Is UART quick enought to make this possible? tlfong01Ah almost bed time. Call it a day, see you later. johnSEe you later, thanks agin for the help here. I might order the 2209 to try it out, I’m getting nowhere with the TMC2130 and it’s incredibly frustrating tlfong014319Mon 20:38Well, Page 15 pf the datasheet says the following:A minimum baud rate of 9000 baud is permissible, assuming 20 MHz clock (worst case for low baud rate). Maximum baud rate is fCLK/16 due to the required stability of the baud clock.So the upper baud limit is fCLK/16, much much faster than you would like. johnI’ll try them and look through the datasheet and see how I get on. It’s frustrating not knowing why the TMC2130 isn’t workinth though.Are the analogue switches you mention above seperate parts?  7 hours later… johnTue 4:05I’ve ordered an analogue switch and the 2209. It seems like the best way to go at the moment, and even using UART with the analog switches might be better all round anyway. Better than SPI.  8 hours later… tlfong014319Tue 11:38@john Let us look closely at the (a) tmc2130 datasheet and see if we have missed something important. (b) Silent Stepper Sick Schematic (the breakout/board/module) and find out the function of the jumpers (SPI, CFn).References:trinamic.com/products/…

(2) TMC2130 Datasheet R1.1 – Trinamic 2021jun17
trinamic.com/fileadmin/assets/…

(3) TMC2130 SPI SilentStepStick SPI Schematics- Trinamic 2017dec22
trinamic.com/fileadmin/assets/…Now the schematic:

user image

@john I more or less agree that tmc2209 is the best way to go now. For me, SPI cannot do long distance (> 30cm) so UART is my only choice. I have a couple of analogue switches (multiplexors) in my junk box, but I am not sure if using digital mux is a better way. My first step is just 4 motors without need for analogue switches.And my first step consists of 3 little steps: (a) fiddling/messing in standalone mode, using manual jumper wires/pins only, but no Rpi Pico, (b) Use Pico GPIO pins to replace manual operation, but no UART (c) UART mode to config and diagnostics, removing all jumper wires, but still need Step, Dir pins/jump wiring. tlfong014319Tue 12:19I got confused with all the jargons of the tmc2xxx/3xxx stuff, because I came from the A4899/TB6600 world. So I need to read a FAQ:SilentStepStick FAQ – Watteroot
learn.watterott.com/…  2 hours later… tlfong014319Tue 14:48I also found that I misunderstood/misinterpreted many tmc things I read, including the following:(1) I told you that tmc can only do SPI or UART, but not both. I was wrong, tmc5xxx can do both SPI and UART, though 5xxx is a bit expensive, and commercial modules seems can do SPI only. Unluckily I cannot edit my old chat record. Perhaps when we finish our chatting, I will write a summary, including a long errata list.Some more references:TMC5160 Datasheet – Trinamic
trinamic.com/fileadmin/assets/…

TMC2226 Datasheet – Trinamic
trinamic.com/fileadmin/assets/…

TMC2209 and TMC5160: Guide for MKS Gen L and SKR V1.3
youtube.com/…

TMC2100 guide Part 1 Stepper driver upgrades – How to set VREF & firmware – Teaching Tech 2019feb23
youtube.com/…

TMC2208 guide Part2 Stepper driver upgrades – Teaching Tech, 2019feb26(see full text)tlfong01Tue 15:38So, TMC5160 can address up to 256 slaves, and no analog switch/mux is required.  2 hours later… tlfong014319Tue 17:18The time has come to test TMC2130. As said earlier, I will test in 3 steps:Step 1 – Standalone mode – No Rpi Pico, only manual jumper wires, and a square wave sig gen.

user image

  2 hours later… john1752Tue 19:03Let me know how you get on with the TMC2130. I’ll be sending mine back anyway I think to avoid any trouble. 5160 doesn’t seem too badly priced if it’s a better option eventually but the 2209 will do for now. I just need something to run so I can code the rest. 5160 does need external MOSFETS apparently, so keep that in mind if you are thinking of buying those. The step controlling looks better though tlfong014319Tue 19:17Ah, I did not notice that 5160 need external MOSFETs, that is a big problem for me doing prototyping. I only plan to use 5160 later, perhaps 2 years from now. I am keeping in mind 5160 things for future plans (SPI/UART 2 in 1, can address 256 motors etc). For now I will be messing with 2130/2160 SPI, and 2209 UART. I think almost all 2130/2209 knowledge and skills can easily be ported to 5xxx.I have started 2130, going very slowly. I am using the following motor:

user image

Ah, locking down supper time. See you later.  1 hour later… tlfong014319Tue 20:28

user image

tlfong014319Tue 20:50Now I am using this stepdown voltage regulator to test the stepper motor:XL4015 1.25 to 36V DC-DC 5A Stepdown Module
components101.com/modules/…tlfong014319Tue 21:09

user image

  13 hours later… tlfong014319yst 10:37Now I am browsing other forums to see how other guys a playing with TMC2130. I found many questions have no reply. Here is an example: stackoverflow.com/questions/….The question is to set the stepper motor’s speed, which is proportional to the step rate.I guess I might try this using my TMC2130 testing rig.  4 hours later… tlfong014319yst 14:48Other tm2130 hobbyists seem not quite understand the relationship between step rate and motor speed, so I am thinking of using a square wave signal generator to explain how we can dreive the motor speed from step rate.For the standalone mode testing I am doing now, I will be using a sig gen to send the step signals to the tmc2130 driver. In other words, no Pico software now. It is the next step I will be using Pico generated stop pulses to replace the external, manually adjusted frequency sig gen.

user image

Reference of the step/sig gen:How can Rpi4B python UART talk to XY PWM Signal Generators? – Rpi SE, Asked 2019oct20, Viewed 813 times
raspberrypi.stackexchange.com/…I forgot to mention that this cheapy PWM sig gen is only US$2. tlfong014319yst 15:07Now I am staring at the tmc2130, and thinking of how to select:(a) manual hardware pin config mode, or(b) software UART config mode.

user image

tlfong014319yst 15:24@john Ha, it is only now that I have a chance to look at the real thing then I understand why you said why you could not find the “SPI jumper”. The reason is that the photo we are looking at does not match the real thing we are looking at. I need to find if it is a version difference.The tmc2310 I just received is version 1.1. What is your version?

user image

tlfong01yst 15:38Ah, locking down afternoon tea time. See you later.  3 hours later… tlfong014319yst 18:11TMC2130 SPI Jumper Explained:I used a multimeter to verify that the SPI jumper is actually sort of “SPI Enalbe/Disable” jumper. If this jumper shorted by the SMD 002 resistor, or just a solder blob, then the TMC23010’s SPI pin is shorted to ground, thus disabling the SPI function.@john So if your board’s SPI jumper is open, it means SPI signal is disabled. To set SPI mode, you need to remove the resistor/solder blob.Now my board’s SPI jumper is shorted, so I can now ready do standalone mode of configuration, using the config pins CFG/MF pins, but still need to use the Step/Dir pins to move and set direction of the motor. Later if I wish to do SPI configuation, I would remove the 0 Ohm resistor (SMD marked 0 or 002) or the solder blob.

user image

  3 hours later… tlfong014319yst 21:42So I am wiring the tmc2130, but found a big problem. As uploaded above the pinout on the power/coil side is like this:VM, GND, 2B, 1B, 1A, 1A, Vcc, GNDWhat should I do now?Bed time anyway, so I should go to bed. 🙂  16 hours later… tlfong01431913:30Now I have the sig gen scope, and psu ready to test the tmc2130. The sig gen is set to output 1kHz, 50% duty cycle, as the step output for tmc2130. Scope is set to display the step signal. PSU is set to output 15VDC 5A max, to step down to 12V 5A to power the stepper motor.

user image

  3 hours later… tlfong01431916:19Now I have wired up the tmc2310 v1.0 for standalone mode testing, as briefly described below:1. Logic/Motor Power and Motor Coil: Gnd, 3V3 (Logic Power), A2, A1, B1, B2, Gnd, 12V (Motor Power)2. SPI Jumper – Shorted (Solder Blob, 0Ω, SMD 002) to select Standalone Mode.3. MicroStepping Select 1 Step, CFG2 (CLK) = Gnd, CFG1 (MISO) = Gnd, No Interpolation, No SpreadCycle.4. CFG6 (Driver Enable), Gnd = Enable, Vio (3V3) = Diable, Open = Enable + Ramp Down.5. Dir = Gnd (CCW)6. Step = XY-LPWM3 1kHz ~ 5kHz, 50% Duty Cycle.

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.