Utilizing the AK9723 LED driver and AK9730 photodiode to control the operation and intensity of an infrared LED (AK9703) based on ambient light conditions.
AK9723AJ is an IR LED driver and Analog Front End (AFE) IC designed for signal processing of IR photodetectors. It features a dual-channel AFE and an ADC for digital output, enabling IR photodetector output signals to be obtained simultaneously. The AK9723AJ is suitable for NDIR (Non-Dispersive Infrared) gas sensing applications using IR LED and IR photodetectors.
- Integrated LED Driver with Programmable Constant Current Circuit
- Dual-Channel Input AFE
- Communication via I2C bus with HOST MCU
- Suitable for NDIR gas sensing applications
- Oscillator (OSC)
- Reference voltage and reference current generator (VIREF)
- Temperature sensor (TSENS)
- Sigma-delta analog-to-digital converter (ADC1/2)
- LED constant current driver (LED DRIVER)
- Register (REGISTER) to store measurement data, operation mode, and timing value
- I2C communication, interrupt, power-down, test, IR photodetector connections, LED driver output, power supply, and ground
- Operating temperature range: -40°C to 85°C
- Power Supply Voltage Range: 2.7V to 3.6V
- Analog, digital, and AC characteristics specified
- Supports I2C bus interface with standard mode (up to 100kHz) and fast mode (up to 400kHz)
AK9703AJ is a small mid-infrared quantum photodiode optimized for NDIR gas sensing applications. It features high sensitivity, high-speed response, and high reliability.
- High sensitivity with a signal-to-noise ratio three times higher than conventional thermopiles
- High-speed response of approximately 100kHz
- Built-in optical band-pass filter with a centre wavelength (CWL) of 3.32μm
- Compact 3mm x 3mm surface-mount plastic package
- NDIR gas sensing applications, including methane (CH4), R32, etc.
- Operating temperature range: -40°C to 85°C
- Output current ranges from 2.9nA to 14.2nA
- Internal resistance ranges from 15kΩ to 250kΩ
AK9730AJF21 is a miniaturized mid-infrared light-emitting diode optimized for NDIR gas sensing applications. It operates at room temperature and offers high radiant intensity, high-speed response, and high reliability.
- High radiant intensity with a peak wavelength (λp) of 3.6μm
- Angle of half intensity (Φ) is 60°
- Suitable for high-speed pulse current operation
- Compact 2.6mm x 1.9mm x 0.4mm surface-mount package
- NDIR gas sensing applications, including methane (CH4), R32, etc.
- Reverse Voltage (VR): 1V
- Forward Current (IF): 0.5A
- Power Dissipation (PV): 110mW
- Operating Temperature: -40°C to 85°C
- Forward Current (IF): 100mA to 125mA (Duty cycle: 0.15%, Pulse width: 0.25ms)
- Output Current (Ip) of the calibrated infrared sensor ranges from 1.43nA to 5.73nA
- Internal Resistance (Ro) of the calibrated infrared sensor ranges from 18kΩ to 589kΩ
- Set up the microcontroller and establish communication with the AK9723 LED driver and AK9730 photodiode using the Wire library.
- Define necessary constants such as I2C addresses, register addresses, LED control commands, LED on/off time, and maximum LED intensity.
- Implement functions to control the LED. These functions should include commands to turn the LED on/off and set its intensity.
- Implement a function to read data from the AK9730 photodiode. This function should request data from the photodiode and interpret the response to obtain ambient light intensity.
- Turn on the LED for a specified duration.
- Turn off the LED for an equal duration.
- Read data from the photodiode to measure ambient light intensity.
- Adjust the LED intensity based on the ambient light level measured by the photodiode.
- Serially print photodiode data and LED intensity for monitoring purposes.
- Continuous Execution: Repeat the main loop continuously to maintain LED operation and intensity control.
The main code consists of functions and a main loop to control the AK9723 LED driver and AK9730 photodiode. It initializes the hardware, defines constants, controls the LED, reads photodiode data, and adjusts LED intensity based on ambient light levels. The code utilizes the Wire library for I2C communication.
The header files include declarations for functions and constants related to the AK9723 LED driver and AK9730 photodiode. They provide an interface for the main code to interact with the hardware components.