1
\$\begingroup\$

I am working on a project that reads sensor data from multiple sensors. I am trying to come up with a universal solution for connecting these sensors, and have decided to go with a 4P4C Modular Jack since I need a minimum of 4 lines. Some of the sensors communicate via UART, and some are simply analog.

These are the cases I need to cover:
NC = Not Connected

  • +5V, GND, TX, RX
  • +3.3V, GND, TX, RX
  • +5V, GND, Analog, NC
  • +3.3V, GND, Analog, NC
  • NC, GND, Analog, NC

Is there an IC that I can use to switch between +5V, +3.3V, and NC. Then also switch between TX/RX, and Analog/NC?

Edit: I am using a BeagleBone Black to record the data that comes from the sensors, and I am designing a cape/shield to go on top of it, so the space I have is limited.

\$\endgroup\$
7
  • \$\begingroup\$ A PSoC5 will let you do that plus and a lot more and hasa fast ARM on board and op-amps, etc. All configurable. \$\endgroup\$ Mar 27 '14 at 7:02
  • \$\begingroup\$ I am using a BeagleBone Black. I was hoping there might be some minimal DIP that I could control with a couple of GPIO pins from the BeagleBone? \$\endgroup\$ Mar 27 '14 at 7:07
  • \$\begingroup\$ The physical PCB space I have is limited. \$\endgroup\$ Mar 27 '14 at 7:16
  • 3
    \$\begingroup\$ I question your wisdom of first selecting the connector and then facing this pin-switching problem. Why bot go with a 6/6 or even 8/8? What are the consequences of connecting a 3.3V sensor to 5.0V? If you really want to do this switching you must specify the currents on the 3V3 and 5V lines. \$\endgroup\$ Mar 27 '14 at 7:49
  • \$\begingroup\$ I agree with Wouter at least on the power side of things - use separate pins for 3V3 and 5V. The rest are easily accomplished with analogue switches/logic \$\endgroup\$
    – Andy aka
    Mar 27 '14 at 8:35
1
\$\begingroup\$

I would highly recommend avoiding a voltage switching scheme for the power, if only to add some level of idiot proofing. If 5v is accidentally provided to a 3.3v sensor, the sensor could easily be damaged. Voltage switching might be OK if there was a very reliable method of determining what the required voltage is while no power is applied, e..g. a short between two pins or a resistor between two pins that can be measured.

As for the actual signals to the sensor, you can use CMOS switches. However, you want to make sure you're not going to accidentally apply a voltage to a signal line to something that can't handle it. This can be mitigated by series current limiting resistors, but this can affect signal integrity and serial communications speed. Also, CMOS switches can have a relatively high ON resistance.

I would recoomnd a 6P6C connector like so:

  • +5
  • sense res
  • +3v3
  • RX/analog-
  • GND
  • TX/analog+

where sense_res is a resistor to GND that you can build a voltage divider around and then use to determine what sensor is connected.

It might be a better idea to just go ahead and use 8p/8c as that is a standard Ethernet cable. In this case, I would recommend something like:

  • +5v
  • GND
  • TX
  • RX/Analog+
  • Analog-
  • Sense res
  • GND
  • +3v3

This also takes advantage of the twisted pairs in a standard ethernet cable. +5v and GND are twisted together, as well as +3v3 and another GND. Analog + and analog - are twisted together so differential signals have good performance. TX and RX are not twisted togther to prevent crosstalk. This also prevents accidentally connecting TX to an analog sensor output.

\$\endgroup\$

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.