I'm Road Testing the Rohm SensorShield-EVK-003 (Arduino Compatible) and the sensors that come with it. In this post, the Colour Sensor BH1749NUCBH1749NUC. |
The Sensor Shield ecosystemSensor Shield ecosystem is ROHM's test bed for their sensors. It's an Arduino form shield with a number of slots.
The small evaluation boards for their sensors plug into that board.
For each of the sensors, there's an example sketch available.
In this blog, I'm checking the Colour Sensor that comes with the kit.
Evaluation Board
Similar to the other sensors I reviewed, the board has the sensor and a bypass cap.
There's the optional footprint for the 2 I2C pullups and a jumper to allow you to change the i2c address.
image: ROHM website
I haven't discussed the jumper system on the i2c evaluation boards yet, although we also have this on the Magnetometer shield.
By default, the address pin is (for this one) connected to VDD by a tiny copper trace.
To change the address, you have to rip that trace and solder a bridge between the address pin and ground.
Unfortunately, the PCB uses black solder mask, and even with a magnification glass I can't see where the connection between the default pins is made.
It looks like it's between the two pads of JP1, but maybe it isn't. That trace seems to wander off to somewhere.
Black solder mask and no published PCB design makes it unnecessary difficult to find out where to cut.
The default address, as configured on the module, is 0x39.
The interrupt pin, connected to Arduino D2, is worth reviewing. It can be set to react on one of the RGB colours.
I'll look into it in the next section.
Colour Sensor BH1749NUC
There are four light detecting diodes on the chip, capped with a transparant window.
There are three ADCs. The IR shares one with blue. The IC can work in IR reject mode, for ambiant light measurements.
image: block diagram and interrupt mechanism from ROHM datasheet
The interrupt can be set to any of the three visible colours.
You can set the threshold for that trigger, then react on that in your code.
You release the interrupt yourself from firmware.
The number of samples that have to exceed the threshold before triggering can be configured via i2c.
The example sketch and library don't use the trigger.
Test Setup
I've used white and coloured LEDs.
White (backlight of multimeter):
BH1749NUC (RED) = 35 BH1749NUC (GREEN) = 168 BH1749NUC (BLUE) = 81 BH1749NUC (IR) = 2 BH1749NUC (GREEN2) = 168
Desk LED lamp 1800 lm, 5000 K
BH1749NUC (RED) = 28784 BH1749NUC (GREEN) = 25682 BH1749NUC (BLUE) = 6682 BH1749NUC (IR) = 674 BH1749NUC (GREEN2) = 25798
White (Mobile phone torch):
BH1749NUC (RED) = 17950 BH1749NUC (GREEN) = 51230 BH1749NUC (BLUE) = 21999 BH1749NUC (IR) = 631 BH1749NUC (GREEN2) = 50787
I may update this post later with IR, green, blue, red and yellow LEDs. Depends on what the other road testers do.
But first I'm going to see if I can expand the example to work with the interrupt mechanism.
edit: not needed, Sparkfun did that: https://github.com/sparkfun/SparkFun_BH1749NUC_Arduino_Library/blob/master/examples/Example3_NewDataInterrupt/Example3_NewDataInterrupt.ino
Top Comments