« first day (9 days earlier)      last day (21 days later) » 

1:34 AM
@kyrpav Ah, you mean the "distantiators"!
 
 
6 hours later…
7:11 AM
Now I have started using Rpi Pico MicroPython to do the tmc2225 testing. First thing is to use Pico PWM pin to create 1kHz 50% duty cycle to replace the hardware PWM sig gen xy-lpwm3. The PWM signal creation is a simple as three lines of code:
gpPwmPin28 = PWM(Pin(28))
gpPwmPin28.freq(oneKHz)
gpPwmPin28.duty_u16(int(65535/2)) #dutyCycle 50%
The complete listing of the program is as below (the pwm signal creation is at lines 134~136)
tmc2225test68.py = penzu.com/p/de67d7f3
I used the scope to display the Rpi Pico PWM signal and found it OK:
I replaced the xy-lpwm signal by the pico pwm and found both tmc2225 controlled stepping motor moves smoothly and quietly.
 
7:37 AM
Another question on PID: electronics.stackexchange.com/questions/608956/…. Can you let me know if you are using a similar cct to to do PID of motor torque, instead of motor position?
 
 
6 hours later…
1:16 PM
Now I have written a micropython function to use GP pin#22 to toggle High/Low every millisecond, thus creating a step/pulse rate of 1,000 pulses per second (pps). I used this step pulse to input to the tmc2225 driver to verify can also smoothly move the motor, same as the xy-pwm sig gen or pcio pwm pin in earlier experiments.
The scope screen capture and complete listing of the micropython code is geven below.
tmc2225test70.py tlfong01 2022feb18hkt2109 = penzu.com/p/8a33dd91
# *** 1 kHz (1k step pps) function definition ***
def toggleGpOutPin1kHz(gpOutPinNum):
    print('Begin toggleGpOutPin1kHz')
    toggleGpOutPin(gpOutPinNum, highTime = halfMilliSecond, lowTime = halfMilliSecond, repeatTimes = once, totalToggleTimes = tenMillionTimes)
    print('End   toggleGpOutPin1kHz')
    return

# *** Sample Test ***
toggleGpOutPin1kHz(gpOutPinNum = 22)
Important tmc2225 microstep resolution setting for 1 k step pulses per second.
I found that for 1k pps, if the m1, m2 pins were set to Low, Low, then motor trembles and won't move. I need to set m1, m2 to High, High, then motor happily moves.
 

« first day (9 days earlier)      last day (21 days later) »