Author Topic: PSP + Accelerometer  (Read 21928 times)

Offline Hazer

  • x4675636B4E7574
  • Acidmods Alumni
  • Acid Modder
  • *
  • Posts: 583
  • Post quality +59/-0
Re: PSP + Accelerometer
« Reply #30 on: May 04, 2009, 04:58:55 PM »
OK. I got a used PSP and fixed it. I found some time recently to setup the analog stick evaluation.

Pretty pictures:





And the accelerometer:



Edit:
The accelerometer is pretty basic. Give it power, put caps on the output, and the X and Y changes voltage as you tilt the chip around. That is going to be real easy to handle with the PIC.

The bad part: My DMM was only reading 80 mV and 40mV on the analog stick. So I put the wires on the oscilloscope and found that the stick is getting pulsed at a rate of less than 1kHz. The pulse is very small and it changes voltage with the sticks movement. What this means is that I cannot use a simple PWM signal ontop of the analog stick.

I have seen another PIC design for a tilt (that was never made public) that replaced the analog stick. I want to keep the stick intact and have the tilt operate like this:

Disabled; X axis only (right/left); X and Y axis (marble mode)

It looks like I will need a proper DAC to overlay the signal and be able to shut it off. In the end, I will not be able to use a 8-pin PIC. I am going to need SPI and a few extra pins to possibly do a multi-color LED mod too.

If I run into any more roadblocks, or I have something cool to show, I will update.
« Last Edit: May 04, 2009, 05:10:10 PM by Hazer »
[Quote from Gamermodz via Viking forums]
Don't be jealous your not half as smart. I hate ****tards like you. An ignorant redneck. Your nothing but a posing ******. Get the **** out of here, really, your claim to fame is an open source rapid fire code? You make me laugh. You think you have control over the modding market?  You couldn't create what I can and do. You are too ignorant with your outrageous assumptions and accusations. [/Quote]

Offline EliteGamer83

  • Millennium Poster
  • *
  • Posts: 1233
  • Post quality +0/-0
  • Gender: Male
  • Trusted Seller! Slim Modder! Graphics Artist!
Re: PSP + Accelerometer
« Reply #31 on: May 08, 2009, 12:09:08 PM »
Wow! great job haze, never would have thought of most of that.

So what exactly still needs done on this project, the digital to analog code for a pic?

Offline Hazer

  • x4675636B4E7574
  • Acidmods Alumni
  • Acid Modder
  • *
  • Posts: 583
  • Post quality +59/-0
Re: PSP + Accelerometer
« Reply #32 on: May 08, 2009, 07:53:04 PM »
Well, my next test was to use a complimetary emmiter follower circuit to overlay an analog signgal onto the stick and see if I can control the X axis with a pot. Just to prove I can implement a DAC ontop of the stick (its in the mail).

Next would be a quick LCD readout of the accelerometer readings being read directly from the pic.

From there, I can take the voltage readings from step one (determine the range of the analogsignal the DAC needs to provide), and scale that with the acelerometer. Then I will find a decent way to make a switch as an input to switch modes.

Final part will be to make a PCB board for the SMT parts and throw it all together.
« Last Edit: May 08, 2009, 07:54:51 PM by Hazer »
[Quote from Gamermodz via Viking forums]
Don't be jealous your not half as smart. I hate ****tards like you. An ignorant redneck. Your nothing but a posing ******. Get the **** out of here, really, your claim to fame is an open source rapid fire code? You make me laugh. You think you have control over the modding market?  You couldn't create what I can and do. You are too ignorant with your outrageous assumptions and accusations. [/Quote]

Offline EliteGamer83

  • Millennium Poster
  • *
  • Posts: 1233
  • Post quality +0/-0
  • Gender: Male
  • Trusted Seller! Slim Modder! Graphics Artist!
Re: PSP + Accelerometer
« Reply #33 on: May 08, 2009, 09:18:47 PM »
So you ordered a pic? I take it that means you wrote your own code then?

I've been studying and reading up on this all afternoon.

So an easier way to describe what your doing is wire up the X and Y axies to the X and Y axies on the PSP analog, but you have a pic in between which has a code so the digital accelerometer can talk to the PSP analog correctly. Am I correct?

Where Also did you get your accelerometer from spark fun cause I am too trying to work on this project myself and the one I found on there looks very similar to the one you used.

If so, one thing I do not understand is I see you have a wire soldered to the COM pad on the accelerometer is that actually mean ground? So X axies on the meter to X on the analog, same for Y, then ground to ground which is COM? then gronded to the mobo in between then + from analog to VCC on the meter again with a wire leading to 5v in between?

Also, now what is this about a custom PCB?

Offline Hazer

  • x4675636B4E7574
  • Acidmods Alumni
  • Acid Modder
  • *
  • Posts: 583
  • Post quality +59/-0
Re: PSP + Accelerometer
« Reply #34 on: May 09, 2009, 03:38:31 AM »
Actually, this is what I plan to do:

