How to Use A PS3 Controller As A Wireless Servo and I/O Controller!Wednesday, February 10, 2016
The ServoShock is pre-loaded with drivers for the Bluetooth dongle and the DualShock3 controller that allows you to control several RC circuits and motors with the Sony Dualshock3 controller via USB or wireless (Bluetooth). With this solution, you can control four servos with the analog sticks, two servos with the triggers, three servos with the XYZ accelerometers, and one servo with the gyroscope. The digital outputs are controlled by button presses and trigger pulses.
One feature that I really like about the ServoShock controller is that you can make a number of adjustments to the outputs. For example, you can choose whether you want the servo to operate in absolute input mode, or the analog sticks directly control the position of the servo.
You can also choose a relative mode where the analog sticks control the velocity of the servo. You can also change the trim, range of motion, direction of travel and sensitivity. You can implement a center deadband and re-calibrate the null position of the analog sticks and accelerometers to correct for any signal drift. The RC servo outputs can also be changed to a regular PMW signal for controlling DC motors.
What you do is hold the PS and select buttons down for 3 seconds to enter in a special configuration mode. You can then cycle through each of the 27 outputs and make adjustments. For example, let's say you want to adjust the center position of the servo control by the right joysticks X axis, which is on channel 2. You tap the right shoulder bumper twice to cycle the channel to configurations and press the left or right direction pad to adjust positions.
When you are done, hold the start button for 3 seconds to save the changes.
PS3 Controller controlling this four wheeled mecanum robot
There is also a demo board available with the ServoShock solution that can function as an Arduino shield. RC servos can be plugged into this demo board and an Arduino can read the controller packets via the SPI bus. The demo board also has a USB to serial bridge that allows you to upload new firmware and read the controller console output for making adjustments.