Pages: [1]   Go Down
Author Topic: using PS3 (pot 4 legs) sticks from a controlle in a project, [SOLVED]  (Read 2722 times)
0 Members and 1 Guest are viewing this topic.
Colombia
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.



« Last Edit: October 27, 2012, 04:02:16 pm by Selda81 » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8967
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Colombia
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8967
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Colombia
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ALPS but I did not find the data sheet
Logged

Colombia
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Is pretty tricky use this sensors is better get PS2 joysticks
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5594
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

Code:
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...
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Pages: [1]   Go Up
Jump to: