Omron B5WC User manual

E612-E1-01
Built-In Color Sensor
User’s Manual
B5WC
Built-In Color Sensor

1B5WC Built-In Color Sensor User's Manual ( E612-E1-01)
Unauthorized copy, replication, and/or reprint of a part or all of this manual is prohibited.
- The content of this manual is subject to change without notice for the purpose of
improvement.
- If you have any question or comments, please contact our sales representative listed at
the end of this manual.
Please notify the manual number described at the end of this manual as well.
Note

B5WC Built-In Color Sensor User's Manual ( E612-E1-01) 2
Table of Contents
Safety Precautions••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••4
1 Overview••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••7
2 Structure••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••7
3 Dimensions•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••7
4 Product Features•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••8
5 Usage (Detection) •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••9
6 Usage (Circuit) •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••12
7 Installation Method••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••14
8 Frequently Asked Questions••••••••••••••••••••••••••••••••••••••••••••••••••16
Appendix: Color Sensor Operation Overview•••••••••••••••••••••••••••••••••••17

3B5WC Built-In Color Sensor User's Manual ( E612-E1-01)
Safety Precautions
To ensure safe operation, be sure to read and follow the
Terms and Conditions Agreement.
These products cannot be used in safety
devices for presses or other safety
devices used to protect human life. This
product is designed for use in
applications for sensing workpieces and
workers that will not affect levels of safety.
This product is not designed or rated for
ensuring safety of persons either directly
or indirectly.
Do not use it for such purposes.
To ensure safety, observe the following precautions.
●Wiring
Power supply voltage
Do not use the product with a voltage or current that will
even momentarily exceed the specified voltage or current
range.
Applying a voltage or current exceeding the specified
voltage or current range or using an AC power supply may
result in rupture or burning.
Load Short-circuit
Do not short-circuit the load. Rupture or burning may
occur.
Faulty Wiring
Do not miswire such as the polarity of the power supply
voltage.
Rupture or burning may occur.
Example 1. Wrong polarity
Example 2. Wrong polarity and faulty wiring
Connection without Load
If the power supply is connected directly without a load,
rupture or burning of the internal elements may occur.
Connect a load when wiring.
Storage and Operating Environment
1. Places where the product is not exposed to corrosive
gases, such as hydrogen sulfide gas, or salty wind.
2. Places where it is not exposed to direct sunlight.
3. Make sure that flux, oil, or other chemicals do not
adhere to the surface of the emitter and receiver.
4. Do not apply a load that may deform or deteriorate the
product in any circumstances.
5. Store the product in a normal temperature, humidity,
and pressure environment.
6. The product should be used without freezing or
condensation.
7. Do not use the product in atmospheres or environments
that exceed product ratings.
8. This product does not have a water-proof and oil-proof
structure.
Therefore, do not use the product in an application or
environment where it will be subject to water, oil,
chemicals, or any other liquid getting directly on it.
⚠WARNING
⚠CAUTION
Precautions for Safe Use

