Broadcasting one UART to many

Go To Last Post
14 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello all,
I have one AVR sending data on Tx, and several AVRs listening for data coming in (attached Rx). Essentially I have a system that is broadcasting data to many processors, in one direction only.

 ___________          ___________           ___________
|           |        |           |         |           |
|  Main  Tx |   *----| Rx  Child |    *----| Rx  Child |
|___________|   |    |___________|    |    |___________|
       |________|_____________________|__________________ _ _ _

This works great for a few processors, but the data gets lost once ther are many on the line. I would like to broadcast to several hundred. What do I need to put on the line between the Main and the Child to make sure the signal is strong enough to get to all of the Children?

(Standard caveats apply, i'm a newbie with signal processing :)
Thanks in advance!
Ryan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using +-12V RS232 levels, or 0-5V TTL levels? (seems like either should work). Have a good ground to all of them? If the input is .1 standard load, or .1 ma, and the output pin is 40ma, then you should be able to drive 400 of them.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yep, ground is good. The TTL is 3.3 (and also 5v tolerant, i think).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What baud rate?

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the fast responses guys!
For safety of testing we were going with a low baud of 9600, and were hoping to speed it up later.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would use RS-485 drivers for long distances and noise immunity.

Randy

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Standard RS232 receivers are NOT good for this application as they have a built-in input resistor. So, as you add more and more, the resistance that the transmitter has to drive goes down. RS422 (not RS485 since it is one-way) is an excellent choice. There are 3.3V drivers.

"TTL" or CMOS is NOT built to drive long cables. Period. It is intended to drive other logic. You are going to see a LOT of load capacitance with length and number of receivers. I'd bet that is what is killing you. That said, there are CMOS buffer chips that can source OR sink 25ma. If cost is a critical issue, I would try one of these at the transmitter, configured non-inverting.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Could also put another driver, or two, along the chain, to boost the signal to the next leg.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I would like to broadcast to several hundred.

Wow, may I ask what kind of application this is for?

What kind of distance will be involved?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have to agree with the RS485 method. Just use the slaves in listen mode and a 120ohm resistor at each end of the link. Yu can go up to 4000 feet and up to over 1.5 megabaud with the right driver ic.

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I also support (as many other here) the RS-485 approach, but I will aware you that if you have several hundreds, then you will need some kind of 'buffer' or 'repeater' in the path, since usual RS-485 drivers allow to drive up to 128 (some only up to 32) devices.

Guillem.
"Common sense is the least common of the senses" Anonymous.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@ CirMicro
the distance involved is only about a meter and a half.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

At 1.5m, there is a much better way to do that than lots of AVRs! Have a look at the XMOS chip:

http://www.xmos.com

One or two of those will outperform dozens of AVRs, at a fraction of the cost.

Leon

Leon Heller G1HSM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

r_y_a_n wrote:
@ CirMicro
the distance involved is only about a meter and a half.

For such a small distance I would say a simple transistor buffer would suffice.