Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How does a MAX 485 function?

Status
Not open for further replies.

farsey

Newbie level 3
Joined
Jul 6, 2005
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,335
Hello

Could someone kindly explain how a MAx 485 works? How do the bus lines, RO, output and input drivers interact?

please help.

lost,
farsey
 

max485

Receiver part of MAX485 you can imagine as a comparator which compare levels on lines A and B. If A > B by 200mV then R0 is high, if A < B by 200mV then R0 is low. RE ensures highZ stage at R0 if it is high.
Transmitter section you can image as two independent transmitters driven by signal in opposite phase. To ensure highZ at A and B pin there is a control pin, DE, and drivers output can be put in highZ by bringing DE high.
Regards,
IanP
 

    farsey

    Points: 2
    Helpful Answer Positive Rating
what is max485

Hello.

Thank you IanP for replying me. However, Im still having this little problem with my circuits. Im actually building an auto-logger unit, from scratch, using PICAXE28X. The server, and each client has a MAX485 connected so that each client can communicate with the server (which composes of a PICAXE28X too). Im not sure how much this will make sense to anyone but I am getting a huge voltage difference between A and B, which I was taught was wrong. With 5V input, I am expecting A and B to be in between 1.8 - 2.4V. But now, I am getting 0.2V at A(pin 6) and 4.8V at B(pin 7). I suspect this is what's halting the circuit to flow efficiently.

I do not have much technical knowlege about microchips or digital circuits. I hope to get some real good help.

thanks,
lost again,
farsey
 

max485 resistor

The voltages you have are pretty normal ..
Connect ≈150Ω termination resistor between A and B, and 2kΩ resistor between A and +5V, and another 2kΩ resistor between B and GND. This network will establish proper bias for A and B. With these resistors connected you will read something like 0.8 and 3.8V (A or B)
If you are close to the server and another RS-485 device already has a termination resistor you will not use it ..
Regards,
IanP
 

    farsey

    Points: 2
    Helpful Answer Positive Rating
half duplex transmission in max485

Thank again IanP.

I actually have connected the bias resistors, also, a terminating resistor on the server board, and on the last unit connected to the network.

I am confused as to what actually causes the voltages to vary at A and B. Is it DE and DI? RO should go high when the client is transmitting to the server, and that's when A > B. But this happens inconsistently. So, Im trying to track down what is causing it not to work as effectively as it should be.

Trying hard,
farsey

Added after 1 hours 53 minutes:

Someone who does digital circuit design reckons that Im getting my problems from my veroboards. It could be just a soldering joint, or he implied that veroboard isnt the most effecient board to use.

What are the opinions out there about using veroboards? Im not sure what my options are now.


farsey
 

max485 test circuit

The MAX485 is a half-duplex RS-485 transceiver. That means that only one transmitter can be active at a time on the bus, but all receivers can be enabled.
Obviously, this requires a protocol. Typically, a device designated a master requests or sends data from/ to slaves. The slaves are identified by an address. The slaves must start transmitting their replies only if their address was specified and only after the master has finished its message.
As you can see, a very specific and clear protocol needs to be implemented in all devices. And you should realize that most of the time the bus is actually idle.

The bus is idle with B high and A low, pulled up/ high by the biasing resistors. So unless you check the signals with a scope, you will always measure close to 0V on the A line and close to 5V on the B line.

The drivers are enabled just before the transmission, by taking the DE (Driver Enable) line high. This snould only happen on the transmitting node. Then the node transmits its data, as a short burst and then releases the bus by driving the DE line low.
While transmitting, the A line copies the state of the DI (Data Input) line, while the B output transmits the complement of DI.

The receivers can be permanently enabled if line /RE (/Receiver Enable) is tied low, or they can be enabled only when needed. However, the /RE only tristates the RO line (Receiver Output), that is on the microcontroller side. It does notthing on the bus side. Typically, the receivers are enabled all the time and all the slaves "listen" and check if their address is being received, followed by other instructions, etc, depending on the protocol.

To summarize, the voltages you measure seem OK. Check with a scope for bursts of data. Ensure you have a master in the systemand that at least it is transmitting something.

One more thing: the bus is a differential one, but the grounds of the devices connected to the bus must be within a few volts of each other (max. 7V difference).

For additional info, check this out: https://focus.ti.com/docs/apps/catalog/resources/appnoteabstract.jhtml?abstractName=slla166
 
circuits using max485

With RS-485 there is always the issue of switching between transmission and reception and I think you should direct most of your attention to this subject. In most cases the enable pins, RE and DE, are connected together and controlled by the same line, so if you transmit you disable reception and the opposite way around: as soon as you finish transmission MAX485 is put into reception mode.

As far as veroboards are concerned, I wouldn't blame this technique as this is the fastest way of assembling small circuits without involving PCB development. Veroboards are not good for everything (RF circuits, for example), but are widely used for lots of small projects. After you test a project with a veroboard, and it works fine, it is good idea to put it into a small box and pot it with a special potting compound for electronic components. This will give your costruction almost proffesional look ..

Regards,
IanP
 

    farsey

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top