Chess board 64 reed switches to Arduino Leonardo

Hey, I am making chess board using reed switches to detect whether there is chess piece on square or not. I have found few solutions but I am still not sure, that's why I am asking you.

Option with diodes

Option without diodes
(Step 7.)

I wonder if i need diodes to wire it. I want to wire it using 9 pins as shown on Inctructables. However there are no diodes and I read in a few solutions that they are necessary. So.. where is the truth, if diodes are required then why is it working well in project described on Instructables.com?

The "instructable" solution uses CD74HC4067 chips to test each reed switch individually. This is then not a matrix.
You can also use a scanning technique such as is used for integrating key pads with a microcontroller . The diodes are required because multiple reed switches can be closed simultaneously.

I am Also planning to use multiplexers CD74HC4067. If i get it right, diodes are not required in that case. Thanks for answer.

I have 4x :
https://allegro.pl/oferta/16-kanalowy-multiplekser-do-arduino-cd74hc4067-6107196032

Isn't a matrix with diodes much simpler? Especially the wiring...
Edit - and with 64 individual inputs you need 64 pull up/down resistors...

Hint
Never believe anything you read on Instructables unless you have the knowledge to correct any mistakes in the project. It is just a hot bed of people with an over inflated opinion of their own skill level in electronics.

1 Like

Normally I don't "tail end" a comment like that. But it's possible that someone might not believe it. However, I can tell you that all those sites where anybody at all can post a project, are mostly huge junk piles.

The way to learn, and in fact to have fun with electronics, is to go to original source documentation and tutorials.

Is that true, or would 4 be enough, attached to the common pins of each multiplexer?

1 Like

Oh, right. But still....

Novice programmers almost always seize right up when facing a mux. Here there are two of them.

I assume you know that the pieces will need magnets in them. I wanted to warn you not to use neodymium magnets, use the much less powerful iron magnets.

Well you might think so, but in practice that leaves all the unselected pins into the multiplexer floating. This in turn causes large voltage pick-up which bleeds into the selected input due to cross talk in the multiplexer chip.

However with a pure digital signal you might get away with it, in a way that you wouldn't with an analogue signal. Not a good idea in my book.

1 Like

Fair enough. 64 resistors it is then.

An alternative would be 4 port expanders such as MCP23017 or PCF8575 which includes pull up resistors

1 Like

four of them!

I suspect that the current from a reasonably low value pull up resistor would swamp out all that. Of course, anything might happen in the Frankenstein wiring that would be required...

The problem is with the floating inputs messing up your basic multiplexer chip.

IDK I haven't actually used one in decades... wouldn't it mainly affect the dynamic behaviour, not the static behaviour?

Okey, so problem isnt that simple as I can see. I am little confused now. So using 4 multiplexers requires 64 diodes and 64 resistors? Cant I just use internal pull up resistor in Arduino and it means that wiring on Instructables is crap? Also I am planning to scan board state once after move (using a button).

With that circuit you need the resistors but not the diodes.

Another suggestion would be a single sx1506 or pcf8575 chip. You would need 64 diodes but no resistors.

It's not a beginner project.

No.
Just 64 pull up resistors.

No.
Because in a multiplexer there are no pull up resistors

There are two solutions you are just getting the two mixed up in your mind.