# Row Column Matrix Problem with Flyback Diodes

So I had a simple row column matrix which I am driving with mosfets to power solenoid locks like this:

GC is ground via 1.5k resistor

C is 24V via 1.5k resistor

And these are the connectors: Outputs

So the problem is after putting the diodes in parallel the whole row and column turns on rather than the single designated point I want. What could be causing this? If i remove all the diodes the operation is normal but upon installing the diodes it start to turn the whole row and column on rather than a designated point. And the weird thing is that at the point where I turn on e.g 3rd row and 3rd column the designated point I want to turn on has 24V across it and the whole 3rd row and 3rd column (apart from the point i wanted to turn on) has 12 volt across it. This only happens with the diodes.

Let me know if further info is needed!

Working Normally:

Problem with diodes causing whole column to malfunction (with both switches turned on):

Problem with diodes causing whole column to malfunction with single switch :

• Are you sure you placed the diodes with the right polarity? Jan 14, 2019 at 9:18
• @Dorian probably, otherwise the diodes would have shorted and died. I am pretty sure the polarities are correct. Jan 14, 2019 at 9:33

This multiplexing works only with unidirectional current loads (ie led-s ). Otherwise the current will go from high on one column to high to all other rows not pulled down then backwards through the coils to high on all other columns, not 24v since the current passes through two coils but enough to make trouble.

Try this setup:

simulate this circuit – Schematic created using CircuitLab

Edit for more details:

This is the way the current goes through the matrix when a row and a column are selected:

Current goes to the left through LED and to the right through the flyback diode. The selected diode/coil will have full voltage, all other led/coils connected to the selected row and column will have almost half voltage. Putting a diode in series with each group led/coil + flyback diode will break the current path through non selected LEDs/coils.

• I am currently testing using an LED and resistor and a diode in parallel to them in place of the coil but it does the same, lights up all the row and column instead of my specific desired point. But ill try putting that diode in series to stop reverse polarity and update. Jan 14, 2019 at 10:32
• multisim.com/content/o6eJdCY8SHBMSSvdb2U2cX/… I made this to test it but there is also a component limit so i couldn't go above 25 components. If you like you can fiddle around with the circuit. Jan 14, 2019 at 10:34
• @AmeerUsman The reverse breakout voltage of a LED is usually in the 5 to 10V so at 24 V reverse voltage the LED will let pass enough current to have the same issue. Jan 14, 2019 at 10:37
• So would it be that I add solenoid coils and rather then leds i am using for testing and the issue would not occur? Jan 14, 2019 at 10:40
• @AmeerUsman The difference you see with or without the diode is because you actually help the current pass in the wrong way which you shouldn't. Jan 14, 2019 at 10:41

I think that you have some fundamental biasing issues that make the switching activity of any one of your components behave abnormally. I have made one snippet of your schematic to point out two of these (there are others in the rest of the circuit).

1. Sharing the R44 1K pullup resistor with all the opto couplers seems wrong. I would tie the anodes of all opto coupler diodes directly to the 5V supply and then put a 1K current limit resistor in each of the COL_x lines.
2. Putting a common 1.5K resistor to GND for all the modes labeled GC causes an interaction between the gate drive for all of the MOSFETs. I would remove this 1.5K resistor and connect the opto coupler emitters directly to GND. If you need the 1.5K resistor in the emitter circuit because of some gate voltage limitation of the MOSFET then have a separate 1.5K for each emitter.

Regarding your application of the flyback diodes. If I were you I would place them across each of the solenoid coils right at solenoid.

• Only one column and one row is active at a given time so the setup with one resistor on each opto is useless and redundant. Jan 14, 2019 at 9:13