B5WC Built-In Color Sensor User's Manual ( E612-E1-01) 4
●Mounting
1. This sensor is designed to be built into equipment.
Design the equipment structure so that ambient light
does not enter into the sensor. When using the
equipment where the sensor will be influenced by
ambient light, install it so that the sensor will not be
affected by ambient light.
2. Mount the sensor securely on a flat surface. To retain
the sensor with screws, use M3 screws (to prevent the
screws from loosening, use a spring washer and a flat
washer with a diameter of 6mm). Use a tightening
torque of 0.54 N⋅m max.
3. Take care that nothing comes into contact with the
detected part of the sensor. Damage to the sensing
element will result in poor performance.
4. Before using the sensor, check to make sure that it has
not become loose due to vibration or shock.
5. When using the sensor with a moving part, secure the
part of the cable that is pulled out so that stress will not
be directly applied to it.
●Wiring
Surge Prevention
1. If there is a surge in the power supply, try connecting a
Zener diode or a capacitor (with a capacitance of 0.1 to
1 μF), depending on the operating environment. Use the
sensor only after confirming that the surge has been
eliminated.
2. Do not use a small inductive load, such as a relay.
3. Separate the wiring for sensors from high-voltage lines
or power lines. If the wiring is routed in the same conduit
or duct as such lines, the sensors may malfunction or
may be damaged by inductive interference.
4. When attaching the connectors, make sure that they
are inserted into the housing properly.
●Handling during Wiring
Surge Prevention
1. If a force is applied to the connection area between the
terminal and connector by bending or pulling the cable
after the wiring is completed, the connector contact part
or connection area with the cable may be damaged,
resulting in contact failure.
2. Make sure that a stress (external force) as shown in the
figure below is not applied to the connection area
between the terminal and connector when routing and
connecting cables or harnesses.
3. Do not perform cord wiring when power supply voltage
is applied. Doing so may result in breakage.
●Design
Modulated-light sensors
When designing, give proper consideration to the
influence of the power supply and cable length.
Since this sensor is a modulated-light sensor, it is more
easily affected than non-modulated light sensors.
Reasons for Interference from Power and Cable
Length on the sensors with Modulated Light
An LED emitter is pulse-lighted to produce modulated
light.
A large current momentarily flows to the sensor in sync
with this pulse timing. This causes a pulsating
consumption current. A photoelectric sensor incorporates
a capacitor with sufficient capacity, and is virtually
unaffected by the pulse of the consumption current. With a
small sensor, however, it is difficult to have a capacitor
with a sufficient capacity. Accordingly, when the cable
length is long or depending on the type of power source, it
may become impossible to keep up with the pulse of the
consumption current and operation may become unstable.
Countermeasures
Adding a Capacitor
Attach a capacitor of 10 μF min. as close as possible to
the sensor when wiring.
(Use a capacitor with a dielectric strength that is at least
twice the sensor's power supply voltage. Do not use
tantalum capacitors. A short-circuit may cause the
capacitor to ignite due to the large current flow.)
Precautions for Correct Use

5B5WC Built-In Color Sensor User's Manual ( E612-E1-01)
Countermeasures for Switching Power Supplies
Take either of the following countermeasures as required
if connecting a modulated-light sensor to a switching
power supply.
1. Attach a capacitor (e.g., aluminum electrolytic
capacitor) of 10 μF min. as close as possible to the sensor
when wiring.
(Use a capacitor with a dielectric strength that is at least
twice the sensor's power supply voltage. Do not use
tantalum capacitors. A short-circuit may cause the
capacitor to ignite due to the large current flow.)
2. Connect to the 0-V line of the power source or connect
by way of a capacitor (approx. 0.47 μF) at the point
closest to the sensor to reduce the impedance of the
sensor mounting base so that it is difficult for inductive
noise to enter the mounting base.
3. Connect the noise filter terminal (neutral terminal to
ACG) of the switching power supply to the case (FG)
and 0-V terminal of the power supply.
The line connected as mentioned above should be
grounded or connected to the mounting base to ensure
stable operation.
(Recommended by power supply manufacturers.)
Countermeasures to Handle Inductive Noise
Insert a plastic insulator of approximately 10 mm between
the sensor and the mounting base.
Effects of Inductive Noise
When there is inductive noise in the sensor mounting
frame (metal), the output of the sensor may be affected.
In this case, ensure that there is no electrical potential
difference between the sensor 0-V terminal and the
sensor mounting frame (metal).
Or, put a 0.47-μF capacitor between the 0-V terminal and
the frame.
●Other precautions
1. Do not mount the sensor in the following places
because doing so may cause malfunction or failure.
1) Place exposed to a lot of dust or oil mist
2) Place exposed to a lot of corrosive gas
3) Place directly or indirectly exposed to splashes of
water, oil, or chemicals
4) Outdoors or place exposed to intensive light such as
direct sunlight
2. The sensor may be dissolved by exposure to organic
solvents, acid, alkali, aromatic hydrocarbon, and
chlorinated aliphatic hydrocarbon solvents, causing
deterioration in the characteristics.
Do not expose the sensor to such chemicals.
3. An output pulse may occur when the power supply is
turned ON due to the power supply environment and
other influences. Use the sensor in the stable ready-for-
detection state reached in 100 ms after turning on the
power supply.
4. When the number of averaging times is set to a low
value, variations in the RGB output values may increase
due to A/D conversion errors, noise, and other factors.
We recommend checking the RGB output values
multiple times.
5. If the sensor is used outside the power supply voltage
range, set the power to OFF (0 V) once because there is
the possibility of unexpected operation.
6. If foreign matter has adhered to the lens, the output
voltage may vary. When removing foreign matter from
the lens, take care not to touch the lens with a hand, etc.
so as to prevent it from getting scratched or dirty.
7. Use a power supply of max. 15 W for the power supply
connected to this sensor because the internal circuit
does not have a safety device.
8. When disposing of the product, please dispose of it as
industrial waste.

