Asynchron movement ...
 
Notifications
Clear all

[Solved] Asynchron movement of 2 motors via UART

4 Posts
2 Users
2 Likes
278 Views
Forum 1
(@unolittlebird)
Trusted Member
Joined: 10 months ago
Posts: 63
Topic starter  

Hi,

I connected two SOLOs to my Raspberry Pi via UART and a multiplexer to control 2 linear motors. The setup works but I noticed that the motors do not move (or rather start to move) at the same time. My code block is like this:

speed = 1500
__solo_driver_0.set_speed_reference(speed)
__solo_driver_1.set_speed_reference(speed)
time.sleep(2)

I am planning on switching to CAN but I have to wait for the delievery of a few parts until I can try it out. In the meantime I continue with UART and wanted to know if you have any idea if the root of the problem is in my code (do I have to call them differently to move them at the same time?) or somewhere else.

The 2 motors are not exactly the same. One is bigger and draws more current than the other.

Kind regards,
unolittlebird


   
SOLO Team reacted
Quote
SOLO Team
(@milad)
Illustrious Member Admin
Joined: 3 years ago
Posts: 427
 

Hi @unolittlebird,

In this code, I don't see when you change the multiplexer channel from one SOLO to the other one?

so basically before setting a reference for each of these channels you need to make sure first you select properly the channel on the multiplexer. Let me know about this.

Milad

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


   
ReplyQuote
Forum 1
(@unolittlebird)
Trusted Member
Joined: 10 months ago
Posts: 63
Topic starter  

Hi @milad

yes, that was the problem. I was changing the multiplexer only in the setup when I was reading the bus voltage. Now I am doing it before every call to the SOLO and the motors act synchronous.

Thanks for the help!


   
SOLO Team reacted
ReplyQuote
SOLO Team
(@milad)
Illustrious Member Admin
Joined: 3 years ago
Posts: 427
 

Ok great and thanks for reporting it back.

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


   
ReplyQuote
Share: