Hello all,
This is my schematic for the electrical components for my all wheel drive robot. does anyone know how to write/find a code to control these 4 motors independently using a transmitter? My goal for this project is to turn the robot by accelerating any tire I choose. I'm willing to do arduino or raspberry pi
Please advise,
BullEngineer
Didn't we already have a conversation on this topic? I cannot find my recent posts.
However, you describe several parts of your project that should be tackled independent.
Making motors run using a motor driver like you have in your image is pretty straight forward. The manufacturer of the motor driver often has sample code. Have you tired this?
Using a transmitter to send command input and a receiver to receive that input and pass it to your sketch is quite doable, with many different solutions.
Have you picked how you are going to do this? One solution is to use a transmitter/receiver pair from the radio control hobby. Another is to use this tutorial from Robin2.
What sort of transmitter? WiFi, Blurtooth, radio control ala RC planes, custom radio control? Range?
I assume that the robot will run on batteries? A schematic would show all power sources. If you are running on batteries, I suggest that you look for more appropriate motor drivers. The L298 drivers waste a good deal of power by themselves. Check Pololu.com for more effecient DC motor drivers.
It looks like you are using an Adafruit feather. Do you know that they make a feather card that can drive four motors? This would simplify your design and shrink its size.
You can use a feather doubler to connect the feather controller and motor driver. This picture shows a 4 wheel drive with a tripler allowing a four motor driver card and IMU to connect to the feather. The bluetooth feather allows control by a smartphone. You can also get wifi feather controllers if that is the way you want to go.
Also, the motor driver has an accompanying library that makes things really simple. I have no connection to Adafruit.