B5WC Built-In Color Sensor User's Manual ( E612-E1-01) 6
1 Overview
This User's Manual describes the usage and special notes of B5WC, the color sensor to build into
equipment.
This document is intended to supplement the datasheet and product specifications, which should be
referenced when using the sensor.
2 Structure
The built-in color sensor B5WC is composed of a white LED light source
with a wide wavelength range of visible light, an RGB photo IC with a PD
(photo diode) that detects light in each of the three primary colors of light
(red, green, and blue), an optical lens, an internal circuit with the MCU, and
other dedicated components.
<Principle>
・White LED light emitted from the color sensor
reflects off the surface of the sensed object, and the
reflected light is focused by the optical lens and
enters the RGB photo IC.
・The light reflected from the sensed object contains
R/G/B wavelength regions that provide color
information, and the RGB photo IC detects each of
the received light intensity. This light intensity value
is converted into R/G/B output voltage value.
・The RGB output voltage value is loaded from an
upstream system via the I2C bus.
3 Dimensions
Shown below are the dimensions of the color sensor. Refer to the datasheet for details.
Note that the external dimensions and screw mounting hole dimensions are the same as those of OMRON's
light convergent reflective type sensor B5W-LB21 series.
Light emitting/receiving surface
Emitted
light
Reflected
light
Object: Red
Emitted
light
Reflected
light
Emitted
light
Reflected
light
Object: Green
Object Yellow

7B5WC Built-In Color Sensor User's Manual ( E612-E1-01)
4 Product Features
The color sensor is a type of reflective optical sensor that detects the color of the sensed object by the
received R/G/B light intensity. These received RGB light measurements allows judgment of the color of
sensed objects.
Shown below is the Munsell color detection capacity diagram indicating the ratio of each voltage value to
the maximum voltage value when the maximum output voltage value of the color sensor is set as 100%.
The ratio of RGB data changes according to the Munsell color.
Another feature of color sensors is that the RGB ratio remains virtually unchanged as the sensing distance
changes.
The charts below show the receiver output of the color sensor and the receiver output ratio when the
sensing distance changes. Since the color sensor is a type of reflective optical sensors, the receiver RGB
output value changes with changes in sensing distance, but the receiver RGB output ratio remains almost
unchanged. This is because the sensor detects not only the light intensity reflected from the sensed object,
but also the RGB wavelength components contained in the reflected light. This makes it possible to stably
differentiate the color of sensed objects even when the sensing distance to the object changes due to
flapping or other factors.
0
0.1
0.2
0.3
0.4
0.5
R G B
Output voltage [V]
Receiver output value
0
0.1
0.2
0.3
0.4
0.5
R G B
Output voltage [V]
Receiver output value
0%
20%
40%
60%
80%
100%
R G B
Output voltage
ratio
Ratio
0%
20%
40%
60%
80%
100%
R G B
Output voltage
ratio
Ratio
←As sensing distance changes, receiver output
value also changes.
←Even if sensing distance changes, receiver RGB
output ratio does not change.
Color sensor
Munsell color
Conceptual Image of Measurement
Munsell color detection capacity

B5WC Built-In Color Sensor User's Manual ( E612-E1-01) 8
5 Usage (Detection)
Shown below are the electrical and optical characteristics described in the product specifications for Model
B5WC-VB2322-1.
Since this sensor is used in applications to detect various objects, the output voltage value is defined by a
gray color reference board that is achromatic. Omron uses gray as its standard because gray is a color in
which all RGB wavelength regions are theoretically equal.
The optical characteristics of the sensor can be confirmed mainly by the characteristic diagram that
graphically shows the receiver output of the color sensor versus sensing distance and the ratio of receiver
output. The characteristics diagrams shown below are charts that indicate the relationship between the
sensor output voltage and sensing distance for various sensing objects.
For example, the product specifications for the RGB output voltage values for a gray reference plate are
given as TYP:0.45V @d=40mm, which means that the output voltage at a sensing distance of 40mm in the
following "Receiver output and Sensing distance characteristics" is around 0.45V for each of RGB.
The RGB output voltage ratio to this gray color reference plate is shown in the receiver output ratio and
distance characteristic diagram (informative), which indicates that the difference in the RGB output ratio is
within about 10% or less even when the sensing distance changes in the range of 10 to 70mm.
When designing the structure of the equipment to which the color sensor is incorporated, the distance
between the sensor and the sensing object should be determined by referring to the "Receiver output -
Sensing distance characteristics". In the case that the sensing object position does not fluctuate, the
sensing distance is recommended to be set at the position within the range from 30 to 50mm where the
characteristics curve is relatively small.
Receiver Output - Sensing Distance Characteristics Receiver output ratio - Sensing Distance Characteristics

