I am wanting to make a robotic arm that is position controlled. I was wondering if it was possible to have more than 2 simpleFocSheilds running on an Arduino Mega as it has more PWM pins than the Arduino Uno. If this is not possible what could be the best next solution?
Only two can be stacked on your board. It might be possible to wire a 3rd however the Mega would really struggle to do the FOC maths for 3 bldcs at the same time. Perhaps you could have two megas each with up to two shields and then hook up a simple RX/TX serial interface between with one of the boards being a master.
As this is a robotic arm, is it being hooked up to a PC for control? Perhaps PC could be the ‘master’ with 2 USB connections (one to each mega). Might be worth describing how you intend for your robotic arm to be controlled. I think someone here has managed to get an ESP32 controlling 3 motors.
Were you intending for your motors to be openloop? Or were you thinking of adding magnetic sensors/encoders to each motor?
I am using an nvidia jetson nano as the main computing system to control the logic for the robot. I am using a Bluetooth xbox controller as the input to the jetson.
The jetson is then going to send commands of positions to the arduino via serial usb.
I am wanting to run 4 brushless motors to be able to control the positions. With all of them having a encoder for each motor and possibly a limit switch to set the home position.
Any ideas or feedback is greatly appreciated.
I think you are looking at 2x microcontrollers (e.g. two Megas) for four motors. Maybe you can get 2 serial ports out of the jetson nano, one to each of the mcus.