I am using an ADXL203 that will be wired directly to a PIC16F688. The PIC will read the voltages of the ADXL203 through its ADC channels. I will also wire a switch (or wire to an existing switch, ie- hold button or wireless button) to be able to siwtch modes. The PIC will then be wired to an MCP4922 SPI DAC and I will bit-bang the serial communication to output the sclaed analog voltages to the PSP analog stick.

I want the PIC to be able to cycle through three modes: Tilt disbaled, right-left tilt only (driving games), and right-left and up-down tilt enabled (marble games). All of this without removing the analog stick.

All of these parts are surfacemount, so I will make a prototype PCB board to solder the parts to and keep it tucked under the wifi boared in the PSP.

What I have found interesting is that there seems to be a bunch of failed attempts at this, or that nobody ever posted any info. The first thing I found was PVP_knight had done something over a year ago using the same setup but it appears that the project was never finished. I have also seen another tilt sensor that interfaced to the audio port but needed the game software to work (and no game ver used it). Lastly, I found a youtube video that showed a succesful implementation with a demo of marlbe madness. The bad thing was a 3 inch wire-board hanging off the top of the PSP and the analog stick was completely missing with a ton of wires running through the hole.

So hopefully I can actually finally complete a working accelerometer tilt project.
[Quote from Gamermodz via Viking forums]
Don't be jealous your not half as smart. I hate ****tards like you. An ignorant redneck. Your nothing but a posing ******. Get the **** out of here, really, your claim to fame is an open source rapid fire code? You make me laugh. You think you have control over the modding market?  You couldn't create what I can and do. You are too ignorant with your outrageous assumptions and accusations. [/Quote]

Offline EliteGamer83

  • Millennium Poster
  • *
  • Posts: 1233
  • Post quality +0/-0
  • Gender: Male
  • Trusted Seller! Slim Modder! Graphics Artist!
Re: PSP + Accelerometer
« Reply #35 on: May 09, 2009, 07:57:55 AM »
Are you making your own code for the PIC?

Well actually wouldn't you have to mount the accelerometer in the center to even it out when playing like a driving game. It would be unbalanced if it was placed to the far left.

Also will a ADXL202 work the same?

Offline conker

  • Chief squatting Hard
  • *
  • Posts: 18
  • Post quality +0/-0
  • working on bluetooth file transfer for psp
Re: PSP + Accelerometer
« Reply #36 on: May 25, 2009, 02:23:56 PM »
I've made one with a gyro but i think I lost the code but ill try and find it to help you lot out
PSP Bluetooth Mod is Nearly working can send files just need to get it running off psp battery power
what ever deosn't kill you makes you stronger, thats probably why im gonna die soon            XBL should be free

Offline Hazer

  • x4675636B4E7574
  • Acidmods Alumni
  • Acid Modder
  • *
  • Posts: 583
  • Post quality +59/-0
Re: PSP + Accelerometer
« Reply #37 on: June 19, 2009, 02:49:59 AM »
Getting closer:

PSP tilt testing

This was a direct input -> output scaling. I have to tilt the sensor from 9-oclock to 3-oclock to move from left to right. The next step is proper scaling for a couple of different sensitivity settings.
[Quote from Gamermodz via Viking forums]
Don't be jealous your not half as smart. I hate ****tards like you. An ignorant redneck. Your nothing but a posing ******. Get the **** out of here, really, your claim to fame is an open source rapid fire code? You make me laugh. You think you have control over the modding market?  You couldn't create what I can and do. You are too ignorant with your outrageous assumptions and accusations. [/Quote]

Offline EliteGamer83

  • Millennium Poster
  • *
  • Posts: 1233
  • Post quality +0/-0
  • Gender: Male
  • Trusted Seller! Slim Modder! Graphics Artist!
Re: PSP + Accelerometer
« Reply #38 on: June 19, 2009, 06:12:28 AM »
Interesting... I would love to try and help out with this project if you needed any.

Offline Barnstormer

  • Guppy
  • *
  • Posts: 1
  • Post quality +0/-0
  • Acidmods User
Re: PSP + Accelerometer
« Reply #39 on: September 22, 2009, 03:44:29 PM »
Hay hazer, how is this coming along? i Love what you are doing :clap:, I've been wanting to do this for a while now. Can i get the schematic of it at least the one that you have on You Tube:beg:. If not i can be patient and wait.

Offline Hazer

  • x4675636B4E7574
  • Acidmods Alumni
  • Acid Modder
  • *
  • Posts: 583
  • Post quality +59/-0
