can i put leds on serial line to show activity?

so i was planning on puttings leds directly the rxd/txd to show activity(ofcourse with series 1k resistors), i was just wondering if this would affect the serial transmission at all or if it would even work(as in blink too fast and be useless). i checked out the arduino uno shematic and they power the leds off of a separate output not directly off the lines, i figured this was so they dont affect the serial lines when they are in use, but im not sure, thanks for reading

It shouldn't be a problem. The Arduino board has LED's attached to the serial port to show communication over the USB lines. Just make sure to put the LED's in series with at least a 470 ohm resistor to limit the current sucked up by the LED's.

John

Wire up the LED so you use current sinking rather than current sourcing because while you can easly se an LED blinking on quickly you can't see it blinking off quickly.

Grumpy_Mike: Wire up the LED so you use current sinking rather than current sourcing because while you can easly se an LED blinking on quickly you can't see it blinking off quickly.

Whuts current sinking; current sourcing? Why would one be better than the other? Keep in mind you are talking to a neophyte with a small amount of knowledge of the workings of DC current.

John

The Arduino board has LED’s attached to the serial port to show communication over the USB lines.

Yes - the USB/Serial interface chip drives those lines to show activity.

If you add LEDs to the Tx & Rx lines as I did here they work fine:
http://www.crossroadsfencing.com/BobuinoRev17/

John,

You put the LED and current limiting resistor between the Arduino pin and ground,, and the LED 'Sinks' (draws) power from the Arduino when the pin goes high ( the Arduino sources power to the LED).

You put the LED and resistor between +5Vdc and the Arduino pin,, and the LED 'Sources' power, from +5Vdc, to the Arduino pin when it goes low ( the Arduino sinks from the LED).

I think,,, My brain hurts....

The choices:

OldSalt1945:

Grumpy_Mike: Wire up the LED so you use current sinking rather than current sourcing because while you can easly se an LED blinking on quickly you can't see it blinking off quickly.

Why would one be better than the other? John

Read the answer again I said why sinking was better. It is in the quote if you don't want to scroll back.

Keep in mind you are talking to a neophyte with a small amount of knowledge of the workings of DC current.

And apparently can't access google or ask if he doesn't know.

Grumpy_Mike, your moniker has a ring of truth to it. I thought what I [u]was[/u] doing was to ask a question. And, yes, I suppose I should have spent more time on google. Partly, what I was trying to accomplish with my question was to gently persuade the responder that when a person asks a question such as "can I put LED's on a serial line to show activity" it is obvious from the question that he will have no idea what sinking vs. sourcing current means. Sort of like asking the doctor "why does my knee hurt?" and he says "you have displasia on the bilateral quadrahedric bifurnial pomegranite" and walks out the door. You are left sitting there saying "Huh?".

Sometimes this forum has a tone that is intimidating to the less knowledgeable. You reach out for help and draw back a stump. I have had enough years dealing with gruff, antagonistic people that I can usually ignore it or consider the source, but I wonder about those with thinner skins who simply give up and move to friendlier places.

Of course, I realize that you folks with the know-how will sometimes get your fill of answering the same ID 10 T (IDIOT) questions over and over to newbies that can't seem to form coherent questions and who keep coming back for clarification. Could it be possible that the newbie doesn't know enough to ask a concise question? Could it be that a terse answer to a newbie might not be an answer at all to said newbie?

Just an observation.

John

Why would one be better than the other?

The serial data lines have +V as their idle state, so you want to wire the LEDs so that there are "off" when there is +V (active), and ON when the signal is at 0V (active.) You can do this by connecting the plus side of the LED to the +V power supply, and the cathode to the signal, rather than the more common (in arduino-land, anyway) method of connecting the LED cathode to GND and the anode to the signal.

Note that if you have a "real rs232" signal, there is an inversion that is part of the spec, so rs232 breakouts go back to connecting between GND and signal (the signals then also go BELOW 0V, so two LEDs are good.) https://www.flickr.com/photos/58843278@N00/13929634874/player/

Thanks for the replies, and sorry if the question didn't seem very concise, but I'd say it was answered perfect, that the leds will not interfere, also the bit on the normal state of the lines is very helpful, I kinda assumed they were held low with no activity, I'm currently designed a board with a 328p and I decided to throw in those leds as a troubleshoot helper since its going to be connected to a serial Bluetooth module which has no indication of activity

Excellent answer WestFw. Even I understood your explanation. I had no idea that the serial lines were active low and idle high. Now I understand what Grumpy_Mike was talking about and why.

Thanks.

John

+Karma to westfw

Still, if you're using the power from the RX.TX line to light the LED, you're taking power away from the signal. Right? It may not be noticeable on short connections but if you're going for long runs (more like RS485), it seems you should use a separate power source and drivers for the LED(s) and not the power meant for the signal.

I came across this topic doing a search on the www for the answer on how to use the LEDs on the RJ45 connectors. I notice drivers on RX/TX lines for LEDs but traces are on another layer of the pcb so not sure where they go. Drivers are new to me..

So this is what I will do, use separate +5, use driver, resistor, send cathode of LED to signal.

Thanks!

When I do it I use a 74C914 buffer with a 50K resistor connected to the RS232 signal. These are old parts with if I remember tolerate 25 Volts while operating on a 5 volt supply. They also have nice front end protection. This requires virtually no current from the signal and I can have the LEDs work on either polarity or use 2 and use bipolar LEDs. Try these links for more information: http://www.epanorama.net/circuits/rspower.html and https://www.electronics-notes.com/articles/connectivity/serial-data-communications/rs232-signal-voltage-levels.php.

With RS232 you are using a large voltage which requires current to make the transition plus the capacitance of the wires. This link for the 74C914. https://www.mouser.com/datasheet/2/308/mm74c914-1193419.pdf Good Luck & Have Fun! Gil

This is electrically a little different, but where I work we have these little [u]RS-232 Testers[/u] with two LEDs per line. We can see the LEDs flicker when data is transmitted and we can see the handshaking status, but mostly we use them just to make sure the RX & TX lines are connected correctly, or if we need to use a null-modem adapter. (If everything is connected correctly the green LEDs light-up for TX & RX, before any data is transmitted.)