Go Down

Topic: 112 switches need reading (Read 2 times) previous topic - next topic

themotorman

I have 112 switches that output a 0 or 5 volts. I need a way to send this to an Arduino, MEGA2560  , by the serial port, using some CMOS logic or? so that I can tell which switches have changed state. Normal condition is that all 112 are HI=5 volts. Ideas please. The Arduino and the switches are about 5 feet apart but in a noisy environment.
thanks

Runaway Pancake

A 10x12 (120) matrix and a 14x8 (112) matrix would both take up 22 pins, but the 10x12 would have room for adding more switches later!    ( :
"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

retrolefty

#2
Nov 18, 2012, 03:08 am Last Edit: Nov 18, 2012, 03:16 am by retrolefty Reason: 1

I have 112 switches that output a 0 or 5 volts. I need a way to send this to an Arduino, MEGA2560  , by the serial port, using some CMOS logic or? so that I can tell which switches have changed state. Normal condition is that all 112 are HI=5 volts. Ideas please. The Arduino and the switches are about 5 feet apart but in a noisy environment.
thanks


Well you state the switches already have a 0 or +5vdc signal value. Scanning 112 'dry contact' switches is pretty straight forward in simple 2D matrix scan using 22 arduino I/O pins, however if the switches already have a 'foreign' voltage (no free 'dry contacts') wired to them then it's not possible as the arduino has to be able to activate voltage on one dimension of the matrix to then read back the other dimension to tell is a specific switch is closed or not. So what are the switches now controlling and or wired too?

So assuming the switches are performing some electrical function already and you just want to 'monitor' their output states, then you probably need to use lots external logic chips like input shift registers (parallel in/serial out) or digital encoder chips (say lots of 16 in /1 out mux chips. It will not be a low parts count application that is for sure.

Lefty

themotorman

THey are as you described external and I don't have any way to connect to the Arduino except as a serial line. I am hoping someone will have some idea of what CMOS logic chips might do the job. I realize that this is not a simple problem but I am willing to build the PCB to put the chips on it. Just haven't worked with CMOS for some time and need some help with the CMOS family, decoders, etc... also need to take the logic output and have a way to read the data. I did think that a way would be to use 2 MEGAs, since that would give me enough inpins and then send the data from these to the remote ARduino via the serial line. Although not cheap it it seems that it might be the simplest... Opins?

MarkT

How many will be LOW at any one time?  Just a few or potentially many?
[ I won't respond to messages, use the forum please ]

Go Up