Synchronized actions with multiple devices

asked 2018-07-20 15:40:38 -0600

Passless11 gravatar image

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?

edit retag flag offensive close merge delete

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.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-07-21 02:00:23 -0600 )edit

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.

Passless11 gravatar image Passless11  ( 2018-07-23 12:44:30 -0600 )edit

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.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-07-24 06:12:02 -0600 )edit

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

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-07-24 06:13:04 -0600 )edit