USB zero delay encoder: how to daisychain this PCB (in order to connect 2 buttons to one toggle switch)?
Hi there, I recently bought the USB zero delay encoder that is almost everywhere on the internet. I will be using it to create a button box for PC and - if it works - a RetroPie build. The USB encoder is really easy to use: just connect wires to buttons, connect PCB through USB, done. But there is one particular thing I want to do: wire a two-way toggle switch to two different buttons.
Photo of the PCB, front:
Photo of the switch:
Photo of the PCB, back:
To be specific, this switch can control two different circuits. So in theory flipping it 'up' should activate button 1 and flipping it 'down' should activate button 2. That's what I want.
Now, the problem is that the switch has only one terminal for the ground wire. On the other hand, the USB zero delay encoder seems to have one ground wire per button (i.e. two wires per button in total). So I need to figure out how to connect the extra wire from the PCB.
I have read on different forums that on this exact and very common board, the ground* lines can be daisychained. Then, only one ground wire would need to be connected for an an entire series of buttons. That would allow me to connect my flip switch to two different buttons, wouldn't it?
But the posts never went into detail or showed photos of where I could connect the wire to. But apparently it should be easy to spot. Alas, I can't spot it.
Can someone help me out on this one and walk me through the PCB/process? I have crimping and soldering equipment available. Can offer photos and construction report of my (hopefully) beautiful button box in return.
Link to imgur post with problem:
*I should perhaps say at this point that my knowledge of how circuits works was last touched when I was in middle school more than a decade ago. I can program and put together computers, but until now I was never interested in anything that required you to know about resistors, voltages and so on. Therefore, I don't know the exact difference between ground and common, also because English isn't my native language.
Twitch0815 last edited by
Problem is your talking about using a switch which is non momentary push on a momentary push
You can basically just flip the board over or just clip the ground wire from the second button and splice it into any other exposed ground cable that is wired to the board.
But if you wired that switch into it the switch would constantly be activated. So it would just repeat again and again,
Can you explain why you want to do this and the better thing would be fore us to suggest a better way to accomplish what you want to accomplish.
Thanks for your fast reply!
I think that the switch itself is actually fit for purpose. It's not momentary in the sense that it'll immediately open the circuit by itself, but it opens it as soon as you remove your finger -- the swtich immediately falls back into the middle position and stops signaling, I've verified that. It's (on-off-on), so it'll only activate if you actively hold it pushed. But then it will indeed signal 'OnOnOnOn' as long as you have your finger on it.
But that would not be a problem for me - I'll use it first in flight sims for engine and gear control. There, holding the button for engine/gear (i.e, sending 'OnOnOn' or pressing 'ggggg', also with joystick) is only counted as 1 event. For other controls such as trimming or adjusting gunpod elevation it's even advantageous to have a button that can continously output signal. So I'm very hopeful that it would work fine, if it works that is! The reason why I want to do it with a flip toggle switch is simply aesthetics, honestly. It could be done with other buttons as well. But having both engines on the same switch, with a missile cover on top, just looks and feels nicer. The other puttons I have are all just these tiny push buttons you get in packs of 10 or 20. But I wanted to have one or two 'pretty' switches on the box.
'You can basically just flip the board over or just clip the ground wire from the second button and splice it into any other exposed ground cable that is wired to the board.'
If you look at the top portion of the board (from the front), there is a 5-pin-connector that's used for a particular type of joystick. I'll leave that one unused. Am I understanding you correctly that I could just have all the ground wires (of the toggle switches) go onto that unused ground pin? I'll give that a try this evening!
Twitch0815 last edited by
alright so take a close look at your pcb back
Now from above hold your JST connector. visualize which bottom piece of solder point correlates to the black wire. That is a ground point. You can solder in a wire to that point just add one and then use that to ground a switch. But you are limited to whatever signal is pressed with it.
So lets say you have 2 buttons
Signal Hooked up to first position on switch
Ground hooked to ground on switch
Signal hooked to second position on switch
ground hooked to ground on switch
you can splice out from the 2 ground black wires with the JST connector, or you could lead out from the solder contact point on the back of the board.
and you have a switch that throws between the two signals meaning signal 1 and signal 2 are hooked up to their respective wires from the JST connector. It just needs a ground now
either of the grounds from both should work.
I think your help solved it!
I was trying to do exactly as you told me but it just wouldn't work, button number 2 would either on constantly or not at all. Then I remembered that I had read somewhere that on some of these boards ground and signal have swapped colors. I then swapped the black and red cables at the switch and tada, pressing it in one direction produces button 1 signal, pressing it in the other direction produces button 2 signal!
Here is a photograph of it:
I am very, very, happy with this and without your post I would not have tried it this way! Man this feels like a 'Hello World!' moment, can't wait until all the other switches are in the mailbox so I can complete it! Thanks a lot man!!
edmaul69 last edited by
@gunschlinger if you do need it to go back to center for any reason instead of being stuck on a button one way or the other buy a spdt momentary switch.
Hi Edmaul, these switches go in fact back to the center (see my second post); they are on only as long as you actively push them in the on-position. They also feel very nicely. I like them very much now, can't wait for the rest to arrive in my mailbox so I can assemble everything :)
edmaul69 last edited by
@gunschlinger you are correct. Not sure how i missed that. Glad to see you are using them.