Welcome! Log In Create A New Profile

Advanced

RS485 Question

Posted by bothacker 
RS485 Question
September 25, 2009 03:47PM
Looking at the Gen3 motherboard, it looks like it was designed to use RS485 in a star topology. As I understand it, this is generally not recommended.

At our baud rates and cable lengths, is this just not an issue? And if not, what is the recommended configuration for the termination resistors? For a single toolhead, termination on the toolhead and the motherboard makes sense, but for additional nodes, what then?

Mostly just curious...

-Tim
Re: RS485 Question
September 25, 2009 04:30PM
It isn't a problem with cables a few meters long and low baud rates (<1 mbit).

Signals travel up and down the cable at about half the speed of light. When there are impedance mismatches and missing terminations you get reflections which caused ringing on the waveform. But these will die down long before the mid bit period where the UART samples so they don't affect the data.

The ringing will cause some extra RFI emissions, but because the bit rate is so low compared to the ringing frequency the average RFI energy is low, so unlikely to fail any EMC tests (if anybody cares).

RS485 can do 10 mbits down 4000ft cables, in which case termination would be essential.


[www.hydraraptor.blogspot.com]
Re: RS485 Question
September 28, 2009 11:22AM
"what is the recommended configuration for the termination resistors?"

RS485 is usually point to point or multi-drop bus (of some type, maybe master & slave/s or multimaster depending on your application)

In both of these modes the accepted practice is to put terminating resistors at both the extreme ends of the link/bus. This does exactly as nophead explained for the reasons explained.

You can get away with (not entirely recommended for reasons nop explained) a star topology or the odd spur.

So long as the line lengths are kept short.

Note do not put more than the two terminating resistors in what ever your topology as you could be overloading the transceivers.

I agree with nophead, for this particular app it is'nt too critical.

Being a touch retentive though I personally would stick to a single run with all transceivers in parallel and a terminator at each extreme end.

Hope this helps.

cheers

aka47


Necessity hopefully becomes the absentee parent of successfully invented children.
Re: RS485 Question
September 28, 2009 01:22PM
Thanks for the great replies!

We might consider adding a second RS485 connector to the extruder controller so that we have the option to use the parallel bus configuration. Given that multiple toolheads would probably be situated near to each other, the chained wiring would be very clean.

-Tim
Re: RS485 Question
September 28, 2009 02:38PM
Or you could do what I do, that is use Tyco MTA connectors which have a pass through option. These are IDC style connectors that have two versions. Closed end housings (for the end of the cable) and "feed thru" that can go in the middle of a cable. [www.tycoelectronics.com]


[www.hydraraptor.blogspot.com]
Re: RS485 Question
September 29, 2009 02:52AM
There is an extra wrinkle we could probably do with considering as well.

Given that the data bus connection/s are parallel and that power would similarly be parallel.

It makes sense to use either noheads suggestion as above or use screw terminals (you can normally get 1 or 2 wires into screw terminals easily) and specify a multiwire bus that carries both data and power.

This way we can get rid of all those regulators dotted around.

