I have DVR with Serial Port RS485 .... it can be managed by SW to send PTZ command trough RS485 port to move PTZ camera once event occur , but what I need when I send "any" command trough RS485 to trigger 5v relay ....
I thought of using RS485 to TTL with mini arduino to do job , but I'm thinking if there is simpler way and less cost way because I'm thinking of it to adopt it in my business , so I need less cost way and less complicated way ...
if not applicable I need support from those who can help to send me code for mini arduino
Just theorizing here, but if you had a MAX485 based RS485 module, wired in permanent receive mode, I think the RO output will be mostly high, then toggling low/high as data is sent on the RS485 bus.
If you then had a monostable timer (555?) triggered from a high/low transition of RO, then you could use the timer output to drive a relay module.
EDIT: You may be able to get a relay module with a built in time delay unit.
If you connected the RE & DE pins to 0v, then the module would be in receive mode. The RO pin will output any data that's on the RS485 bus. When the 485 bus is idle, I think the RO pin will be high. At the first sign of any 485 activity, then the RO pin will go low (i.e the start bit of the first byte of data).
You could use this high to low transition to trigger a monostable timer which in turn drives a relay. You could also use something like this module that I found on AliExpress:
The description seems to indicate that it will trigger the built-in timer when the trig pin goes low, the timer is triggered and the relay energises for a pre-determined time. The original text is:
Providing a low pulse signal, or touch trigger key, relay and indicator lights, the output of the state: normally open (NO) and Common (COM) connected, normally closed (NC) and the common terminal (COM) is disconnected. After 0-24 seconds (this time can be adjusted according to your needs) relay off, back to the state before the trigger.
I want to thank you for such really Great Help .... the trial was done with RS485-TTL Using Basic Relay module without delay timer the Prototype was able to interrupt any MSG from Port , and finally thats what I need simple basic inexpensive easy to deploy
The connection Was as you mentioned RO was giving trigger signal on each MSG DE/RE both on GND .