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.
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!
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.
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.