8*8 matrix relay connection to 8051 MCU

Discussion in 'Embedded Systems and Microcontrollers' started by madhusudan.pigeonsembs, Mar 17, 2011.

  1. madhusudan.pigeonsembs

    Thread Starter New Member

    Mar 17, 2011
    23
    2
    I am using AT89s8252 in my project. I have to connect 64 relays i.e in 8*8 matrix to the MCU.
    I have 16 dedicated i/o pins to the matrix,specification of relays are current=12 to 14mA, voltage =12 v dc . PLZ Help ME............
     
  2. be80be

    Distinguished Member

    Jul 5, 2008
    638
    94
    There is a way to do this like the drawing, just scale for 64 you float the pins you don't want on
     
    Last edited: Mar 17, 2011
  3. madhusudan.pigeonsembs

    Thread Starter New Member

    Mar 17, 2011
    23
    2
    Hi. I could not understand the figure properly. Which pins are to be connected to rows & columns. Plz simplify this.
     
  4. be80be

    Distinguished Member

    Jul 5, 2008
    638
    94
    |____________rows
    |
    |
    |
    |
    columns

    How hard is that ?

    Normally rows are horizontal lines, and columns are vertical line

    This would be up to you seeing you didn't post any thing to show what your doing.
    It's pretty simple you have to block the current with a diode to keep the coils off on the relays that you don't want on.

    Or they would back feed and all come on.

    The 12 volt is going to give you trouble because it not logic level and EMF

    The simple fix would be to use 16 more relays that could have back emf diodes on them
     
    Last edited: Mar 18, 2011
  5. mjhilger

    Member

    Feb 28, 2011
    119
    16
    The matrix solution be80be works great if you only need one relay on at any given time. Is that the case? I didn't necessarily get that from the original post. If it is not the case, his solution will not work.
     
  6. John P

    AAC Fanatic!

    Oct 14, 2008
    1,671
    241
    You need to add freewheeling diodes around each relay. Then to operate any arbitrary pattern of relays, you use a voltage of approximately 100 (!!) with transistors to match, and run the "rows" (could be "columns") at a 1/8 duty cycle, at a rapid enough cycle rate that the current through the relay coils is more or less constant. Since they're inductive, this isn't too difficult.
     
  7. be80be

    Distinguished Member

    Jul 5, 2008
    638
    94
    The drawing I posted works quit well I made a small matrix with 4 relays there no spikes
    when turn off and you could switch any of them on .

    I would use logic level relays I did with the 4 I tried

    This works great can't even see a spike
     
    Last edited: Mar 20, 2011
Loading...