Understanding diodes in a switch-matrix

Hey people,

 

I have a simple question. 

 

For me a diode is a kind of blockade for signals. But in a switch matrix (if I get it right) the diodes will be connected reversed so that I would expect that absolutely no signal will pass the diode. I know that those diodes are used to isolate the switches and they are necessary. To make clear how I understand it I attached a picture.

 

 

So: What happens with the diode if I press a switch? How does it “passthrough” the signal coming from the switch? Or did I get it wrong?

 

Thanks,

Chris

The signal level at digital input pins is usually 5V, pulled up by 10k resistors -> logic level 1

By closing a switch/button, this input will be connected with ground through the diode -> logic level 0

 

The diodes ensure that one button doesn’t influence the signal level of other buttons.

 

Best Regards, Thorsten.

By closing a switch/button, this input will be connected with ground through the diode -> logic level 0

 

Thanks for the reply.

But it doesn’t sound logically to me to put the diodes “reversed” behind the switches… because in my understanding it would block the signal from the switch…

Is your switch matrix working with high-active, or low-active signals?

A more complete schematic would help.

 

Best Regards, Thorsten.

Hi TK,

 

sure. This is a pcb I created where pin 1 of the DIL header should be the row selection line.

 

I was looking at your schematics and it seems that I made a mistake sadly…

 

If I get it right the diodes in my layout have no effect. I could turn the diodes and use pin 1 of the DIL header as column-selection and pin 3-10 for the rows. Not perfect, but a workaround.

Am I right?

The circuit behaves the same way like the standard low-active button matrix: http://www.ucapps.de/mbhp/mbhp_din_8x8buttons.pdf

 

It doesn’t matter if the diodes are at the upper or lower side of the button…

Only the polarity is important, and it’s matching with my schematic.

 

The error is somewhere else…

 

Best Regards, Thorsten.