I'm using a RS232 to rs485 converter to connect a PC to a rs485 bus. The bus is half-duplex, so how can I detect if someone is speaking in the bus and avoid collisions??
Could you advise me any rs232 to rs485 converter that has collision detection?
thanks
Do you want to write protocol for communication on RS-485 bus? If so, you should read "data communication" book. Else, I think converter must have the hardware support for communication on bus.
First you must check that nothing is received (bus idle) for some time (a few mS).
Afterwards start sending your packet. As the bus is half duplex you are also receiving what you are sending, so if you do not receive exactly what you are sending there must be a collision. So go back to start and wait a few mS while nothing is received (bus idle) and restart sending your packet.