How to calibrate more than one LEGO Mindstorms EV3 Light/Color sensors at a time

Would you like to resolve all the problems with the light/color sensors that you have? And to make all of them work in a predictable, stable way even when using more than one MINDSTORMS color sensors.

When using Color sensors it is important to calibrate them depending on the light conditions in your venue. In this way, the calibrated sensor will show values between 0 and 100 independent of the light conditions. But using the default EV3 colour calibration available in the colour sensor block could lead to unpredicted problems that are difficult to track and resolved especially when used with multiple Color sensors. So in this series of tutorial we implement the calibration ourselves discussing the principles of colour sensor calibration. 

  • #632
  • 04 Oct 2017
  • 4:25

We have more than one sensor. Each sensor could have a different calibrated value. But when changing the ports on which these calibrated sensors are attached a few problems could arise. We are taking a different approach. Implement the calibration on our own. 

How does the program behave at the end

The whole calibration process consists of the following steps

Initialization

It happens right after the robot is started. It is the first thing to do

Finding of Min and Max raw values

We find the values and we store them in an array that is later used to get the values.

Getting a value depending on the calibrated Min and Max

We get the raw value and find the percentage this value represents between the Min and Max.

Blocks Package for Advanced Calibration of LEGO Mindstorms EV3 Color/Light sensors

This package contains the three blocks used in the advanced calibration section of the FLL course.

The blocks contained are:

  • InitiArray block
  • CalibrateMinMax
  • GetCalibrateValue 

Example program for using the Advanced Calibration Blocks Package

This is the example program using the blocks available at  Blocks Package for Advance Calibration of LEGO Mindstorms EV3 Color/Light sensors. The program makes the robot find the minimum and maximum values and to calibrate the current sensor value depending to the min and max.