Method of switching between two signal sources? - Page 1
Forum section: electronics / beginners

author: mc
author_rank: Regular Contributor
timestamp: December 29, 2012, 11:24:56 pm
content: I'm looking for a component that I'm not sure if it even exists.I'm designing a system based on an Arduino Mega, and all was going well until I realised that one of the interupt pins I need to use, is also used for the I2C bus.What I need is some way to switch from having the I2C bus connected (for a few seconds during initial power up sequence), to the interupt source.I've looked at various options, and all SPDT signal/reed relays I've looked at, require more coil power than what the arduino is capable of providing. I could use two SPST Reed relays, but they're not exactly cheap. Two SSRs are a cheaper option, but I'm not sure how the extra bit of resistance would affect the I2C bus.I was hoping there would be some kind of chip available that could handle switching between signal sources, however I'm not even sure what to search for.So any suggestions?

author: Thor-Arne
author_rank: Unknown
timestamp: December 30, 2012, 12:09:33 am
content: Signal relays with a driver transistor, flyback diode, resistor.... first thing that comes to mind.Bus driver IC is the second thing that pops up.

author: lewis
author_rank: Frequent Contributor
timestamp: December 30, 2012, 01:00:15 am
content: Something like this ought to do it:http://www.ti.com/lit/ds/symlink/ts5a3159.pdf

author: mazurov
author_rank: Frequent Contributor
timestamp: December 30, 2012, 02:23:06 am
content: Mega has many interrupt pins, just use another one.

author: Wytnucls
author_rank: Super Contributor
timestamp: December 30, 2012, 05:03:28 am
content: multiplexer/demultiplexer?http://www.fairchildsemi.com/ds/NC/NC7SB3257.pdfhttp://en.wikipedia.org/wiki/Multiplexer

author: pickle9000
author_rank: Super Contributor
timestamp: December 30, 2012, 05:11:51 am
content: 4066B ?

author: amyk
author_rank: Super Contributor
timestamp: December 30, 2012, 06:30:41 am
content: A relay for that, seriously?It's called a transistor... and if you get the interrupt polarity right you may only need one of them.Why do you need to share that pin anyway? TheMCU in the Arduino Megahas a ton of interrupt sources, and unless you're using almost every single feature of the chip, I think the better solution here would be to just find another pin to take the interrupt on.

author: AndyC_772
author_rank: Super Contributor
timestamp: December 30, 2012, 09:39:02 am
content: If you really need a switch:http://www.ti.com/lit/ds/symlink/cd74hc4053.pdf

author: Thor-Arne
author_rank: Unknown
timestamp: December 30, 2012, 10:46:05 am
content: Quote from: amyk on December 30, 2012, 06:30:41 amYes, seriously. A signal switching relay is a valid option.Not saying it's the most economical solution, but it might be the easiest to understand.Also, it's a solution that should work with all kinds of signals.

author: mc
author_rank: Regular Contributor
timestamp: December 30, 2012, 12:40:19 pm
content: That TI analog switch suggested by Lewis looks like it will work perfectly, is available at my usual supplier, and is a reasonable price.As for using another interupt, I could do, but the standard Arduino Mega/libraries only makes 4 of the hardware interupts available, and 2 of those are shared with the I2C pins. I'm needing 3 interrupts for this particular project.Out of the other 4 hardware interupts available on the Mega, only 2 make it to physical pins, and they're not available in the standard Arduino language anyway, so not much use.Ideally I'd design this project from the ground up on another more suitable chip (which I may well do in the future), however the Mega ticks all the boxes I need, has various libraries available I need, and will allow me to get this project finished quickly.