Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

RS485. How to read a magnetic door switch

Status
Not open for further replies.

MoreSaku

Computer
Feb 23, 2016
4
Hi

I am new to RS485 and have it working to read temperature sensors etc.
I have a few magnetic door switched to determine if a door is open or closed.

How can I read these with RS485?
I assume I need some other device between the switch and the RS485 bus,
but have searched various suppliers etc and cannot find anything.

Any ideas how this is normally done?

Thanks in advance

 
Replies continue below

Recommended for you

LOL, that's because it isn't normally done.

RS485 is a communications protocol so it isn't used to detect switch positions. You will need some sort of microcontroller to 'communicate' what it's seeing on its inputs that are watching the switches.

Check with:
BB-electronics
Under serial connectivity.

or:
Black Box



Keith Cress
kcress -
 
Hi

Yes I understand that I need some device between the RS485 wires and the Magnetic door switch.

Just cannot find them. Will look for 'Serial Converters'

Does anyone know any off the shelf units to read switches etc?
I have used 1-Wire before and that has very cheap devices to do this, but I have to use RS485 for this.
I can see RS232-to-RS485 converters and USB-to-RS485 Converters.

Should I be looking for a RS485-to-TTL ? Can you connect the switch to the TTL pins?

Thanks for your help.


 
What exactly do you mean by "RS-485?" So you mean a serial port that uses an RS-485 interface? Or do you simply have an RS-485 interface into an I/O port, as implied by your last post? If the latter, you can get by with a buffer and a couple of resistors.

Is this for school? Student posting is not allowed.

TTFN
I can do absolutely anything. I'm an expert!
homework forum: //faq731-376 forum1529
 
Hi

I am just trying to lean how RS485 works. I have done some testing with a 1-Wire system to read temperature devices and read magnetic door switches.
I want to try this with RS485.
I know the device (DS2406) to use with 1-Wire.

Is there a commercial device to use for RS485 that can be used to read a few devices, temp, switch etc?

I am searching for Analog Serial Converters and think this is the kind of device I need.

Thanks again.

 
You can use an ADC, but that's a bit of an overkill, don't you think, to decode what is basically a two-state system into 8, 10, or 12 bits?

You can read about RS-485: and other sites. RS-485 is simply a description of an electrical interface that uses a differential pair of lines to communicate and to mitigate common-mode noise. The serial protocol is a separate thing completely, as the standard 8-bits plus start bit serial protocol is interface agnostic, and can run on RS-232, RS-422, RS-485, or a number of other interfaces.

Since RS-485 is simply a differential electrical interface, you can simply connect an RS-485 compatible driver input ( to a pullup resistor and attach your switch thereon. This will cause the RS-485 driver to toggle the state on its output, which you can use an RS-485 receiver to decode and run into any I/O pin and detect the logic state changes. BTDT.

RS-485 as the conduit for serial communications is a complete other layer of complexity. The thing of note here is that RS-485 was intended to support multiple masters and slaves, while RS-422 was intended primarily for a single master with multiple slaves. Thus, and RS-485 driver must have a tri-state mode to disconnect it from the bus when another master is attempting to gain access to the bus.

TTFN
I can do absolutely anything. I'm an expert!
homework forum: //faq731-376 forum1529
 
Thanks everyone - I have some reading to do and need to check out a few new devices.

Thanks again for your help.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor