Author Topic: Simple input selector, but still don't get it?  (Read 5269 times)

0 Members and 1 Guest are viewing this topic.

Offline FriedMuleTopic starter

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: dk
  • Can make even the simplest task look imposible.
Re: Simple input selector, but still don't get it?
« Reply #25 on: August 26, 2020, 07:55:42 pm »
No there is no reason for using solid state relays at all, can's just find out on how to make bjt / mosfet's, replace the solid states.
My problem is that I think I do not understand your drawings, how to combine them to a functioning single drawing, so I have done many things and, yes end up with something less ideal.
Even if I appear online is it not necessary so, my computer is on 24/7 even if I am not on.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19569
  • Country: gb
  • 0999
Re: Simple input selector, but still don't get it?
« Reply #26 on: August 29, 2020, 10:24:34 pm »
No there is no reason for using solid state relays at all, can's just find out on how to make bjt / mosfet's, replace the solid states.
My problem is that I think I do not understand your drawings, how to combine them to a functioning single drawing, so I have done many things and, yes end up with something less ideal.
Well you haven't exactly stated what you're trying to achieve.

Go back to the logic gate solution, using the NOR gates, with output resistors enabling their outputs to be safely forced high by switches. It's possible to omit the resistors, but shorting the output of logic gates to +V, causes large current spikes to be drawn from the power supply. Figure out how it works using the truth table for the NOR gate. Now consider the same circuit with NAND gates, but the outputs are inverted, so have to be forced to 0V, by switches. The other schematics I've posted work on the same principle, except they use transistors/relays.


https://en.wikipedia.org/wiki/NOR_gate
 

Offline FriedMuleTopic starter

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: dk
  • Can make even the simplest task look imposible.
Re: Simple input selector, but still don't get it?
« Reply #27 on: August 31, 2020, 12:07:40 am »
I like your solution, it does not take up much space but I have to add the LED's and a bit.
You talk about transistor/relay solution, may I please here more about that?
I was hoping on being able to just add "relays" if I need more channels or an extra on/off indicator.
Even if I appear online is it not necessary so, my computer is on 24/7 even if I am not on.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19569
  • Country: gb
  • 0999
Re: Simple input selector, but still don't get it?
« Reply #28 on: September 01, 2020, 09:45:52 am »
I like your solution, it does not take up much space but I have to add the LED's and a bit.
You talk about transistor/relay solution, may I please here more about that?
I was hoping on being able to just add "relays" if I need more channels or an extra on/off indicator.
It's easy to connect relays to the outputs of logic gates, using transistors.

I've already posted transistors/relay solutions which work on the same principle as the circuit I posted previously. They're all just logic gates, NAND/NOR, made from relays, transistors and/or diodes. For example, the one with the BJTs is just four, three input NOR gates. The only subtle difference from the circuit above is the switches force the outputs low, by shorting the base to 0V, rather than connecting the output to +V, via a resistor.


The one with the MOSFETs consists of diode AND gates, followed by MOSFET NOT gates, forming NAND gates. Because the LEDs are connected between the output and +V, they're on, when the output is low. The switch forces the output low, by connecting the gate to +V.
https://en.wikipedia.org/wiki/Diode_logic#AND_logic_gate
https://d2vlcm61l7u1fs.cloudfront.net/media%2F989%2F98947c65-7a7b-460d-ac91-a564a9f62f6e%2FphpshF46T.png

Extra outputs/inputs can be added by using additional gates, with more inputs.

« Last Edit: September 01, 2020, 09:51:04 am by Zero999 »
 

Offline FriedMuleTopic starter

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: dk
  • Can make even the simplest task look imposible.
Re: Simple input selector, but still don't get it?
« Reply #29 on: September 03, 2020, 07:44:09 pm »
I have now tried to modify your great circuit a bit. I have done that to try to make power lached to the selected output and to avoid any limitation on the current on the push-switch. It may not be a great solution, but I have done my best. :-)

I have changed the DPST push button to a simple SPST and replaced one of the LED's in series with an optocoupler.
Top half of the circuit is for powering the input selector and the top 4 LEDs are just loads for the moment.

I do not understand why you choose to put two LEDs in series to make a 7V voltage drop?

Please take a look and understand that I am in no way saying that your circuit was flawed or anything, I am just trying to make my brain understand it and fit it to what I, maybe wrongly, think it does not do from your original drawing.

I have lost a great amount of data on hard drive, so I can only present a simulation for the moment: http://tinyurl.com/yyo7grhk
Even if I appear online is it not necessary so, my computer is on 24/7 even if I am not on.
 
