RS485 Input Voltage Levels - Page 1
Forum section: electronics / projects

author: Sparky84
author_rank: Newbie
timestamp: December 13, 2024, 11:18:00 am
content: Hello,I am a little rusty on RS485, and I am unsure if it will read a (0-5V) PPS input signal. I have a spare RS485 input and I thought this would be a simple way to read a (0-5V) PPS signal into a 3V3 microcontroller. So essentially the signal path would be as below:PPS (0-5V) -> RS485 -> UART -> MicrocontrollerI think this should work, but I just needed a second opinion before I get the soldering iron outMany thanks,Sparky84

author: David Hess
author_rank: Super Contributor
timestamp: December 13, 2024, 12:12:59 pm
content: A RS-485 input should read a 0 to 5 volt digital signal just fine. A DC input at the other RS-485 input sets the threshold and the RS-485 receiver then operates as a comparator.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: December 13, 2024, 01:32:16 pm
content: RS485 is a differential signal, and you always have to use the two wires to get the voltage difference. But you can indeed use a DC bias voltage on one of the wires and then use the RS485 transceiver as a comparator.

author: Sparky84
author_rank: Newbie
timestamp: February 18, 2025, 03:24:05 pm
content: Hello,Thanks for your reply.Do you mean setting the threshold and wiring the input like this?Many thanks,Sparky84

author: Ian.M
author_rank: Super Contributor
timestamp: February 18, 2025, 03:36:56 pm
content: No. Ideally, you'd want to bias at 2.5V (half the logic high level) or a bit less (1.4V) if you wanted TTL input level compatibility. If minimal power consumption was essential and you needed to avoid potential dividers, you could probably get away with biasing at 3.3V from your MCU Vdd.

author: Sparky84
author_rank: Newbie
timestamp: February 18, 2025, 04:08:53 pm
content: Hello Ian,Thanks for the input.Here is V2 of my circuit and the threshold adjusted to 2V5. Is it okay to put a potential divider on the input and are 10k resistors to high a resistance for this application?Thanks,Sparky84

author: David Hess
author_rank: Super Contributor
timestamp: February 18, 2025, 04:32:32 pm
content: That will work, but like Ian.M says, 2.5 volts would be best. Assuming the input signal really is 5 volts, then 3.3 volts directly wired to the 3.3 volt supply is a good solution because it avoids the problem discussed below.The RS485 receiver can be treated as a comparator and the usual rules about comparators apply, meaning that it wants to see a low impedance at its inputs. If you use a resistive divider to apply 2.5 volts from 3.3 volts, then add a small capacitance from the middle of the divider to ground to lower the AC impedance if the divider resistance is high.Quote from: Sparky84 on February 18, 2025, 04:08:53 pm10 kilohms is pretty high for a comparator input. Place a capacitor from the reference input to ground to lower the AC impedance, and then measure the reference voltage. Some RS485 inputs have resistive dividers built in so may have a low enough input resistance to pull a higher value divider to another voltage.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 18, 2025, 04:36:37 pm
content: Quote from: Sparky84 on February 18, 2025, 04:08:53 pmno that's wrong - the top of your divider needs to be a fixed supply voltage. If your input is 5V then a fixed 3.3v would probably be OK, but the optimum would be 2.5v. Won't hurt to add al 100n cap across the bottom resistor to avoid noise issues. And swap A/B if you want inversion.

author: PGPG
author_rank: Frequent Contributor
timestamp: February 18, 2025, 07:33:08 pm
content: Quote from: Sparky84 on February 18, 2025, 04:08:53 pmWhen you have at input 5V than at divider you will get 2.5V - ok.But when at input you have 0V than at divider you will also get 0V.RS485 receiver needs +0.2V difference to detect one state and -0.2V difference to detect second state.In one case you give it 2.5V difference - ok. one state.But in second case you give it 0V - its output is not specified for 0V (except fail-save transceivers).

author: PCB.Wiz
author_rank: Super Contributor
timestamp: February 19, 2025, 02:56:05 am
content: Quote from: Sparky84 on February 18, 2025, 04:08:53 pm#3 is better than #5, as mentioned above, you have not created 2.5V. If you have only 3.3V and no 5V.You could put a series R from 3v3 to B, to give you closer to 2.5V, and give you some immunity from someone jumpering the termination (connecting your 5V signal to your 3v3 via termination R!).Rin of RS485 varies, some data says 32k nom min and some says nom 96k min.Check the data for the part you are using, and about 25% of the typical Rin, will give you ~ 2.5V, or you can create a lower R divider with 2 resistors from 3v3 to give 2.5V