LED INDICATORS FOR FOOTSWITCH - Page 1
Forum section: electronics / projects

author: geobee
author_rank: Contributor
timestamp: April 25, 2018, 08:09:20 am
content: Hi all, have the need to add LED indicators to a bank of momentary foot switches to show their state. The switches are DPDT momentary, and I am only using one side of the switch. Issue is, I require the LEDS from any single switch to be distinguished once any other switch is activated. There will only be one switch activated at any one time. I know there are plenty of 4 channel LED latching chips out there, but I require around 12 channels. Maybe someone could have an idea on this one? Regards. Geoff

author: Wimberleytech
author_rank: Super Contributor
timestamp: April 25, 2018, 09:50:59 pm
content: My first thought is an Arduino. 12 I/o pins have LEDs to VDD and momentary switches to ground. Poll 12 inputs for the one pulled down and set to 0 and all others high. You ignore the last one pulled low so that another switch can override. Have not worked out the details, but confident it will work.

author: german77
author_rank: Regular Contributor
timestamp: April 26, 2018, 12:06:11 am
content: Just because it's posible to do it this way, not because is the simplest solution. I would go for the arduino attempt. But an analog approach its simple, cheap and could be extended to any amount of switches.

author: geobee
author_rank: Contributor
timestamp: April 26, 2018, 12:39:37 am
content: Thanks to both. I do have an arduino board as I was interested in using it for a midi controller, but changed my mind. I have no experience with arduino and will have to learn the setup to use it for this project, but it could be possible. I have downloaded the program for the board. With the analogue schematic, which IC's are being used there? It looks like it may be easier for me as would have the components on hand pretty much. Regards. Geoff

author: John B
author_rank: Frequent Contributor
timestamp: April 26, 2018, 12:42:13 am
content: The Arduino approach will easily allow you to change the behaviour of one or any number of the switches later: ie, exclusive latching between desired switches, individual toggling, momentary etc. May or may not be necessary, but it's very easy to change when it can be done in software.If you're making this for a MIDI controller, you'll almost certainly want the flexibility later.

author: german77
author_rank: Regular Contributor
timestamp: April 26, 2018, 01:03:58 am
content: The 2n2222 will work fine, and for the opamp any single rail opamp will work, I will use an lm324.I will recommend to test this circuit first, specially to determine which capacitance works the best.

author: Wimberleytech
author_rank: Super Contributor
timestamp: April 26, 2018, 02:10:38 am
content: Quote from: Wimberleytech on April 25, 2018, 09:50:59 pm...and I am 40 years an analog designer...but I love the Arduino!!!

author: geobee
author_rank: Contributor
timestamp: April 26, 2018, 02:48:53 am
content: Not for midi, but you are close to the mark. Making up a multi bank foot switch to trigger a relay bank within a musical keyboard to make rhythm chord changes whilst playing guitar, using the keyboard for backing. Tried a midi foot switch but the Yamaha keyboard is limited on receiving midi commands, so did not work. The relays are to be connected to the key switching circuits, but only to the major chords, their minors, and some but not all 7th's, plus stop/start and drum roll. 12 or so should cover it, as only one note is required to change a major chord, and two notes to do a minor or 7th change, but the relays are DP, so a single relay will do two note switching. The idea works as I have tested it, will link it to the foot switch using a 25 pin computer type cable. Would just like to add these LED indicators to the foot switches so as to give a visual indication of the last switch pressed. I mean, I should be aware of it, as I will be playing the matching guitar chord, or should be lol. Will have a go at the arduino idea, see how I go.

author: geobee
author_rank: Contributor
timestamp: April 26, 2018, 07:09:41 am
content: Just a question on those switches shown in the analogue schematic, are they momentary or latching type? I need them to be momentary so my relays release once the foot switch is released. If they trigger the LED to be latched on, until a different channel is switched, all good. I haven't decided on the arduino or analogue at the moment.

author: Wimberleytech
author_rank: Super Contributor
timestamp: April 26, 2018, 12:37:36 pm
content: Quote from: geobee on April 26, 2018, 07:09:41 amYes it works with momentary switches. The opamp/comparator circuit acts as a latch.It is a cute circuit for sure. Arduino Nano will take up less board space and give you more flexibility IMHO.

author: trys
author_rank: Regular Contributor
timestamp: April 26, 2018, 02:10:18 pm
content: I've been mulling this over since I saw your question.I was trying to think down the CMOS logic chip route until I realised that I don't understand them well enough. Then I thought of an Arduino, and thought that would make it too easy.Anyhow, I went down the route of thinking about relays, then mosfets, then suddenly thought BINGO - all you have really is twelve contestants in a game show, each with their own buzzer button, and only one will light when the fastest person presses. In your case though the twelve are footwitches.So to save reinventing the wheel, you can either search for "contestant lockout circuit" or have a peek at this page - it's a really simple solution:http://www.techlib.com/electronics/games.htmlTrys

author: dmills
author_rank: Super Contributor
timestamp: April 26, 2018, 02:32:08 pm
content: Small thyristors, surely the tool of choice for this?Have the contact closing produce a 10us or so pulse that switches off the power to all the sections to reset the thyristors to off (RC network into the base of a transistor), and have the closed contact supply gate current to the one you want latched on, easy.Not everything has to automatically involve a processor.Regards, Dan.

author: trys
author_rank: Regular Contributor
timestamp: April 26, 2018, 02:41:07 pm
content: Dan,My thought exactly.Trys

author: Wimberleytech
author_rank: Super Contributor
timestamp: April 26, 2018, 03:56:55 pm
content: Quote from: dmills on April 26, 2018, 02:32:08 pmCan you suggest a specific thyristor for this task?

author: trys
author_rank: Regular Contributor
timestamp: April 26, 2018, 04:07:26 pm
content: On the link I gave, one circuit used the SCR 2n5061

author: dmills
author_rank: Super Contributor
timestamp: April 26, 2018, 04:09:41 pm
content: It is hardly going to be critical, just make sure the holding current is low enough.I would use (at random from Digikey):X0202NA 1BA2 for a thru hole part, or maybe a P0102BL 5AA4 if I wanted SMT, either will want 5mA for holding current which should make for a reasonably bright LED, so that will be fine.You would probably want two NPN transistors to get the reset pulse logic the right way up, but whatever.Regards, Dan.

author: GreyWoolfe
author_rank: Unknown
timestamp: April 26, 2018, 09:01:44 pm
content: Quote from: trys on April 26, 2018, 02:10:18 pm+1 for this. We did something similar back in my ITT days. We had knowledge bowl competitions and originally, each side had a bell to ring like at a hotel front desk. We were always feeling we were ringing in first but the other side got to answer first. Building this circuit kept it honest and we packaged it in such a way to make it easy to replace the hand buttons as they wore out.

author: geobee
author_rank: Contributor
timestamp: April 26, 2018, 09:42:44 pm
content: Many thanks to all for a well researched group of solutions. I certainly have some ideas to study. Switch board will be very roomy, so circuit space wont be an issue.