Hi experts,
i am a newbie to RS485, i want to make a temperature and humidity sensor with rs485 output but i don't know how to do this, if anybody have a idea to do this kindly share with me
regards
kannannatesh
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi experts,
i am a newbie to RS485, i want to make a temperature and humidity sensor with rs485 output but i don't know how to do this, if anybody have a idea to do this kindly share with me
regards
kannannatesh
Dear Surya -
Since I2C is so radically different from RS-485, I think your best option would be to use the UART pins on same MCU which is also interfacing to sensors over I2C. Then you just need to have basically RS232 (TTL/UART) to RS485 converter.
Here are a couple reference designs for exactly that last part:
Hi Josh Wyatt
thanks for the answer, you know that RS485 has a multiple register operation like holding registers, write registers, and read registers and every register have multiple registers for reading/write the value, here my doubt is how can i create those registers and how can i store the data to that output registers.
regards
surya
Hi Josh Wyatt
thanks for the reply, yes you had already shared the reference designs but that design shows the value or string transmitted continuously so other end pc or MC receive the string/value with the help of rs485 to usb/rs232 converter but i am asking about my microcontroller transmit the data like i2c sensor, Currently, i have an ultrasonic level sensor with RS485 output that manufacture attached the datasheet of the sensor the datasheet have an only one page data like
device id(1), holding register value(03), level registers like data is 4byte length so register value is 100 to 103 that's all so i connect the level sensor with rs485 to ttl out (max485 ic based) converter to my controller and send the request like
char buf[]={0x01,0x03,0x64,0x04,0x52,0x34};//don't mind CRC value it's just example
serial.write(buf,8);
then my controller serial receive 10byte of data including deviceid, level,readed data length,CRC
i want to do the same with my controller, my controller replies to PC/mc when PC/controller sends the data request as per the above example format.
Hi Josh Wyatt
Thanks for the reply, and Yes, you are correct this is exactly what i want to do