Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
sparefroh
Level 1
Level 1
First like received First question asked First reply posted

Hi,

I want to move the motor for a certain distance (e.g. 180 degrees). I already tested the different methods of motor rotation (one-step movement, multi-step movement voltage- and time-based). However, none is fully satisfying, especially when using different smartphones as a power source.

One-Step Movement: During each test I get different results, i.e. the motor stops at different positions, although I did not change any setting (V start or max runtime)

Multi-Step Movement Voltage-Based: As long as I have enough power, the motor rotates. How can I stop it at 180 degrees using this setting?

Multi-Step Movement Time-Based: Same as above, as long as I have enough power, the motor rotates. How can I stop it at 180 degrees using this setting?

Generally speaking, is there a way to program the firmware in such a way to stop the motor rotation exactly e.g. at 180 degrees? Or can this only be achieved using a "mechanical barrier" at 180 degrees?

Best regards

0 Likes
1 Solution
Kanahaiya_K
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 10 likes given

Hello @sparefroh ,

There is no explicit parameter setting for the rotation angle in the mobile application . However, the maximum run time (measured in milliseconds) and motor rotation mode—single one step , multi-step (voltage-based )  or multi-step (time-based )—may be configured using the mobile app, and the required rotation angle can be empirically determined.

The firmware regulates the rotation angle based on how long the H bridge (and motor) are turned on for. The firmware is modified, and the time is then modified by experimenting with various values for a particular motor.

There is just a timer running after switching on the H bridge, or a main loop is executed with a known cycle time. After the timer expires or the cycle count of the main loop reaches a certain number, the H bridge is switched off again. Timer value or loop count are set in firmware, or may be stored in NVM if the firmware allows remote configuration.

Regards,
Kanahaiya

View solution in original post

0 Likes
1 Reply
Kanahaiya_K
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 10 likes given

Hello @sparefroh ,

There is no explicit parameter setting for the rotation angle in the mobile application . However, the maximum run time (measured in milliseconds) and motor rotation mode—single one step , multi-step (voltage-based )  or multi-step (time-based )—may be configured using the mobile app, and the required rotation angle can be empirically determined.

The firmware regulates the rotation angle based on how long the H bridge (and motor) are turned on for. The firmware is modified, and the time is then modified by experimenting with various values for a particular motor.

There is just a timer running after switching on the H bridge, or a main loop is executed with a known cycle time. After the timer expires or the cycle count of the main loop reaches a certain number, the H bridge is switched off again. Timer value or loop count are set in firmware, or may be stored in NVM if the firmware allows remote configuration.

Regards,
Kanahaiya

0 Likes