0
\$\begingroup\$

I have the next situation:

I've got two microcontrollers that should drive 4 motors. It's either microcontroller1 or microcontroller2 that is driving the motors.And 4 motors means that each microcontroller has 4 outputs. So I'm searching for a system that could choose(depending on a extern variable) which microcontroller is driving the motors.

So basically it's something like a selective switch, but with 8 inputs (comming from microcontroller1 and microcontroller2, and 4 outputs that go to the motors)

Thanks in advance

\$\endgroup\$
1
  • \$\begingroup\$ Like a demultiplexer? \$\endgroup\$
    – jippie
    Commented Sep 15, 2014 at 8:03

3 Answers 3

2
\$\begingroup\$

This is typical application for a digital multiplexer. In this case 8:4 multiplexer. For example the 74HC257 quad 2:1 MUX can do this.

Important thing is to keep its power on while either of the MCUs is on because input of inactive CMOS circuit is essentialy shorted to ground (via the protection diode to VCC).

\$\endgroup\$
1
  • \$\begingroup\$ I'll give it a try and compare it with the 74HC244 setup. Thanks \$\endgroup\$
    – PlatonInc.
    Commented Sep 15, 2014 at 8:22
2
\$\begingroup\$

You can use a 74HC244.

1/OE and 2/OE must be different at all times (use an inverter for example) and every two outputs operating the same motor must be connected. I added a drawing to show what I mean.

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ This is the first thing I'm going to try. Thanks for the idea! \$\endgroup\$
    – PlatonInc.
    Commented Sep 15, 2014 at 8:19
0
\$\begingroup\$

How about a multiplexer? You feed the outputs of the microcontrollers in on one side and you use a binary selector to select one input which is routed to its output.

Multiplexers exist in several sizes, and to accomodate four outputs you can simply connect four of them in parallel (eg like in a 74HC157). There is a list of device types in the Wikipedia article, but a Google search is bound to give more results.

Another, maybe even more viable, method is using another microcontroller that you program as a multiplexer with all inputs and outputs in the same device. This would simplify wiring a lot.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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