Solved

# Electrical switch

Posted on 2009-04-23
710 Views
Lets say that I have a microcontroller (MC-A) with a digital input that is actuated by a switch.  I have another microcontroller (MC-B) which I want to use to trigger the switch (as if the user pressed it).  I assume that I cannot simply attach the digital out pin on MC-B to the digital input on MC-A.  So I would need a relay or something which would allow MC-B to bypass the switch.  Relays are slow, mechanical devices; my best guess is an optocoupler.

What kind of hardware switch would I need to do this?  It needs to wait for the output pin on MC-B to go HIGH, and then allow current to flow and bypass the push button switch.

MC-A is running at 3 volts, and MC-B is running at 5 volts.

I am a complete newbie at this.
0
Question by:ChetOS82

LVL 23

Expert Comment

check this out

http://www.newark.com/pdfs/techarticles/microchip/3_3vto5vAnalogTipsnTricksBrchr .pdf

I have not done this myself.

CT
0

LVL 18

Author Comment

Sorry, I am a newbie; I am not qualified to evaluate these methods :)
0

LVL 69

Expert Comment

>What kind of hardware switch would I need to do this?

I would say a solid state relay with the voltages and current you need.  There are no moving parts.
0

LVL 18

Author Comment

The solid state relays are rated for hundreds of volts, which makes me think they are not designed for low power use (although they will probably work).

Could I not just use a voltage divider on the input (to go from +5V to +3.3V), and connect the grounds of the two controllers?
0

LVL 69

Expert Comment

If you're connecting the grounds, how are you going to make it function as a switch?  That configuration sounds like it's always on.
0

LVL 18

Author Comment

+5 is coming out of a digital output on MC-B.  Can I connect it to a digital input on MC-A (which is a 3.3V chip) if I use a voltage divider and connect the grounds?
0

LVL 69

Accepted Solution

The +5v output is controlled by MC-B, so it acts as a switch?  As long as the current draw of MC-A on that pin does not exceed what MC-B can provide, you can do this.
0

LVL 18

Author Closing Comment

That is what I needed to know.
0

## Featured Post

### Suggested Solutions

Hello to users to the new age of computers. There are so many products to choose from nowadays that you maybe confused to understand which product is the correct product for you. Let me explain briefly what should be the idea product for your best n…
Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…