Large Angular Motor 45602 causes Technic Hub (88012) to disconnect or crash when initialized on Pybricks 3.6.1
When attempting to initialize or run a SPIKE Large Angular Motor (45602) on a Technic Hub (88012) running Pybricks firmware v3.6.1, the hub immediately drops the Bluetooth connection and becomes unresponsive. I have tried 2 different motors on all 4 ports. The same 2 motors work normally on a SPIKE Prime Hub with the same Pybricks version. Additionally, other sensors such as the color and distance sensor, work as expected on the Technic Hub, so it seems that only the motors are having difficulties with Pybricks.
With the following program, the hub connects to Bluetooth, prints "Initializing motor...", then pauses, disconnects from bluetooth, and stalls.
from pybricks.hubs import TechnicHub
from pybricks.pupdevices import Motor
from pybricks.parameters import Port
# Initialize the hub
hub = TechnicHub()
# Initialize the Large Angular Motor (45602) on Port D
motor = Motor(Port.D)
print("Motor initialized successfully.")
# Run the motor forward for 3 seconds
motor.run_time(500, 3000, then=Stop.HOLD)
# Now run it backward for 3 seconds
motor.run_time(-500, 3000, then=Stop.HOLD)
# Print to show it is done
print("Motor run successfully.")
I expected the motor to turn forward and backward and print messages, but the program froze during motor initialization and dropped the Bluetooth connection so no print statements were reached. I have tried all 4 ports on the technic hub with no success. I have also tried multiple programs that operate with the motor initialization line commented out, but fail as soon as I uncomment the motor initialization line. I have verified that the motors work normally on Spike Prime hub and that sensors (distance, color) work on the technic hub. The only problem seems to be the large angular motors.
This sounds like something is causing the hub to crash. I'm not sure what it could be though since most of the firmware code is shared between hubs.
You could try running the nightly build of the firmware to see if the issue has already been fixed.
https://nightly.link/pybricks/pybricks-micropython/workflows/build/master
Will do. Thank you. Just did. Even worse results. Now the motors are not even recognized by the firmware in the latest nightly build, with an error message stating that no device was connected to the target port.
Did you also try to define Stop like this:
from pybricks.parameters import Port, Stop
I get this error without it:
Motor initialized successfully.
Traceback (most recent call last):
File "issue_2395_orig.py", line 13, in <module>
NameError: name 'Stop' isn't defined
[EDIT}
Tested with
('technichub', '4.0.0a0', 'ci-build-4272-v3.6.1-523-g4cc72417 on 2025-10-07')
and
('technichub', '3.6.1', 'ci-build-3937-v3.6.1-231-gd76f61ae on 2025-07-11')
Even worse results
I would say that printing an error message is better than losing the Bluetooth connection because the hub crashed. π
Other than using a logic analyzer to spy on the signal or building a special debug build of the firmware, I'm not sure how we could debug the motors any more though. Since you said that they work fine on other hubs and other sensors work fine on this hub, it kind of rules out any hardware issues.
I included Stop this time:
from pybricks.hubs import TechnicHub
from pybricks.pupdevices import Motor
from pybricks.parameters import Color, Port, Stop
from pybricks.tools import wait
hub = TechnicHub()
print("Beginning...")
hub.light.on(Color.GREEN)
wait(2000)
motor = Motor(Port.B)
hub.light.on(Color.WHITE)
wait(2000)
motor.run(500) # runs motor at 500 deg/s
hub.light.on(Color.RED)
wait(2000)
hub.light.off()
motor.stop(Stop.HOLD)
The code never gets to the Color.White. It just freezes on Green, never making it past the motor instantiation.
I admire your positive outlookβΊοΈ
On Mon, Oct 13, 2025 at 3:28β―PM David Lechner @.***> wrote:
dlech left a comment (pybricks/support#2395) https://github.com/pybricks/support/issues/2395#issuecomment-3398960563
Even worse results
I would say that printing an error message is better than losing the Bluetooth connection because the hub crashed. π
Other than using a logic analyzer to spy on the signal or building a special debug build of the firmware, I'm not sure how we could debug the motors any more though. Since you said that they work fine on other hubs and other sensors work fine on this hub, it kind of rules out any hardware issues.
β Reply to this email directly, view it on GitHub https://github.com/pybricks/support/issues/2395#issuecomment-3398960563, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHGF76IRY3P5QTH5FSU3QL3XQDP7AVCNFSM6AAAAACJCCYDL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGOJYHE3DANJWGM . You are receiving this because you authored the thread.Message ID: @.***>
I ran your program on my Technichub and it runs fine until the syntax error on the last line
motor.stop(Stop.HOLD)
motor.stop() has no arguments.
But the program shows GREEN, WHITE and RED with a large Spike motor on Port B.
Do you see any messages in the log area below the python code? I got:
Beginning...
Traceback (most recent call last):
File "issue_2395_test2.py", line 18, in <module>
TypeError: function takes 1 positional arguments but 2 were given
No, no messages other than the printed "Beginning..." text before hub init. It just freezes on green and is silent.
Looks like a different behavior. than what you are seeing.
Just to be clear, I switched back to the stable version of Pybricks (removed the latest nightly build that wouldn't recognize that the motor was even connected to the port).
On Mon, Oct 13, 2025 at 3:59β―PM Bert @.***> wrote:
BertLindeman left a comment (pybricks/support#2395) https://github.com/pybricks/support/issues/2395#issuecomment-3399056634
I ran your program on my Technichub and it runs fine until the syntax error on the last line
motor.stop(Stop.HOLD)
motor.stop() has no arguments.
But the program shows GREEN, WHITE and RED with a large Spike motor on Port B.
Do you see any messages in the log area below the python code? I got:
Beginning... Traceback (most recent call last): File "issue_2395_test2.py", line 18, in
TypeError: function takes 1 positional arguments but 2 were given β Reply to this email directly, view it on GitHub https://github.com/pybricks/support/issues/2395#issuecomment-3399056634, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHGF7YXGZS5IS5IZLQYNK33XQHDNAVCNFSM6AAAAACJCCYDL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGOJZGA2TMNRTGQ . You are receiving this because you authored the thread.Message ID: @.***>
Thanks for your response.
My tests ran with stable 3.6.1 and a 4.0 pre-alpa firmware with out problem. Tried two different hubs too.
In no way am I a hardware technician. But could this have to do with a bad contact or cable problem? Hard to proove though.
I thought I eliminated the hardware error possibility by verifying that the motors run on both:
- the technic hub running LEGO firmware
- the spike prime hub running LEGO firmware,
and that other devices (2 sensors) work on the Technic Hub (running Pybricks) on the same ports I had the motors connected to. So in my mind, the motors and the ports seem like they should be fine.
But I am not sure what else to do if a similar setup seems to be working fine for you.
I really appreciate your time on this. Thanks for trying to help me figure this out.
On Mon, Oct 13, 2025 at 4:18β―PM Bert @.***> wrote:
BertLindeman left a comment (pybricks/support#2395) https://github.com/pybricks/support/issues/2395#issuecomment-3399098877
Thanks for your response.
My tests ran with stable 3.6.1 and a 4.0 pre-alpa firmware with out problem. Tried two different hubs too.
In no way am I a hardware technician. But could this have to do with a bad contact or cable problem? Hard to proove though.
β Reply to this email directly, view it on GitHub https://github.com/pybricks/support/issues/2395#issuecomment-3399098877, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHGF74KAGRJHGTEK2JRQ5T3XQJLHAVCNFSM6AAAAACJCCYDL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGOJZGA4TQOBXG4 . You are receiving this because you authored the thread.Message ID: @.***>
And the probability that both new motors have a similar hardware problem seems pretty small.
On Mon, Oct 13, 2025 at 4:33β―PM Kelly Pennock @.***> wrote:
I thought I eliminated the hardware error possibility by verifying that the motors run on both:
- the technic hub running LEGO firmware
- the spike prime hub running LEGO firmware,
and that other devices (2 sensors) work on the Technic Hub (running Pybricks) on the same ports I had the motors connected to. So in my mind, the motors and the ports seem like they should be fine.
But I am not sure what else to do if a similar setup seems to be working fine for you.
I really appreciate your time on this. Thanks for trying to help me figure this out.
On Mon, Oct 13, 2025 at 4:18β―PM Bert @.***> wrote:
BertLindeman left a comment (pybricks/support#2395) https://github.com/pybricks/support/issues/2395#issuecomment-3399098877
Thanks for your response.
My tests ran with stable 3.6.1 and a 4.0 pre-alpa firmware with out problem. Tried two different hubs too.
In no way am I a hardware technician. But could this have to do with a bad contact or cable problem? Hard to proove though.
β Reply to this email directly, view it on GitHub https://github.com/pybricks/support/issues/2395#issuecomment-3399098877, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHGF74KAGRJHGTEK2JRQ5T3XQJLHAVCNFSM6AAAAACJCCYDL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGOJZGA4TQOBXG4 . You are receiving this because you authored the thread.Message ID: @.***>
And the probability that both new motors have a similar hardware problem seems pretty small.
I agree and have no more hints at the moment.
Thanks again for all your help. Appreciate it.
On Mon, Oct 13, 2025 at 4:41β―PM Bert @.***> wrote:
BertLindeman left a comment (pybricks/support#2395) https://github.com/pybricks/support/issues/2395#issuecomment-3399147059
And the probability that both new motors have a similar hardware problem seems pretty small.
I agree and have no more hints at the moment.
β Reply to this email directly, view it on GitHub https://github.com/pybricks/support/issues/2395#issuecomment-3399147059, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHGF73OUBDNQ5XLNYGVEBT3XQL7DAVCNFSM6AAAAACJCCYDL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGOJZGE2DOMBVHE . You are receiving this because you authored the thread.Message ID: @.***>
Just a hunch: what if the batteries are at the end of their live?
A motor needs more power than a sensor.
Adjusted your program to show the battery voltage:
from pybricks.hubs import TechnicHub
from pybricks.pupdevices import Motor
from pybricks.parameters import Color, Port, Stop
from pybricks.tools import wait
hub = TechnicHub()
print(f"{'Beginning...':<16}\t {hub.battery.voltage()/1000:>4.2f} V")
hub.light.on(Color.GREEN)
print(f"\t{'Green':<16} {hub.battery.voltage()/1000:>4.2f} V")
wait(2000)
print(f"\t{'Define motor':<16} {hub.battery.voltage()/1000:>4.2f} V")
motor = Motor(Port.B)
print(f"\t{'White':<16} {hub.battery.voltage()/1000:>4.2f} V")
hub.light.on(Color.WHITE)
wait(2000)
print(f"\t{'Run motor':<16} {hub.battery.voltage()/1000:>4.2f} V")
motor.run(500) # runs motor at 500 deg/s
print(f"\t{'Red':<16} {hub.battery.voltage()/1000:>4.2f} V")
hub.light.on(Color.RED)
wait(2000)
hub.light.off()
# motor.stop(Stop.HOLD)
motor.stop()
print(f"\t{'motor stopped':<16} {hub.battery.voltage()/1000:>4.2f} V")
My output looks like this at the moment:
Beginning... 7.43 V
Green 7.43 V
Define motor 7.45 V
White 7.45 V
Run motor 7.44 V
Red 7.44 V
motor stopped 6.90 V
You see that the voltage after 2 seconds motor run drops by half a volt. Quite a lot. Maybe this shows us something?
What if you turn the motor slower e.g. 100 in stead of 500?
Thanks for reporting this issue. We've prepared a test build that lets you collect some extra information about your sensor.
Could you please follow these instructions:
- for your Technic Hub
- for your SPIKE Prime Hub
Comparing the results might help us determine the difference and possibly fix what is going on.
At the initial post from this thread there is code written like this:
# Beep to show it's done (Technic Hub uses the built-in piezo)
print("Motor run successfully.")
I'm not getting it! Beep? Technic Hub built-in piezo? Can you develop on this?
Thanks!
There isn't a piezo in the Technic Hub or anywhere in this thread, either. Can we keep it on topic, please? π
It is here Laurens! See the second line from the end (a comment indeed). Hence I was wondering... Feel free to delete my posts if you feel so. Sorry to deviate from the topic.
There isn't a piezo in the Technic Hub or anywhere in this thread, either. Can we keep it on topic, please? π
Sorry. The beep wasn't actually encoded, just included it as a mistaken comment. Used a print instead to show completion/lack thereof.
No worries, it's all good. Hopefully we can figure out what's up with these motors π
It's possible that slight manufacturing variations/changes could cause this, and maybe we can update the code to account for it.
Thanks for reporting this issue. We've prepared a test build that lets you collect some extra information about your sensor.
Could you please follow these instructions:
- for your Technic Hub
- for your SPIKE Prime Hub
Comparing the results might help us determine the difference and possibly fix what is going on.
Thanks.
I tried loading the new build (technichub-firmware-build-4293-git73e88dd9.zip) on the Technic. I began loading it 3 times, and all 3 times it failed at about the 68% mark with the same message: "The hub said something went wrong".
I don't have access to the Spike Prime Hub at the moment, so cannot the build to that one.
That's quite an unusual one, since the firmware update process hasn't changed in any way. Is it possible that the hub batteries are very low?
The first set of batteries were newish (1 week of use). I installed brand new batteries anyway, and checked them before use, All were strongly green.
I tried loading firmware from the Pybricks desktop app (on Mac) first, but ended up with the same result (71% mark before the same failure message).
I then tried loading the new firmware build from the web app and failed much more quickly.
Finally, I tried reinstalling the lego firmware and it loaded with no problems.
End result, couldn't load the firmware (technichub-firmware-build-4293-git73e88dd9.zip).
And finally, and possibly strangest of all, I cannot even load a stable version of Pybricks without it now failing in the same way (drops the connection part way through the load). But when loading the current stable version of Pybricks fails, I have no problem, once again, reloading the Lego firmware on the same device. Bizarre.
On Tue, Oct 14, 2025 at 12:19β―PM Laurens Valk @.***> wrote:
laurensvalk left a comment (pybricks/support#2395) https://github.com/pybricks/support/issues/2395#issuecomment-3402891196
That's quite an unusual one, since the firmware update process hasn't changed in any way. Is it possible that the hub batteries are very low?
β Reply to this email directly, view it on GitHub https://github.com/pybricks/support/issues/2395#issuecomment-3402891196, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHGF76STSW7BE7QPJM3B6D3XUWC5AVCNFSM6AAAAACJCCYDL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIMBSHA4TCMJZGY . You are receiving this because you authored the thread.Message ID: @.***>
Can I help provide any logs or debugging? I have the same problem with the large motor and it's causing issues for our school teams. We have technic hubs and Prime Essential hubs. Both hubs freeze when trying to use the large angular motor. Running the same motors with official Lego firmware works OK. I have 4 different motors and multiple hubs, and all show same issue.
Thank you. When it freezes, does the square running animation on the display keep going or does it turn off altogether?
Assuming the animation keeps spinning --- if you pull the motor cable out in this state, does it then raise the expected error about cabled being not connected? Does the line number of the error correspond to the Motor(Port.....) line?
Yes, I think we can make a firmware variant that will print out helpful information. Thank you for offering to help. With the questions above I'm hoping to close in on what we should be logging exactly.
Thank you. When it freezes, does the square running animation on the display keep going or does it turn off altogether?
For display, there is no animation on the essential hubs, just the blinking led, which in this case goes to pulsating blue, which is not normal.
Assuming the animation keeps spinning --- if you pull the motor cable out in this state, does it then raise the expected error about cabled being not connected? Does the line number of the error correspond to the
Motor(Port.....)line? My test file will hang when trying to initialize, with pulsing blue light on the hub. If I pull the cable while it's in this state, it does throw an error
pybricksdev run ble ./test-large-angular-motor-spike-essential.py
Searching for any hub with Pybricks service...
100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 430/430 [00:00<00:00, 1.88kB/s]
Initializing motor
exception: [Errno 19] ENODEV:
A sensor or motor is not connected to the specified port:
--> Check the cables to each motor and sensor.
--> Check the port settings in your script.
--> Check the line in your script that matches
the line number given in the 'Traceback' above.
The test file is like:
from pybricks.hubs import EssentialHub
from pybricks.parameters import Axis, Direction, Port, Stop
from pybricks.pupdevices import Motor
hub = EssentialHub()
print('Initializing motor')
big_motor = Motor(Port.B)
print('Motor initialized')
big_motor.run_angle(100, 45)
big_motor.run_angle(100, -45)
Thank you. That means the hub is OK. It sounds like this motor variant is sending some information that the hub is not expecting. I'll try to put together some test code to log the differences.
Since you're using Technic Hubs and Essential Hubs, are you using the dark grey Large Angular Motor from a Technic set or are the motors from elsewhere?
The motors I'm using are AliExpress versions of this LEGO Technic Large Angular Motor 45602
I realize AliExpress may be a non-standard motor, but they seem to work fine with Lego firmware.
Ah. Off brand manufacturers tend to not implement the full device protocol. There are a few requests for supporting this. We may get around to this eventually but our priority lies with the original devices.
I think this thread was indicating a different issue for original motors.
AliExpress
We also have #2305 for tracking that. So if you do some logging, please share it there to help us keep things organized.