PlayStation 2 Touchscreen Robot Remote
November 16, 2013
This is a project I've been working on for a while.
It's supposed to be a robot remote control. I have had it working as a remote but currently it's in the middle of an upgrade so it doesn't really control anything yet.
As you can see it uses a PlayStation 2 controller as one of the input devices. There's an enclosure strapped to the front of the controller.
Here's a side view to give you an idea of how the two main parts join together.
The enclosure is held in place with a combination of zip ties, Polymorph and acrylic.
Part of my recent upgrade has been to move the text from the various menus onto a SD card for storage. Since I plan to use this remote to control several robots, I wanted a way to store a bunch of different menus.
Here's a picture of the inside of the enclosure with most of the "guts" removed.
There's a Nordic nRF24L01+ module from SparkFun in the upper right of the photo. There's a piezo speaker on the bottom right held in place with Polymorph. There's also a microphone on the lower left (behind the 8-pin header). The mic will be used with an EasyVR module.
The hacked cable of the PS2 controller plugs into the connector in the lower center of the photo.
Here's the missing "guts".
The board on the left has two Propeller chips on it. One Propeller is used as a graphics slave which runs the VGAish output to the touchscreen monitor. The graphics slave also monitors the touchscreen (resistive) and sends the touch coordinates at 115,200 bps to the master Propeller.
The master Propeller interfaces with the other devices and makes decisions based on the coordinates received from the slave.
When a menu is initially displayed, it is first read from the SD card. The menu is made up of a series of "buttons" The data for each button contains information about the location on the screen, color of text and background, the text displayed on the button and the action to perform when the button is press. As the text to be displayed is sent to the slave, the master creates an array with the button location and actions to take when the button is pressed. It uses this array to decide what to do when the slave sends a coordinate.
One of the cool things about the PlayStation 2 controller is most of the buttons can be analog buttons. I added support for analog buttons to the PlayStation 2 driver I found. I haven't yet found an application to use the analog buttons but I'm thinking maybe they could be used to modify the gait of my hexapod. It's kind of hard to imagine when I'll need additional analog control above the two joysticks but I intend to find an application no matter how contrived.
My earlier tests with the remote weren't very impressive. I attempted to send PS2 data to my Mecanum wheeled robot which in turn would send data about its direction and speed. The data exchange took almost half a second.
I have since rewritten the nRF24L01+ driver to use almost all assembly (PASM) so it is much much faster than my earlier Spin version. I'm still working on incorporating this driver into my current code used to control the remote.
I'm hoping posting this here will give me an added incentive to finishing the upgrade.
I've included a video showing the PlayStation 2 data being displayed on the screen (it the same video as the one I posted in the Mecanum wheeled robot page). Hopefully I'll have some video of the remote controlling a robot (or two or five) soon.
In case any of you aren't aware of the Nordic nRF24L01+ transceivers, you should be. They are really inexpensive on ebay. They're inexpensive enough (less than $2 if you buy a few at a time) to add transceivers to all your robot projects.