Hi mayhem, I've also emailed Leo, and he says it's something to do with the high frequency pulses generated when the pins are scanned interfering with the RC circuit. This strikes me as odd as the circuit works find on all the column inputs but none of the rows. I'm using the gnd from one of the analog inputs. Is this the right thing to do?
Jabo
No I would use the digital ground pins. While Ground is supposed to be common there can be differences in potential depending on how things are hooked up internally. Leo sent me a reply as well.
Hi Robert,
BU0836 uses high frequency pulses to check resistance of switches connected to its digital inputs. THis is why your analogue RC circuit does not work well.
What are you trying to do? Often it is easier to use external mapping software to create commands based on switch transitions.
Check these:
Autohotkey http://www.autohotkey.com/
SVMapper Link 1 or Link 2
JoyToKey http://www.mehdiplugins.com/herewedown/jtk379en.zip
Alternatively, consider a switch as 1/2 of rotary encoder. COnnect switch to button 1 input and leave button 2 not connected. Use encoder setup utility from BU0836X to setup encoder mode 1:1 on buttons 1&2 and you will have pulse generated on B1 when you close the switch and pulse on B2 when you open it.
If you have three position switch, connect it to buttons 1 and 3 and set up two encoders, etc.
Thanks
Leo
From what he says here you can set up the board in "encoder mode 1:1". Says you can connect a switch to input 1 and leave input 2 unconnected and the board will generate pulses based on the switch position. Not sure if that setup will work with a matrix but if not sounds inefficient.
It seems odd to me that he would be using high frequency pulses to detect buttons states but this is probably how the board is able to detect whether or not a button or switch is actually attached so it shows up in the control panel before you have pushed anything. I'm thinking since the columns are working ok we can find a workaround for the rows but it may require a little bit of experimentation. First off, start using the digital grounds for the digital inputs just to eliminate any issues with that. Test it first on the columns to verify that its working right then switch to the rows. The problem is with the high frequency variations in voltage you essentially have some amount of AC bypassing the capacitor. The cap will block DC when fully charged and that is the principle we're using to generate a single pulse. But if there is a biased high frequency signal on the DC voltage the cap will remove the biasing but the AC will still pass. Its looking like with a steady and solid DC coming from the board the circuit will work fine and is on the columns for whatever reason but with some amount of AC on the row (or at least enough to cause a problem as compared to the columns) the circuit is not able to cope with that. There may very well be some AC signal on on the column voltage as well but its frequency or biasing is such that it is not negatively effecting the capacitive charging circuit. We can probably make a small modification to the rows that will fix the issue but I need to think for a second to come up with something. I think we should use an inductor to smooth out the high frequency AC and see what happens. Inductive components like coils or inductors have a resistance to AC called reactance. Reactance is to AC what resistance is to DC. The inductor will resist the high frequency variations and produce a smoother DC signal. I'm not exactly sure how this the board will respond to this but its worth a shot.
I'll tell you what I am going to do, I have an oscope, so I will open up my switchbox and check the output of the columns and rows to see what difference there is in the voltage sources. This will give us a better insight into how to work around the problem.
For you however in the meantime do this first, using the digital ROW ouput and ground pins, try adding another resistor in series with the resistor in the circuit and see if that helps, if not remove that extra resistor and add it in parallel to the resistor in the circuit. What this will do is increase and decrease respectively the resistance in the circuit and change the charging time of the capacitor. This should change the line voltage and in turn the biasing of the high frequency AC which may have an effect on the output. If that fails to solve the issue you can also try adding another capacitor in series or parallel to the cap in the charging circuit for the rows. This may seem like we are taking shots in the dark here but with your limited testing equipment (pretty sure you don't have an o-scope laying around) and the parts you already have it is worth trying. If you can find a very small inductor you can try placing is in series with the charging circuit as well which should filter out some high frequency AC on the line.Let me know if that helps or not while I stew on the problem for a moment or two. I've contacted Leo again to see if he can be more specific as to why the columns would work but not the rows. Hopefully he will reply shortly.
