AnswerBun.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!

Related Questions

AVRDUDE does not recognize USBasp device

3  Asked on December 5, 2020 by bas

     

Adding switch gives an error in Proteus

2  Asked on December 4, 2020 by sizu-taylorventuresllc

 

Higher than expected voltage in RC low pass filter

1  Asked on December 2, 2020 by vladimir-martynenko

 

Op-Amp as an error detector

0  Asked on December 2, 2020 by beatriceuk

         

Fine delay tuning using phase interpolation

0  Asked on December 2, 2020 by sahithi

     

MicroSD card stuck after CMD8, responding 0x5 before next CMD is issued

1  Asked on December 1, 2020 by diego-colombo

   

Water damage repair on solders

0  Asked on November 30, 2020 by anonymus51

     

Serial comms not reaching 0 V

0  Asked on November 28, 2020 by sanjo

       

Cause a voltage drop of about 1V

3  Asked on November 28, 2020 by michael-brown

     

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir