TransWikia.com

Input matrix with reed switches

Electrical Engineering Asked by iGEL on November 26, 2020

I’m about to buy components for my first Arduino project: Reed contacts for my model railroad (H0 scale) to detect track usage. I don’t want to use special shields, but use as few components as possible to directly connect the reed switches to the Arduino.

To make good use of the Arduino Nano, I’d like to use an input matrix. Let me summarize, how I understand the matrix (here it’s 4 by 4, but with 14 digital IO pins, I could have a 7 by 7 matrix, right?):

Input matrix

To see the closed contacts, I switch on the one of the inputs at a time (I, R1, S1, T1) and read all of the outputs (N, O, P, Q). If R1 is active and I receive a high on O and P, then both of the middle contacts would be closed.

Since I’m a real newbie here, I’m unsure about the specs I should look for in the reed switches and the diodes. Also, do I miss any components (resistors?) or are switches and diodes enough?

Thank you!

One Answer

This application is not very demanding and you're you're going to be buying a lot of parts, so just buy the cheapest ones. 1N914 or 1N4148 diodes are usually inexpensive. for the reeds shop around. you probably want glass ones as they are harder to bust than plastic ones.

Resistors are a good idea, you could use the arduino's internal pull-up but using a lower resistance (like 1K) will help noise immunity, and an electroc model railways is probably electically noisy.

backing your table-top with foil connected to the arduino ground and running the wires below the foil will probably help with the noise too,

Answered by Jasen on November 26, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP