INFORMACIÓN
El Sensor de Luz UV 290-390nm (UVA, UVB) con RS485 es un dispositivo que mide la intensidad de la radiación ultravioleta en el rango de longitudes de onda de 290 a 390 nanómetros, cubriendo las bandas UVA y UVB. Este sensor se comunica mediante el protocolo estándar Modbus-RTU a través de RS485. Es compatible con placas como Arduino UNO R3 usando módulos adaptadores como el TTL a RS485. Su carcasa metálica de aluminio con nivel de protección IP67 lo hace resistente al polvo y al agua, lo que permite su uso en exteriores y condiciones adversas.
Este sensor se utiliza ampliamente en aplicaciones como monitoreo ambiental, protección de la salud frente a la radiación UV, análisis del crecimiento de cultivos, sistemas fotovoltaicos y proyectos de investigación científica.
ESPECIFICACIONES Y CARACTERÍSTICAS
- Marca: DFROBOT
- Modelo: SEN0642
- Voltaje de alimentación: DC 5–30V
- Corriente de trabajo: <10mA
- Modo de salida: RS485
- Rango de medición de intensidad UV: 0–15 mW/cm²
- Resolución: 0.01 mW/cm²
- Precisión: ±10% FS (@365nm, 60% HR, 25°C)
- Rango de medición del índice UV: 0–15
- Rango de longitud de onda: 290–390 nm
- Tiempo de respuesta: 0.2 s
- Protocolo de comunicación: Modbus-RTU 485
- Temperatura de trabajo: -25°C a +60°C
- Nivel de protección: IP67
- Longitud del cable del sensor: 20 cm
- Longitud del cable adaptador: 70 cm
- Peso: 222 g
DOCUMENTACIÓN Y RECURSOS
INFORMACIÓN ADICIONAL
Para probar tu sensor te sugerimos realizar las siguientes conexiones y cargar el programa para obtener lecturas a través del monitor serie del Arduino IDE.
Para conectar tu sensor al Arduino uno o similares necesitas un adaptador RS485 a TTL, para ello da clic aquí para adquirir uno o puedes usar el empleador por DFROBOT

#include <SoftwareSerial.h>
SoftwareSerial mySerial(2,3);
uint8_t Com[8] = { 0x01, 0x03, 0x00, 0x00, 0x00, 0x01, 0x84, 0x0A };
uint8_t Com1[8] = { 0x01, 0x03, 0x00, 0x01, 0x00, 0x01, 0xD5, 0xCA };
void setup() {
Serial.begin(9600);
mySerial.begin(4800);
}
void loop() {
float UV = readUV();
Serial.print("UV = ");
Serial.print(UV);
Serial.print(" mW/cm² ");
uint16_t UVI = readUVI();
Serial.print("UVI = ");
Serial.println(UVI);
delay(1000);
}
float readUV(void) {
uint8_t Data[10] = { 0 };
uint8_t ch = 0;
float data;
bool flag = 1;
while (flag) {
delay(100);
mySerial.write(Com, 8);
delay(10);
if (readN(&ch, 1) == 1) {
if (ch == 0x01) {
Data[0] = ch;
if (readN(&ch, 1) == 1) {
if (ch == 0x03) {
Data[1] = ch;
if (readN(&ch, 1) == 1) {
if (ch == 0x02) {
Data[2] = ch;
if (readN(&Data[3], 4) == 4) {
if (CRC16_2(Data, 5) == (Data[5] * 256 + Data[6])) {
data= (Data[3] * 256 + Data[4]) / 100.00;
flag = 0;
}
}
}
}
}
}
}
}
mySerial.flush();
}
return data;
}
int readUVI(void) {
uint8_t Data1[10] = { 0 };
int16_t data1;
uint8_t ch1 = 0;
bool flag1 = 1;
while (flag1) {
delay(100);
mySerial.write(Com1, 8);
delay(10);
if (readN(&ch1, 1) == 1) {
if (ch1 == 0x01) {
Data1[0] = ch1;
if (readN(&ch1, 1) == 1) {
if (ch1 == 0x03) {
Data1[1] = ch1;
if (readN(&ch1, 1) == 1) {
if (ch1 == 0x02) {
Data1[2] = ch1;
if (readN(&Data1[3], 4) == 4) {
if (CRC16_2(Data1, 5) == (Data1[5] * 256 + Data1[6])) {
data1 = Data1[3] * 256 + Data1[4];
flag1 = 0;
}
}
}
}
}
}
}
}
mySerial.flush();
}
return data1;
}
uint8_t readN(uint8_t *buf, size_t len) {
size_t offset = 0, left = len;
int16_t Tineout = 500;
uint8_t *buffer = buf;
long curr = millis();
while (left) {
if (mySerial.available()) {
buffer[offset] = mySerial.read();
offset++;
left--;
}
if (millis() - curr > Tineout) {
break;
}
}
return offset;
}
unsigned int CRC16_2(unsigned char *buf, int len) {
unsigned int crc = 0xFFFF;
for (int pos = 0; pos < len; pos++) {
crc ^= (unsigned int)buf[pos];
for (int i = 8; i != 0; i--) {
if ((crc & 0x0001) != 0) {
crc >>= 1;
crc ^= 0xA001;
} else {
crc >>= 1;
}
}
}
crc = ((crc & 0x00ff) << 8) | ((crc & 0xff00) >> 8);
return crc;
}
⚠️NOTAS ⚠️
- El sensor es un dispositivo de precisión. Para evitar daños al producto, no lo desmonte durante su uso.
- Si el valor de lectura es 0, compruebe si hay una fuente de luz y si la cubierta protectora del producto está retirada.
- Si el bus 485 está desconectado o las líneas A y B están conectadas al revés, no tendrá lecturas
- Compruebe que la fuente de alimentación cumpla con las marcas de polaridad.
ENLACES EXTERNOS








































Valoraciones
No hay valoraciones aún.