SKU: OT3561 Número de artículo: AA686 EAN: 8720618827449
Este módulo convierte un voltaje de 0V - 10V en una señal PWM
Especificaciones del convertidor de voltaje a PWM:
Conexión:
VCC: + Voltaje de trabajo 5V-12V (alimentación de la propia placa)
GND: - Voltaje de trabajo 5V-12V
VIN: + Voltaje de entrada 0-10V (este se convierte en PWM)
GND: - Voltaje de entrada 0-10V
GND: - salida PWM
PWM: + salida PWM
Modo de uso:
Conecta el voltaje de trabajo a VCC y GND. No los conectes al revés para evitar daños en la placa y en los dispositivos. Conecta un voltaje regulable al terminal VIN. El rango de voltaje se divide en dos tipos: 0-5V y 0-10V según el modo seleccionado con el jumper. En la parte trasera de la placa se muestra esto. Por defecto está configurado en 0-5V.
La salida es PWM. El ciclo de trabajo puede ajustarse modificando el voltaje. La precisión puede controlarse ajustando el potenciómetro.
Así conectas el Módulo convertidor de voltaje a PWM 0-10V a un Arduino UNO o ESP32, con un sketch de ejemplo que puedes subir directamente.
Este circuito genera una señal PWM variable en el pin 9, que el módulo convertidor transforma en una tensión de salida analógica de CC proporcional (0-10V). Abre el Serial Monitor para observar el duty cycle PWM actual mientras sube y baja suavemente. Mide el terminal VOUT con un multímetro para verificar el cambio de la tensión analógica.
/*
* ==================================================================
* Generated by Codey.online — https://www.codey.online
* ==================================================================
* Project : PWM to 0-10V Voltage Converter Demo
* Board : Arduino UNO (arduino:avr:uno)
* Parts : PWM naar Voltage converter module 0-10V
* Libraries : none (built-in)
*
* Codey Online is an AI-powered browser IDE for Arduino and ESP32.
* Describe your project and Codey writes the code, draws the wiring
* diagram and uploads it to your board, straight from the browser.
* This code is free to use, modify and share, without warranty.
* ==================================================================
*/
// PWM to 0-10V Voltage Converter Module Demo
// Sweeps PWM duty cycle on pin 9 from 0% to 100% and back
const int pwmPin = 9;
void setup() {
pinMode(pwmPin, OUTPUT);
Serial.begin(115200);
Serial.println(F("PWM to 0-10V Converter Demo Initialized"));
}
void loop() {
// Ramp up
for (int duty = 0; duty <= 255; duty += 5) {
analogWrite(pwmPin, duty);
Serial.print(F("PWM Duty: "));
Serial.print(duty);
Serial.print(F("/255 ("));
Serial.print((duty * 100) / 255);
Serial.println(F("%)"));
delay(50);
}
delay(500);
// Ramp down
for (int duty = 255; duty >= 0; duty -= 5) {
analogWrite(pwmPin, duty);
Serial.print(F("PWM Duty: "));
Serial.print(duty);
Serial.print(F("/255 ("));
Serial.print((duty * 100) / 255);
Serial.println(F("%)"));
delay(50);
}
delay(500);
}
Wiring diagram and example code generated by Codey.online — https://www.codey.online
Este proyecto muestra cómo generar una tensión de control analógica de 0-10V usando un ESP32 y un módulo convertidor de PWM a voltaje. El ESP32 envía una señal PWM de 0-100% desde GPIO 4 al módulo, que la convierte en una salida DC proporcional de 0-10V, adecuada para PLC, VFD y reguladores de intensidad. Una fuente de alimentación externa de 12V alimenta el módulo convertidor.
/*
* ==================================================================
* Generated by Codey.online — https://www.codey.online
* ==================================================================
* Project : ESP32 0-10V PWM Voltage Converter Demo
* Board : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
* Parts : PWM naar Voltage converter module 0-10V
* Libraries : none (built-in)
*
* Codey Online is an AI-powered browser IDE for Arduino and ESP32.
* Describe your project and Codey writes the code, draws the wiring
* diagram and uploads it to your board, straight from the browser.
* This code is free to use, modify and share, without warranty.
* ==================================================================
*/
/*
* PWM to 0-10V Voltage Converter Demo
* Board: ESP32 DevKit V1
*
* Ramps output voltage from 0V to 10V and back down.
*/
const int PWM_PIN = 4; // GPIO 4 connected to PWM input
void setup() {
Serial.begin(115200);
pinMode(PWM_PIN, OUTPUT);
Serial.println("PWM to 0-10V Converter Demo Started");
}
void loop() {
// Ramp up from 0V to 10V
for (int duty = 0; duty <= 255; duty += 5) {
analogWrite(PWM_PIN, duty);
float expectedVoltage = (duty / 255.0) * 10.0;
Serial.print("Duty: ");
Serial.print(duty);
Serial.print("/255 | Output Voltage: ~");
Serial.print(expectedVoltage, 2);
Serial.println(" V");
delay(50);
}
delay(500);
// Ramp down from 10V to 0V
for (int duty = 255; duty >= 0; duty -= 5) {
analogWrite(PWM_PIN, duty);
float expectedVoltage = (duty / 255.0) * 10.0;
Serial.print("Duty: ");
Serial.print(duty);
Serial.print("/255 | Output Voltage: ~");
Serial.print(expectedVoltage, 2);
Serial.println(" V");
delay(50);
}
delay(500);
}
Wiring diagram and example code generated by Codey.online — https://www.codey.online