I am constructing an Tennis ball machine. I'm currently having a head scratch moment to the point I am pulling my hair out.
I have 2 brushless drivers connected to 2 brushless motors. I have 2 stepper motors a nema 17, 4 wire and nema 23, 4 wire both connected to TB6600 Drivers. And a dc motor connected to LN298 Driver. I have them all connected to an arduino mega apart from the nema 23 that is connected to a Slave arduino Uno.
They are all controlled by a HC05 Bluetooth addapter.
I had all of this working individually no issues. And I had it all working together. But for some reason now I can't have both stepper motors working at the same time and have controle via Bluetooth. If I unplug one of the stepper motors and turn everything off and back on again then 're connect the Bluetooth. I gain control of the remaining motors. And if I plug the stepper motor back in it powers up by does not move to my commands.
I should add that on start up the unit is programmed to find a home position ( this is the stepper motor that I need to unplug to gain control). It goes through that process fine.
I should also add that the I am powering the motors with 2 18v batteries. A stepper and a brushless motor on each battery
Why is the Uno powered by the Mega’s 5 volt supply?
The Uno should have its own dedicated supply runs to 12 volts and ground - not powered and grounded through the Mega +5/GND pins as shown. I cannot say if that is the source of your trouble but it sure could be, depending upon how current the Uno needs.
@Morrisonandboyd. I have installed 2 amp meters 1 to each battery, on start up they jump fairly high to about 6 amps. But when everything is running the both drop down to about 1. 5 amps and 1.6 so I don't think that's the problem.
@ Aar fred. The Uno is just a Slave, and it's controlling a nema 17 stepper motor via a driver that has its own power supply, the current drew is next to nothing so I'm not really concerned about that at the moment. I may change that in the future for the sake of best practice.
Without a proper schematic, code and photos of the actual wiring, you are correct that the only thing anyone can provide is just a theory guess.
Hers another one: The battery negatives are not bonded.
That said, my more educated guess is that is has something to do with two processors, the need for which you have neglected to explain. Two processors is a really bad idea. It may sound simple but it never is. A similar concept is posting limited project information and then thinking and hoping someone will know what’s wrong