SCL and SDA voltage translator behavior



  • Hi,

    I2C voltage translator PCA9306 require voltage >1V on its Vref1 pin to work properly. If this voltage is below 1V, the SCL1 and SDA1 voltages are not limited and can rise up to SCL2 / SDA2 level (5V on UniPi board). On the UniPi board, the Vref1 is connected to 3.3V from the processor board. So if you have UniPi powered while processor board is not powered, processor SCL and SDA pins can be at 5V – pretty above processor specification limits. Therefore, it is better to power up processor board before UniPi and power down UniPi before processor board.

    Karel



  • Hi,

    I2C voltage translator PCA9306 require voltage >1V on its Vref1 pin to work properly. If this voltage is below 1V, the SCL1 and SDA1 voltages are not limited and can rise up to SCL2 / SDA2 level (5V on UniPi board). On the UniPi board, the Vref1 is connected to 3.3V from the processor board. So if you have UniPi powered while processor board is not powered, processor SCL and SDA pins can be at 5V – pretty above processor specification limits. Therefore, it is better to power up processor board before UniPi and power down UniPi before processor board.

    Karel



  • Hello,
    why we don't use the 5V-Voltage from UniPi with a R-divider to generate the Vref1 = 3.3V @PCA9306?
    If J1 is opened (separate power supply for RPi / UniPi) and RP is down, than it would be save.

    In case RPi is on and UniPi is down, there would be no Vref1 @PCA9306, but the voltage could only rise to 3.3V from RPi-i2c-lines. This should be no problem for 5V lines @UniPi. The Enable-Pin @PCA would also be off.
    We are not sure if this is correct idea? It's difficult without UniPi-schematic bur PCA9306 schematic helps to understand.

    If J1is closed, than it will work too because 5V and generated Vref1 are there at the same time.

    We guess, cuting the wire on pcb short before the pin2 of PCA9306 and R-divider from +5V (UniPi) - R1 - pin2 (PCA) - R2 - Gnd could be the modification.

    What we are unsure is, if it's a problem, when 3.3V from new R-div. differs a bit from RPi 3.3V-lines. Can somebody help?
    Maybe we are unsure, if the RPi is really threatened when it's down and UniPi is on. Yes it's out of spec but does it destroy the RPi in practice?

    with best regards
    iot



  • Hi,

    I think that it would be better to use the EN pin of the PCA9306 in stead of making your own 3V3. We will implement a fix based on AND gate (of both RPi5V and UniPi5V) and provide the output of the gate to the EN pin of the PCA.

    But if you are experienced with soldering you can partially fix it at your own risk (see the pictures attached). Remove the C3 and put a 100k resistor instead. Than place the C3 back to the board by the R42 as shown in the picture (you would have to scratch the protective layer to get to GND and the other end of the C3 to R42). Then just scratch off the connection between pin 7 and 8 of the PCA and make a new connection from behind of the new 100k resistor to the EN pin of PCA. This will enable the I2C communication but only at 3v3 to non-powered IC which is also not a good solution.

    I have to inform you that you will loose the warranty by any modification of the product. And we strongly recommend to power the UniPi and RPi from a single power source.



  • Hi Tomas,
    thanks for fast reply. Yes the EN-Pin ist also an idea. We think it's important to make the system as safe as possible.
    Using RPi and UniPi with single power supply it's not the solution.
    For example: If UniPi is ON and you have to restart the Pi manually (after crash) there would be a short state with 5V from the UniPi on the SDA/SDL of the RPi.
    Nice to see, that you will fix it in next version. We love reliability.

    We will try your mod for v1.1. The warranty we lost at the 1 day , when we changed 4 relays to "S202T02"-SSR. This reduces the power from 80mA/relay to 15mA per slot (only 20% !). Of cource it will only work for 230V AC (Triac) toys.
    For future version it would be nice if you can implement options to the relay slots on the PCB for Mosfet (DC) and SSR (AC). It saves lot of internal power of the UniPi and it would be possible to use UniPi with ONE power supply (rail mount supply are expensive and we love small ones). Also for mixer use with lot of switching SSR are better.

    with best regards from Germany
    iot



  • Hello Tomas,
    would it be possible for you sending the "AND-Enable" solution here?. So we could create a small Extra-circuit with this an put it beside the UniPi. Nevertheless the associated modificatin on UniPi would be necessary. It's the perfect solution.
    with best regards
    iot



  • Hi iot,

    we are trying to be always ahead of our customers but this time we are the same We already have prototypes of our 1Wire relay extension boards where customers will be able to choose between exactly this SSR or standard relay.

    Instead of the AND gate we have better solution and I think that a image is worth of thousand words...

    [attachment=0:lva3gveo]unipi_pca9306.png[/attachment:lva3gveo]

    Basically you need a MOSFET transistor with N channel (eg. bss170 - THT), put its drain to 5V of UniPi (eg. R42), gate to 5V of RPi (and also a paralel 100k resistor to GND to protect the transistor) and source via 220k resistor to the EN pin of PCA. Also do not forget to scratch the connection between pin 7 and 8 of the PCA, put the C3 to the R42 as in the last post and leave the space after the C3 unconnected.

    This will cause the voltage of RPi will switch the gate, which switch the EN pin with the 5V of UniPi thus the PCA will only be active in case of presence of both voltages.

    Hope it helps.

    Br,
    Tomas



  • Hello Tomas,
    no worry - your are on top . It's nice to see how UniPi would become perfect. Thanks for the Mosfet-solution - it looks fine and we will try it.

    Yes we have seen the new 1-wire boards with SSR-option - great.
    Neverseless the option of relay (DC+AC), SSR (only AC) and Mosfet (only DC) on the UniPi-PCB would be great on v1.2!

    Here is the picture of our relay to SSR- modification:
    The Rs for S202T02 are 330 Ohm. The hardest work was desoldering the 4 relays without destroying other parts.

    https://drive.google.com/open?id=0B6lNU ... lZvVktyYWs
    https://drive.google.com/open?id=0B6lNU ... WdmcUhQNnc
    with best regards
    iot



  • Nice work with the SSRs Let me know how the mosfet transistor worked. But we have tested it and should be OK.



  • Hello,
    after spending 6 hours of weekend on UniPi v1.1 we suceeded . The most horrible part was remounting C3 at Pin 7 of PCA9306D-converter. The N-Mosfet-solution works well but we suggest to power the Gate of Mosfet with RPi-5V (not 3.3V). The voltage @Pin 8 (Enable) for High State is about 4.2V so the minimum necessary voltage from datasheet is reached safely (3.3V + 0.6V = 3.9V). Everything on I2C seems to work fine:

    ~ $ sudo i2cdetect -y 1
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
    20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: 50 -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- 6f
    70: -- -- -- -- -- -- -- --

    Please integrate the solution in UniPi v1.2 and later.
    Also the small Logic Level-Mosfet is important because of the low Gate-voltage. We used IRLML 2502.

    To help others we made a small pdf-documentation. You can download here.
    https://drive.google.com/open?id=0B6lNU ... HpuWHo2TGM

    Please answer to question for 1-wire topology.
    with best regards - iot