I have some problems with the first connection between WebControl and Arduino/Motors.
I am doing a university project where a lawn mower should “drive” a vertical greening wall. This works the same way as Maslow CNC but with the lawn mower instead of the router, but I am using a little different hardware.
My current setup:
Motor: GR 53X30, 24V - GR/G | DC Motors - Dunkermotoren GmbH
And a 15:1 gear.
Driver : VNH5019 (works the same as the normal Maslow L298N driver)
I can run the motors in all ways I want at full power and read the encoder with the Arduino at the same time. So it should not be a general connection problem and no noise from the cables if I’m right.
But when I upload the Firmware and try to drive it with WebControl, problems start happening.
If I run the Motor/Encoder test, at first one motor turns 4 times in one direction, then 4 times in the other. After that, the second motor is doing the same. Is this supposed to be like this? There is also no result or anything else shown, but I also could not find on the internet what the test is expected to do.
But real problems start here:
If I go to Set Sprockets and click one of the available buttons (to make one step or 10 steps …) one motor starts turning like it is supposed, but it never stops. If I press another button, then the motor is following the new order but still never stops spinning. Also, the stop button below doesn’t work at this point. If I press the turning buttons multiple times in a short period of time, Webcontrol disconnects from the Arduino and reconnects a couple of seconds later.
The same happens if I’m at the main page and press one of the arrows to move in any direction. Both motors start spinning but don’t stop. But in this case after about 10 seconds, Webcontrol disconnects again, motors stop spinning and after a couple of seconds, it reconnects. The X and Y position in Webcontrol also does not change. Sometimes it states that the Sled is not keeping up.
At first I thought it is the encoders that just cannot be read. But if I flip the A and B line and do the Motor/Encoder test, the motor starts switching directions really fast more like vibrating, what means it can read that it is turning in the wrong direction.
I also tried smaller motors with an encoder with less steps per revolution: exactly the same results. That’s why I’m thinking it must be something with the connection.
In the forums I found that power settings might be a problem. I deactivated the USB selective suspend settings in the control panel. In my UEFI of my laptop there is no power options. Are their more power options to possibly deactivate?
I also tried with a different Tower PC. There, I also deactivated power settings in the BIOS, but still didn’t work.
Any ideas what could be the problem? I’m out of ideas and it already took a lot of time.