Wednesday, 21 September 2011

PS2 Controller - Simple Outline

The PlayStation brand is a series of video game consoles created and developed by Sony Computer Entertainment. In this post we concentrate on how the (playstation 2) PS2 controller functions. The PS2 controller consists of 4 main select buttons ‘Triangle’, ‘Circle’, ‘Cross’ and square, start, select, a D-pad, shoulder buttons ( L1, L2, R1, R2 ) and 2 analog sticks with Dual shock feature. All the buttons are pressure-sensitive except start and select.

How is pressure-sensitivity achieved?

Whenever a button is pressed, a small disc attached to the bottom of the button is pushed against the conductive strip mounted on the circuit board of the controller. With increase in pressure applied over the button, area of the disc touching the strip is increased and so there is an increase in conductivity leading to increase in flow of current. Thus, the buttons are made pressure-sensitive.

What is dual shock feature? How is it achieved?

         The Dual Shock feature provides a tactile stimulation to certain actions in a game. It makes us feel the vibration during the some critical situations in the game. It is achieved by means of 2 dc vibration motors ( left and right ).

        To the shaft of each motor, an unbalanced weight is attached. When the motor rotates, due to imbalance of weight, it wobbles which is experienced as vibration by the user.

How do analog sticks work?
        Beneath the analog stick, 2 potentiometers (bc103, 10K) are mounted at right angles to each other, one for vertical and the other for horizontal movements. 

          Whenever the joystick is moved in horizontal or vertical direction, there is a corresponding change in the resistance of corresponding POT. Due to this variation in resistance, there is a change in current flowing through it.


Pin Out:

Pin Name Description
1 DATA Data
2 CMD Command
3 +7.6V Dualshock and Dualshock 2 uses this for powering vibro-motors. Voltage on PS2 is 7.6V(standard)/9V
4 GND Ground
5 VCC Vcc
6 ATT ATT select
7 CLK Clock
8 N/C No connection
9 ACK Acknowledge

Pin Details:

  • Data:  This signal is an 8 bit serial transmission synchronous to the falling edge of clock
  • Command: This signal is the counter part of DATA. It is again an 8 bit serial transmission on the falling edge of clock.
  • ATT(Select/DTR/Command): ATT is used to get the attention of the controller.This signal will go low for the duration of a transmission.
  • Clock: (from PSX to Controller) Used to keep units in sync.
  • ACK (from Controller to PSX): This signal should go low for at least one clock period after each 8 bits are sent and ATT is still held low.

More Info on PlayStation:

Coming up next:

Tuesday, 20 September 2011

Monostable Multivibrator- 555 timer

             It is a electronic circuitry (more specifically a relaxation oscillator), that maintains a HIGH or LOW at the output terminal for a fixed period of time interval (determined by  resistor capacitor pair), when a trigger is being given at the input. Other name is One-shot multivibrator.

       What the name indicates, is that the output has only one stable state. When triggered it goes to unstable state, remains there for some time and get back to stable state.

        We'll construct the circuit first with OpAmp and then with 555-timer IC.

555 TIMER:
        The following circuit is the monostable multivibrator using 555-TIMER (IC NE555N). Briefly, the charging time of the circuit determines the time period of the output waveform.

555 Timer Block diagram and its Monostable Multivibrator Configuration.
     555 timer IC consists of a RS flip-flop whose Set and Reset terminals controlled by two comparators, and a three resistor potential divider network, which divides the supply voltage into three equal voltages . In case the supply voltage is 5V, it divided in three resistors as 1.667V. Therefore, the inverting terminal of the upper comparator is connected to 2Vcc/3 = 3.334V and the non-inverting terminal of lower comparator is connected to Vcc/3 = 1.667V. In addition 555 Timer IC also contains a NPN transistor. Its emitter terminal is grounded and collector terminal is called 'Discharge' to which we can connect external potential point that can be drained with the help of transistor. The transistor is operated by the RS flip-flop, since its base terminal is connected to the Q' terminal of RS flip-flop.

Monostable Multivibrator Operation:
     The circuit remains in stable state(LOGICAL-LOW for this circuit), as the current from the supply for RC pair is not allowed to charge the capacitor. At the time of start the, since the FLIPFLOP is reset, the Q' is HIGH(+5V). This drives the transistor into ON condition(saturation region). The functioning of the transistor is clearly understandable from the following figure:
How the Monostable multivibrator is driven into unstable state? 
  When the trigger is applied(i.e switch is closed), the 'Trigger' terminal (inerting terminal of lower comparator)  is directly connected to the ground(0V). This toggles the output of lower comparator from LOW to HIGH. So the SET terminal of FLIPFLOP is at HIGH, toggling the Q' to LOW. The output is HIGH.

How the Monostable multivibrator recovers from unstable state?
     As we have seen above the Q' is toggled from HIGH to LOW, which inturn turns-OFF the transistor. The capacitor(C) charges through Resistor(R). When the capacitor voltages just rises above the voltage at the inverting terminal of upper comparator, it toggles its output from LOW to HIGH. This resets the FLIPFLOP, i.e the Q' is again set to HIGH. Thus the transistor is driven into saturation and the cycle continues.

    When the trigger is given, the output is toggles for a finite time period determined by the time constant = RC.

The design formula derivation is shown below. The capacitor charging equation is used to derive the expression for On-time(unstable-state) for the output waveform. Vf is the voltage of the capacitor, if it is allowed to charge for infinite time period. It is equal to the given supply voltage. The figures on the right and below explain the derivation more elaborately.

   The main application of Monostable multivibrator is switch debouncing, where multiple pulses are generated for single press of the switch. It is also used for the conversion of frequency into proportional voltage. In my next post we will learn about the frequency to voltage(F/V) conversion.

Coming up next:
* Frequency to Voltage Conversion
* Application: Switch Debouncing


Twitter Delicious Facebook Digg Stumbleupon Favorites More