Introduction: Changing the RS485 Wind Sensor Address (SEN0483 or SEN0482)

About: Hello! My name is FuzzyPotato, I have a passion for electronics, Python programming, and DIY projects. I have always been fascinated by the way things work, and I have a love for using technology to solve prob…

When we purchase the wind speed sensor (SEN0483) or wind direction sensor (SEN0482) they have the same address. This means that we can not use them together unless we change the address on one of the sensors.


Supplies

  • RS485 wind speed sensor (SEN0483) or wind direction sensor (SEN0482)
  • Arduino board
  • UART to RS485 shield. I like this one (DFR0259)
  • USB cable

Step 1: Wiring

  1. Connect the RS485 to UART converter to the Arduino board.
  2. Connect the RS485 wind speed sensor to the RS485 to UART converter.
  3. Green wire to B-
  4. Yellow wire to A+
  5. Red wire to a 12v
  6. Black wire to ground
  7. Put the Arduino RS485 shield in “auto” mode. Auto mode takes care of some communication for us and makes our code simpler.

Step 2: Code


This will change the address from 02 to 03


byte address_ref_frame[] = {0x00, 0x10, 0x10, 0x00, 0x00, 0x01, 0x02, 0x00, 0x03, 0xFA, 0x00};

byte buf[11];


void setup(){  

Serial.begin(9600);  

Serial.println("Serial started");


Serial.println("-----------------------------------------------");   

Serial.println("Send");  

delay(1000);  

Serial.write(address_ref_frame, sizeof(address_ref_frame));  

Serial.flush();  

Serial.readBytes(buf, 11);  

delay(1000);


Serial.println("Buffer");  

Serial.println(buf[0], HEX);  

Serial.println(buf[1], HEX);  

Serial.println(buf[2], HEX);  

Serial.println(buf[3], HEX);  

Serial.println(buf[4], HEX);  

Serial.println(buf[5], HEX);  

Serial.println(buf[6], HEX);  

Serial.println(buf[7], HEX);  

Serial.println(buf[8], HEX);  

Serial.println(buf[9], HEX);  

Serial.println(buf[10], HEX);  

Serial.println(buf[11], HEX);    

Serial.flush();

}


Step 3: Testing

  1. Open the Arduino IDE and create a new sketch.
  2. Copy and paste the code provided into the sketch.
  3. Open the Serial Monitor in the Arduino IDE.
  4. Set the baud rate to 9600.
  5. Before uploading the code make sure to move the other switch to “off” and then back to “on” once the upload is complete. If you do not do this your Arduino and PC will not be able to communicate properly.
  6. Upload the code to the Arduino board.
  7. Observe the readings from the wind sensor displayed in the Serial Monitor: If the Slave response frame looks like this: 00 10 10 00 00 01 04 D8 (7byt), the modification is successful. After setting, you need to re-power on and restart the transmitter to make this address take effect.
  • Remember that after you change the address when you send a data request to the sensor you will need to use the new address.
  • New data request frame: 0x03, 0x03, 0x00, 0x00, 0x00, 0x01, 0x85, 0xE8

Step 4: Conclusion

Now we have a sensor that is of a different address. This means that we can use the wind speed sensor and wind direction sensor in parallel.

Take a look at m other tutorials on how to read the sensor readings.


Happy tinkering!