mBot Ultimate's Motors Rotate Uncontrollably at Startup


#1

Hi,
after I switch to Live-Mode in mBlock with my mBot Ultimate 2.0, i have to do the necessary firmware update.
When I reconnect the device and switch on the megapi, both encoder motors on port 1 and port 2 start to rotate and wont stop, until I switch it off.

I replaced the 6 AA-batteries with three LiPo batteries (3.7 V each). Could this be the reason?
Thank you in advance! :slight_smile:


Self balancing robot code for mBot Ultimate
#2

LiPo batteries rated at 3.7v charge to 4.2v. This means that for a 9v rated device, you are giving it 12.6v!! That may well be the issue. Try uploading a code to the mBot with the correct batteries and let me know how that works too. @yannerik

Good Luck!


#3

Thank you for your reply! :slight_smile:
I tried with the correct batteries (6x AA), unfortunately with the same issue.

I did also a hardware reset with the reset-button on board, but that didn’t change anything.
Are there any other ways to do a hard-reset the controller?


#4

Unfortunately, the board my already be ruined by the overvoltage. You may have to buy a new one. :confused:

No, not really.


What you can try is uploading a code to the robot that does something not related to the motors, for example a code that controls its lights or something, to see if the control board is still at least functional. I do know that motor controllers are very sensitive, and overpowering them would likely burn them up, especially if the motors had strain put on them. Hopefully, the robot is OK. Best of luck! @yannerik


#5

The normal Upload Mode for the MegaPi is working fine, the motor drivers are working great as well. As soon as I go to upload mode and switch the MegaPi on, the two motors on port 1 and 2 start rotating. I switched the motors to the drivers on port 3 and 4, and there it works just fine. I also switched the drivers from port 3 and 4 to port 1 and 2, but same result.

Thank you for your replies so far! :slight_smile:


#6

Just a thought - have you built the balancing robot using the MegaPi? This may be how your motors problem has originated.

I spent ages analysing how the balancing robot worked after having initial troubles in getting it to work correctly.

N.B. After turning the MegaPi board on for the first time, the robot started to move immediately without any instructions from the Makeblock app. - the MegaPi must already be programmed to respond to feedback from the gyro module - so in reality there is nothing that you can programme yourself and nothing for you to see on how gyro feedback is used to control the motors. I have no confirmation of this, but I suspect that the default programme for the self-balancing robot resides in the firmware for the MegaPi board (?).

The Arduino code ‘Firmware for Makeblock Electronic modules with Scratch’ (V0e.01.017) dated: 19/03/2020 contains nearly 3000 lines of Arduino ‘C’ code and some lines contain clear references to ‘BALANCED_MODE’ and ‘BALANCED_CAR’ with angle & speed data being written to and read from EPROM, and PID parameters for the encoder motors being set. There are 53 lines of code containing similar references to these including entries referring to ‘Relax angle’, ‘Natural balance angle’, ‘Balanced data’ etc.

The Gyro module connected plus encoder motors connected to ports 1 & 2 activates ‘BALANCED_MODE’. In any new model constructed after this (and using encoder motors connected to ports 1 and 2) the motors will both start to rotate as soon as the MegaPi board is powered-on - the board still thinks that ‘BALANCED_MODE’ has been invoked.

Connecting to the board by Bluetooth and running any new programme should revoke ‘BALANCED_MODE’, stop the motors and return MegaPi to ‘normal’.

Regarding this model, a recommendation from ‘tech-support’ via the Makeblock Forum suggests that battery power (nearly always, as it often is) may be a fundamental problem in the wheels not responding rapidly enough to gyro feedback.


#7

@yannerik no problem. Please see @CommandeR’s very informative post. What was the last code you uploaded to the robot? Try uploading a new one, or switch to live mode and see if the motors stop. Best of luck!


Motors 1 and 2 are always rotating (Ultimate 2.0, mBlock 5)
#8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.