ESP32/IoT B.Tech/Diploma Beginner

DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

DIY Colorimeter or True Color Analyzer with AS7265x Triad Spectroscopy Sensor & ESP32 to display RGB spectral color value on webserver

  • Suitable forB.Tech/Diploma ESP32/IoT students
  • Build time1-2 weeks
  • LevelBeginner
  • Available atAjvika Labs, Kakinada

About this project

Overview
In this project, we will build a
Smart Colorimeter
—also called a
True Color Analyzer
—using the
ESP32
and the
AS7265x Triad Spectroscopy Sensor
. The
AS7265x
is an advanced
18-channel spectral sensor
covering the visible, UV, and near-infrared ranges, enabling accurate
color detection
and basic
material analysis
in a compact form.
The
ESP32–AS7265x Smart Colorimeter
is designed to measure and visualize color information with high precision. It continuously captures
spectral data
and converts it into user-friendly
RGB
and
HEX color values
, all displayed on a clean, real-time
web dashboard
hosted directly on the ESP32.
This device works as a portable scientific tool for
colorimetry, spectral fingerprinting
, and general
optical monitoring
. Its compact design makes it ideal for analyzing
pigments, LEDs, textiles, foods, plastics
, and various experimental materials—providing a small, practical introduction to real-world
spectroscopy.
To get started with Triad Spectroscopy sensor, you can refer to
AS7265x Arduino Interfacing
guide.
AS7265x Triad Spectroscopy Sensor
Fig- AS7265x Triad Spectroscopy Sensor
The
AS7265x
Triad Spectroscopy Sensor
is a compact and versatile optical inspection module, often referred to as a
desktop spectrophotometer
. It combines three independent spectral sensors—the
AS72651
AS72652
, and
AS72653
—to deliver
18 calibrated spectral channels
ranging from
410 nm (UV)
to
940 nm (IR)
. This wide spectral range enables detailed analysis of how different materials
absorb, reflect, or transmit light
across visible, ultraviolet, and near-infrared wavelengths.
Fig- AS7265x Spectral Detection Frequencies
To support professional-quality illumination, the Triad integrates
three LEDs
positioned around the sensor array:
A
5700K white LED
for general visible-light illumination
A
405 nm ultraviolet LED
An
875 nm infrared LED
Each LED can be individually controlled through software, with adjustable drive current, allowing the sensor to illuminate targets under different spectral conditions for more accurate readings.
Fig- AS7265x Spectroscopy Triad-LEDs
The Triad is built around
three AMS sensors
, each responsible for a specific spectral region:
AS72651 — UV Sensor (Master)
AS72652 — Visible Light Sensor (Slave)
AS72653 — Near-Infrared Sensor (Slave)
The AS72651 acts as the
master controller
, communicating with the other two sensors over a dedicated internal I²C bus. By default, the AS7265x communicates using
I²C
at address
0x49
. After collecting data from all three devices, it combines the spectral measurements and exposes them to the user as a
single set of 18 spectral channels
, providing a seamless interface for software developers.
The SparkFun Triad includes a
4 Mbit EEPROM
, which stores the operational firmware. At power-up, the AS72651 automatically loads the firmware, enabling all sensor functions and coordinated multi-sensor operation. The board also supports a
115200 baud UART serial interface
, which uses a simple
AT command set
for configuring illuminators, reading sensor channels, and adjusting measurement parameters.
Colorimeter Circuit Design & Schematic
Let’s walk through the hardware design of the
ESP32 AS7265x-based Smart Colorimeter / True Color Analyzer System
in detail.
Fig: Schematic for ESP32 AS7265x Colorimeter Project
The board is powered through a USB Type-C port. If battery operation is required, charging can be handled by a Li-ion charging IC such as the
BQ24092D
(or similar). It supports
CC/CV charging
, pre-conditioning, and auto cut-off. A small LED indicates charging status. A JST-PH connector is used to connect a
3.7 V Li-ion/LiPo battery
. A slide switch is added to turn the system on or off.
The regulated 3.3 V supply for the ESP32 and the AS7265x sensor is provided by a
buck-boost converter
like the
TPS63020
. It ensures a stable 3.3 V output across the entire
battery voltage
range (3.0–4.2 V). This keeps the ESP32 and the spectroscopy sensor powered reliably even at low battery levels.
Programming is done through the PROG header or the onboard USB interface using an
FTDI adapter
(depending on your ESP32 module). Two transistors, Q1 and Q2, handle the auto-reset and auto-boot sequence. This means no buttons are needed during code upload.
Extra GPIO pins are broken out for sensors and modules.
IO21 (SDA)
and
IO22 (SCL)
provide the I²C interface for connecting the
AS7265x Triad Spectroscopy Sensor
, which is the core of the colorimeter system.
Download:
Schematic PDF
Download:
Bill of Materials (BOM)
Download:
Pick & Place File
Project PCB Design, Gerber File & PCB Ordering Online
The schematic of the
ESP32 AS7265x
was created in
EasyEDA
, and from there it was converted into a compact PCB layout.
Fig: PCB Layout of ESP32 AS7265x Colorimeter
The board is designed with mostly
SMD components
to keep the size small. Resistors and capacitors are in the 0603 package, while the main ICs, such as the
TPS63020 buck-boost converter a
nd the
BQ24092D battery charger,
are also in SMD form.
Fig: Front Side of PCB
All of the critical components, including the ESP32-WROOM module, are placed on the
front side of the PCB
, which makes assembly easier and more reliable.
Fig: Backside of PCB
The
Gerber files
for this board are available and can be used to place an order directly with
ALLPCB
. They offer PCB prototyping services at very low cost, and new users get extra benefits.
👉
Download:
ESP32 Battery Monitoring System Gerber File
Ordering is straightforward: go to the
ALLPCB Official Website
. Then upload the Gerber files using the
Quote Now
option, and choose your board parameters like material, dimensions, thickness, quantity, and solder mask color.
Currently,
ALLPCB
provides a special promotion for new users —
$30 off the first PCB order and $30 off shipping
, effectively giving you
free shipping with no restrictions on board size, layers, or quantity.
Here is the campaign detail:
Unlock $1 PCB Prototyping
Once you finalize the details, select your shipping option, confirm the order, and wait for the boards to be delivered.
Fig: 3D View of the PCB Board
The
3D preview
of the PCB design shows the placement of the ESP32, power management ICs, and passive components neatly arranged on the front side.
Assembly & Testing the DIY ESP32 AS7265x Colorimeter Board
After about a week, the finished PCBs arrived from
ALLPCB
. The quality was excellent, with smooth solder pads and precise silkscreen printing—perfect for assembling the ESP32 IoT board.
Assembly begins with soldering all the
SMD components
on the front side. The design is compact, so only the front contains the ESP32 module, buck-boost converter, charger IC, and supporting resistors and capacitors.
In the first prototype there were a few minor value adjustments for capacitors and resistors, but these have been corrected in the
final Gerber release
, so you can assemble the latest version without any issues.
Once assembled, connect a
3.7 V Li-ion/LiPo battery
to the JST connector. Programming the ESP32 is done through the
PROG header
with an
FTDI adapter
. Thanks to the automatic reset circuitry, there’s no need to press boot or reset buttons—the upload process is completely automatic.
For charging, simply plug in a
USB Type-C cable.
A red LED will indicate charging, and you can verify it by checking the battery voltage with a multimeter.
The voltage should gradually increase during charging, confirming that the system is working properly.
Source Code/Program for ESP32 AS7265x Colorimeter
Now let’s move to the coding part. We will develop an
Arduino C++ code
to interface the
AS7265x
with the
ESP32
and build our Smart Colorimeter / True Color Analyzer.
There is a dedicated
library for the AS7265x
from SparkFun. First, download the library from the following link and add it to your Arduino libraries folder:
Download –
AS7265x Arduino Library
The library contains many examples, and

Technologies used

ESP32ArduinoBLEFingerprintUARTC++

Hardware components

  • ESP32
  • Arduino

Software & tools

  • EasyEDA

What you get

  • Working project / hardware kit, tested before delivery
  • Complete source code with explanation
  • Project demo and guidance for your viva
  • Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed. Payment is in two parts: • 50% advance to start the project • Remaining 50% before delivery Note: • Documentation and PPT are not included by default • If you need documentation/PPT, it can be arranged for extra time and cost We'll confirm the exact timeline and cost with you after reviewing your requirements.