help with multiplexing/demultiplexing

Discussion in 'The Projects Forum' started by dataplex, Aug 20, 2014.

  1. dataplex

    Thread Starter New Member

    Apr 15, 2014
    2
    0
    dear list,

    i have just finished making a touch sensitive keyboard, where each of the touch nodes output 5v logic as you touch them.

    i need these signals to be sent to another module through a cable, to turn things on/off - so rather than using a bulky 30 wire cable to get the control signals where i need them, i thought the 4067 multiplex breakout from sparkfun might come handy :: https://www.sparkfun.com/products/9056

    i understand this mux chip can also serve as a demultiplexer, however i dont quite understand how to pack the button states into a single datastream on the keyboard side, and how to unpack them on the other.

    would i be able to use another 4067 chip in reverse? or do i need an arduino to scan through the inputs at high speeds?

    here is a diagram of what i need to do:

    [​IMG]

    any thoughts would be greatly appreciated!!

    all the best,
    -úlfur
     
  2. pwdixon

    Member

    Oct 11, 2012
    488
    56
    Use a serial link instead. That way you only need 2 wires whereas with a multiplexer you need to use n address lines +1 wires and you still need something to clock through the addresses at both ends.
     
  3. dataplex

    Thread Starter New Member

    Apr 15, 2014
    2
    0
    pwdixon, that sounds very intriguing - would you have any suggestions chips that can do the job? thank you!
     
  4. pwdixon

    Member

    Oct 11, 2012
    488
    56
    You obviously already know about Arduino's so why not put an arduino at each end scan the keyboard data with a serial link between the two. Use your own protocol to send messages containing data on buttons pressed etc.

    If you are desperate to use the multiplexer for some reason that would help to reduce the number of inputs required and hence the size of the Arduino required. Though of course you will have issues if you want to send more than one button activation at a time.
     
  5. massimj

    New Member

    May 5, 2013
    14
    5
    Take a look at this chip, PCF8574. It has a hardware interrupt that can tell the micro that there is incoming data.

    Just picture using how many of these that you need, all on the same I2C buss. You only need to use the Interrupt on the keyboard end to know that a key is pressed, then retrieve the data, and send that data out to the chip that drives things you want to turn on and off. The chip can drive a pretty good load, but I would drive a relay board to keep separation between what you are controlling, and your circuit.

    Here is what the manufacturer says about the chip.

    The device consists of an 8-bit quasi-bidirectional port and
    an I2C-bus interface. The PCF8574 has a low current
    consumption and includes latched outputs with high
    current drive capability for directly driving LEDs. It also
    possesses an interrupt line (INT) which can be connected
    to the interrupt logic of the microcontroller. By sending an
    interrupt signal on this line, the remote I/O can inform the
    microcontroller if there is incoming data on its ports without
    having to communicate via the I2C-bus. This means that
    the PCF8574 can remain a simple slave device.



    1 FEATURES
    • Operating supply voltage 2.5 to 6 V
    • Low standby current consumption of 10 µA maximum
    • I2C-bus to parallel port expander
    • Open-drain interrupt output
    • 8-bit remote I/O port for the I2C-bus
    • Compatible with most microcontrollers
    • Latched outputs with high current drive capability for
    directly driving LEDs
    • Address by 3 hardware address pins for use of up to
    8 devices (up to 16 with PCF8574A)
    • DIP16, or space-saving SO16 or SSOP20 packages.
     
Loading...