9B5WC Built-In Color Sensor User's Manual ( E612-E1-01)
■Sampling period and average number of times
This sensor acquires RGB values at each sampling period of 1 msec. An additive average filter process is
then performed in the sensor to update the output RGB values. Shown below is the relationship between
the average number of times and the data update cycle.
Data update cycle = Sampling period (1 msec) x Average number of times
Average number of times and data update cycle
The average number of times can be configured in
the range from 1 to 50. Increasing the average
number of times allows control of fluctuations in
the output RGB values. Please refer to the chart
on the right for an indication of fluctuation control.
When the average number of times is set to 20,
the fluctuation range of RGB values is suppressed
to about 1/5 compared to the average number of
times set to 1.
Increasing the average number of times also increases the data update cycle. The maximum data update
cycle is 50 msec. For applications where the sensing object moves at high speed, set the average number
of times according to the moving speed and the timing you wish to measure.
For other details related to the I2C operation of this color sensor, refer to the product specifications B5W-
VB2322-1, Sections 10 to 12, or Appendix: Color Sensor Operation Overview.
Conceptual image of RGB value fluctuation range and average number of times
Average number of times: 1 Average number of times: 20
Fluctuation range ratio & Average number of times
Average number of times
Fluctuation range ratio
Fluctuation range
Fluctuation range

B5WC Built-In Color Sensor User's Manual ( E612-E1-01) 10
■If the sensing object is a liquid
So far, we have described the case where the sensor's light is irradiated on the surface of the sensing
object as a general reflective optical sensor, but it can also be used to distinguish differences in the color
of liquids in transparent containers. Example schematic diagrams are shown below. As in the diagram,
install a reflector on the opposite side of the color sensor and place a transparent container containing the
liquid to be detected between them. It is difficult to judge the color of the liquid by irradiating light directly
on the surface of the liquid in the container from a color sensor.
The following chart shows the results (informative) of liquid color measurements using the above
measurement method.
As an example here, a liquid reagent with known color information called ASTM color is used.
With this measurement method, the color of a liquid in a transparent container can be detected by the color
sensor as received RGB light intensity. In this case, however, the RGB output values of the color sensor
will vary depending on the installation environment, mainly as described below.
Condition (1) Container size
As shown in the receiver output -sensing distance characteristics of the color sensor, the receiver output
also fluctuates when the "container size"(i.e. "distance between the sensor and the reflector") changes.
In particular, if the distance is too close (approx. 0 to 20mm) or too far (approx. 50mm or more), it will be
difficult to ensure the receiver output. It is recommended that the distance between the sensor and the
reflector be within the range of 20 to 50mm.
Condition (2) Reflector material and surface condition
Select the reflector with as uniform a surface condition as possible. For reference, OMRON uses a
reflector of "SUS430/surface polished (#240 or #320 equivalent)" in its measurements.
Thus, the RGB output values of the color sensor will fluctuate when either of the above conditions (1) or
(2) is changed. Since these conditions vary depending on the customer's application, it is ideal in actual
use to conduct a thorough evaluation to determine the optimal combination that will produce the desired
RGB output values.
Example of liquid color measurement
RGB output voltage ratio to petroleum product color standard sample*
d=22 mm
dia.=7 mm
Reflective plate: Stainless steel 430
Detected object: ASTM reagent
*For ASTM Color

11 B5WC Built-In Color Sensor User's Manual ( E612-E1-01)
■Others: Reference data
- Sensing distance characteristics and the effect of ambient temperature
The RGB output voltage value of this sensor varies depending on the ambient temperature. Shown
below is the reference data.
■Use of color sensors in practical applications
As mentioned above, the characteristic values listed in the product specifications specify a gray-colored
resin plate equivalent to general Munsell paper as the sensing object. Actual applications,however,
generally detect various objects other than that, and it is necessary to evaluate whether the sensor can
stably detect the target object in actual equipment over a long period of time. Specifically, it is necessary
to measure "Sensing distance -Output voltage" using actual objects to make sure that sufficient output
voltage values are obtained to discriminate color differences. As precautions in this case, the smaller the
output voltage value, the greater the influence of fluctuations due to noise and other effects.As a result, it
may be necessary to take measures to stabilize the output voltage value, such as increasing the average
number of times (this is especially true for subtle differences in color). In addition, it is ideal to evaluate as
many samples as possible, taking into account the individual variability of the sensor.
6 Usage (Circuit)
1. Connector
This sensor uses a connector for connection. Shown below is the model and terminal function of the
connector mounted on the sensor.
You must provide the harness. You also need to select the housing to be connected to the connector.
Shown below are the housing and contact listed in the manufacturer's catalog for the connector "SM05B-
SRSS-TB (J.S.T. Mfg. Co., Ltd.)" to be mounted on the sensor as reference information.
[Excerpt from the catalog of J.S.T. Mfg. Co., Ltd.]
Housing With protrusions: SHR-05V-S-B
Without protrusions: SHR-05V-S
Contact SSH-003T-P0.2-H
* You must determine the compatibility of the connector on the harness side and that on this sensor.
Note that the connector terminal (4) of B5WC-VB2322-1 is a blank one. Since it is not connected to the
internal circuit of the sensor, the operation of the sensor is not affected even if no wire is connected to the
terminal (4).
Ambient temperature - RGB output voltage
Ambient temperature
RGB output voltage change ratio
Object: Gray color reference plate
Sensing distance

B5WC Built-In Color Sensor User's Manual ( E612-E1-01) 12
2. Connection example
This sensor is designed for I2C communication. Electrical connection examples are shown below.
Case 1: 5V MCU direct connection (when microcontroller power supply voltage is the same)
Case 2: 3.3V MCU (I2C port is 5V tolerant)
Case 3: 3.3V MCU (not 5V tolerant)
For details of the components specifications, refer to the product specifications B5W-VB2322-1, Sections
10 to 12.
or

13 B5WC Built-In Color Sensor User's Manual ( E612-E1-01)
7 Installation Method
1. This sensor can be mounted in two directions, X and Y. Refer to the product specifications for details of
mounting.
* Use M3 screws, spring washers, and flat washers and tighten with torque of 0.54(N⋅m).
2. The structure of this sensor should be designed with equipment to prevent ambient light from entering.
If the sensor's light-emitting or light-receiving block must be exposed to the outside of the equipment
for application purposes, the effect of ambient light can be reduced by installing the sensor in such a
way that no ambient light enters from the light-receiving path direction. As shown in the figure below,
the emitting and receiving light paths of this sensor form a V shape. Therefore, it is necessary to
evaluate the sensor sufficiently by considering the direction of sensor installation to prevent ambient
light from entering from this direction.
3. This sensor is neither waterproof nor oil resistant. You need to design the structure of the equipment to
prevent water, oil, or chemicals from pouring on the sensor. For detailed precautions, refer to the
precautions for safe use and precautions for correct use described in the specifications and datasheet.
Receiving light path
Emitting light path
Ambient light

B5WC Built-In Color Sensor User's Manual ( E612-E1-01) 14
<Specific examples of usage>
(Example 1) Lubricant color change detection
A conceptual image of the installation is shown below.
- Install the color sensor so that the lens surface
of the sensor contacts closely to the transparent
container. The recommended size range for
transparent containers is 20 to 50mm. Attach the
reflector so that it contacts closely to the
container as well.
- When lubricant enters the container, the color
sensor outputs the RGB voltage values. By
reading these values via the I2C bus and
identifying the amount of change in the RGB
ratio, changes in lubricant color can be detected.
* Select the material of the transparent container according to the type of lubricant. The shape of the
container can be either rectangular or cylindrical, but the structure should be such that the positional
relationship between the container, sensor, and reflector is fixed.
* Select a reflector that can ensure the received light intensity of the color sensor. For reference, OMRON
uses a reflector of "SUS430/surface polished (#240 or #320 equivalent)".
(Example 2) Cup color detection in drink dispensers
A conceptual image of the installation is shown below.
- Install the color sensor so that the lens surface
of the sensor faces the cup to be detected.
- The recommended distance range between the
sensor lens surface and the cup is about 30 to
50mm. Within this range, the fluctuation of the
RGB output voltage values are relatively small,
even taking into account the shift of the cup's
placement position.
- When a cup is placed, the color sensor outputs
the RGB voltage values. By reading these
values via the I2C bus and comparing with the
RGB ratio for each cup recorded beforehand,
the cup color can be judged. By presetting the
corresponding drink for each cup color, different
types of drinks are served in each cup.
* The cup itself can be detected by comparing the output voltage of the color sensor in the absence of a
cup and in the presence of a cup of each color. However, if the color of the cup is dark and the RGB
output voltages themselves are small, there is a possibility of detecting "no cup" even though there is a
cup, or "cup present" even though there is no cup due to ambient light, so sufficient evaluation is required
for each application. It is recommended that the cup detection method be provided separately from the
color sensor,if possible.
Conceptual image of installation
Conceptual image of installation
Reflector
ASTM reagent
Transparent
container
Color sensor
MCU
Approx. 20 to 50mm
Approx. 30 to
50mm
Colored cup
Color sensor
Drink dispenser
MCU

15 B5WC Built-In Color Sensor User's Manual ( E612-E1-01)
For the above examples as well as other applications, if you have any questions about specific judgment
methods using RGB values, please contact us for technical consultation.

B5WC Built-In Color Sensor User's Manual ( E612-E1-01) 16
8 Frequently Asked Questions
Q: Can the sensor detect color differences of an object with a glossy surface?
A: If a surface of an object to be detected is glossy, some of the white LED light emitted from the sensor
will reflect off the surface and enter the photosensitive area. Since this light does not contain color
information of the object, it is difficult to accurately detect the color information of the object if it is
glossy. In reality, the degree to which color information on the object can be obtained will vary
depending on the degree of glossiness.You need to evaluate the detection capability in your actual
application and on the object to be detected.
Q: There is a description of how to detect colored translucent liquids, but can the sensor detect color
differences of translucent solids (e.g. colored translucent glass or plastic)?
A: If a surface of an object is glossy such as colored translucent glass or plastic with a glossy surface,
the sensor cannot accurately detect the color information of the object even if it directly irradiates light
as it is. As with liquids, it may be possible to detect color differences if a reflective plate is used to
sandwich the translucent object. The precautions in this case are the same as for liquids. For details,
refer to 5. Usage (Detection).
Q: How large must the object to be detected be?
A: Ideally, the size of the object to be detected should be larger than the area of the lens surface of the
sensor (26.4 x 8.4mm).
Q: How should we deal with ambient light?
A: Design the structure of the equipment so that ambient light does not enter the sensor. If the lens
surface of the sensor must be exposed to the outside of the equipment, install the sensor in a direction
that prevents ambient light from entering the equipment as much as possible, and fully evaluate the
effects of such exposure. For details, refer to 7 Installation Method.
Q: Can the sensor detect color differences even if the object is black or white?
A: Since white and black colors theoretically have the same RGB ratio, it is difficult to distinguish white
or black using RGB ratios. On the other hand, there is a difference in the absolute value of the receiver
output values between white and black, which can be used to discriminate them. When attempting to
discriminate black and white using this method, however, the receiver output of the sensor is affected
by factors other than color information, such as distance. Please evaluate the sensor with a thorough
understanding of its characteristics and make your own judgment as to whether or not white and black
can be distinguished.
Q: Can the RGB ratio information in the characteristics data on the datasheet be read from the sensor?
A: Only RGB output voltage values can be read from this sensor. You need to calculate the RGB ratio
based on the readout RGB output voltage values.

