Showing results forΒ 
Search instead forΒ 
Did you mean:Β 

New Input project

Honored Guest
I thought I might take a moment or two to show something that i just started working on, that might end up being a pretty good VR controller in the end...well that is the goal so let's all hope so! πŸ˜‰

The game controller it self is a Cabella's Xbox 360 Game Controller like this one:

The one I ordered came with no sensor bar. I didn't want it for a couple of reasons. One is I don't have an Xbox 360, and I don't think the "Wii-like" camera sensor on the gun(As it is advertised :? )would work for PC games anyway( I was correct from all my tests too 😞 ), but still I carried on! 8-) ) . Also if it IS like the Wii-mote, then I was betting I could either make a sensor bar that would work in it's place if the standard Wii sensor bar would not.

I think someone here mentioned getting one of these, as they show up as a standard Xbox 360 controller, which is AWESOME!! πŸ˜„ So who ever that was Thank You because this is what I found when I opened it up:

Sorry for the blurry picture, but to sum it all up. It IS the Wii-Mote sensor/IR camera! πŸ˜„

This little board (on the back side) had nice labels and solder pads for the SCL/SDA i2c lines along with a reference power and ground(as well as some other, but I don't need those, and I don't have a datasheet for anything, so I only want to use what I know I can for now, until the 'Bus pirate' Tells me different). So we whip out a small bi-direction Logic level converter and BAM! Arduino sees it and get IR positional data perfectly. πŸ™‚

So now, here is my plan for now:

:idea: First I plan to take the data from the IR Sensor and feed that data to the Arduino so that it can control two 10k Digital Potentiometer in SPI bus. They will only be active during the pushing of a big Yellow button I put right behind the X Button, and while this button is held, it interrupts the normal analog stick movement, but movement resumes when the button is released.

:idea: I also plan to add rumble motors in the stock of the gun, as well as in the center of the gun, and a small pancake vibe motor on the back-half of the trigger so smaller haptic feedback effects are possible with the combination of small and large motors placed throughout the firearm.

(This is not final placement of wires, I just needed to make sure they were all turning after the hot glue mounting)

