Tuesday 14 March 2017

communication - Connecting LED to RO pin of RS485 Transceiver



I am using this RS485 transceiver in a circuit of mine and I'd like to place a tiny 0805 LED in series with a 1k resistor coming off of the RO (receiving) pin. I'm hoping this would result in flashing of the LED. However, since I don't have a ton of experience with RS485 transceivers, I'm not sure this will work. Will it cause any issues with communication? Will it look right? Thanks.



Answer



As noted, typical baud rates will flash the LED at rates which are invisible to the eye.


The visual effect that you want can be obtained by adding either some form of triggered oscillator or some form of "monostable" or (most elegantly) by using a microcontroller to control the flashing and decision making.


A single Schmitt trigger gate in a tiny package would do the job. Probably a SOT23-6 package.


While using a microcontroller may seem like bizarre overkill (and probably is :-) ) it also allows a minimum parts count solution, small size, great flexibility, addition of other features if desired AND immense Cool! value.


A device such as a PIC10F200 in stock at digikey for 56 cents in 1's would do your job with NO extra parts apart from the LED, or perhaps one resistor if you wanted to be "proper". I chose that for it's lowest cost in 1's in a small package - but you can get cheaper.


If this is a one off job there will be people willing to write a program for you for free AND program you a chip, just for the sheer joy of the stupidity of such overkill.


Packages include DFN (2mmj x 3mm leadless smd), SOT23-6 (2.3 x 3.1mm worst case outside leads) and DIP.


Schmitt trigger inverter based flasher:



The diagram below is from fig 14 in 74HC14 data sheet here


Oscillator


This will drive an LED or a second gate can be used as a buffer.


To gate this on and off a diode is connected to the gate input.




  • Gate package 74HC14 or equivalent.




  • Resistor R gate_in to gate_out (eg pin 2 to pin3) say 100k





  • Capacitor gate in to ground - say 1 uF ceramic




  • Diode RS485 line to gate in (polarity tbd - see below)




  • LED with series resistor from gate out either to Vcc or ground with appropriate polarity OT





  • gate_out to gate2_in. gate2_out to drive LED via series R as before. Gate 2 here acts as a buffer.




This will oscillate at ABOUT 10 Hz with values given (12.5 Hz according to their formula) when the diode is reverse biased. It will stop oscillating when the diode conducts. Connect diode to RS485 line with connection and polarity to suit.


The state that the gate is "stalled" in controls whether the LED is on or off when not flashing.




Note to compulsive editors: anyone who wants to add an enabling diode and LED with series R is welcome.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...