The MP1584EN Power Regulator Board is a compact, high-efficiency, adjustable step-down voltage regulator that uses the MP1584EN integrated circuit to convert higher input voltages to a lower, stable output voltage. This component is widely used in battery-powered devices, DIY electronics, and any application where voltage regulation is necessary to protect sensitive electronics.
Pin Number | Name | Description |
---|---|---|
1 | VIN | Input voltage (4.5V to 28V) |
2 | GND | Ground connection |
3 | VOUT | Regulated output voltage (0.8V to 20V) |
4 | ADJ | Adjustment pin (connected to onboard potentiometer for voltage adjustment) |
The MP1584EN Power Regulator Board can be used to power an Arduino UNO or its peripherals. Below is an example code snippet that demonstrates how to read the output voltage of the regulator using the Arduino's analog input. This can be useful for monitoring the voltage in your application.
// Define the analog pin connected to the VOUT of the regulator
const int voltagePin = A0;
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(voltagePin); // Read the analog value
float voltage = sensorValue * (5.0 / 1023.0); // Convert to voltage
Serial.print("Regulator Output Voltage: ");
Serial.print(voltage);
Serial.println(" V");
delay(1000); // Wait for 1 second before reading again
}
Note: The code assumes that the Arduino's 5V rail is used as a reference voltage and that the output voltage of the regulator is within the 0-5V range. If the output voltage is higher, a voltage divider must be used to bring the voltage within the readable range for the Arduino's analog input.