:idea: Another idea is to use the Arduino Mirco, as well as the Adafruit CC3000 Wi-Fi Breakout Board. "It supports 802.11b/g, open/WEP/WPA/WPA2 security, TKIP & AES. A built in TCP/IP stack with a "BSD socket" interface. TCP and UDP in both client and server mode, up to 4 concurrent sockets" I want to use this to send some data later on as I need, but mostly this is how I would like to transmit force-feed back commands through Unreal 4(Guess I'll have to write a Plugin for that...oh well πŸ˜‰ )

:idea: I do also plan to use the Bus Pirate to read all the Serial, and i2c information that I can glean from the device, and perhaps I can get proper Xinput Force feedback working if the signals are still being sent to the controller, as this model has no motor controllers, BUT...the controller is using the Standard Wireless Xbox 360 Controller Driver, so thinning it still gets them, but ignores them. Also, button 5 is not used on this controller, so I want to try to get that added in as well. After all we cant have enough buttons right?

:idea: One of the last parts is adding in the MPU 6050, a combination 3 Axis Accelerometer, and 3 Axis Gyroscope(with an tiny on board processor too 8-) Although I don't know how to make use of it yet 😞 ). I have good firmware for this alone that gives a fairly stable Rotation information, including Quaternions, and with using fixed IR Led's as a reference point I 'should' be able to get it really stable, like a bad-ass Wii-mote that can be programmed in an easy to use language and is recognized by windows as a game controller that works universally with most all games, especially in VR.

:idea: Another Modification(Which I already did), was to ass a 1/4 inch hole on the top of the stock. Right where you might lay you check or tilt your head while aiming down the scope of the gun. Inside the housing of the stock I placed a, with a small round plastic piece to act as a window for the sensor. This will activate the scope as you get close enough, and turn it off after you pull away. It is very adjustable, so I will make some sensitivity settings, add in an i2c EEPROM chip to save any data, and a Adjustment Potentiometer (which isn't done yet), so that you can adjust sensitivity 'On the Fly".

:idea: One set of tests that I plan to do after this load has been sorted is to make a bunch of IR-LED ping Pong Balls. These will hang from a Net(later to be individual units I can stick on the walls) making a dome of these balls of IR light, setting apart a proper distance I believe I can do 360 degree positional tracking...well see I guess :? I am hoping it wont take 'too' many, this is theory at the moment....

:?: So if anyone has one of these Game Controllers, or a similar Cabella's one that they would like to Mod, let me know, and Ill see if I can lend a hand, and share my code and designs. I wouldn't mind some thoughts on this project as well, but try to keep it constructive, I am hoping others will learn from this project so lets not clutter with unhelpful comments πŸ˜‰ .

πŸ™‚ I have seen tons of tutorials on ripping the WIi-mote IR camera, and going through a lot of trouble it CAN be done. Now for less that $20 I can find used PC compatible Joystick with a Real IR Sensor all on a nice break-out board, and with a $3 part it talks to the Arduino with no problems that I can find. :geek:

:!: I will also try to keep you all updated as I get along so you can all see the outcome. Thank you all for you time.

~B :ugeek:

PS :arrow: I hope this all makes sense, feel free to ask any questions if anything is unclear, or if I left something out. :roll:

Oh, I have played a bit with wiimotes and GlovePIE/FreePIE, but your modding is in a league of its own. I had also an idea of having a proximity sensor on the stock to detect aiming down the sights, but I lack the engineering and soldering skills. I had thought of using wireless touchpad on the front of my shoulder and putting conductive material on the back of the stock. It would all have been much easier if we had PC support for the PS Move... On the positional tracking, I am not entirely sure why you would need it for standard FPSs, since the controls there rely on the mouse x and y, which are essentially the yaw and pitch readings of an IMU. The accelerometers on the IMU will prevent pitch drift, so maybe the only application of the IR bar would be correcting yaw drift. On 360 degree, I use an overhead old Android phone stuck to the ceiling with velcro and Freetrack and a wiimote strapped on my leg for walking.

Honored Guest
That is precisely what the IR lights on the "wii-bar" does(provide an external reference, like a magnetometer giving you a static reference for AHRS), and what my IR points/globes will do πŸ˜„ . The Wii-mote camera, aka wii-sensor, can track up to 4 IR objects. All of which I can specify for size, so you can get Z as well as X, and Y positionaly πŸ˜‰ . I seem to be able to get a much better Z accuracy than is specified from other posts. :idea: I attribute this to the very defines round IR globe that it sees rather than just looking at some bare led's in a housing they have some shape. πŸ™‚

:!: as a side note Free-track isawesome. You might want to get a PSeye camera(there $10 on Amazon). It gets frame rates over 100FPS, and it a really easy MOD to make it see IR only. That is what I have been using for an overhead mount to track my P-90 Gun(see my other forum post, from the IR sensor mounted on top, which is just a standard IR proximity sensor switch.

Thanks for posting!!

~B :ugeek:

On the PS eye camera, I know it's awesone, actually, one of my first attempts involved mouning it on the ceiling, see ... PeDcoGWJIg
I now use much more sophisticated script.
Nevertheless, this first attempt was a great proof of concept and did have the benefits of higher framerate and FOV. The major disadvantage was having to fix the cable every time since my wify would not tolerate cables hanging like that in the living room πŸ™‚
On the rest, I am actually surprised that the balls' Z is tracked so well by a wiimote camera, similarly to the PS Move, since it was never designed for that, AFAIK.
On correcting yaw drift, I can see the need for that when you play in front of the tv maybe for on-rails shooter and some limited scenarios for standard FPSs, but not for playing standard FPSs with an HMD, since you would read the gun IMU only in the short instances when you have iron sights on. Or you have other usage scenarios in mind?
See here, I only needed to correct the drift at 8:10. Now I have another way for when playing in front of the TV, which is much more elegant. ... fSFNb5QWqY
BTW, if you are good with sesnsor fusion and would like to help fellow modders, the community at mtbs3d on FreePIE is in dire need of fixing the Magwick fusion implementation...

Honored Guest
Honestly doing this is why I haven't touched FreePie. A lot of the interface needs some work. Like the Razor AHRS Plug needs work with the Sync request. It fails nearly %100 of the time on that Plug for me. 😞

As far as censor fusion, if you guys need some help with any algorithmic work I might be able to help, just send me a PM with your Code, I can look at it.... :O)

But making sure you have the IR for reference keeping the yaw stable is necessary. Usually in an IMU the Magnetometer will do this, but I didn't need it because I can get that directional value from the IR lights( and it is more stable as a reference, and easier to code too). Between each set of two lights is a center point. As you rotate around the center point will readjust as you move around between more sets of placed lights. The light don't have to be grouped in the way that the Wii-sensor bar has them... That is the theory anyway that I am working off, but I have yet to get the gun together all the way yet, it still needs engineering on better battery placement, and a few other things. πŸ˜‰


My PM seems to stay in the Outbox, so here it goes as a post, sorry to go off-topic here, I will edit if necessary.
Hi, thanks for agreeing to have a look at the FreePIE Magwick implementation πŸ™‚
The current implementation is this one ... usFuser.cs
But it creates this result for me ... lpage#t=97
CyberVillain referred to this as the source of that code ... onyAHRS.cs
I understand this is essentially an attempt to implement the Magwick AHRS algorithm ... lgorithms/
I understood that for a non-magnetometer solution, the script can be even simpler, see page 29 of the Magwick paper ... report.pdf
In my opinion, maybe the best initial approach would be to have that simple algorithm as a script in FreePIE, basically taking as input the raw gyro and accelerometer data and outputting the accelerometer-corrected gyro data for pitch and roll, rather than integrating it within the build. That would enable everyone to tweak it to their liking without the need for a separate build. My problem is that my Python is nowhere near sufficient to do that.
As a side note, in the meantime, I had experimented with GlovePIE on my own super generic fusion, which I published here and made a video of here
Thanks for having a look at your leisure and only if you want to invest your time beyond your other awesome projects πŸ™‚

Honored Guest
Ill have a look thanks again:O)