How do I configure a simple logic control - diyAudio
Go Back   Home > Forums > Source & Line > Analog Line Level

Analog Line Level Preamplifiers , Passive Pre-amps, Crossovers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 6th July 2014, 01:02 PM   #1
poldus is offline poldus  Europe
diyAudio Member
 
poldus's Avatar
 
Join Date: Jan 2006
Location: basque country
Default How do I configure a simple logic control

I want to make a minimalist remote controlled stepped attenuator with only five steps or so,actuated by a corresponding relay.
I have two buttons on the remote: one would ativate the sequence upwards and the other downwards as in any volumen control.
From what I have gathered a bidirectional counter is a common choice for this purpose. These devices have an input pin that will effect a jump to the next output in the sequence, and and up/down pin that determines the direction of the sequence.
I need help in figuring out how can those two inputs be interfaced so that a single push of either button on the remote control will trigger a shift to the next output in the desired direction.
  Reply With Quote
Old 6th July 2014, 01:11 PM   #2
diyAudio Member
 
jan.didden's Avatar
 
Join Date: May 2002
Location: Great City of Turnhout, Belgium
Blog Entries: 7
I think you refer to a counter with a 'clock' input, which effects the 'jump', and the direction input which determines which way the counter goes.

So the latter part is simple: connect your Up or Down switch output to the Up or Down pin of the counter.

In addition you need a way to generate the clock whenever one of the buttons gets pressed.
A way to do that is to connect each switch to an input of an OR gate. The gate will give an output if the Up OR the Down switch is pressed, and the OR gate output goes to the clock input of your counter.

You need to check polarities; for instance, does the counter clock on rising or falling edge, or is it static? Possibly you need an OR gate with an inverted output.

If you need an edge rather a static level, you can use a differentiating network (series C, R to ground).

Hope this helps.

Jan
__________________
I won't make the tactical error to try to dislodge with rational arguments a conviction that is beyond reason - Daniel Dennett
Check out Linear Audio Vol 7!
  Reply With Quote
Old 6th July 2014, 02:18 PM   #3
poldus is offline poldus  Europe
diyAudio Member
 
poldus's Avatar
 
Join Date: Jan 2006
Location: basque country
Jan, thanks for your response and, please, bear with me: I have no training in electronics or logic gates other tan what I gather on the forums.
My remote receiver has two momentary high outputs activated by the up and down buttons on the handset respectively.
So, the OR gate means the CLOCK pin on the counter will be activated irrespectively of which button has been pressed.


Quote:
connect your Up or Down switch output to the Up or Down pin of the counter
.

I understand this is what will determine the direction of the sequence.

Do I connect either one of those receiver outputs to the up/down pin on the counter, I mean does it not matter if it is the one coming from the up or down button?
Thanks again,
Poldus

Last edited by poldus; 6th July 2014 at 02:22 PM.
  Reply With Quote
Old 6th July 2014, 02:53 PM   #4
diyAudio Member
 
jan.didden's Avatar
 
Join Date: May 2002
Location: Great City of Turnhout, Belgium
Blog Entries: 7
Quote:
Originally Posted by poldus View Post
Jan, thanks for your response and, please, bear with me: I have no training in electronics or logic gates other tan what I gather on the forums.
My remote receiver has two momentary high outputs activated by the up and down buttons on the handset respectively.
So, the OR gate means the CLOCK pin on the counter will be activated irrespectively of which button has been pressed.
Yes - the clock is needed to react to the new command, whatever it is.

Quote:
Originally Posted by poldus View Post
Do I connect either one of those receiver outputs to the up/down pin on the counter, I mean does it not matter if it is the one coming from the up or down button?
Thanks again,
Poldus
Ahh! Good point! You can indeed use only one button connection to up/dn. Say the buttons are normally logic '1' (a high voltage) and when pressed become logic '0' (low voltage).
You connect the Up button to up/dn so up/dn stays '1' when you press Down, and becomes '0' when you press Up. Since both Up and Down button presses cause a reaction through the OR gate, it should work as wanted.

Jan
__________________
I won't make the tactical error to try to dislodge with rational arguments a conviction that is beyond reason - Daniel Dennett
Check out Linear Audio Vol 7!
  Reply With Quote
Old 6th July 2014, 03:53 PM   #5
poldus is offline poldus  Europe
diyAudio Member
 
poldus's Avatar
 
Join Date: Jan 2006
Location: basque country
Thans, Jan, very helpful. I will do a search on simple OR gate implementations, buy the ICs and test on a breadboard.
Regards,
Poldus
  Reply With Quote
Old 6th July 2014, 04:02 PM   #6
nezbleu is offline nezbleu  Canada
diyAudio Member
 
nezbleu's Avatar
 
Join Date: Dec 2009
Location: Halifax, Nova Scotia, Canada
A very simple OR gate implementation is two diodes. Each "input" connects to the anode of a diode, and the two cathode are joined together for the "output". If either input does high, the output goes high.
  Reply With Quote
Old 6th July 2014, 05:10 PM   #7
diyAudio Member
 
jan.didden's Avatar
 
Join Date: May 2002
Location: Great City of Turnhout, Belgium
Blog Entries: 7
Yes but you need a pull-up or pull-down down resistor for it to work reliably.

Jan
__________________
I won't make the tactical error to try to dislodge with rational arguments a conviction that is beyond reason - Daniel Dennett
Check out Linear Audio Vol 7!
  Reply With Quote
Old 6th July 2014, 05:40 PM   #8
nezbleu is offline nezbleu  Canada
diyAudio Member
 
nezbleu's Avatar
 
Join Date: Dec 2009
Location: Halifax, Nova Scotia, Canada
Yes, absolutely.

Also, some chips have a "settling time" requirement, so the data needs to be present for a short time before the clock transition. In that case, where we are using data as clock, you also need a small RC network on the clock pin to add a small delay.
  Reply With Quote
Old 6th July 2014, 07:24 PM   #9
diyAudio Member
 
jan.didden's Avatar
 
Join Date: May 2002
Location: Great City of Turnhout, Belgium
Blog Entries: 7
... and a small RC on the button to prevent bounce...
__________________
I won't make the tactical error to try to dislodge with rational arguments a conviction that is beyond reason - Daniel Dennett
Check out Linear Audio Vol 7!
  Reply With Quote
Old 7th July 2014, 04:26 AM   #10
diyAudio Member
 
Join Date: Jul 2003
Location: Dona paula, Goa
It will also be better to provide limit switch at both ends and use it in the logic to disable the motor from forcing over.

Gajanan Phadte
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HV Logic Control Approach kingneb Tubes / Valves 55 8th May 2014 12:38 AM
Mute Logic for LDR volume control gmphadte Solid State 0 22nd November 2011 10:26 AM
74HC logic or No logic feedingthe Interface Receiver. Mario_JR Digital Source 2 10th July 2011 08:18 PM
Simple, SIMPLE Digital volume control -_nando-_ Digital Source 5 21st December 2006 01:20 PM
RS232 Relay Control (Logic) Morbid Digital Source 4 21st July 2004 02:50 PM


New To Site? Need Help?

All times are GMT. The time now is 03:39 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2