I am using a Phillips SAA3010 IR transmitter IC to send a modulated IR signal. The IC has two types of inputs:

  • Z0---Z3
  • X0---X7

And one type of output:

  • DR0---DR7

Each legal operation corresponds to a wired connection of DR-Z and DR-X pin. The device is designed to be interfaced with a keypad on a remote control, per the datasheet description:

Every connection of one X-input and one DR-output will be recognized as a legal key operation and will cause the device to generate the corresponding code. The same applies to every connection of one Z-input to one DR-output with the provison that SSM must be LOW. When SSM is HIGH a wired connection must exist between a Z-input and a DR-output. If no connection is present the system number will not be generated.

The desired switch arrangement is described in this figure from the datasheet:

enter image description here

However, I want to do the wired connection electronically, so as to make the switch programmable via an Arduino. I have to obtain 64 such legal key connections. I have tried using a MUX/DEMUX IC but as they use gates, no wired physical connection exists. I believe that this will not work unless there is a wired physical connection. The datasheet certainly assumes that a physical keypad will be used.

How can I do this using the minimum possible space? My physical limitations are that the device has to be about the size of a typical mobile phone, which includes the Arduino UNO board.

  • \$\begingroup\$ How much voltage/current are you switching? \$\endgroup\$ – Kris Bahnsen Mar 9 '12 at 19:36
  • 1
    \$\begingroup\$ You MUST define what you mean by PHYSICAL connection. Hard metallic or bidirectional solid state under 0.1 og=hm or monodirectional etc. Telling us what you actually want to achieve and not just how you want to achieve it would be of great help. What is the "load". What voltages? $10 for all 32 switches ? etc. Tell us what you really really want to do and we can give you an answer. \$\endgroup\$ – Russell McMahon Mar 9 '12 at 20:07
  • \$\begingroup\$ how about 64 optocouplers? ;-) \$\endgroup\$ – Stefan Paul Noack Apr 11 '12 at 13:11

Take the problem one level up. Do you want to control the SAA3010 (which has been obsolete since eons) with a microcontroller or do you want to send RC5 codes. I guess you want the latter. One of the reasons the SAA3010 is obsolete is that these days about every device contains at least one microcontroller, and microcontrollers can do this task as easily as the SAA3010, including the modulation.
I've never used Arduino, but I guess it can output RC5 codes. If it can't, or if your Arduino doesn't have the resources left, use an external microcontroller which you control through UART. This will probably cost you less than a few of the switches you would use on the switch matrix, so it's definitely the cheapest solution.

| improve this answer | |

literal answer

Yes, an analog 8:1 mux (to select one of the DRx pins) followed by an analog 1:12 demux (to select one of the Xx or Zx pins) should be adequate to simulate pushing one button on a keypad. (You don't need to simulate pushing two buttons at once, right?)

Any common 8:1 analog multiplexer should be adequate, such as: 74HC4051, 74HCT4051, CD74HC4051, CD4051B, HCF4051B, DG408, etc.

You can make a 1:12 analog de-multiplexer out of two 8:1 analog multiplexers and perhaps an inverter (producing a 1:16 analog de-multiplexer).

Then your microprocessor drives the muxes with 3 pins for DR select, 4 pins for X/Z select, and perhaps a few more pins for "enable" (no buttons pressed).

general comments

Most of the circuitry on that chip deals with reading the keyboard. Since you apparently don't have or want a keyboard, rather than (a) wire your processor to some circuit connected to this chip that generates RC-5 pulses connected to a transistor connected to the IRLED, perhaps it would be simpler to (b) program your processor to generate the RC-5 pulses directly, connected to a transistor connected to the IRLED. There seems to be information on the internet: RC-5, tv-b-gone, etc.

I suspect it is possible to use digital mux and digital demuxes to simulate pushing buttons, but that requires a better understanding of exactly how the chip works.

| improve this answer | |
  • \$\begingroup\$ +1 for generating the pulses in the uC. This chip was designed to read a key matrix, but pretending to be one is bound to cause more trouble than simply generating a sequence of pulses on a single pin. \$\endgroup\$ – Theran Apr 11 '12 at 4:43

There are a few ways you could go about this.

  1. Little SPST relays. You don't want to do this. Big, expensive, noisy and power consuming.

  2. Transistors/FETs might work at each junction. The internal logic of the SAA3010 says that the X/Z inputs are pulled high, and the DR lines are sequentially driven low. This means that if you connect an NPN transistor's emitter to the DR output and the collector to the X/Z input you may be able to achieve what you're after. I have NOT simulated this, but it seems plausible.

  3. Failing #2, you could simply wire all the DR inputs to 8 inputs on your Uno, and then wire 8 outputs to the X0-X7 inputs. Your Uno would hold the outputs either at logic high or high impedance states and then depending on which DR input it sees go active (low), drive the appropriate X/Z output.

Method 1/2 are the easiest since they require no synchronization between the Uno and the SAA3010. Method 2 needs to be tested, I am not even sure it will work. Method 3 requires the Uno to drive the output fast enough after sensing the DR lines, and to stop driving them the instant the DR lines change. The datasheet doesn't clearly state it, but it looks like you'll have to be able to drive and release the Uno outputs based on the DR inputs at a couple hundred kHz. This isn't a massive undertaking. The question is whether you'll have enough I/O ports on the Uno to achieve this.

| improve this answer | |
  • \$\begingroup\$ I was actually thinking about using analog multiplexer/demultiplexer but I'm not sure will it work?If it works, we can use 1:8 MUX and then 8:1 DeMUX simply. Can you tell sth about it or I would have to test it? \$\endgroup\$ – Prabhav Agrawal Mar 10 '12 at 14:24
  • \$\begingroup\$ Analog mux could also work; the datasheet states a maximum resistance for a contact. As long as the analog mux's on-resistance is low enough to meet that spec that would work. \$\endgroup\$ – akohlsmith Mar 12 '12 at 12:20
  • \$\begingroup\$ Method 2 would require 8*8 + 8*4 = 96 I/O lines on the micro. The Uno doesn't have anywhere near that number of pins. \$\endgroup\$ – Theran Apr 11 '12 at 4:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.