An initial suggestion re power would be +5v +12v and Gnd (maybe 2 GND's) then the two connections for RS485 giving a 6 wire power and data bus.

I have a personal preference for Screw terminals purely because they are most easily reused and you can adjust the wire lengths as often as you need. Good for an experimental rig.

I think they have a higher current carrying capacity too. (depending on which ones you use)

Terminated connectors are however arguably neater and easier for a kit supplier/assembler or a production environment.

At the end of the day realistically though what ever works is fine.

Thoughts for what they are worth

cheers

aka47


Necessity hopefully becomes the absentee parent of successfully invented children.
Re: RS485 Question
September 29, 2009 04:21AM
Busing 5V around is a very bad idea. It is much better to regulate it locally so that it is referenced to the local 0V, not the 0V at the other end of the cable. Not much point in using differential RS485 to give noise immunity on your comms if you are going to put the noise on your CPU's 5V rail instead.

Also just busing 12V saves wires and gives flexibility to use 3.3V micros.


[www.hydraraptor.blogspot.com]
Re: RS485 Question
September 29, 2009 05:56AM
I think I agree with you mostly, but am taking into consideration additional factors.

On a subsystem doing analogue things certainly local regulation and filtering/smoothing is the best way forward.

On a subsystem doing purely digital and power control ie stepper driving or digital servo driving (with quadrature feedback) noise is less of an issue and can be best tackled using the usual discreets for filtering. No local regulation needed. Providing the supply is from a suficiently low impedance source.

I guess a good example is a PC PSU and the bussed 5v and 12v supplies that all PC's run with.

If only 12v is bussed around then local supplies for logic will have to be localy regulated down. Usual technique (cheapest) is linear regulators. Unfortunately you are then throwing away (7v * Whatever-current-you-draw)watts, heating up your PCB's.

Effectively 58% of your logic supply is lost to regulation inefficiency.

OK consider the subsystems that use analogue techniques. The amount of current used for analogue measurement is very small, so a little bit of inefficiency is arguably not critical. Running your analogue sections at a voltage that is less than supply and locally regulating it is I agree a very good thing indeed, particularly if you add in some capable filtering etc. Linear regulating is of course the prefered noise limiting option.

These can be run comfortably at say 3.3v or the usual 2.56. Going from 12 v to these low voltages is a long jump, how ever going from 5v to this is trivial and can be easily achieved using discretes or if we need to (by application) a precision voltage regulator. With very little loss.

Interestingly enough as the 12v supply is used most (greatest current drain by sub part of the machine) for motor supplys having the 12v tightly regulated and beautifully smooth is arguably unnecessary.

OK I accept that the above is a touch academic and folk will invariably use what ever is to hand at best cost/least effort.

The reasoning for going over this in detail stems back to one of adrians original design goals.

IE to be able to run a machine from a 12v car battery or perhaps solar voltaic supply (gonna have to be via a reservoir battery anyway, the sun is a bit variable).

To meet this goal capably power efficiency is best increased.

Best power efficiency is gained when using 12v direct from battery (or battery equivalent) and a single step down switcher to 5v. No local regulators other than for local analogue supply/referencing.

I am ignoring here the fact that steppers are arguably one of the less power efficient means of actuation.

Altogether the above explanation logically implies bussed 5v and 12v rails. I take your point though re saving a pair of wires if 5v is omited from the buss.

As an aside I have been looking into re-purposing the electronic transformers for Halogen lighting as a battery replacement for domestic reprap use. They are quite cheap and reasonably efficient if a little deficient without modification (No smoothing and the switching waveform is modulated by the supply frequency).

Thoughts for what they are worth

aka47


Necessity hopefully becomes the absentee parent of successfully invented children.
Re: RS485 Question
September 29, 2009 07:19AM
I have seen many digital systems that were unreliable due to busing 5V in noisy environment with motors. PC PSUs are just a point to point connection, less than 30cm, with very thick wires, whereas we may need ~2M for a moving head machine.

Consider the thermistor circuit. You really don't want the voltage drop on the 0V rail, due to the stepper current, affecting your 5V rail and hence the result.

The power loss is minimal becase the current on the 5V rail is only a few milliamps. There is no heatsink on my extruder controller but the 3.3V reg does not get warm at all.

If it becomes an issue you just use a simple switcher instead of a linear reg.

Another thing to consider is what happens if one of the rails or ground is missing. It is much easier to blow things up with more than one power connection. With on-board regulation you either get 5V and 12V or you get nothing.


[www.hydraraptor.blogspot.com]
Re: RS485 Question
September 29, 2009 07:41AM
I think the thermistor circuit is a clear case of an analogue system. As a measuring circuit I guess it needs a clean local supply for the analogue reference. other wise what ever you do you are introducing noise to something where a few millivolts gives you a different measurement.

I am seeing 5v supply noise on a duck egg incubator I am building, the analogue input to the arduino is +/- 3 to 4 LSB all due to switching noise on an adjacent 12 v heater supply. That is without an independent analogue reference just using the boards regulated 5v.

I would be surprised if the extruder board noise levels are any where near as quiet as this.

Sure, I agree having multiple rails begs the question will the circuitry survive loss of one or more.

I guess these are all arguments in favour of a one board approach.

It goes back to the question of what are your design parameters/specification.

If power efficiency is an important one, multiple high headroom linear regulators for logic supply are arguably not a best fit solution.

It is interesting to look inside these "Electronic Transformers" there are surprisingly few components in them and no IC's.

cheers

aka47


Necessity hopefully becomes the absentee parent of successfully invented children.
Re: RS485 Question
September 29, 2009 08:48AM
Interesting, do they just have a high frequency transformer and oscillator then, or are they just a buck regulator wih no isolation? Can you blog a schematic?

I would be very worried about the mains getting out the wrong end!


[www.hydraraptor.blogspot.com]
Re: RS485 Question
September 29, 2009 09:25AM
They are fully isolated and use a self exciting oscillator and a couple of power transistors design.

I have a transistor manufacturers application note which covers it all.

They are incredibly simple and should be quite cheap to make if the magnetics are source able.

There was also an article in elektor where a guy looked into using them for cheap power supply's and worked out what needed doing to them to improve the output.

They are not a precision device but for motor supplies do you need it ??

I will email you the app note.

Cheers

aka47


Necessity hopefully becomes the absentee parent of successfully invented children.
Sorry, only registered users may post in this forum.

Click here to login