Shop OBEX P1 Docs P2 Docs Learn Events
RS485 NETWORK - Schematic with AUTO TERMINATION - UPDATED REV-K - FINAL?? - Page 2 — Parallax Forums

RS485 NETWORK - Schematic with AUTO TERMINATION - UPDATED REV-K - FINAL??

2»

Comments

  • DavidMDavidM Posts: 630
    edited 2009-03-06 12:22
    Hi,

    Thanks again dMajo for your reply, for now I don't want to worry about full duplex.

    I have updated my schematic with everything you suggested.

    I have chosen some new parts for the critical devices, except for the opto-coupler , I am not sure if this part ( K817P) will work.

    The reason I have chosen the NAND gate is to invert the OPTOCOUPLER SIGNAL to the MASTER DETECT Line.

    I would prefer a logic HIGH for Master Detected, But if I use a dual xor gate then this could still be used, it will just be read as HIGH for Slave Detect.

    Regards


    Dave M
  • dMajodMajo Posts: 855
    edited 2009-03-07 17:58
    Hi DavidM

    So first the errors:
    1. DavidM said...
      for now I don't want to worry about full duplex.

      so you need to connect AtoY and BtoZ
    2. R14 is not needed
    3. R9 is not needed: when OK1 open PropP24 will receive 5v through R11; when OK1 closed PropP24 will see VSS
    4. R12/13 are too low: RLED=(((VCC-LED_VF-(Q_RON*LED_IF))/LED_IF)-Q_RON so eg for SLR-56MC:·(5V-2.1V-0.02V)/10mA-2ohm=286ohm
    5. use SN74AHC1G00DBV instead of SN74LVC1G00DBV because of the higher max supply voltage (max. output current is 25mA: more than enough for optocoupler led)
    6. R10 is too low:
      • we consider power supply 4.0V to 7V; suppose nominal to be 5.5V [noparse][[/noparse]remember here unregulated VCC2]
      • we want work arround max K817P_CRT (fig.11)
      • we don't want exceed 10/12mA of logic output current even if datasheet states max 25mA; SN74AHC1G00DBV VO=VCC
      • RLED=(VCC(4..7V)-K817P_VF(fig.5))/K817P_IF(5..10mA) so R=590ohm E48 2%
    7. use decoupling capacitors on logic gates supply pins
    8. Suggestion: put a BZX84J-B6V8 zener diode on VCC2 to limit the power supply to logic gates
    9. On MAX datasheed a pullup resistor is suggested on DI (10K)

    Maybe you will need to reduce the R11 value a little bit, but than higher is than better (lower current consumption)

    For c1/c2 values you should experiment a little bit but c3 should be at least 3 times c1/c2 ( when mosfet close c1/c2 charges wery quickly and c3 serves as a energy buffer near them to prevent current spikes through the supply line. Eventually you could place in series with c1/c2 a 10 ohm resistor to limit the charge current, it depends on the application)

    The MAX have a very nice fault report feature through RE: keep RE and DE separate if you can afford a pin more on Prop

    Regards

    Post Edited (dMajo) : 3/7/2009 7:18:26 PM GMT
    1680 x 1050 - 226K
  • DavidMDavidM Posts: 630
    edited 2009-03-08 03:29
    Hi dMajo,

    Thanks again for your most excellent suggestions and I love the diagrams you have sent.

    I have updated the schematic to REV-H
    I have put some preliminary values for the caps regarding the LEDs, I don't know if these will work.
    The diode is a good Idea, I was going to suggest a voltage regulator , but this is much simpler and cheaper.


    Q1) Can you clarify that the "AHC" in those logic gate part numbers identifies the voltage types?

    Q2) Regarding ( Previous R9 resistor for MasterDetect) , you said that prop pin 24 will receive 5V via 10K ( R11) , do I want 5 volts back to the prop? That was the reason for the 1K ( previous R9)?

    Thanks

    Dave M
  • dMajodMajo Posts: 855
    edited 2009-03-09 19:21
    Hi DavidM

    A1) No, the "AHC" identifies the family (many·characteristics change => have a look at datasheets) in fact the "AHC" beside to have a higher max.voltage limit have also a much lower output (sink/source) current but still enough to drive the optocoupler led

    A2) No, but:
    • when the OK1 transistor is open, having only·R11 of 11K is the same as having the R11 of 10K plus a R9 of 1K. No big changes here compared to only R11=10K solution.
    • when the OK1 transistor is closed you want a clear logic "0" on Prop. The Prop Vil (max.logic low voltage) states 0.3Vdd so for 3.3V is 1.98V. Now you will never have 0V on prop because of the OK1 transistor that when saturated will have let's say 1V or more if the VCC2 goes under expected and your nand will give less current to OK1 led: you don't want to add some voltage drop more on R9.
    • The propeller (like many other uP and/or logic gates IC) have internal protection diodes (this is the reason why you see on datasheet "Voltage on all other pins with respect to Vss -0.3 V to (Vdd + 0.3 V)"). Each input/pin have one diode connected to Vdd and one connected to Vss: this means that any voltage greater then Prop_Vdd+internalDIODE_VF or lower than Prop_Vss-internalDIODE_VF will be shorted to the power supply lines thus protecting the pin. What you must take care about is to limit the current that flows through this diodes (the datasheet indicates its max.value: for the Prop is "Max. DC current into an input pin with internal protection diode forward biased ±500 μA" Chapter 8.1 on pag.26). Now R11 will give us (5V-3.3V)/10Kohm=170uA so it is OK.
    • The only reason to preserve R9 is to protect Prop pin due to a software mistake: if you drive the pin as output high with the OK1 thansistor closed you will damage the prop pin. If you want to prevent this than keep R9=100ohm E24(5%) series
    • BTW: the same apply to R8 (RO1 is 5V output if the MAX is 5V powered) so at least it should be 4K7 [noparse][[/noparse] (5V-3.3V)/4k7ohm=361uA ] better 6K8

    BTW: R2 should be E96 series (1%)



    Some errors:
    • The Z connection on MAX is wrong
    • The zener position is wrong
    • J1 have missing connection for RE
    • look the RX/TX enable labels



    P.S: I think that you do not need the JP2 jumper: if you have the RE on J1 you can always make a bridge on his twin brother connector on Prop PCB (or solder J1 pins together if they are close) or better, do it in software.

    1680 x 1050 - 240K
  • DavidMDavidM Posts: 630
    edited 2009-03-10 12:47
    Hi dMajo,

    Thanks Again!

    I have updated the schematic ( REV:J) again with your suggestions.

    1) You have chosen BZX84J-B6V8 For the Zener Diode, According to the spec sheet the voltage for this device is 6.66 to 6.94.
    Should we not use the BZX84J-B5V1 instead? ( 5 to 5.2v )

    2) I am trying to fit this device to my existing Propeller device which already has a 6 pin header. But the Fault Report feature is a good idea and I am only showing this in my schematic as an option. My next PROP DEVICES will have 7 pins??

    3) Should the resistors R2, R4 and/or R5 be of a higher wattage, say 1 Watt ? ( I think I read this somewhere)

    Thanks

    Dave M
  • dMajodMajo Posts: 855
    edited 2009-03-10 21:21
    Hi DavidM

    A1) No, you need something more because of the MAX internal regulator. The zener is there just for precaution: the unregulated VCC2 is supposed to be somewhere in the 5.5/6.5 range but, if it exceed the zener will limit somewhere to 6.7/6.9 (because of its tolerance). This is the reason I have suggested you "AHC" logic: max. supply voltage of 7V will never be reached.

    A3) yes and also R9/R14

    A2) don't worry, you can always put a 7 pin header on 485 PCB and connect it with prob pcb just with 6 wires: in this way you will have finished application for possible future uses. Keep DE and RE nearby, so you can make a solder bridge between header pins, if needed

    The 11k value I have used in the explanation was to show you that nothing changes on the prop side. If you want to protect propeller pin from software-bug-damage reinsert the old (from OK1 to PropPin)·R9=100ohmE24(5%or better) otherwise leave just R11=10K

    BTW: R12/13 value was for the this led·(MC - green color) you need to look to datasheet of yours one. Trick: here the datasheet states 10mA nominal and 25mA max current: you can calculate the resistor somewhere between them, (17/18mA) because the light is pulsed

    regards

    Post Edited (dMajo) : 3/10/2009 9:28:41 PM GMT
  • DavidMDavidM Posts: 630
    edited 2009-03-10 22:36
    Hi dMajo

    I have updated to rev K , the header is now 7 pin,

    I have added text regarding resistor wattage.

    Q1) Do you think now, I can start the PCB LAYOUT Design?

    Thanks

    Dave M
  • dMajodMajo Posts: 855
    edited 2009-03-11 18:53
    Hi DavidM

    If I were you, I would flip the pins 5 and 6 on J1 header.

    For leds C (maybe C1=C2=10uF;C3=47uF). For SLR-56MC (or equvalent) try R12=R13=200ohm. I recommend you to try (breadboard)

    Said this, in my opinion you can proceed with pcb

    Regards
  • DavidMDavidM Posts: 630
    edited 2009-03-12 00:14
    Hi dMajo,

    Thanks for your reply,

    I have made the last few changes.

    NOW..

    RE PCB layout,

    I used eagle cad for the schematic, but I have not used eagle cad for BOARD LAYOUT.

    This will be my first SMD board layout, some of the components ( i.e the MAX3535E do not exist in eagle), so I have to create them.
    I have found some tutorials So I have to go through them and just learn how to do it.

    I next have to finalise a BILL OF MATERIALS for ALL Components. Then source them ( probably farnell)

    Regards

    Dave M
Sign In or Register to comment.