Solo Mini Position ...
 
Notifications
Clear all

Solo Mini Position Control - Brushed DC Motor


Forum 1
(@tim-d)
New Member
Joined: 5 days ago
Posts: 1
Topic starter  

I'm thinking of using the Solo Mini to control the position of a 12V brushed DC motor with integrated reduction gearbox and encoder using a Rasp Pi as the supervisory computer.  The interface to Solo would be a sequence of angular positions sent from the PI that the motor would have to move to.  The incremental angular movement in the sequence would in some cases be small - say 2 degrees of rotation and other times large - say 2,000 degrees of rotation.  Clearly the DC motor will take a different amount of time to execute these incremental steps.  The Pi Python code has to ensure that the motor has reached its incremental requested position before moving to the next one in the sequence.  How do I do this?  Using a simple wait/sleep command in Python of the longest expected movement duration will waste time on short rotations and the Pi will always be 'unsure' that the motor position was actually reached.  Alternatively I could tune the wait/sleep time to that of a calculation/approximation based upon speed of rotation and the size of the incremental rotation requested.  Is there any other way?  Ideally, after a position has been sent I would like to halt/loop the Pi code and wait for the Solo Mini to send/read a signal back to the Pi that the position has been reached and then the Pi would send the next position, and so on.  Any thoughts?  Any links I missed?  Thanks. Tim   


SOLO Team liked
Quote
SOLO Team
(@milad)
Chief Member Moderator
Joined: 2 years ago
Posts: 284
 

Hi @tim-d,

Posted by: @tim-d

The Pi Python code has to ensure that the motor has reached its incremental requested position before moving to the next one in the sequence.  How do I do this? 

as you know the position loop is closed within SOLO's firmware, so once the position is reached SOLO will hold the motor in position, but what you can do in your Python code is constantly reading the pulse counts ( position counts) as fast as you can (maximum up to 3kHz rating read here pls), so like that you can see when is the right time to take the next action.

Posted by: @tim-d

Is there any other way?

You can also read the Speed and if the speed is near zero, it means the position has been reached by SOLO to the target or very near to the target.

Posted by: @tim-d

Ideally, after a position has been sent I would like to halt/loop the Pi code and wait for the Solo Mini to send/read a signal back to the Pi that the position has been reached and then the Pi would send the next position, and so on.  Any thoughts? 

till now we don't have such a feature, although it seems like a good idea, however in position controlling there is always some degree of errors, and that depends on your encoder resolution, that's why it's always good to choose the highest resolution possible for your encoder to minimize that error effect on your control quality.

Let me know if you have any other questions.

Milad

 

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


ReplyQuote
Share: