ethernet repeater with propnic
jeromelab
Posts: 31
Hello,
I am seeking advice as I am not an expert in electronics and ethernet.
I have a propnic from ucontroller.com it works great... now my idea is to link several propnic/propeller boards together but without using a Hub or a switch. To name the official ethernet terms, I would like a ring shaped topology instead of a star shaped one. This would mean I have to include in the design a "repeater", so basically I have one RJ45 for input and another one for output/forward. Now all the propnic design with RJ port built-in magnetics etcetera ... I am a bit lost. I googled for finding hub/switch/repeater designs without any luck...
Thanks to all in advance!
I am seeking advice as I am not an expert in electronics and ethernet.
I have a propnic from ucontroller.com it works great... now my idea is to link several propnic/propeller boards together but without using a Hub or a switch. To name the official ethernet terms, I would like a ring shaped topology instead of a star shaped one. This would mean I have to include in the design a "repeater", so basically I have one RJ45 for input and another one for output/forward. Now all the propnic design with RJ port built-in magnetics etcetera ... I am a bit lost. I googled for finding hub/switch/repeater designs without any luck...
Thanks to all in advance!
Comments
Attempting to answer your question directly here without design desirability or practicality bias:
If you want a ring with 10/100BaseT CAT5 cable and RJ45 each node's CPU will need to as you mentioned "repeat" (RX and then TX) all packets with RX interface in "permiscuous" mode. One client TX would need to be connected to the next client RX pins to form a ring (for a back to back connection wiring would be crossed-over). It would be simple enough to create cables for your ring by cutting an existing cables and soldering pins. All nodes would of course need such connections and any one failing interface would break the ring. Look at this wiki for pin connection and color code information: http://en.wikipedia.org/wiki/10BASE-T.
Node Cabling
··········NodeA···············NodeB·············· NodeC
··· TX····||·||·····RX· TX····||·||·····RX· TX····||·||·····RX
+-- 1 ----+| |+---- 3·· 1 ----+| |+---- 3·· 1 ----+| |+---- 3 --+
|+-·2
+ +
6·· 2
+ +
6·· 2
+ +
6·-+|
||···························································· ||
|+
+|
+
+
Given 3 nodes ABC as shown, cables would be connected as (NodeLetterCablePin) to (NodeLetterCablePin) pairs: A3-B1, A6-B2, B3-C1, B6-C2, C3-A1, and C6-A2.· Data flows CBACBACBA .... with cable ends connected to RJ45 plugs and proper software of course.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (jazzed) : 6/8/2008 4:46:11 PM GMT
What I should clarify is that I want cheap connectors/cable that can be 100+ meters in between nodes. I cannot use a hub or rather I would like to add a minimal hub to the final propeller board. I cannot use a hub or a switch because I am talking of about a 1000 nodes with long distance (max 100 meters, 328 ft) in between group of nodes and I want to minimize the costs.
I am usually using rs485/DMX but I want some more speed and features this time. Yet I want to retain the ability to chain devices for sparing a few kilometers (0.62 miles) of cable.
What features is it that you would want more? for really long runs i would use and overdrive set, Optos on each side of the long run to send higher voltage to compensate for the length then translate back to sane levels.
If you build a ring, the communication speed per node is low - full duplex max baud is ~1mbps (and may need to be slower because of the distance involved), so each node is 1000bps unless there are a lot of nodes that dont communicate. If there are communication patterns then multiple rings is probably the best bet, putting the nodes that communicate a lot together and separate these nodes from other communicating nodes.
You could build a ring on top of the fullduplex driver, but the ring forwarding would be in a different cog and would slow the fowarding down a lot.
I have a modified fullduplex serial that is a serial ring i.e. it uses 2 pins on each prop, tx of one to rx of the next but it only supports a max of 64nodes (and hasn't been tested that high!) and the serial cog understands the ring forwarding protocol so forwards much faster. A two level ring would give you enough nodes but the communicate speed would still be low.
At the distances you are talking about you also shouldn't connect the pins directly but do what Spinhead mentioned using rs-485 or similar hardware drivers.
I seriously believe if you try to attempt such a large geographic network with the original idea, that you will just be buying/building yourself a headache. Ethernet is a LAN or local area network. If you need something so big, you will have to pay the price for high quality. Best of luck with your project.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There are many industrial ethernet devices that can be arranged in a "ring" topology. These devices have two ethernet ports on them. In reality though each device is a 2 port switch. So, you end up with switch after switch after switch when you use them. The protocols used though for those industrial ethernet I/O are optimized for this because speed, latency, response and reliability are very important.
I am curious about your application. I am experienced in using DMX as well, what do you wnat to add to it? Were you going to use the latest ACN standard over ethernet instead of DMX?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter
www.brilldea.com·- uOLED-IOC, RGB LEDs, TLC5940 driver PCB
www.tdswieter.com
One little spark of imagination is all it takes for an idea to explode
About the project:
I am a member of an artists group, active in digital arts. http://www.lab-au.com . We have also a digital arts gallery http://www.mediaruimte.be We made some big scale installations in the past but until recently we would be essentially in software and computers, only dealing with electronics to hook up some sensors or some control boards and interfaces, or giving this task to manufacturers (impossible in this case due to tight budget). Due to microcontroller being able to do more and more and costing less and less, it becomes interesting for us to use it.
The project is to have a 40 ft container of televisions (produced in a chinese factory according to our specifications with repurposed B grade CRT tubes and a stackable design casing) so that is about a 1000 units. Then I have to add control/signal generator to the "dumb" TV sets. We will "invade" a tall housing building replicating somehow the typical view you have from observing a housing building when everybody is watching TV at night but in a "strangely" controlled fashion (I let your imagination building the rest of the picture!). In the main lobby we will stack 200 TVs that will be the central hub.
At first I considered using my usual AVR/DMX architecture, but Pal signal generation takes too much time, so I am prototyping right now with propeller as it seems quite ideal for this project and it is not so expensive in quantity. I want to process incoming messages, generate PAL signal(only plain color, not detailed "graphics") and sound at the same time (each TV has an integrated speaker).
Indeed all the TVs are slaves, only listening to messages (but I have to design some synchronisation scheme for it, some of these designs would require the "end of the line" node to send back message to the master). You can easily anticipate that a star topology is out of question due to the length of necessary cables. I can have at most one computer control on each level, but then starting from there will be at least a 100 TVs. Then I want to design a flexible/modular system so that it can be adapted to another place without worying too much abot cable length and distribution scheme.
Beside the communication, my main problem is power! It is not a problem in the case of this building but would be if the 1000 units would be stacked in one place then I need one superbig main power line (splitted in many many cables off course).
One idea for your distribution scheme is to send ACN or ARTNET packets over ethernet to each floor. At each floor then the ethernet is translated to DMX-512 network. There are off the self devices for that. The custom propeller design would be at each TV then.
Lab-au looks to do some very inventive and challenging projects. WOW!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter
www.brilldea.com·- uOLED-IOC, RGB LEDs, TLC5940 driver PCB
www.tdswieter.com
One little spark of imagination is all it takes for an idea to explode
The problem is that each floor has its own latency and you can see that they are not synchronised by half second or so. These off the shelf devices are not so good ... but you can see that only when your installation footprint is the one of a huge building. I would prefer not using artnet, just plain UDP with my own message format, it goes way faster and I avoid data corruption by just sending it 25 times a second. I favor speed over accuracy you could say but in my experience a small fast error tends to be less visible than a slow jerky animation.
BTW I have another question, if I can make a RS485 network running at 10Mbit/s (seems the fastest chips by Maxim are supporting this speed), how do I make the bridge to a computer? I never heard of a RS485 interface running faster than 1MBit/s. I can only think of having a propeller with ethernet as an interface, ftdi chips are way to slow... maybe a full speed native USB chip???
as for the computer link just use fullduplex serial (must love this object) and talk to the computer, dont worry about the 485 end of it at all on the computer, the fact that the master prop will be talking to all the floors at the same time will help with any possible latency issues.
How often do you plan to actually update the display? you could send all of the data for the next refresh, then send a clock bit to clock all the data in to get pretty much perfect timing.
I would like to achieve anything in between 12-25 Hz refresh rate. By experience I know that the clock bit is not the ideal solution( except maybe if I follow your advice of 32 nodes max), very long cable length and big building makes it for perceptible lag.
In the past I used a timestamp method, the commands are sent with the time of execution, when the command reach the last node it replies with the timestamp of received command. Then simple substraction makes the next command time of execution. This way it tries, refresh after refresh, to achieve accurate synchronisation. Sending always the same amount of data helps too. I am not sending image or sound data, just a few bytes (something like 8 Bytes per frame and per node + header) to switch a state in the propeller and some parameters.
In the end modularity and simplicity in cabling (and cable length) is more important than synchronisation in my case, so if I agree with you about master prop at each floor(+ computer), I would like to keep it open about the number of nodes, I have to design a repeater on each slave node.
Thanks for your answers.