max488/485 bus multi slave

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

hello hello , this time i'm in deep trouble i think , according to this link https://www.avrfreaks.net/forum/r... i cannot use max488 for a multi slave communication ( i need all of the slaves to be able to respond ) ,

things to note :

1- using 5 atmega 128 , 16 MHz , baud 9600  as Slaves

2- RPi B3 , acting as the master , & control the bus .

3- a bus consisted of 6 nodes ( 5 slaves - 1 master )

4- all slaves TX are going to the Pi RX  and the TX of the PI going for all of the Slaves RX pin ( meaning the slaves are listening only to the Pi)

5- the communication with one atmega is good , but i notice some bytes come after my packet , i dont know if it's noise or max488 fault .

6- the bytes seems to be after each packet sent from slave to master .but it's not affecting the SW .

 

case at which the bus fail :

 when there are 2 or more slaves are connected to the bus , there are only one who is able to respond , they all take orders from the pi & correctly served in each slave .

the problem arise when there is data to be sent from a slave to the master , complete noise , i print the data which i receive and they are all noise .

but again , there are only one slave who is abl to communicate while the others cannot . 

 

i made bus out of PCB so i save wires and getting confused , so it would be a huge loss if there is no solution to this problem . i know that i made i mistake :D i should've used max485 that has a DE pin .

 

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

You really only need half duplex comms as only one device can talk at one time. On the raspi side you probably want to use a usb to serial chip that manages the bus direction automaticallyfor you.
The max488 is the wrong device for multidrop comms as you cannot disable the transmitter. Thus all your nodes will fight each other. Use a max485/7 device.

Read this:
http://www.ti.com/lit/an/snla049b/snla049b.pdf

Follow the rules and it should work.

Last Edited: Wed. Feb 1, 2017 - 02:00 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

so , no way to can save this bus :D ?

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

Depends
Post a schematic, and a picture of your board and maybe someone might have a soulution. Guessing gets you nowhere.

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

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"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

it's a total loss :D , i will go for max485 , do u have a good thread here that illustrates how to make the physical bus , i noticed that the are some topologies that i should avoid .

note that this is a graduation project , so i made a model which is 1.2 m by .8 m so ,what i had in mind to make a PCB that hold th 2 data comm lines and beside them a GND line total of 3 wires , if any one has a ready schematic would be great . 

also another inquiry how thick should be the copper in the PCB 1,2,3 mm ? 

 

EDIT : the model contains 5 rooms 3 on left 2 on right , what i'm asking how should my PCB look like ?

                        0       0

                        |        |

like this : 0------|------|

                        |        |

                        0       0

 

or 

               0           0

               |           |

0----------|---------|---|

                                 |

                                 |

                                 |

               |-------------|

               |                 |

               0                0

 

 

note the master is the first node from left . 

Last Edited: Wed. Feb 1, 2017 - 04:32 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

do u have a good thread here that illustrates how to make the physical bus ,

https://www.avrfreaks.net/forum/r...

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

It took me a while to make sense of your questions. Technically the 485 bus should be a daisy chain, however, the stub lengths are short on your pcb, so either method would suffice. How thick the pcb track? Depends on the current! 0.25mm should be adequate.
Really -if your whole circuit is on the one pcb, you can wire-or the tx from your slaves using schottky diodes and a pullup resistor on the raspi rx pin. Rs485 is good if you have multiple pcbs and distance between them.