Hello,
Thank you for your response.
I am fully aware that perhaps this is not the best model of the Zumo for our particular situation. Truth be told, we purchased this on a bit of a whim to go with our Romis.
The DFRobot device is nice because in addition to providing the motor and servo outputs, it also acts as a breakout board for the Micro: Bit. At the moment, we are just attempting to drive the Zumo (with the eventual intent of creating a practice bot for students to learn to code with it). I have been writing micro:bit libraries for the team that utilizes the FRC framework in order to teach them to code. I liked this kit, because it was pre-assembled and had a better gyro than the Micro:bit, but if I am having this much difficulty with motors, I am thinking the I2C may be a bit difficult.
I have poured over the documentation, the Zumo manual, schematics, and the DV8835 documents as well, but am only understanding it partially proficiently. As you may realize (you have helped me previously :), I am learning some of the lower-level aspects of programming and robot construction this year as we are experimenting with mini-robots. This is the latest iteration.
When I say Duty, it is because the libraries I am familiar with use both a duty cycle (perhaps 1-2.4 ms and a frequency, but often, I find the datasheets only use one or the other.
When I get no movement out of the H-bridge, my first thought is either one or both of those variables are wrong. However, there seems to be a lot more going on here.
I first tried the DF Robot Servo ports (which run a 600-2400us Duty cycle @50hz) combined with the Digital ports that were broken out of the Micro:bit. I got no motion and was thinking that it was either that wrong timing, or a power issue.
I have since realized my issue was I was only testing one motor. When working with both, it seems that it does not matter which of the four pins I use as the phase pins, if any of the four pins are set to 0 (or not set at all, even if pulled hi), neither motors move. If I set any two pins to 1, and write any analog value to the other two pins other than 0, the motors move. around 255, they stop, but it is not consistent. if both analog levels are too low, the motors stall (even if the treads are off the ground). if the difference between the left and writeanalog()
value is large, the speed increases in opposite directions, if they are the same but above 255, they both go fast in reverse. I have yet to figure out how to get them both to go fast forward.
Once I figured that out, I could go back to the servo ports.
Anyway, this behavior does not sound like the datasheet described either mode should be. I am using pins 7-10 just as the user guide suggests, but as I said above, it seems as though it does not matter which pins I use, the behavior is the same.
Although I do not have a compatible Arduino, I do have an Arduino Nano and wired it up as recommended, then ran the Zumo Motor Sketch. It moved the treads independently, but only in one direction for each (backward).
I looked at the wiring diagram, and I think I may have a theory. In both of my wirings, I left the 5v pin untouched. Is the mode button of the motor driver hard-wired to the 5volt bus, or the arduino 5volt pin? if it is the latter, that may explain the behavior.
Thank you for your help.