Using 2 linefollower sensors


#1

Hi,

I wanted to use 2 line follower sensors to follow a black line with more precission.
Is it posible to code it with the makeblock software?

Thanks!


#2

Also… how can you calibrate this sensor?


#3

Yes, you can connect 2 line follower sensors to the bot and read the values from Makeblock.

However, how I have no idea how to use the additional sensor for more precision.


#4

There is no calibration needed. See how the sensor works here
http://learn.makeblock.com/en/me-line-follower/


#5

I’m unsure of how you’d get more precision with two line follower sensors. Each line follower sensor has two emitter/receiver pairs that will let you know if the robot is completely on the line, off to the left/right, or completely off the line. Where I can see a good use case for two line sensors is in maze-solving where you want to detect intersections. The line follower sensors don’t need to be calibrated.


#6

The idea is to use 4 (or more) different points of information (each line follower has 2).

  • White white/ white/ Black -> turn fast to the right
  • White/white/black/ black -> turn slowly to the right
  • White/black/black/white -> go straight
  • Etc…

This way, robot can move faster when the robot is centered in the line and slowly when it is going away, instead of having a constant speed


#7

Hm, I’ve written line followers and didn’t find that I needed any extra sensors. Try looking at the Where’s My Line program (link) that’s part of an ebook I published (link) for an example of running a line follower that can uses “nudges” to get back on the line as soon as the mBot detects that it is off of the line.


#8

That book looks really interesting.

I still think that using more sensors can provide higher speed and precision to the robot. I havent tested with the mBot yet, but I have done using the Lego Mindstorms


#9

One of the challenges with the Mindstorms kit is that the light sensor (or color sensor) only has a single pair of emitter/receivers. This situation requires much larger turns at slower speeds to stay accurate. I would suggest trying the line follower code before buying additional parts, not to discourage you, but to see whether or not it works for what you want to do. My tendency is to try to keep things simple and only add additional pieces/code when necessary.

Regards,

Chuck


#10

I’ve used two line following sensors on an mbot and code it to make it pass a black broken line (dashed line) path. However, is there any method to code so that using one line following sensors on an mbot can make it pass a black broken line (dashed line) path?
Thanks!


#11

You’d need a test to account for the time it takes to traverse the white portion of the dashed line. In essence, the logic would be along the lines of:

If line-sensor sees white
    move forward for the expected duration to find black
    if black is found continue moving forward
    else make a turn to try to find the black line again

#12