Measuring Wind Speed With the RS485 Sensor (SEN0483) and Arduino

by FuzzyPotato in Circuits > Arduino

1614 Views, 0 Favorites, 0 Comments

Measuring Wind Speed With the RS485 Sensor (SEN0483) and Arduino

PXL_20230212_003709104.jpg

This project demonstrates how to measure wind speed using an RS485 wind speed sensor (SEN0483) and an Arduino board. The RS485 sensor sends wind speed data to the Arduino, which reads the data and converts it into a readable format. The wind speed readings are displayed on the Serial Monitor for easy observation. The project includes wiring instructions and code for the Arduino board to perform the necessary operations.

Supplies

PXL_20230212_003709104.jpg
PXL_20230212_003727153.jpg
PXL_20230212_003734749.jpg
  • RS485 wind speed sensor (SEN0483)
  • Arduino board
  • UART to RS485 shield. I like this one (DFR0259)
  • USB cable

Wiring

PXL_20230212_003742420.jpg
PXL_20230212_003759526_exported_666_1676162648849.jpg
PXL_20230212_003827776.jpg
  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.


Code

Arduino IDE.PNG
  1. Open the Arduino IDE and create a new sketch.
  2. Copy and paste the code provided into the sketch.
  3. 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.
  4. Upload the code to the Arduino board.


byte wind_speed_ref_frame[] = {0x02, 0x03, 0x00, 0x00, 0x00, 0x01, 0x84, 0x39};

byte buf[8];

int speed_dec_value;


void setup()

{

Serial.begin(9600);

Serial.println("Start");

}


void loop()

{

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

Serial.println("Sending read request");

delay(1000); // waiting for serial data to clear

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

Serial.flush();

Serial.readBytes(buf, 8);

delay(10);


speed_dec_value = buf[4], DEC;

Serial.println("");

Serial.print("Wind Speed: ");

Serial.print(speed_dec_value/10);

Serial.println(" m/s");


Serial.println("Buffer");

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

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

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

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

Serial.print(buf[4], DEC);

Serial.println(" !");

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

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

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

Serial.flush();

delay (3000);

}


Testing

Serial Monitor.PNG
  1. Open the Serial Monitor in the Arduino IDE.
  2. Set the baud rate to 9600.
  3. Observe the readings from the wind speed sensor displayed in the Serial Monitor.


Conclusion

With this setup, you can read the wind speed values from the RS485 wind speed sensor and display it on the Serial Monitor. The code provided performs the necessary operations to read the wind speed values and convert it into a readable format. You can now use the wind speed readings for your own projects and applications. Happy tinkering!