LM PS2 Refresh issue

Hello all,

I just built a 3d-printed quadruped. I am using an Arduino Uno, a Pololu Maestro servo controller and the LM Wireless PS2 controller. I have everything connected and working, but I am having problems with the refresh of the LM controller.

For some reason every time the refresh occurs, the controller sends a signal that all the buttons have been pressed. This obviously causes my robot to do weird things and iterate through loops that I do not wish it to.

I am using Bill Porter’s PS2 library for the commands and when I hook up a “genuine” wireless PS2 controller i do not have the same problems. The “genuine” controller is a friends and I wanted to figure out how to get the LM controller to stop sending false signals.

Any help would be greatly appreciated. I am also just guessing it is happening when the comm link refreshes, I could be wrong.

Thanks!

Not sure I understand enough of how you are hooked up to be able to give a complete answer, but will try to give a few hints.

Which version of the LM controller are you using? Does the receiver look like it has a circuit board hanging out the end with male pins, that you use two servo extension wires to connect up, or the older one that could plug directly into a PS2 game machine?

What I have found with Arduinos and Bill Porters library is that not all PS2 controller as equal. Many times the Arduino built-in Pull up resistor on the the Data line is sufficient, but sometimes I have found it not to be and have soldered one directly in. With the old receiver I would take the receiver apart and solder one in in the back side of the pins. With the newer ones (which I don’t have one), I believe that the board was setup with holes for Pull-ups to be able to be soldered in.

Not sure what you mean about refresh. Refresh of what? Power issue?

Not sure what else to say yet.

Kurt

Thanks for the reply Kurt,

I have one of the older receivers that plugs directly into the PS2, but I plugged it into the level shifter that LM sells, so I have servo connectors coming out of a circuit board and going to my arduino. Perhaps the Pull-up is the problem. Would that cause the signal to send all buttons being pressed at once?

There is a set of holes on my circuit board for an optional pull up. What ohm pull up should I use?

I thought that when the signal between the controller and receiver was being read, or in my mind “refreshed”, that it was sending a signal that all buttons were pressed.

In other words in my loop when the code reads:

ps2x.read_gamepad();

I thought it was sending all buttons pressed each time through the loop. The reason I thought this was because as long as I held a button the signal was not sent, but when I let go it would finish the loop and return to the beginning of the loop where the read gamepad line was…does that make sense?

anywho, I see where to solder the optional pullup, so maybe that will fix it. Just let me know what size i should use and I will let you know if it works!

Thanks again for the help!

Harper

You can use a 10k Ohm resistor for the pull-up. Usually, the controller should work without issues with the level shifter, but it is hard to say for sure since the internal circuit may vary according to manufacturing batches.

Let us know your results.

I added a 10K resistor this morning. I also looked on the trouble shooting website for the PS2 library and they were talking about communication being faulty on the arduino in pin 13 so I moved the clock pin to pin 9.

I am still having the same issue. When I let go of a button the controller, or receiver, thinks all of the buttons have been pushed. It does not happen every time. And sometimes it will move through my change speed loop while it is walking without me pressing select.

Again the “genuine” PS2 controller works so I am really confused. There is clearly communication because I can make it work I just can’t figure out where this all pressed signal is coming from…

Thanks again for any other suggestions.

Harper

Forgot to ask, which version of the PS2 library you are using. If you are not already doing so, you may want to try downloading it from the Lynxmotion github.

github.com/Lynxmotion/Arduino-PS2X

Kurt