Skip to content
VEML-7700: Visible Light Intensity

icon picker
VEML-7700 Setup Guide


Pinouts

adafruit_products_VEML7700_pinouts.jpg
adafruit_products_VEML7700TopCropped.jpg

Power Pins

Vin - this is the power pin. Since the sensor chip uses 3 VDC, we have included a voltage regulator on board that will take 3-5VDC and safely convert it down. To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V micro like Arduino, use 5V
3Vo - this is the 3.3V output from the voltage regulator, you can grab up to 100mA from this if you like
GND - common ground for power and logic

I2C Logic Pins

SCL - this is the I2C clock pin, connect to your microcontroller's I2C clock line.
SDA - this is the I2C data pin, connect to your microcontroller's I2C data line.
- These connectors allow you to connect to development boards with STEMMA QT connectors, or to other things, with.

Power LED and LED Jumper

Power LED - In the upper right corner, above the STEMMA connector, on the front of the board, is the power LED, labeled on. It is a green LED.
LED jumper - This jumper is located on the back of the board. Cut the trace on this jumper to cut power to the "on" LED.
adafruit_products_4162.png

Assembly

adafruit_products_image.png
adafruit_products_DSC_4206.jpg
adafruit_products_DSC_4206.jpg
adafruit_products_DSC_4210.jpg
adafruit_products_DSC_4212.jpg

Prepare the header strip:

Cut the strip to length if necessary. It will be easier to solder if you insert it into a breadboard - long pins down
adafruit_products_DSC_4211.jpg

Add the breakout board:

Place the breakout board over the pins so that the short pins poke through the breakout pads
adafruit_products_DSC_4214.jpg
adafruit_products_DSC_4214.jpg
adafruit_products_DSC_4216.jpg
adafruit_products_DSC_4224.jpg

And Solder!

Be sure to solder all 5 pins for reliable electrical contact. ​(For tips on soldering, be sure to check out our ).
adafruit_products_DSC_4227.jpg
You're done! Check your solder joints visually and continue onto the next steps

Arduino


Wiring

Connecting the VEML7700 to your Feather or Arduino is easy:
The contents of image.jpeg appear to present a security risk
adafruit_products_VEML7700QR_Arduino_STEMMA_bb.jpg
adafruit_products_VEML7700QR_Arduino_breadboard_bb.jpg
adafruit_products_VEML7700_arduino_original.jpg
If you are running a Feather (3.3V), connect Feather 3V to board VIN (red wire on STEMMA QT version)
If you are running a 5V Arduino (Uno, etc.), connect Arduino 5V to board VIN (red wire on STEMMA QT version)
Connect Feather or Arduino GND to board GND (black wire on STEMMA QT version)
Connect Feather or Arduino SCL to board SCL (yellow wire on STEMMA QT version)
Connect Feather or Arduino SDA to board SDA (blue wire on STEMMA QT version)
The final results should resemble the illustration above, showing an Adafruit Metro development board.

Installation

You can install the Adafruit VEML7700 Library for Arduino using the Library Manager in the Arduino IDE:
adafruit_products_Arduino_Manage_Libraries.png
Click the Manage Libraries ... menu item, search for Adafruit VEML7700, and select the Adafruit VEML7700 library:
adafruit_products_Arduino_VEML7700_Library.png
Then follow the same process for the Adafruit BusIO library.
The contents of image.png appear to present a security risk

Load Example

Open up File -> Examples -> Adafruit VEML7700 -> veml7700_test and upload to your Arduino wired up to the sensor.
Upload the sketch to your board and open up the Serial Monitor (Tools->Serial Monitor). You should see the the values for Lux, white light, and raw ambient light levels.

Example Code

The following example code is part of the standard library, but illustrates how you can retrieve sensor data from the VEML7700 for the Lux, white light and raw ambient light values:
#include "Adafruit_VEML7700.h"

Adafruit_VEML7700 veml = Adafruit_VEML7700();

void setup() {
Serial.begin(115200);
while (!Serial) { delay(10); }
Serial.println("Adafruit VEML7700 Test");

if (!veml.begin()) {
Serial.println("Sensor not found");
while (1);
}
Serial.println("Sensor found");

// == OPTIONAL =====
// Can set non-default gain and integration time to
// adjust for different lighting conditions.
// =================
// veml.setGain(VEML7700_GAIN_1_8);
// veml.setIntegrationTime(VEML7700_IT_100MS);

Serial.print(F("Gain: "));
switch (veml.getGain()) {
case VEML7700_GAIN_1: Serial.println("1"); break;
case VEML7700_GAIN_2: Serial.println("2"); break;
case VEML7700_GAIN_1_4: Serial.println("1/4"); break;
case VEML7700_GAIN_1_8: Serial.println("1/8"); break;
}

Serial.print(F("Integration Time (ms): "));
switch (veml.getIntegrationTime()) {
case VEML7700_IT_25MS: Serial.println("25"); break;
case VEML7700_IT_50MS: Serial.println("50"); break;
case VEML7700_IT_100MS: Serial.println("100"); break;
case VEML7700_IT_200MS: Serial.println("200"); break;
case VEML7700_IT_400MS: Serial.println("400"); break;
case VEML7700_IT_800MS: Serial.println("800"); break;
}

veml.setLowThreshold(10000);
veml.setHighThreshold(20000);
veml.interruptEnable(true);
}

void loop() {
Serial.print("raw ALS: "); Serial.println(veml.readALS());
Serial.print("raw white: "); Serial.println(veml.readWhite());
Serial.print("lux: "); Serial.println(veml.readLux());

uint16_t irq = veml.interruptStatus();
if (irq & VEML7700_INTERRUPT_LOW) {
Serial.println("** Low threshold");
}
if (irq & VEML7700_INTERRUPT_HIGH) {
Serial.println("** High threshold");
}
delay(500);
}
You should get something resembling the following output when you open the Serial Monitor at 115200 baud:
adafruit_products_VEML7700_Arduino_Serial_Output.png

Sources

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.