mBlock Ranger onboard LEDs not working properly


#1

Hello,

I received my mBot Ranger today, and I love it. Me and the kids started playing with it right away and everything went smoothly. However, we noticed that some times, only half of the onboard LEDs would light up when activating them through the APP.

I just started testing the mBlcok development tooling, and while I was able to get a light show running at first, now only half the leds (1 through 6) seem to be working. Uploading the latetst firmware doesn’t fix this.

Am I doing something wrong here? Could this have something to do with low battery power? I put in brand new batteries.

Here is a screenshot of my program:

After running this several times in a row, this is what I end up with as the resulting led display:

led_display

Mark


Only half the LEDs are working
LED doesn't response to the program
#2

Be sure to put a “hat” block at the beginning of your program. Not sure if that’s the issue, but putting the “When [green flag] clicked block” when running the program in mBlock or “mBot Ranger Program” block when running standalone are usually required.


#3

Just tried that, same result.
I also noticed a difference in running my programs when linked to the computer via USB, and after uploading to the ranger and running directly on the ranger.

When I write a small program which basically says:

led all red
led all blue
get range from ultrasonic sensor
while range > 10
loop
move forward at speed 100
get range from sensor
end loop
move forward at speed 0

when I run this, the leds are turning red, then blue, then the ranger starts moving forward. but way before hitting the wall, it seems to restart the program, because it stops moving, and the leds go red and blue again before the rangers moves forwards again.

Am I doing something wrong here? amd I not allowed to just simply move forward, potentially indefinitely, like this?


#4

Hi ractoc,
The speed of running online is slower than running after upload. That is normal to get maybe different phenomenon with same program. To get clear phenomenon, please try to add wait block like wait 0.3 or 0.5 seconds after each action.
For more question, please provide us with the program and video of the phenomenon. Thank you!


#5

Hello,

I’ve recorded a video showing the application running on my ranger. I also added the program I used.

video:
https://drive.google.com/open?id=1nJ4A3W1CuN032AUSMYsEivX7UTvs4_u6

program:
https://drive.google.com/open?id=1o0x5iN9ZpuNW0DfxmxQFWf7VFTS1AQXX

Mark


#6

Hi Mark,
Actually my test with your program doesn’t perform like your video. Will you please try this program? Is that what you want? Once turn on power, robot turns on blue light, then run forward, when it detects obstacle distance in 20cm, it turns on red light and move back, when it detects obstacle distance more than 40cm, it stops and turns on green light.
If no, would you please tell me your exact expectation?


#7

I entered the program above. First I tested it with the robot connected to the computer, everything worked as expected. The robot ran forward, stopped, ran backwards and stopped completely. The LED colors also changed to the correct colors.

When I disconnect the robot from the computer however, I get the exact same results as before.

  • The LEDS start blue
  • The LEDs turn off and the robot starts moving
  • The robot stops moving
  • The LEDs turn blue again
  • The robot moves forward again

This repeats until the robot is within the 20 cm range as measured by the sensor.

  • The LEDs turn red
  • The robot starts moving backwards
  • The robot stops.
  • The LEDs turn blue
  • The robot moves forwards
  • The LEDs turn red
  • etc.

This last part keeps repeating itself.

Since I also keep seeing the blue LEDs after every stop, it seems like the board is somehow resetting itself.

Could this be related to the other LED problem I reported at the start of this post?


#8

I did ome more thinking, and testing. Connecting a powerback to the USB port where you would normally connect the computer fixes all problems. So the problem seems to be power related somehow.
When running on USB power, the main board work without problems. When working solely on battery power, the main board seems to reset itself at random intervals.


#9

Hi ractoc,
Thanks for the trying and glad to hear that you’ve figured it out. For the battery/power issue, according to our test and research, it is suggested to use rechargeable Li-ion battery or rechargeable nickel-metal hydride, nickel-cadmium which can be bought from amazon or local shop. Or Alkaline battery with good quality like Energizer, DURACELL.


#10

I just bought and installed a set of brand new Duracell batteries, the program now works correctly.
Now to test the original LED problem, see if that’s also fixed now…


#11

One of the discoveries that I made early on with my Ranger was that alkaline batteries don’t work very well. I switched to some rechargeable Litihum Ion (LiOn) batteries that have worked well for me.


#12

Hi ractoc,
Glad to hear that :slight_smile:
Hope you can enjoy with Makeblock products.


#13

Hi Chuckcknight,
Thanks for the feedback. We tested some Alkaline battery and they perform good. We’ll try to test more if possible.


#14

No worries, my experience with alkaline batteries and robots has been that the alkaline batteries discharge far too rapidly and end up costing more to replace than just biting the bullet and getting rechargeable LiOn batteries. On one project using motors the battery drain was high enough that the robot immediately went into a brown-out situation. :frowning:


#15

Thanks for sharing that :slight_smile:


#16

Finally had some more time to play with the robot and test some stuff. It all works now ,including the LED’s. I’ll probably use up this set of Duracell, and another one, since they sell per 4 batteries… Then I’ll definitely be looking into rechargeable ones.

Here’s what I’m currently running with for collision detection. It uses both the sonic sensor and the gyro. Reason for the gyro is that I found that the tracks sometimes ride up the wall while the sonic sensor does not detect any obstacle.

Collision preview


#17

Hi ractoc,
According to the video, actually the result is normal. Since the ultrasonic module is not exactly face the wall. With different angle between ultrasonic and wall, the respond time varies. Sometimes robot collides wall but ultrasonic doesn’t detect it due to the angular deviation (too much).


#18

To add to @tech_support, think of the ultrasonic signal as if it’s a ball on a pool table. If the ball hits the side at an angle it will bounce away at the same angle. If it hits the side directly in a straight line, it will bound back at you. This is the principle that radar and sonar rely upon. :slight_smile:


#19

that’s what I figured, which is why I added support for the angle sensor as well. That way, when the ranger starts driving up the wall, as seen in the video, I can detect that and handle it appropriately.

So far, so good. Now to figure out what to do next…


#20

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