« first day (1 day earlier)      last day (25 days later) » 

8:06 AM
Now I apply 5kHz, 50% duty cycle to the L298N, N20 motor turns at 34 rpm.
 
 
2 hours later…
9:43 AM
I also tried 2kHz and 1kHz, and found speed ~= 42 rpm. So I concluded that 1kHz is good benchmark frequency.
Next step is to keep applying 1kHz, but vary duty cycle, to confirm if higher duty cycle means higher speed.
 
 
1 hour later…
10:55 AM
Now then, 1 kHz, 50%, 90%, and 20% duty cycle results. (10% duty cycle cannot start motor.)
Results summary: 20% dc = 27.3 rpm, 50% dc = 4.16 rpm, 90% dc = 47.6 rpm
 
 
2 hours later…
12:40 PM
Test Results Summary and Excel Chart.
-------------------------------------------
L298N N20 Test Results
-------------------------------------------
DutyCycle (%)   0   10    20   50   90  100
Speed (rpm)     0    0  27.3 41.6 47.6   56
-------------------------------------------
The time has come to do some Pico MicroPython dual core programming.
 
 
1 hour later…
1:45 PM
Now I have written a very basic test function to run the N20 motor for four seconds. Next step is modifying this function to run the motor at specified speed (duty cycle) for a specific time (as small as a millisecond).
# L298N Config/Functions

l298nEnblPinNum   = 20
l298nIn1PinNum    = 21
l298nIn2PinNum    = 22

def l298nDsblDriver(enblPinNum):
    enblPin = gpOutPinDict[str(enblPinNum)]
    setGpOutPinLow(enblPin)
    return

def l298nSetDirCcw(in1PinNum, in2PinNum):
    in1Pin = gpOutPinDict[str(in1PinNum)]
    in2Pin = gpOutPinDict[str(in2PinNum)]
    setGpOutPinLow(in1Pin)
    setGpOutPinHigh(in2Pin)
    return

def l298nSetDirCw(in1PinNum, in2PinNum):
    in1Pin = gpOutPinDict[str(in1PinNum)]
    in2Pin = gpOutPinDict[str(in2PinNum)]
Locking down bed time. Call it a day. See you tomorrow.
 

« first day (1 day earlier)      last day (25 days later) »