The following users thanked this post: Alex Nikitin

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19569
  • Country: gb
  • 0999
Re: Simple input selector, but still don't get it?
« Reply #30 on: September 03, 2020, 08:52:18 pm »
Yuck, that schematic is quite difficult to follow. Doesn't that simulator support labels? It makes it much easier to read.

What's the point of the opto-couplers? Nothing seems to be isolated. Why not drive the LEDs directly from the transistors?

I thought your LEDs used 700mA. If so, why use J-FET current sinks which only supply 8mA?

All of the circuits I've posted use SPST push button switches. None of them have DPDT push button switches. I think you're confused with the relay contacts, or someone else's circuit.

I put two LEDs in series, because I thought your LEDs have a voltage drop of 6V to 7V, in which case they would really be two LEDs in series, inside the same package. Perhaps I misunderstood, but it doesn't matter, the principle behind the circuit is the same.

The most important thing is: do you now understand how it works?
 

Offline FriedMuleTopic starter

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: dk
  • Can make even the simplest task look imposible.
Re: Simple input selector, but still don't get it?
« Reply #31 on: September 04, 2020, 12:34:06 am »
Yuck, that schematic is quite difficult to follow. Doesn't that simulator support labels? It makes it much easier to read.
Yes it's a mess! And yes, just found out you can make notes, sorry!
What's the point of the opto-couplers? Nothing seems to be isolated. Why not drive the LEDs directly from the transistors?
The isolation is not my goal here I was thinking of the control of the current on the input chips, but yes forget that, was just not thinking. Blame lack of routine in electronic for that! :-)
I thought your LEDs used 700mA. If so, why use J-FET current sinks which only supply 8mA?
At max does my input selector use 700mA but that's an old calculation where a LED was included to indicate selected input.
"My" choice for using J-Fets is not mine but simply a copy of a circuit that should be able to deliver a "dimmable" constant current, I have chosen that because I do not know better. All I need is a super simple discrete constant current, that do not get influenced by Voltage ripple over i.e. 5V
All of the circuits I've posted use SPST push button switches. None of them have DPDT push button switches. I think you're confused with the relay contacts, or someone else's circuit.
I did mistakenly read your SW S1, S2 and so on as a Push button switch with 4 pins or DPST, I thought your separate power was switched on a separate on in the button.
I put two LEDs in series, because I thought your LEDs have a voltage drop of 6V to 7V, in which case they would really be two LEDs in series, inside the same package. Perhaps I misunderstood, but it doesn't matter, the principle behind the circuit is the same.

The most important thing is: do you now understand how it works?
Yes I do now think so. But do I understand correctly that I easily can maintain one of your LEDs and put my load in series?

I am so happy that you spend all that time to help and teach!! :-)
« Last Edit: September 04, 2020, 12:39:50 am by FriedMule »
Even if I appear online is it not necessary so, my computer is on 24/7 even if I am not on.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19569
  • Country: gb
  • 0999
Re: Simple input selector, but still don't get it?
« Reply #32 on: September 07, 2020, 09:38:45 pm »
You won't get a 700mA constant current source, using a J-FET, like that.

My advice is to use the MOSFET design, but with relays. Replace R3, R6, R9 & R12 and the LEDs with relay coils and flyback diodes and power the circuit of whatever, voltage the relay coils require. Assuming the relays don't use much current, say under 200mA, the old 2N7000 could be used for M1 to M4.


The relays can then be used to switch whatever you want from audio signals, to LEDs.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19569
  • Country: gb
  • 0999
Re: Simple input selector, but still don't get it?
« Reply #33 on: September 27, 2023, 07:59:54 am »
I thought about this again for a project at work. It won't be used, since a more simpler solution which didn't involve switching has been selected.

The problem with all of the transistor/relay-diode and logic gate circuits posted is, the number of inputs or diodes/resistors doubles for each channel added. The flip-flop solution doesn't, assuming it works, I haven't looked at it for long enough to determine that.

This circuit doesn't have that problem. It just uses relays. The downside is, it probably won't work, with free-wheeling diodes in parallel with the relay coils, since it will delay the turn-off for too long. To reduce arcing and prolong contact life, add an RC snubber, with a resistor several times the voltage rating of the coil resistance and a capacitor, which will store enough of the energy in the coil, without being subject to over voltage, can be added across the contacts all connected in series.

« Last Edit: September 27, 2023, 08:02:06 am by Zero999 »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5898
  • Country: de
