0
Offline
Newbie
Karma: 0
Posts: 21
Arduino rocks
|
 |
« on: September 03, 2011, 10:29:16 am » |
I need some input on a design I'm working on. I need to do the following with the least amount of components, as space is an issue:
I have 3 input pins A, B and C. Two output pins 1 and 2. And I need to achieve these three combinations: A to 1 and B to 2 C to 1 and B to 2 A to 1 and C to 2
It needs to be controlled by an Arduino. I have been looking at NPN and PNP transistors, but it will require to many conponents.
Any thoughts?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 270
Posts: 17040
Available for Design & Build services
|
 |
« Reply #1 on: September 03, 2011, 10:35:57 am » |
So you want the outputs to mimic the inputs under those three sets of conditions? Example switch (ABCselect){ Case 1: digitalWrite (output1, digitalRead(inputA)); digitalWrite (output2, digitalRead(inputB)); break; Case 2: digitalWrite (output1, digitalRead(inputC)); digitalWrite (output2, digitalRead(inputB)); break; Case 3: digitalWrite (output1, digitalRead(inputA)); digitalWrite (output2, digitalRead(inputC)); break; }
Or you need to have outputs = inputs as analog signals? Your question needs to be more clear.
|
|
|
|
« Last Edit: September 03, 2011, 10:37:42 am by CrossRoads »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 21
Arduino rocks
|
 |
« Reply #2 on: September 03, 2011, 10:41:15 am » |
Your question needs to be more clear. Yes. I just thought of that. Imagine a DPDT relay. I need something like it but a Double Pole Triple Throw instead. A, B and C is 16v, 10v and Ground. I need it routed to the outputs, 1 and 2, using the Arduino to do the controlling. Better? Otherwise, I think I can draw it.. Not sure, though...
|
|
|
|
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 75
Posts: 6975
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #3 on: September 03, 2011, 10:42:11 am » |
You can use transmission gates like the 4066, they will work with digital or analogue but as Crossroads says, need more info.
Voltage levels. Current levels. Analogue/digital. Speed of signals. Speed of changing from one setup to another.
and probably some other stuff I haven't thought of.
EDIT: Crossed there, you need 4 SPST relays.
A only ever goes to 1 (SPST) B only ever goes to 2 (SPST) C can go to either (2 x SPST)
_____ Rob
|
|
|
|
« Last Edit: September 03, 2011, 10:46:34 am by Graynomad »
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 75
Posts: 6975
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #4 on: September 03, 2011, 10:48:45 am » |
Another question, how important is it that another combination is NOT selected?
You can control the relays with 4 Arduino outputs but if it's a big problem say for A to be connected to 2 then I may add some logic because it's easy to stuff up the programming.
_____ Rob
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 270
Posts: 17040
Available for Design & Build services
|
 |
« Reply #5 on: September 03, 2011, 11:07:59 am » |
4 Simple 5V/low coil current relays could be controlled by arduino outputs like this: Be sure to have software open relays before closing others.
|
|
|
|
« Last Edit: September 03, 2011, 11:10:32 am by CrossRoads »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 21
Arduino rocks
|
 |
« Reply #6 on: September 03, 2011, 11:10:15 am » |
I already thought of the solution with four relays (or even two DPDT), but I have space issues - But perhaps, some of you can find some small relays?
|
|
|
|
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 75
Posts: 6975
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #7 on: September 03, 2011, 11:14:20 am » |
You could use solid state relays (like the CPC1014N), they come in a 4x4mm package but only 400mA capacity.
That's why I asked the questions above.
______ Rob
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 270
Posts: 17040
Available for Design & Build services
|
 |
« Reply #8 on: September 03, 2011, 11:15:38 am » |
Is SUBMiniature small enough for you? http://www.mpja.com/prodinfo.asp?number=18474+RLTakes up the space of a 16 pin DIP
|
|
|
|
« Last Edit: September 03, 2011, 11:18:21 am by CrossRoads »
|
Logged
|
|
|
|
|
|
|
|