using PS3 (pot 4 legs) sticks from a controlle in a project, [SOLVED]

I have 2 PS3 controllers (dualshock 3, brokens), I am trying to use the joysticks, but I don`t know how to wire it out cause they have 4 legs instead 3 so I need help for the connections.

Have you checked with a multimeter to see if two of those terminals are connected together?

If you took the joysticks out of a PS3 controller you can look at the circuit board to see if one of the terminals is not used or two of the terminals are connected together on the board.

johnwasser:
Have you checked with a multimeter to see if two of those terminals are connected together?

If you took the joysticks out of a PS3 controller you can look at the circuit board to see if one of the terminals is not used or two of the terminals are connected together on the board.

I found that this are not pots, they suppose to be hall sensor I found this pic, what do you think, it have sense?

Do you know how can make it works?

thanks for the reply!

The output could be almost anything: analog voltage, quadrature pulses, I2C serial...

I don't suppose there are any manufacturer's markings on the joysticks.

ALPS but I did not find the data sheet

Is pretty tricky use this sensors is better get PS2 joysticks

I don't really know if this sensor is tricky or not to use; based on what I presume is your post here:

http://letsmakerobots.com/node/34705

(at least, it's by someone named "SeL" and uses the same images, asking the same question...)

Based on what people have posted there (code from OddBot for the 2SA10, link to the Hall Effect tutorial) - it seems like all you would need to do is provide a source of regulated voltage (which you could easily get from the Arduino itself - start with the 3.3V output), and monitor the voltage outputs for the XA/XB and YA/YB outputs (what your graphic notes as "poles") - in other words use four analog inputs.

You could then just try dumping the output of all four reads to the terminal; likely, you could use the code (or some minor variant) that OddBot posted on LMR (which would be for one axis only, of course); something akin to:

int xangle, yangle;
double XA, XB, AX;
double YA, YB, AY;

void setup() {
}

void loop() {
  XA = (analogRead(0) - 512);
  XB = (analogRead(1) - 512);
  AX = (atan2(XB, XA) * 180 / PI);
 
  xangle = (int) ((AX + 180) * 10);

  YA = (analogRead(2) - 512);
  YB = (analogRead(3) - 512);
  AY = (atan2(YB,YA) * 180 / PI);

  yangle = (int) ((AY + 180) * 10);
}

TBH - I'm not sure my typecasting is right, plus I don't know if math.h is needed to be included for this to work - but the gist of it is there, I think...