Re: Simple input selector, but still don't get it?
« Reply #34 on: September 27, 2023, 07:39:21 pm »
Here's a different idea (used it myself in a different application).
By encoding to binary and decoding again, it's 100% certain that two buttons (or inputs) cannot be active at the same time. And latching is much simpler.
For 4 buttons, remove U3A and replace the 4051 with a 4052. This will give you stereo capability from the start.
Very nice is that you don't need extra debouncing, U5 will do that for you.
SWx inputs will need pull-down resistors.
More comments in the schematic.
If you don't need bipolar signal capability, connect VEE to GND.

« Last Edit: September 27, 2023, 07:52:02 pm by Benta »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19569
  • Country: gb
  • 0999
Re: Simple input selector, but still don't get it?
« Reply #35 on: September 27, 2023, 09:53:45 pm »
Is there any need for debouncing this circuit? Once the switch is pressed, the appropriate output will latch high on the first pulse. It wouldn't matter if the switch bounced.

Yes, I could do it that way, but the requirement was for relays, which are isolated. I'd just use a microcontroller, if I wanted to use analogue switches.

Preventing more than one on being at a time wasn't a requirement, but I can see how it would be for some applications. It might be possible to implement that with this circuit, by adding resistors and capacitors.

This is a bit of a cludge but could be made to work.

R1 should limit the current so only one relay can latch on at a time.

R2 only needs to charge C1 and shouldn't provide enough current to latch a relay. C1 just needs to store enough energy to activate one relay.

An MCU might be a better idea.

« Last Edit: September 27, 2023, 09:56:57 pm by Zero999 »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5898
  • Country: de
Re: Simple input selector, but still don't get it?
« Reply #36 on: September 27, 2023, 11:08:28 pm »
Groan...
And here's the four-button version, just for fun.
The output demux can be anything, also a LED or relay driver or whatever.The point is, it fulfils the basic "radio button" functionality in a simple, cheap and understandable way.
Your isolation requirement I found nowhere in this thread, but OK, it's late I may have missed it.
Happy "clackety-clack" (expensive, BTW, both in parts and in power).

Just for fun, here's the four-button version:

 

Offline RJSV

  • Super Contributor
  • ***
  • Posts: 2140
  • Country: us
Re: Simple input selector, but still don't get it?
« Reply #37 on: September 28, 2023, 05:04:11 am »
   Ok, OK, OK;  Sanity check here, folks....whew!  At about the 40rh iteration and people reading still don't have a good overview, of problem / question / goals.
Then, suddenly, oh, its for audio.  FORGET THE COMPLEX ELECTRONICS, for one second:   (unless you wish to learn, that's ok).  Bouncing from one partially stated 'function', to another, incomplete and complex solution.
_________________________________________________________________________________________________________________

   Is that switch-set with one down, and stays like that, until some other push button is pressed ?
I mean, like your '67 Chevy vintage car radio has ?
And, where did that switch come from, salvaged out of ?

   Sounds like you want a multiple selector, for audio, but then you imply audio / constant current, using non-existing symbol 'CC'.
   I know of a rotary, 6 position switch, that likely can handle 750 mA, and even better has TWO decks, so has DP6T, That's double pole, six throw.  And has nice 'chicken head' style knob.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19569
  • Country: gb
  • 0999
Re: Simple input selector, but still don't get it?
« Reply #38 on: September 28, 2023, 07:16:03 am »
Your isolation requirement I found nowhere in this thread, but OK, it's late I may have missed it.
You didn't miss it, just the fact it was designed for a different application where I work, which I mentioned in the post. The idea was to use it for switching between different strain gauge signals. Connecting more than one simultaniously wouldn't have done any harm, even though the reading would have been invaid. I decided to post it here, as it's not needed, but I thought someone else might find it useful.
   Ok, OK, OK;  Sanity check here, folks....whew!  At about the 40rh iteration and people reading still don't have a good overview, of problem / question / goals.
Then, suddenly, oh, its for audio.  FORGET THE COMPLEX ELECTRONICS, for one second:   (unless you wish to learn, that's ok).  Bouncing from one partially stated 'function', to another, incomplete and complex solution.
_________________________________________________________________________________________________________________

   Is that switch-set with one down, and stays like that, until some other push button is pressed ?
I mean, like your '67 Chevy vintage car radio has ?
And, where did that switch come from, salvaged out of ?

   Sounds like you want a multiple selector, for audio, but then you imply audio / constant current, using non-existing symbol 'CC'.
   I know of a rotary, 6 position switch, that likely can handle 750 mA, and even better has TWO decks, so has DP6T, That's double pole, six throw.  And has nice 'chicken head' style knob.

That's pretty much it. A switch like the one on an old radio. There's some level of ambiguity. It's not clear whether it's for LEDs, running off a constant current supply, or audio.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf