Mixing new and old cards


  • Hi

    (Refer to https://forum.sequentmicrosystems.com/index.php?threads/which-485-on-old-16-opto-in-hat.191/)

    I have a existing setup of

    Stack:
    RPI 5
    ID0: 16 Opto inputs (card from 2021)
    ID1: 16 Opto inputs (card from 2021)
    ID2: 16 Opto inputs (card from 2021)
    ID6: 8 relay outputs (card from 2021)

    Today I added to the stack

    ID3: 16 Solidstate outputs
    ---: 4 x RS232/485
    ID4: 16 Analog/Digital inputs

    The old stack worked before and also works after adding the new stuff
    All cards in the old stack + the 4*RSxxx has steady green status light.

    BUT status light of ID3 is blinking red and status light of ID4 is blinking blue.
    Also I cannot see the cards in neither 16inpind -list nor 8relind -list

    Havent tested the RSxxx card yet

    What did I do wrong ?


  • The new cards are replacing the IOExpander with a processor; blinking instead of solid on is an indication of this.
    I am not sure what the problem is, whether the new stack is not working or just the list command is not working.

  • Do you have a description of the LED blink codes ?
    It seems the 16uni on ID4 is working but it claims it is in 'calibration' phase
    When I try to communicate with 16rel on ID 3 the 16relind just hangs after I managed to talk to it once

    pi@AFC01C91:~/16relind-rpi $ 16relind 3 board
    Board Firmware Version: 01.03

    since that no reply

  • The LED blinks short (100ms) each second when in normal operation, and long 1s on 1s off when running the bootloader (update in progress or invalid firmware)
    The calibration phase for 16-universal inputs means nothing; it should work as expected, but you can reset the calibration if the results are off.
    The relay card runs the latest firmware. Have you tried to update the 16relind command ?

  • So the colors means nothing ?!

    Yes I just pulled 16relind from github.

  • The color is arbitrarily chosen. When an LED is out of stock, we replace it with what is available.
    Could you test the 16relind as a single card on Raspberry?

  • I will se what I can do - unfortunately I only have one RPi 4/5 and it is running sensor monitoring in production.

  • Just seeing

    COMPATIBILITY


    The Sixteen Solid State Relays card is compatible with all Raspberry Pi versions from Zero to 5. All stacked cards share the I2C bus using only two of the Raspberry Pi’s GPIO pins to manage all eight cards. This feature leaves the remaining 24 GPIOs available for the user.

    I will try to rig it up on an older RPi

  • You can use any Raspberry Pi that has a 2x20-pin GPIO header, including Zero

  • OK, set it up on another Rpi and it seems to work - except 16relind does not allow a higher register value than 255 (8 relays)
    using e.g. "16relind 3 write 16 on" works.

    So next question is what would make it fail with the old stack ?
    When I tested it with 16relind, I was at the same time running a close loop polling all the 3 x16 inputs on ID0-1-2 repeatedly.
    Would that polling lockup the I2C bus starving the 16relind, so it never get a chance to communicate ?
    If yes - why would the 16uni card work under the same conditions ?

  • - you found a bug, I will take a look, the 16relind must accept value up to 65535
    Hard to answer the questions, but you could increase the I2C speed to 400k and try again with al the cards in the stack

  • OK, will try tomorrow - 12:30am here in DK :-)

  • Configured I2C speed to 400K - no change - test on solidstate output did not roll the leds - leds stayed off - 16relind did not repond.
    Added 5ms sleep in each iteration of the input polling loop - helped 16relind now responsive and card reacts to commands.
    So apparently my close polling loop is exhausting the I2C.

    Haven't tried with 16uni in the stack - but that already worked yesterday - so I guess it works.
    Also got the 4 x coms card to work - a little confusing PORT numbers are opposite to /dev/ttyAMA numbers - and RS485 A/B on Sequent's card seems to be opposite of my ICP gear (not sure who got it right :) ).

  • I am glad you managed to communicate with all the cards. I did not realise you had no delay between reads.
    Sorry, the port number does not match the serial port names. I guess you found the correspondence on the product page.
    About the A/B notation, we follow the transceiver IC datasheet.

Please login to reply this topic!