Robotics StackExchange | Archived questions

Synchronized actions with multiple devices

I have three Raspberry Pi 3s. One of the RPIs is a master controller that tells the other 2 slave RPIs to each control a motor. The motor movement needs to be synchronized. I wanted to use services or actions to perform the motor movement. How would I be able to get the actions synchronized?

Asked by Passless11 on 2018-07-20 15:40:38 UTC

Comments

How precisely do the motor movements need to by synchronised? RPIs are not real time computers which will limit how close you can get it. Is there a reason you're not controlling both motors from a single RPI or even a micro controller which would give you the best temporal control.

Asked by PeteBlackerThe3rd on 2018-07-21 02:00:23 UTC

The synchronization precision only needs to be within a couple of milliseconds. The reason that I'm using 2 slave RPIs is because I'm using the pigpio Python library, specifically using the waveform functionality. I need to send different waveforms to each motor and couldn't do it with just one RPI.

Asked by Passless11 on 2018-07-23 12:44:30 UTC

How many PWM outputs do you need exactly? Raspberry pi's are not well suited to this task because they run a high level operating system. A teensy 3.2 board can generate 12 different PWM signals in hardware with microsecond precision.

Asked by PeteBlackerThe3rd on 2018-07-24 06:12:02 UTC

This could be operated as a slave device off a single Pi to control the motors with very good synchronization.

Asked by PeteBlackerThe3rd on 2018-07-24 06:13:04 UTC

Answers