5

Very short version: Looking for a way to wirelessly get STEP and DIR signals (only those two signals) from an Arduino to a DRV8825 stepper driver about a meter away:

Arduino -> STEP and DIR IO pins -> transmitter ) ) ( ( receiver -> DRV8825 enter image description here enter image description here

edit Jan. 2024: Just to follow up on this; in the end I decided to simplify the whole setup I had, and moved all electronics, except for the power supply, to the moving part. A custom slip ring connects a PSU that is on the floor to the rotating platform that holds the Arduino, steppers, etc.

Long version: For a project I've mounted an Arduino to a wooden board. The Arduino has a GRBL shield (basically a breakout board to four motor drivers for stepper motors (in my case the DRV8825)). Connected to this setup is a stepper motor. The power supply (NOT on the wooden board) for the motor is 24v, and I'm using a buck converter to take it down to 5v for the Arduino. This whole board is rotating and the 24v gets passed to it using a custom sliding-contact with two contacts (24v and gnd).

Now this all works fine, but the problem is this: I have a second motor which I want to control from the same GRBL shield. But this motor is NOT on the rotating board. If I place the motor driver next to this motor and power it from the same power supply (parallel to the sliding-contact) I have everything I need, except for the STEP and DIR signals from the Arduino.

Because there is no way I can add 2 more contacts to the sliding-contact (plus the signal would probably be too noisy anyway) I'm looking for a way to basically add a wireless bridge between the STEP and DIR output pins on the Arduino, and the STEP and DIR input pins on the motor driver. The motor and driver are about a meter away from the Arduino, so signal strength shouldn't be a problem.

I believe those well known 433Mhz transmitters are too slow for something like this, but I read most nRF24L01 modules are faster. Before I order some for a test setup, I was wondering if anyone already knows if this could work or not, knows a useful alternative, or has some suggestions for keywords to search for when trying to find another solution. I can find a lot of 'wireless' motor drivers online, but most are completely standalone units where the microcontroller is on the board, it's just controllable over wifi/bluetooth.

1 Answer 1

-1

(Moved to "answer" for space; it's definitely not an answer. Sorry all!)

Minor points:

  • It's a motor controller shield; the GRBL is on the Arduino.
  • You'll need a motor controller at each motor; not clear if that's understood.
  • I'd also consider optical comms, although it has a different set of problems.

Ultimately I might approach this in a different way: instead of a single GCode box attempting to synchronize and control itself and an (essentially) independent system, I'd consider having a single GCode box (GBOX) controlling two independent systems (M1, M2).

GBOX would be a laptop/RPi/whatever that processes the "real" GCode. Based on the GCode commands, which in the end just tell motors what to do, I'd send each GCode command to its associated M1/M2 system.

How well this works depends a lot on the GCode, however; diagonals, arcs, etc. require motor cooperation, so a command like G02 X2Y0 R2 might cause problems, even though we can pull out the X and Y data. How the GCode is generated matters, but note that GBOX could also interpolate "tricky" commands to break them into something a dual-target system might be able to understand.

The "meaning" of the moves also matters: there's "getting from one place to another" and "getting from one place to another while drawing a line": the former may (or may not) have requirements around what that actually means, while the latter requires coordinated motion, and even if you're splitting the commands up correctly, even a fraction of a second difference in receive/action time will matter. Of course, you could also transmit both motors' commands to both motors and rely on timing or cross-Mn synch for starting their respective commands.

In the end it may be the only real way to make this work would be to have the "independent" systems be able to synchronize with each other, so that they know they're (a) ready to start, and (b) starting at the same time. GBOX could also potentially handle that synchronization as a "Go!!!" command is about as deterministic as it gets, especially if M1/M2 can receive a broadcast signal at the same time.

https://www.zikodrive.com/motor-control-case-studies-and-applications-2/a-remote-controlled-and-synchronised-stepper-motor-controller/ (very) briefly discusses the issues around synchronizing remote motors where their relative positions matter.

2
  • Not that I've given things like this any thought :p We had a similar approach to a similar, but non-wireless, project, but the motion control required was limited in scope, and synchronization was trivial, because the second system was limited in scope, and required no simultaneous cooperation with the primary system. Commented May 25, 2021 at 20:24
  • This GO signal sounds like a great idea. I can create two setups, have them use the same GCode but only connect their relevant motors. This should ensure they use the right timing (so motor X will wait for motor Y) I have a lot of straight movements in my GCode so I could even execute them line by line with a GO in between to prevent a slowly increasing offset. I borrowed a couple of NRF24L01's so I'm going to give the IO bridge idea a quick try, but could also use them to sync up the two setup. Thanks for the suggestion!
    – Jasper
    Commented May 26, 2021 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.