Using the LM73100 Ideal Diode with Arduino involves wiring up the breakout to your Arduino-compatible microcontroller and running the provided example code.
Wiring
Wire as shown for a 5V board like an Uno, with the breakout inline with an external DC power supply. If you are using a 3V board, like an Adafruit Feather, wire the board's 3V pin to the breakout VIN.
- Power supply positive to ideal diode VIN (red wire)
- Power supply negative to ideal diode GND (black wire)
- Ideal diode OUT to DC jack positive (red wire)
- Ideal diode GND to DC jack negative (black wire)
- DC jack output to Metro DC jack
- Ideal diode IMON to Metro pin A0 (yellow wire)
No additional libraries are needed for this example.
// SPDX-FileCopyrightText: 2025 Liz Clark for Adafruit Industries
//
// SPDX-License-Identifier: MIT
// LM73100 IMON Current Monitoring
const int IMON_PIN = A0; // IMON connected to analog pin A0
const float RIMON = 1500.0; // RIMON resistor value in ohms (1.5kΩ)
const float GIMON = 2.5; // GIMON typical value in μA/A (from datasheet, typical is 2.5)
const float VREF = 5.0; // Arduino reference voltage (5V for most Arduinos)
const int ADC_RESOLUTION = 1024;
void setup() {
Serial.begin(9600);
pinMode(IMON_PIN, INPUT);
Serial.println("LM73100 Current Monitor Started");
Serial.println("================================");
Serial.print("RIMON: ");
Serial.print(RIMON);
Serial.println(" ohms");
Serial.print("GIMON: ");
Serial.print(GIMON);
Serial.println(" μA/A");
Serial.println("================================\n");
}
void loop() {
int adcValue = analogRead(IMON_PIN);
float vimon = (adcValue * VREF) / ADC_RESOLUTION;
float iout_A = vimon / (RIMON * GIMON);
float iout_mA = iout_A * 1000.0;
Serial.print("ADC Value: ");
Serial.print(adcValue);
Serial.print(" | VIMON: ");
Serial.print(vimon, 3);
Serial.print(" V | Output Current: ");
Serial.print(iout_mA, 2);
Serial.print(" mA (");
Serial.print(iout_A, 3);
Serial.println(" A)");
delay(500); // Read every 500ms
}
Upload the sketch to your board and open up the Serial Monitor (Tools -> Serial Monitor) at 115200 baud. You'll see the raw analog reading, the IMON voltage reading and the current draw from the IMON pin printed out to the Serial Monitor. The code uses the formula from the datasheet (page 20, section 7.3.5 "Analog Load Current Monitor Output"):
Iout (A) = (Vimon(V) × 10^-6) / (Rimon(Ω) × Gimon(μA/A))
to calculate the current from the voltage output from the IMON pin as an analog reading.
Page last edited July 15, 2025
Text editor powered by tinymce.