Re: PSP + Accelerometer
« Reply #40 on: September 23, 2009, 06:13:15 PM »
I have been on and off this for awhile. Right now I am trying to get a really cool feature to work in order to show another video. I have everything bread-boarded, so there is no schematic yet. When I go to make the PCB file, I will post the schematic for ya.
[Quote from Gamermodz via Viking forums]
Don't be jealous your not half as smart. I hate ****tards like you. An ignorant redneck. Your nothing but a posing ******. Get the **** out of here, really, your claim to fame is an open source rapid fire code? You make me laugh. You think you have control over the modding market?  You couldn't create what I can and do. You are too ignorant with your outrageous assumptions and accusations. [/Quote]

Offline mastapsp

  • Ω Allumnist Ω
  • *
  • Posts: 102
  • Post quality +0/-0
  • Gender: Male
  • Acidmods User
Re: PSP + Accelerometer
« Reply #41 on: September 25, 2009, 01:06:50 AM »
Don't buy that from radio shack, it is super expensive, 
If you buy a broken wii remote chances are the accelerometer is in working condition and you can remove it and use that instead
you can buy them for about 7$ or a lot less
« Last Edit: September 25, 2009, 01:13:01 AM by mastapsp »

Offline zephyrus

  • Chief squatting Hard
  • *
  • Posts: 23
  • Post quality +0/-0
  • Gender: Male
  • Acidmods User
Re: PSP + Accelerometer
« Reply #42 on: October 23, 2009, 07:35:21 AM »
anyone still working on this project?
it sounds really interesting

Offline Blizzrad

  • Chaos Lover
  • *
  • Posts: 267
  • Post quality +0/-0
Re: PSP + Accelerometer
« Reply #43 on: October 23, 2009, 02:54:01 PM »
If Hazer or anyone else is still working on this, interfacing an mcu to the analog stick contacts is very simple with a digital potentiometer. The Microchip MCP4251 for example has two channels, a serial interface, and built-in switching hardware to connect/disconnect any of the potentiometer terminals from the internal resistor network via a single command. Just scale your X/Y data to 8-bit values with 128 as the default, write them to the MCP4251 wiper0 and wiper1 registers, and you have full scale control of analog input to the psp. If you want to use the default analog stick, write to the TCON register to disconnect the terminals for one or both of the channels. There is AVR code for doing it in this post.
« Last Edit: November 15, 2009, 06:04:26 PM by Blizzrad »

Offline Hazer

  • x4675636B4E7574
  • Acidmods Alumni
  • Acid Modder
  • *
  • Posts: 583
  • Post quality +59/-0
Re: PSP + Accelerometer
« Reply #44 on: October 25, 2009, 05:16:42 AM »
Thanks for that. All ideas are welcome.

I chose the MCP4922 DAC for a reason though. It outputs the exact voltage needed regardless of the resistance value of the analog sticks wiper reisstance. The digital potentiometer would ahve to be tuned for every analog stick, which means programming the MCU would be unique for each PSP. The MCP4922 though will directly output the middle voltage vlaue of the supply voltage provided and will not change from PSP to PSP.

Also, using a DAC it is easier to create a center 'deadband' where you do not have to be so precise about tiliting the PSP for no movement.

Thats just my thoughts.

I have been pretty busy lately, and I also got sidetracked with the opensource again. My last attempt at this project I was able to have 3 different scaling values (direct, half, and quarter) and played around with a few games to see the effects. I was in the middle of making a SMD PCB and also developing a cool side-effect when I last played with this. I will try to finish sometime soon, but no promises.
[Quote from Gamermodz via Viking forums]
Don't be jealous your not half as smart. I hate ****tards like you. An ignorant redneck. Your nothing but a posing ******. Get the **** out of here, really, your claim to fame is an open source rapid fire code? You make me laugh. You think you have control over the modding market?  You couldn't create what I can and do. You are too ignorant with your outrageous assumptions and accusations. [/Quote]

Offline Blizzrad

  • Chaos Lover
  • *
  • Posts: 267
  • Post quality +0/-0
Re: PSP + Accelerometer
« Reply #45 on: October 25, 2009, 10:03:50 AM »
A two channel digital potentiometer should function exactly like the external joystick in this old mod, except controlled digitally over SPI. I have used the MCP4251 for controlling a psp with a wii nunchuck and wireless ps2 controller this way, and it works great. Since a potentiometer is a voltage divider, when the wiper is centered its voltage should always be half of the input voltage, without requiring any unique calibration. The psp ADC takes 8-bit samples from the analog stick internally, so an 8-bit value still provides the maximum possible input resolution, with 128 always at the default/center.

I like your idea of making the tilt control nonlinear, though if the deadband and scaling ranges are all handled in software, it shouldn't matter what hardware is being used to create the analog voltage.

Offline zephyrus

  • Chief squatting Hard
  • *
  • Posts: 23
  • Post quality +0/-0
  • Gender: Male
  • Acidmods User
Re: PSP + Accelerometer
« Reply #46 on: October 25, 2009, 10:15:39 AM »
it would be great to see something we can remake on our own, if its not too difficult, because i do not understand so much of that :confused:

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.5 © 2008-2012, SimplePortal