the12volt.com spacer
the12volt.com spacer
the12volt.com spacer
the12volt.com spacer
icon

momentary switch and two output


Post ReplyPost New Topic
< Prev Topic Next Topic >
buzz-wwp 
Member - Posts: 1
Member spacespace
Joined: January 25, 2012
Location: South Carolina, United States
Posted: January 25, 2012 at 1:49 PM / IP Logged  
I am trying to install a momentary switch that cycles between output 1, output 2 and off with relays. I have looked thru the diagrams and can't find what I think I need but not sure I would know it if I saw it.
Know barely enough to be dangerous, can some one steer me in the right direction?
Buzz
oldspark 
Gold - Posts: 4,913
Gold spacespace
Joined: November 03, 2008
Location: Australia
Posted: January 25, 2012 at 6:26 PM / IP Logged  
The easiest (other than a specific mechanical switch) is probably a 4017 "one of ten output" counter circuit.
The switch clocks the 4017. The switch will probably need "debouncing" - often a mere resistor & capacitor.
The normal output is output #0 (pin 3; using output 0-9 convention and NOT the 1-10 "labeling"). Leave that unconnected (ie, nothing on).
A clock (switch) to pin 14 sends output #1 (pin2) high.
The next pulse turns #1 off and #2 on (pin 4).
By connecting the next output #3 (pin 7) to Reset (pin 15) means the next press resets the counter/4017 back to #0. (Output #3 does go high for about a micro-second, but that has no impact in this case.)
The 4017 outputs can only supply ~30mA so some buffer will be required to drive a relay. (IE, a transistor, though a FET/MOSFET may be simpler. And it may be simpler and better for the FET/transistor to ground the relay(s).)
A diagram is so much simpler than the above....
The 4017 operates (from 3V) to 15VDC, so +12V limiting (and filtering) should be added - maybe a diode and capacitor.
A 3-terminal voltage regulator up to (say) 9V may be best - eg, 7805 for 5V, 7809 for 8V - with a few diodes (polarity and capacitor discharge protection) and a cap. [If the relays are ground-switched, then the voltage of the relays is irrelevant - as long as the relays and 4017 share the common ground.] BTW - the selected voltage depends on different factors - eg, FETs may need ~5V to turn on; the regulator may have a voltage drop up to 3V; your battery may be as low as 11V - hence 11V - 3V = 8V, so 5V to 8V.   
Actually I'd probably use the settable 3-pin LM317 regulator. Not so much for its 2 resistor programming (one is 120Ω, the other is chosen to get the voltage you desire), but for its current limiting and self-protection. And its "one regulator for all". And it can be used as a current limiter (eg, for LEDs etc).    
Sorry for all the above text, but I'm thinking aloud. Again. If I had my old circuit diagram I'd simply post that. (Recent data loss & I haven't yet recovered. In fact, I may never bother to recover it... LOL.)
But if you want to read the following optional extra crap...
The 4017 for a "divide by n" counter is easy - just connect its reset pin to the "n" pin (where the "n" pin is the 4017 output 0-9, eg, yours is div by 3, hence connect Reset to output #3 (pin 7). [It's the "n+1" pin if using the output 1 to 10 convention.]
"n" can be 2 to 10 for one chip, but n can be much higher by cascading (adding) the required number of 4017s. (It has a "carry out" pin (#12) that makes this easy but connecting it to the next 4017's "clock enable" pin (#13).)
The 4017 circuit is great for future expansion or for uncertain cases - eg, you want to add another press for another output, or you think your Harley tacho on your car engine means a divide by 2 counter but find it should be divide by 4 - just move the rest pin connection (and add the output circuitry in your case).
BTW - for divide-by circuits, I usually use output #1. Then it is not "normally" on (as per output 0) and I don't have to move the output if I change the divide-by number.   
[ I once used a 4017 to convert a normal car distributor to sequential spark. Output 0 was unused, IgCoils for splugs 1, 3, 4, 2 (for a 4 cylinder) were outputs #1, #2, #3, #4; with the clock from the dizzy output (points, pickup, or igniter) and the Reset from an extra "synch" sensor in the dizzy. ]
And if you decide for key-press #4 to be "both outputs #1 & #2, move Reset up one to #4, add isolating diodes (small common IN914 or 1N4148 etc signal diodes, else 1N400x etc) between outputs #1 & #2 and their buffers, and 2 diodes (ditto - 1N914 etc) from output #3 - one to the #1 output and one to the #2 output (each AFTER the previous "isolating" diodes to the buffer/relay-driver). (That's how to "logically-OR" outputs - eg, relay #1 is output #1 or #3; relay #2 is output #2 or #3.) [Damn, where's that diagram with descriptive? It was so good...!]    
Whoops - I digressed again....
Though I dislike using a chip (IC; 4017) for simple counters, it is often the simplest. EG - though a "divide by 2" circuit is easy with a few transistors etc, SAAB and others use the 4017 for their high-low beam circuit! But for divide by 3 (as per yours) or higher, the 4017 is best.
And whilst I find using multiple relays as per another thread (over 150 relays for a "5 counter" circuit), I much prefer using ICelectronics plus the output relays (ie, 10 or 15 relays instead of >150 relays). But some prefer the alleged
simpler relay version.   
Note to self: Hey OldFart, recover that lost data so you can continue that Harley tacho in hot-rod conversion...

Sorry, you can NOT post a reply.
This topic is closed.

  Printable version Printable version Post ReplyPost New Topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

  •  
Search the12volt.com
Follow the12volt.com Follow the12volt.com on Facebook
Friday, March 29, 2024 • Copyright © 1999-2024 the12volt.com, All Rights Reserved Privacy Policy & Use of Cookies
Disclaimer: *All information on this site ( the12volt.com ) is provided "as is" without any warranty of any kind, either expressed or implied, including but not limited to fitness for a particular use. Any user assumes the entire risk as to the accuracy and use of this information. Please verify all wire colors and diagrams before applying any information.

Secured by Sectigo
the12volt.com spacer
the12volt.com spacer
the12volt.com spacer
Support the12volt.com
Top
the12volt.com spacer
the12volt.com spacer