Control Large Number of Motors Remotely

Hello,

I am looking to control multiple motors remotely. I am thinking about 30-40 motors independently. I was looking to use stepper motors than use a L298N motor controller. My thought process was to have 1 board be the main communication device like a mega or an uno. Then use nanos to separately communicate with each pair of motors.

I was considering using 1 nano then attached to each nano is 2 L298N's which each could control 2 motors. Making it so 1 nano can control 4 motors. With this setup I would need roughly 12 nanos. My first idea to communicate was to use NRF24L01 modules to communicate between the nanos and the mega. However, I believe I would be limited with how many boards can communicate with each other in that method so small scale it would work but as I scale it up would not be feasible. I was also considering using ESP8266 to connect to WIFI then control the boards via a laptop however, I do not believe I will have access to wifi. I am just curious if there are other methods out there that I have not been exposed to. Any input would be greatly appreciated.

what's the rationale for the radio? are motors dispatched over a wide area? physical constraints? what about the airwave environment?

You could use only one arduino and daisy chain enough of those PWM/Servo drivers to meet your needs.

of course motors' power needs etc would need to be taken into account to really decide if this is a good idea

Hello,

Thank you for quick response. This is awesome and exactly the kind of information I was looking for. However, the reason I was thinking radio and using multiple nanos is due to physical restraints. All the motors will not be close by. Within a room distance but no ability to wire directly. The motors will be in groups of 4. Then some distance and another group of 4 motors.
Thanks again for the input!

Hi @jacobbic.

My sugestion:
Use an ESP8266 using WiFi as a client for each motor group and an ESP8266 working in WiFi in AP mode sending control to all other ESPs.

So you create your local Wifi network.

PS: Also read about mesh networks.

RV mineirin

2 Likes

Hello,

I actually really like this idea. I looked into it and it does seem feasible. I think doing something like this or like an xBee radio communication will be what I decide to go with. Thank you very much for this suggestion.

I would use Wemos D1 Mini boards (ESP8266) and communicate over WiFi using MQTT.

Wemos- because I buy them by the dozen at $5 each
MQTT- because I use it a lot around the home already, so I am familiar with it.

There are many other boards and protocols that would work, only you can decide which is best for your needs and your experience level.

Uau,!!!
Send me the link to this store that sells dozens of Wemos for $5.00.

Tks in advance.

RV mineirin

Correction- make that $3 each:

Hi,
What is the project?
WiFi would be ideal for your system cos its made for networking.

What do you envision as your master control?
A physical control panel, or a virtual one on a phone or PC app?

Tom... :smiley: :+1: :coffee: :australia:

My suggestion goes something like this:
No need for XBee.

RV mineirim

Thank you for the suggestion. I have experience using the ESP8266 boards. I agree the wemos seem like a more cost-effective solution as the Xbee is definitely more expensive. I am not too familiar with MQTT but I will look further into it. Do you have any suggestions on where to start?

The end goal would be more of a machine learning-type system. However, due to that being aways away. I was thinking a virtual control panel would be doable for now. In the short term, I was planning on hard coding the motors to do the tasks I wanted, then eventually work my way to the controller.

I rally don't know how I got started with MQTT. Someone on this forum tipped me to it.

Install the PubSubClient.h library from the library manager, and run some of the example sketches. You will also need a broker. There are public brokers or you could make your own from a Raspberry Pi.

Hi @SteveMann,
I recommended either AP mode or mesh networking on the server because of this information from the OP.

RV mineirin

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.