17 B5WC Built-In Color Sensor User's Manual ( E612-E1-01)
Appendix: Color Sensor Operation Overview
■(Reference) Setting flowchart
The initial configuration example of this sensor is shown below.
We recommend that you follow the flowchart below.
■I2C Communication Protocol
Communication
method
I2C
Master/Slave Slave
Transmission speed 100 kbps (Standard mode(*1))
Slave Address 40 h (Write: 80 h, Read: 81 h)
Clock Stretching Yes (maximum clock stretch time: 1 ms)
*1: Reserved addresses (general call addresses, etc.) are not supported.
*Slave Address
bit bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
Add[6] Add[5] Add[4] Add[3] Add[2] Add[1] Add[0] R/W
Value 1 0 0 0 0 0 0 1/0
When writing: Set the LSB of the slave address to "0" to 80h (1000 0000b).
When reading: Set the LSB of the slave address to "1" to 81h (1000 0001b).
Yes
Yes
No
No
Write protect disabled (0x5A) to data address: 0x00 via I²C communication
Write any average number of times (1~50 times) to data address: 0x00 via I²C communication
Write protect enabled (other than 0x5A) to data address: 0x00 via I²C communication
Read data address: 0x00 via I²C communication
and confirm that Write protect is enabled (other than 0x5A)
Read data address: 0x01 via I²C communication
and confirm that the average number of times matches the set value.
After changing the average number of times, wait for stability as
RGB values may be indefinite for up to 100ms.
Start
End
Apply power to this sensor
Wait for stable power supply (100ms)
Write protect disable setting
Average number setting
Write protect enable setting
Wait for RGB values to stabilize
Write protect effective?
Is the average number
The value you set?

B5WC Built-In Color Sensor User's Manual ( E612-E1-01) 18
Defining I2C Bus Timing
Characteristics of SDA and SCL Bus Lines
symbol parameter Min Max unit
fSCL SCL clock frequency - 100 kHz
tHD;STA hold time (repeated) START condition 4.0 - μs
tLOW LOW period of the SCL clock 4.7 - μs
tHIGH HIGH period of the SCL clock 4.0 - μs
tSU;STA set-up time for a repeated START condition 4.7 - μs
tSU;DAT data set-up time 250 - ns
trrise time of both SDA and SCL signals - 1000 ns
tffall time of both SDA and SCL signals - 300 ns
tSU;STO set-up time for STOP condition 4.0 - μs
tBUF bus-free time between a STOP and START conditions 10.0 - μs

19 B5WC Built-In Color Sensor User's Manual ( E612-E1-01)
(1) Write
1. Operation is started by detecting the START condition.
2. The mode is switched to Write mode by receiving data with the Write bit ("0") added to the slave
address (bits 7 to 1).
3. Set the received Write data to the received data address.
(In the case of multiple consecutive Write bytes, when Write data is received in succession, Write
data is set in sequence with the received data address at the top.)
4. The write operation is terminated upon detection of a STOP condition.
(2) Read
1. Operation is started by detecting the START condition.
2. The mode is switched to Write mode by receiving data with the Write bit ("0") added to the slave
address (bits 7 to 1).
3. The register to receive and read the data address is specified.
4. The mode is switched to Read mode by detecting a repeated START condition and receiving the
slave address (bit 7 to 1) plus the Read bit ("1").
5. Outputs 1 byte of data at the address specified by the data address as Read data.
*When 0x02 is specified for the data address, 6 bytes of data from 0x02 to 0x07 are output one
byte at a time in sequence as Read data until NACK is detected.
*Multiple data blocks (described in Chapter 12) cannot be read in a single Read message.
6. After Read data is output, the checksum is output.
*Checksum is output only when the first address of each data block is specified in the data address.
7. Read operation is terminated upon detection of Stop condition.
*If the read operation is continued, the value that can be read is indefinite.
*The following is an example of reading the 6 bytes from 0x02 to 0x07 and the checksum.
Other manuals for B5WC
1
Table of contents
Other Omron Accessories manuals

Omron
Omron ZX-GT - User manual

Omron
Omron V680-HAM91 User manual

Omron
Omron E3U-GS-S User manual

Omron
Omron F3W-D User manual

Omron
Omron E3X-DA-S User manual

Omron
Omron E2F-X1R5Y1 User manual

Omron
Omron E2E-Y - User manual

Omron
Omron D6T Series User manual

Omron
Omron ZX2 Series How to use

Omron
Omron E2EC - User manual

Omron
Omron SYSMAC C200H-IDS01-V1 User manual

Omron
Omron E3NT-L User manual

Omron
Omron F3C-AL User manual

Omron
Omron SYSMAC CJ2H-CPU6@-EIP Instruction Manual

Omron
Omron E3X-HD0 User manual

Omron
Omron E2C-EDA Series User manual

Omron
Omron F500 - User manual

Omron
Omron E2A - User manual

Omron
Omron ZW Series User manual

Omron
Omron FQ - V1 User manual