I require your help regarding a problem I’m encountering.
I’ve recently purchased the Omni Mechanum 4WD 10011 robot. I’ve been trying to program the arduino and it doesn’t work and gives me an error (the settings are as per the instructions from the manual).
When I remove the motor shield and load the program into the arduino, it works, with the same settings.
How do I program the wheels if I’m unable to do so without the motor shield?
@Sambhavi Welcome to the RobotShop Community. It sounds like the motor shield uses the same pins which are used to program the Arduino board, so it is not possible to use both at the same time. This is often the case with shields, so (assuming this is the case) you need to physically remove the shield every time you upload a new program.You can then still likely send normal serial commands to the MCU.
Thanks, I understand why it is necessary to remove the shield now.
I am however facing another issue now. On first look when I uploaded the demo actions code, it seemed to be working, but as I started testing the individual movements it seemed to be going wrong.
For example, for it to move diagonal, 2 of the diagonal wheels should move. However, just 2 wheels turn - but they are not the intended wheels. Sometimes all the wheels just turn, as if they got a boost of power.
I have double-checked the wiring connections with this manual as well. Is there anything I should do in terms of coding, to get the robot moving? Or is this a hardware issue?
Checked the motor wirings to the terminals- I’ve set them exactly according to the diagram in the manual
tested the “setCarAdvance” in the demo code- then switched the live and ground for motor 2 such that all of the wheels would be moving in the same direction. Also, what I understand from this is that this just switched the direction of the motor(at the terminal), so it shouldn’t be giving me the speed problems I’m facing(as given in the table below)
Checked the pins in the code- they are the same as given in the diagram in the manual.
Wheels are physically connected the right way- checked that as well. But as I have mentioned, I’ve switched M2’s live and ground for it to turn properly for setCarAdvance test, and to make proper referencing for the rest of the code.
Here is the table for the testing for all the functions:
Is there something wrong with the code, motors, encoders or the board? Because even if the directions of turning were wrong, the wheels jumping forward and backward in varying speeds make me wonder if this is a hardware issue. If this is because of the code, I’m using the demo code from https://www.robotshop.com/media/files/zip/arduino_library.zip as given on the main website.
Thank you once again for your support.
Btw, this is the table that I have with the live and ground not changed for M2 (original connections)
Raise the rover off of the ground to see if the wheels turn freely (i.e. a weight issue or a friction issue). You might even remove the Mecanum wheels and replace them with yogurt lids to just see direction of rotation and speed
What battery are you using? Several of these points seem symptomatic of undervoltage / under current.
Triple check all electrical connections to ensure proper contact everywhere, no loose wires or strands
Check the electronic components for any burn marks, bad solder points etc.
If nothing above leads to a solution, we’ll have you reach out to the manufacturer directly at [email protected]
Raised the motors off the ground, and ran the commends- no change
The battery was the same one as the one provided by the manufacturer, Ni-Mh battery
-even after fully charging the battery (shows 13.4V), the motors still jump when moving, and motors don’t turn the way they are supposed to.
There really aren’t any loose strands or wires and I check the connections every time I upload a program- because of the removal and attaching of the shield
There aren’t any burn marks, maybe some areas could have been soldered stronger:
I’ve tried to change the speed by changing the speedMMPS value to be given through the demoActions, and there is no change in the speed of the Robot.
I believe there is either something wrong with the microcontroller or the encoders of the motors, (especially motor 2) which are not accepting my commands via the codes provided.
In case you didn’t see an email from manufacturer, here it is:
Before uploading the program, please disconnect the jumper shown in the picture below and the connection of the ultrasonic sensor,Reconnect the connection after uploading the program
Hi!
I’ve done this (I just remove the entire shield when programming, but I’ve tried this specifically too), but this still doesn’t help me with my speed issue(not able to change the speed in the demoActions module (the speed doesn’t slow down)…
I can’t seem to pinpoint the reason for the speed not changing… The manufacturer hasn’t gotten back to me yet about this yet. Do you happen to have any idea?
Thank you for your support!
Best Regards,
Sambhavi
I’m able to turn the motors, individually, so the motors are working properly. I’ve connected them to the power source directly to test them, and they work fine.
I’m able to turn the motors individually as well.
I always check the connections every time i upload codes
I’m not able to change the speeds of the motors- I don’t know if it is an encoder issue, microcontroller/shield issue or a code related issue?
Thank you for your time and support!
Best regards,
Sambhavi