Quote from sporubcan on March 21, 2025, 2:57 pmThank you for your reports too!
During my tests yesterday, I didn't notice described behavior at all. I can assemble the setup again and have look soonest today evening, if it is OK for you?
Best regards,
Sam
Thank you for your reports too!
During my tests yesterday, I didn't notice described behavior at all. I can assemble the setup again and have look soonest today evening, if it is OK for you?
Best regards,
Sam
Quote from Bifrostman on March 21, 2025, 3:03 pmSure, that's fine.
It is strange, that you can use the code without any problem. Is there any limit on the supported motors? However, if the motor is the problem it shouldn't work on either connector, should it?
Sure, that's fine.
It is strange, that you can use the code without any problem. Is there any limit on the supported motors? However, if the motor is the problem it shouldn't work on either connector, should it?
Quote from sporubcan on March 21, 2025, 3:22 pmBasically, RoboHeart Hercules can work with any DC brushed motor rated to 2 to 4Volts (or less and slightly more but with motor torque limitations). You're right, it must work the same way on either connector. I assume the iOS App delivers different power level information for steering and different level for FW/BW movement. I need to confirm this by experiment. Possible reason why this is done is because obviously you need less power for steering than for movement of whole mass of car or toy.
But your observation, that steering doesn't work after first activation seems be a bug indeed.
Aside of DC brushed motors, RH Hercules can also work with one stepper motor and several servo motors (library for servo motors will be available soon).
Basically, RoboHeart Hercules can work with any DC brushed motor rated to 2 to 4Volts (or less and slightly more but with motor torque limitations). You're right, it must work the same way on either connector. I assume the iOS App delivers different power level information for steering and different level for FW/BW movement. I need to confirm this by experiment. Possible reason why this is done is because obviously you need less power for steering than for movement of whole mass of car or toy.
But your observation, that steering doesn't work after first activation seems be a bug indeed.
Aside of DC brushed motors, RH Hercules can also work with one stepper motor and several servo motors (library for servo motors will be available soon).
Quote from sporubcan on March 21, 2025, 3:36 pmI forgot also to say, that there is some current limitation of USB input as well as battery input.
We can assume, that if the input power limit of USB is reached (happens only when battery isn't connected), the BLE disconnects and ESP does reboot. This is because USB maximum input current is limited by power management of RH-H to approx. 1A and some limit can come also from your USB internal supply (Mac Studio) or hub.
Remember, that 1A is maximum USB input PEAK current. Inrush current of motor startup can be higher and thus can trigger overcurrent protection.
Anyways, I will verify your observation.
I forgot also to say, that there is some current limitation of USB input as well as battery input.
We can assume, that if the input power limit of USB is reached (happens only when battery isn't connected), the BLE disconnects and ESP does reboot. This is because USB maximum input current is limited by power management of RH-H to approx. 1A and some limit can come also from your USB internal supply (Mac Studio) or hub.
Remember, that 1A is maximum USB input PEAK current. Inrush current of motor startup can be higher and thus can trigger overcurrent protection.
Anyways, I will verify your observation.
Quote from Bifrostman on March 21, 2025, 3:39 pmSounds reasonably. However, this does not explains why the same motor runs on one port and fails on the other, does it?
Sounds reasonably. However, this does not explains why the same motor runs on one port and fails on the other, does it?
Quote from sporubcan on March 21, 2025, 3:40 pmDefinitely not. This will be software issue. As I wrote, will have look later evening and let you know.
Thank you for great point again!
Definitely not. This will be software issue. As I wrote, will have look later evening and let you know.
Thank you for great point again!
Quote from sporubcan on March 21, 2025, 5:14 pmHello again, reason of different behavior of MotorB and MotorC is now clear.
Whereas driver for MotorA and MotorB have maximum peak current limit internally set to 1A, MotorC has maximum peak current threshold set to 2A (That makes 4A driving capability all together). That's the reason, why motorC is able to work with your specific motor and motorB isn't.
As I can see at the picture you provided, your motor is quite huge, so I assume it does overload the 1A driver.
Next point is, that iOS App does send different levels for steering and different for forw./back. movement. For steering, maximum speed of motor is set to 138, whereas for F/B movement it is 300 (300 is in library internally clamped to 255 because of PWM resolution preset, but still taken as maximum)
I assume the reason for this is that steering force doesn't need to be so huge compared to movement force.
If you want build a car, I recommend using your big motor for movement and choose something significantly smaller for steering. Everything should be Okay then 🙂
Hello again, reason of different behavior of MotorB and MotorC is now clear.
Whereas driver for MotorA and MotorB have maximum peak current limit internally set to 1A, MotorC has maximum peak current threshold set to 2A (That makes 4A driving capability all together). That's the reason, why motorC is able to work with your specific motor and motorB isn't.
As I can see at the picture you provided, your motor is quite huge, so I assume it does overload the 1A driver.
Next point is, that iOS App does send different levels for steering and different for forw./back. movement. For steering, maximum speed of motor is set to 138, whereas for F/B movement it is 300 (300 is in library internally clamped to 255 because of PWM resolution preset, but still taken as maximum)
I assume the reason for this is that steering force doesn't need to be so huge compared to movement force.
If you want build a car, I recommend using your big motor for movement and choose something significantly smaller for steering. Everything should be Okay then 🙂
Quote from Bifrostman on March 22, 2025, 9:08 amAs I can see at the picture you provided, your motor is quite huge, so I assume it does overload the 1A driver.
Actually the motor is not that big. It is from a rather small car. The reason in looks so big is, that it is still enclosed in the gear box. However, I do not know the specific power values.
Whereas driver for MotorA and MotorB have maximum peak current limit internally set to 1A, MotorC has maximum peak current threshold set to 2A (That makes 4A driving capability all together). That's the reason, why motorC is able to work with your specific motor and motorB isn't.
- When working with the MotorTest sketch the same motor works without any problem on all three ports.
- The CarControl sketch fails when the "big" motor is connected to port C. According to you this should be the port with the 2A threshold and thus the port which can handle the motor. Correct? However the sketch fails with the "big" motor at C and works with the "big" motor at B
My current setup is:
- Big motor at port B. Runs correctly when the "direction" control in the app is used (the horizontal control on the right. Log shows correct left/right commands)
- A smaller motor (the turning motor from the car) is connected to port C. It runs correctly when the "turn" control is used in the App (the vertical control on the left. Logs show forward/reverse commands)
This does not match the information from your earlier post:
Please connect motor to connector B(turn) or C (direction) and let me know!
And it makes no sense, that the "big" motors can be used on the direction Port B but not on the turn Port C. Does it?
Additionally I do not understand how steering works using the direction motor? Steering should be limited to some angle to turn the wheels in the right direction. Thus the movement of the motor should be limited to some number of revolutions. With the current code the motor simply turns in one direction as long as the control is used.
As I can see at the picture you provided, your motor is quite huge, so I assume it does overload the 1A driver.
Actually the motor is not that big. It is from a rather small car. The reason in looks so big is, that it is still enclosed in the gear box. However, I do not know the specific power values.
Whereas driver for MotorA and MotorB have maximum peak current limit internally set to 1A, MotorC has maximum peak current threshold set to 2A (That makes 4A driving capability all together). That's the reason, why motorC is able to work with your specific motor and motorB isn't.
My current setup is:
This does not match the information from your earlier post:
Please connect motor to connector B(turn) or C (direction) and let me know!
And it makes no sense, that the "big" motors can be used on the direction Port B but not on the turn Port C. Does it?
Additionally I do not understand how steering works using the direction motor? Steering should be limited to some angle to turn the wheels in the right direction. Thus the movement of the motor should be limited to some number of revolutions. With the current code the motor simply turns in one direction as long as the control is used.
Quote from sporubcan on March 23, 2025, 7:14 pmHello Bifrostman,
Let's discuss some points in some other order:
Additionally I do not understand how steering works using the direction motor? Steering should be limited to some angle to turn the wheels in the right direction. Thus the movement of the motor should be limited to some number of revolutions. With the current code the motor simply turns in one direction as long as the control is used.
- You're right and gave great idea for the future. The demo in library is very simple and does assume that turning the steering wheels will be limited in a real toy mechanically. In the more sophisticated devices, a servo is often used for steering because its behavior and movement angle is predicable. At the classic brushed DC motor we have no idea, how much will this motor move the steering mechanism. So there are definitely several ways how to solve this issue, that your is one of them.
My current setup is:
- Big motor at port B. Runs correctly when the "direction" control in the app is used (the horizontal control on the right. Log shows correct left/right commands)
- A smaller motor (the turning motor from the car) is connected to port C. It runs correctly when the "turn" control is used in the App (the vertical control on the left. Logs show forward/reverse commands)
This does not match the information from your earlier post:
Please connect motor to connector B(turn) or C (direction) and let me know!
- Sorry for misunderstanding on my side. Unfortunately I don't own cellphone with iOS, so I am running the app on my Mac and the interface looks very tight (see attachment, btw. If you can give me as more experienced Mac user some hint, how to tune that, I would appreciate your helpfulness!). I am pretty sure that port C and BLE commands 1 and 2 ("New value" first byte in the debug terminal) are for forward/backward movement - the vertical control in iOS app. Port B is intended for steering (commands 3 and 4) - the horizontal control in the App.
Whereas driver for MotorA and MotorB have maximum peak current limit internally set to 1A, MotorC has maximum peak current threshold set to 2A (That makes 4A driving capability all together). That's the reason, why motorC is able to work with your specific motor and motorB isn't.
- When working with the MotorTest sketch the same motor works without any problem on all three ports.
- The CarControl sketch fails when the "big" motor is connected to port C. According to you this should be the port with the 2A threshold and thus the port which can handle the motor. Correct? However the sketch fails with the "big" motor at C and works with the "big" motor at B
- Can you please verify the behavior of "big" motor with external battery connected to your RH-H? I have checked the whole issue with oscilloscope and see nothing strange on my table. Everything works as it ought be.
Hello Bifrostman,
Let's discuss some points in some other order:
Additionally I do not understand how steering works using the direction motor? Steering should be limited to some angle to turn the wheels in the right direction. Thus the movement of the motor should be limited to some number of revolutions. With the current code the motor simply turns in one direction as long as the control is used.
My current setup is:
- Big motor at port B. Runs correctly when the "direction" control in the app is used (the horizontal control on the right. Log shows correct left/right commands)
- A smaller motor (the turning motor from the car) is connected to port C. It runs correctly when the "turn" control is used in the App (the vertical control on the left. Logs show forward/reverse commands)
This does not match the information from your earlier post:
Please connect motor to connector B(turn) or C (direction) and let me know!
Whereas driver for MotorA and MotorB have maximum peak current limit internally set to 1A, MotorC has maximum peak current threshold set to 2A (That makes 4A driving capability all together). That's the reason, why motorC is able to work with your specific motor and motorB isn't.
- When working with the MotorTest sketch the same motor works without any problem on all three ports.
- The CarControl sketch fails when the "big" motor is connected to port C. According to you this should be the port with the 2A threshold and thus the port which can handle the motor. Correct? However the sketch fails with the "big" motor at C and works with the "big" motor at B
Augmented Robotics GmbH Bismarckstraße 10 – 12 10625 Berlin Germany
+49 (0)30 590-083296
This project is co-financed by the European Regional Development Fund [ERDF]