Thumbwheel switch output to a 4-bit register

Discussion in 'The Projects Forum' started by Jad85, Nov 30, 2015.

  1. Jad85

    Thread Starter New Member

    Nov 25, 2015
    3
    0
    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.
     
  2. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    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...
     
  3. Jad85

    Thread Starter New Member

    Nov 25, 2015
    3
    0
    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.
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    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: Nov 30, 2015
  5. ScottWang

    Moderator

    Aug 23, 2012
    4,850
    767
    Please attach the schematic or block diagram, it's more easy to discuss and the Participants have the same view.
     
  6. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    +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
     
  7. Jad85

    Thread Starter New Member

    Nov 25, 2015
    3
    0
    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 sided 20151202_080400.jpg
     
  8. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    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.
     
Loading...