Electric Circuit Problems

By Jabo, Nov 17, 2011 in Help!!

Posted November 24, 2011 · edited Nov 24, 2011 by Mayhem

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.

Posted November 24, 2011

Where are the digital ground pins? I don't think I have any

new sig copy.jpg

Posted November 24, 2011

Perhaps I should be looking at the BU0836X instead. That seems to have an individual ground for each switch. And it has 32 discrete inputs so no need for matrix wiring...

Jabo

new sig copy.jpg

Posted November 24, 2011 · edited Nov 25, 2011 by Mayhem

Ah, rgr that, yes I see sorry. I thought you would have no problem using both columns and rows but this appears to not be the case. I see what Leo was talking about now. He's scanning the columns and rows in the matrix just like memory, polling for continuity. It may be that the reason the columns seem to be working is that they are oscillating fast enough to fool your eye into thinking the light goes out after the initial pulse when in reality it is just flashing at such a speed and duty cycle that you can't see it blinking. If the rows are strobing slow enough the flickering my become visible to the eye. In this case it may be more of a pain in the tail then it's worth. Before going with the BU0836 though I would run it past Leo and see if it will work properly on that board. Like I said before, not as simple a problem as it first appears. If you do have to go with the X board hopefully you can return your BU0836 or use it for another project. Sorry this doesn't seem to work out on this board but you may be right and hopefully the X board will function in a more co-operative manner but once again I would check first. To my knowledge you can connect several boards together and perhaps have them show up as one USB device though I don't know if they have to be the same model board or not. Hopefully you will have a use for the board you already possess. If not I or some of the other Dogz may be interested in it so you can get your money back.

Posted November 24, 2011

Not quite, the columns are working perfectly in game and in addition the rows are not strobing at a constant rate its more a random flicker.

Jabo

new sig copy.jpg

Posted November 25, 2011 · edited Dec 6, 2011 by Mayhem

Well in that case you can try the suggestions I mentioned in my previous post above. Try a second resistor in series and then parallel with the first resistor. Then try a second cap in series and parallel with the first cap. If that does help you can find or buy a couple of small inductors (the kind that looks like the small non-polar caps) to try to filter out the flicker. The inductor will keep the resist the change in current in the circuit but this might also effect the discharge time of the cap a bit though maybe not enough to break functionality. There still might be a problem if you try to use the circuit in a matrix config. You can try it though but if it doesn't work out you will probably only be able to use this method in a direct connection config which will limit your buttons to 12 switches if you can get the rows working.

Posted December 6, 2011

Thanks Mayhem, I tried these with no joy, so went and got a BU0836X and it works a treat! I guess having discrete signal and ground connectors for each switch is the reason. Got three switches wired up now so I can test with multiple 'on' conditions. All looks OK for now though. Your little circuit is spot on!

Jabo

new sig copy.jpg

Posted December 6, 2011 · edited Dec 6, 2011 by Mayhem

Thank you Sir, nice to be vindicated. Sorry for the inconvenience but if you're happy, I'm ecstatic. You are to be commended for deciphering my chicken scratch of a schematic. Glad to be of service, especially where Dogz are involved. Let me know if any issues arise, which hopefully won't.

Posted December 7, 2011

It certainly was odd but it seems to be ok now!!

new sig copy.jpg

Sign in to reply.