Thumbwheel switch output to a 4-bit register

Thread Starter

Jad85

Joined Nov 25, 2015
3
I have a machine that uses a 3 thumbwheel switches to provide operation settings, each switch has 4 outputs and a common. I want to to control who can change the settings by using am ID card reader that provides an output.
my thought is if I add a 8-bit register (here or similar option.) to store the values and update only when the ID card is swiped.
so 4-bits => register on signal from card reader to reset and and store new values
what kind of input do I need on the CLK?
This is my first time using registers and was wondering if anyone has any insights or see any flaws in my approach to this.
 

MikeML

Joined Oct 2, 2009
5,444
The common input is either tied high, or grounded on the three switches?
How about just interrupting the common connection and "qualifying" it with the card swipe. During the time the common connection is broken, the code out of the switches will be either 000 or FFF, which is not likely a useful real combination...
 

Thread Starter

Jad85

Joined Nov 25, 2015
3
The common is High, disconnecting it will output reading to 000.
I'm not following what you are suggesting, I still need to read the settings and allow changes only if the swipe id is authorized, otherwise the settings should remain unchanged. the machine needs to constantly look at the settings and disconnecting the common will cause it to read 000.
 

ErnieM

Joined Apr 24, 2011
8,377
What is the output of this swiper? If you get a pulse out that can be the clock to the registers you are adding.

You would need two 8 bit registers to capture all 12 bits from your thumbwheels of course.

What you need to look out for is someone attempting to change the setting without a card. In such a case the setting on display (on the thumbwheels) will not be the current setting.

That can lead to bad things and something you should detect and protect against. One good way to fix both the old and new problem is to get a clear keyed box like those frequently found on office thermostats.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
11,038
+17 on the schematic. Are the three switches setting one 3-digit value, or three independent 1-digit values? What tells the machine to read the switches? If they are being read continuously, is the machine depending on the switches holding the previous values, acting as both a variable and a latch? If so, then what you are talking about is three 4-bit latches that detect the AND-ed combination of when a value changes AND when a valid ID is detected. Not tremendously complex, and easily done in random logic, but with each details comes an additional layer of stuff. For example, you will need to work out a process for when to change the switches vs. when to swipe the ID.

ak
 

Thread Starter

Jad85

Joined Nov 25, 2015
3
What is the output of this swiper? If you get a pulse out that can be the clock to the registers you are adding.

You would need two 8 bit registers to capture all 12 bits from your thumbwheels of course.

What you need to look out for is someone attempting to change the setting without a card. In such a case the setting on display (on the thumbwheels) will not be the current setting.

That can lead to bad things and something you should detect and protect against. One good way to fix both the old and new problem is to get a clear keyed box like those frequently found on office thermostats.
You make very valid points! Having an industrial solution that fixes that would be great, I'm currently searching for one and thinking of how I could build one from myself if need to. I was thinking about using a PSoC(MC) that will read the values and and providing them as an output on a validated card swipe, a light can provide that confirmation that the output matches the input.

The Switches are one 3-digit value, and are read continuously, I don't have schematic for the machine I attached the pictures , the PCP on the back of the thumbwheel is double sided20151202_080400.jpg
 

Attachments

ErnieM

Joined Apr 24, 2011
8,377
If your DVM tells you the logic output is 5V when high and zero when low then you don't have much worry replacing with something digital.

Any 5V micro with 12 inputs and 12 outputs, plus an input to sense a valid swipe and an output or two to run indicator lights would work. I use microchip parts and most any 40 pin device they make could do this, excepting there may be a very new line that doesn't run much above 3.3 volts.

Lots of those come in DIP packages so they are easy to hand wire.
 
Top