1. Hello Guest! Did you know that we're also on Discord? You can join us here: https://discord.gg/vxqdaG4.
    Dismiss Notice

Project diva homemade controllers

Discussion in 'Tutorial Area - By users for users!' started by nofutur, Jul 20, 2016.

  1. gbafamily

    gbafamily Newbie Player

    Joined:
    Sep 10, 2020
    Messages:
    32
    Likes Received:
    18
    Trophy Points:
    80
    The two rows of pins are not aligned so it not possible to use the new boards on bread board or proto board. And the ADDR pin to set the I2C address does not work the same. I have not had time to track this down.
     
    steelpuxnastik likes this.
  2. steelpuxnastik

    steelpuxnastik SHINSANWASWITCH is ready and working!

    Joined:
    Aug 2, 2019
    Messages:
    230
    Likes Received:
    124
    Trophy Points:
    180
    Gender:
    Male
    Occupation:
    useless piece of shit
    Location:
    Mykolaiv, Ukraine
    Home Page:
    https://www.instagram.com/jandevalua/
    So it's not working with Adafrout MPR121 library?
     
  3. gbafamily

    gbafamily Newbie Player

    Joined:
    Sep 10, 2020
    Messages:
    32
    Likes Received:
    18
    Trophy Points:
    80
    The new board does work with the Adafruit MPR121 library at the default address of 0x5A. I will have to find the trace to cut to make it work at other i2c addresses. It is not the same trace as on SparkFun clone boards because I have already tried that.
     
    steelpuxnastik likes this.
  4. steelpuxnastik

    steelpuxnastik SHINSANWASWITCH is ready and working!

    Joined:
    Aug 2, 2019
    Messages:
    230
    Likes Received:
    124
    Trophy Points:
    180
    Gender:
    Male
    Occupation:
    useless piece of shit
    Location:
    Mykolaiv, Ukraine
    Home Page:
    https://www.instagram.com/jandevalua/
    I just didn't try this module at all, but @kirei39 is interested in this and sometimes he ask me and I littly confused because I know how it COULD work somewhere closely, but without nuances, but devil is in the details, so better to know better.
     
  5. gbafamily

    gbafamily Newbie Player

    Joined:
    Sep 10, 2020
    Messages:
    32
    Likes Received:
    18
    Trophy Points:
    80
    I ended up using 1 new board at 0x5A and 2 old boards jumpered for 0x5B and 0x5C. This results in 3x12 touch inputs. I used 32 for the slide and 4 for buttons. I made an all touch (no mechanical buttons) controller for Nintendo Switch. It works in arcade dedicated mode.
     
    steelpuxnastik likes this.
  6. gbafamily

    gbafamily Newbie Player

    Joined:
    Sep 10, 2020
    Messages:
    32
    Likes Received:
    18
    Trophy Points:
    80
    I have the "new" MPR121 boards from Amazon working. No trace needs to be cut (unlike the older SparkFun clone boards). In fact, the ADR pin is left floating but it should be connected to GND to set the i2c address to 0x5A. It works even when ADR is floating but this is not a good idea.

    To set the i2c address to 0x5A, connect ADR to GND. For address 0x5B, connect ADR to 3.3V. For address 0x5C, connect ADR to SDA. For address 0x5D, connect ADR to SCL.

    I have 3 boards connected and working with a SAMD21 board using the Adafruit MPR121 library. I also have 32 WS2812 RGB LEDs working using the Adafruit ZeroDMA library. This library does not disable interrupts and bit bang. It uses DMA to drive the LEDs so it does not slow down checking for changes on the slider inputs.
     
    steelpuxnastik likes this.
  7. cyberkevin

    cyberkevin Intermediate Player

    Joined:
    May 26, 2013
    Messages:
    51
    Likes Received:
    4
    Trophy Points:
    150
    #427 cyberkevin, Jul 16, 2021
    Last edited: Jul 16, 2021
    So, I'm back, once again with "slider" in mind, and still nothing done about it lmao
    Actually, I just don't play the AFT version, but only PS4 FT, and am I wrong or nobody ever made a correct Arcade Mode Slider PS4 ?
    Thanks to TheCorrellRoy, I have a video so I can retrieve datas of how it works.



    Does that can help us in any way to create a real Slider using Arcade Mode on SP4/Switch ?

    IT SEEMS to just output static stick value depending of which sensors are touched (like, 1 for sensor 1, 2 for sensor 2, 1.5 for sensor 1 & 2 at the same time, etc...), BUT sometimes for weird reasons I see values that I can't hook to certain sensors.

    The slider is cut in 4 parts, each for one stick axis, so double slider are easy to understand, it just depend of where you touch it, but as it's cut in 4, it's small enough to always give good results.
    But it also don't explain how it works if you touch sensor 1, but not sensor 2, but you touch sensor 3... the 3 sensors are in one part, so one axis, does it maybe just output a new value... maybe there's too much possibilities to really retrieve data easily like that :/
    or maybe it just calculate it, haven't checked yet...


    Here's what scare me the most :
    Here the slider, cut in 4 axis
    [--------|--------|--------|--------]
    Ly Lx Ry Rx

    it's extremely easy to understand that it output two values when you touch like that :
    [----X---|----X---|--------|--------]


    or that it output a specific value when 2 sensors are touched together like that ( to have 64 points with 32 sensors) :
    [-XX-----|--------|--------|--------]

    BUT, what about this scenario ? :
    [-X---X--|--------|--------|--------]

    maybe it just output different values for all cases ?
    AND WHAT ABOUT THOSE ???
    [X-X-X-X-|--------|--------|--------]
    [-X-X--X-|--------|--------|--------]


    EDIT : I have no time to check now, but this video could help a lot, and if more is needed, I'll ask TheCorrellRoy again I guess :/
    I'll check this video later :
     
    gbafamily and correllroy like this.
  8. correllroy

    correllroy Newbie Player

    Joined:
    Sep 29, 2016
    Messages:
    31
    Likes Received:
    13
    Trophy Points:
    150
    Gender:
    Male
    as for a "Proper Arcade Mode Slider" I don't believe anyone did make one for HORI Dedicated option. Mainly made more only like this
     
    gbafamily and cyberkevin like this.
  9. cyberkevin

    cyberkevin Intermediate Player

    Joined:
    May 26, 2013
    Messages:
    51
    Likes Received:
    4
    Trophy Points:
    150
    #429 cyberkevin, Jul 16, 2021
    Last edited: Jul 17, 2021
    So, Zedamax did a video last month that I just didn't got the notification for, and confirmed a lot about how it works, and more... Well, actually, we just KNOW how it works
    Soooo... LET'S DO IT~

    Also, I made a simple text file that resume exactly how it works :
    How it works :
    - The slider is made of 4 parts that works the same way, each one using a specific axis of Joystick
    - One part have 8 sensors, each with their own values for his own stick axis.
    - Static Value is the default value with no touch on the part of slider.
    - multitouch is handle by adding up those values, and for each new "touch", we substract the "Static Value".
    - If all the 8 sensors are touched, the value sent is negated Static Value.

    Values of the 8 sensors :
    1 - -1.00000
    2 - 0.50588
    3 - 0.25490
    4 - 0.12941
    5 - 0.03529
    6 - 0.06667
    7 - 0.01961
    8 - 0.01176

    Static Value : 0.00392



    Visual:

    Ry = Right Stick, vertical
    Rx = Right Stick, horizontal
    Ly = Right Stick, vertical
    Lx = Right Stick, horizontal

    Ry Rx Ly Lx
    [--------|--------|--------|--------]
    12345678 12345678 12345678 12345678
    Part1 Part2 Part3 Part4



    Examples :

    Part1 1 = -1.00000 Ry
    Part2 1 = -1.00000 Rx
    Part1 1 + Part1 2 = -1.00000 + (0.50588-0.00392) = -0.49804 Ry
    Part1 1 + Part2 1 = -1.00000 Ry -1.00000 Rx
    Part1 2 + Part1 5 = 0.50588 + (0.03529-0.00392) = 0.53725 Ry
    Part1 2 + Part1 5 + Part2 1 = (0.50588 + (0.03529-0.00392)) & -1.00000 = 0.53725 Ry, -1.0000 Rx

    Part1 2 + Part1 5 + Part2 1 + Part2 2 + Part2 3 =
    (0.50588 + (0.03529-0.00392)) & (-1.00000 + (0.50588-0.00392) + (0,25490-0.00392)) = 0.53725 Ry, -0.24706 Rx


    Actually, I now wonder how can we send precise Axis state to PS4...


    EDIT: Just saw it was already well documented, and also, seems like a dead end, cause I don't see any way to send those 8bit data properly on PS4/5... I'm so done
     
    gbafamily and correllroy like this.
  10. gbafamily

    gbafamily Newbie Player

    Joined:
    Sep 10, 2020
    Messages:
    32
    Likes Received:
    18
    Trophy Points:
    80
    It is possible to emulate a Nintendo Switch USB controller so it sends the 32 touch slider bits in the axes values. I have not had much time to work on this and it is not complete but I have 3 MPR121 touch controllers each with 12 inputs. 32 inputs are connected to copper tape to make the slider. The slider bits are sent over USB encoded as left and right axes. MegaMix is in running in dedicated controller mode. The main CPU is a SAMD21 board (Adafruit ItsyBitsy M0) running Arduino code. This avoids the problem of generating precise resistance values.

    I plan to switch from SAMD21 to a Raspberry Pi Pico because it has more GPIOs, is faster, and is cheaper.

    As for PS4 PDFT, I will try dedicated controller mode in the Japan version. As far as I know the US version does not support dedicated controller mode. The NS controller emulator (NSGadget) can be used on PS4 by using a controller adapter such as the Mayflash Magic S Pro.

    Emulating a DS4 controller is not so easy because of crypto handshake but Project Alpaca does this. I have not tried it though.
     
  11. erikchan002

    erikchan002 Welcome to DIVA!

    Joined:
    Mar 7, 2020
    Messages:
    7
    Likes Received:
    7
    Trophy Points:
    45
    #431 erikchan002, Jul 17, 2021
    Last edited: Jul 18, 2021
    It's been a while since I was here but I see you guys are talking about the dedicated slider mode.

    The one I made (post made in this thread some time ago) uses that when plugged into the Switch. (demonstrated in this video in the post)
    Since then I've also made it communicate with serial for the slider when plugged into a regular computer for AFT.

    I did make the slider after that post, and it worked with both the Switch and AFT, but my construction of the controller was flawed, having a lot of air gaps between the copper strips and the slider top, making the sensing very unreliable. It basically is only playable if I remove the slider top and touch the copper directly. I shelved the project after IRL stuff (and laziness, and then the release of Project Sekai) got in the way. Here are some more photos and videos I took last year:
    [​IMG]
    [​IMG]
    [​IMG]



    I am thinking of restarting the project and have been learning how to design PCBs. I may also try out using the MPR121s I got last year for a smaller version.

    As for PS4, I don't think I'm knowledgeable enough to deal with the handshake so getting a brook adapter (Switch->PS4) is probably the easiest way for me. I don't have a PS4 though.
     
    correllroy and gbafamily like this.
  12. gbafamily

    gbafamily Newbie Player

    Joined:
    Sep 10, 2020
    Messages:
    32
    Likes Received:
    18
    Trophy Points:
    80
    https://github.com/touchgadget/divaKey

    In the movie, I missed some slides because I was looking through the camera phone. I think the camera introduces a little bit of lag. The slider works well when not looking through a camera.

    My goal is to build a small slide that fits into a mechanical keyboard case. It will be roughly 12 inches wide. I plan to use cherry mx key switches instead of arcade buttons. Large arcade buttons are tall so the controller ends up being hard to use sitting unless it is on a low table. As a software dev I have spent far more time using keyboard switches instead of arcade buttons so this is good for me.

    So far I have only tested with direct contact with the copper tape so I expect problems when covering the slide with plastic. With very little use the copper tape is looking grungy/tarnished so it really needs a cover. I read in cap touch controller app notes that gluing the cover to the electrodes is recommended to eliminate air gaps.
    [​IMG]
     
    erikchan002 likes this.
  13. correllroy

    correllroy Newbie Player

    Joined:
    Sep 29, 2016
    Messages:
    31
    Likes Received:
    13
    Trophy Points:
    150
    Gender:
    Male
    I was just searching and looking at the videos and looks amazing so far from when first posted back then.
     
  14. steelpuxnastik

    steelpuxnastik SHINSANWASWITCH is ready and working!

    Joined:
    Aug 2, 2019
    Messages:
    230
    Likes Received:
    124
    Trophy Points:
    180
    Gender:
    Male
    Occupation:
    useless piece of shit
    Location:
    Mykolaiv, Ukraine
    Home Page:
    https://www.instagram.com/jandevalua/
    #434 steelpuxnastik, Jul 19, 2021
    Last edited: Jul 20, 2021
    Real Slider using Arcade Mode on SP4/Switch can't be realized because devices themselves doesn't support Arcade Mode if we talking about Arcade Mode in case PDAFT, because PDAFT with real Slider has different language to speak between Slider and Game, if I can say something like that. As you can see on that videos you posted, and that commentaries bellow you talk about that slider works like analog slicks and in one case it works like static analog stick movement, like button press, in other case, like yours, it has gradient of movement, from small count to bigger, but in case of PS4 game, does it really matter?
    In real Arcade Game examine every single sensor from 32 sensors in slider and in results of that examination Game makes decision in what direction movement was, it speed (and if it was not enough fast - slider movement can be not count, that was really surprisingly for me, because I didn't expected nothing from that, also in case of LKP by @Doctopus, I think here it's same with real slider, slider also can feel degree of pressing on slider from 0 to 255 on every single slider sensor that's also can cause some affects to game) and everything with it, but in case of analog stick movement game already receives direction of movement and Game has nothing but obey. In case that PS4/Switch doesn't support real Arcade mode, because they cannot provide COM-port for communication with real slider - I do not really understand about what real slider you talking about, there possible only somekind of emulation that's already done or I'm mistaken?
     
    correllroy likes this.
  15. gbafamily

    gbafamily Newbie Player

    Joined:
    Sep 10, 2020
    Messages:
    32
    Likes Received:
    18
    Trophy Points:
    80
    steelpuxnastik likes this.
  16. gbafamily

    gbafamily Newbie Player

    Joined:
    Sep 10, 2020
    Messages:
    32
    Likes Received:
    18
    Trophy Points:
    80
    I think cyberkevin is referring to the dedicated Arcade Controller option.

    https://projectdiva.net/community/threads/project-diva-homemade-controllers.1465/page-14#post-17764

    The Hori Arcade Controller for MegaMix supports this mode where it transfers the 32 slider inputs over USB to MegaMix. MegaMix interprets the inputs to determine direction and 1 or 2 finger slides. This should be as close to the real arcade experience as possible. PS4 PDFT Japan has this option but PS4 PDFT International does not.

    Eric Chan's project implements a slider for dedicated arcade controller mode for MegaMix. My project is similar but using different cap touch sensors and main CPU. Project Alpaca implements this for PS4 FT but PS4 PDFT International does not have the arcade controller mode option.
     
    steelpuxnastik likes this.
  17. steelpuxnastik

    steelpuxnastik SHINSANWASWITCH is ready and working!

    Joined:
    Aug 2, 2019
    Messages:
    230
    Likes Received:
    124
    Trophy Points:
    180
    Gender:
    Male
    Occupation:
    useless piece of shit
    Location:
    Mykolaiv, Ukraine
    Home Page:
    https://www.instagram.com/jandevalua/
    Woooooow, it looks totally amazing :)

    Thanks for explanation, because I do not know those nuances of console versions, but totally understand some limitations, so some similar terminology littly confused me, now I understand something more :)
     
  18. AmeKinoko

    AmeKinoko Welcome to DIVA!

    Joined:
    Jun 28, 2021
    Messages:
    4
    Likes Received:
    2
    Trophy Points:
    25
    Made following Tomtortoise's instructable (although I made some modifications to the slide buttons. the big yellow decal covers some, uh, mistakes that I had to fix with a rotary tool and some epoxy).

    Now I just need to wait for my 200g springs to arrive from akishop (I've read horror stories about their shipping times)...... I used adafruit 100mm buttons but they really take some elbow grease to push, so hopefully new springs will help.

    [​IMG]
     
    steelpuxnastik and gbafamily like this.
  19. gbafamily

    gbafamily Newbie Player

    Joined:
    Sep 10, 2020
    Messages:
    32
    Likes Received:
    18
    Trophy Points:
    80
    Looks great! I like the button artwork especially.
     
  20. gbafamily

    gbafamily Newbie Player

    Joined:
    Sep 10, 2020
    Messages:
    32
    Likes Received:
    18
    Trophy Points:
    80
    Added video using the cardboard slider on a US PS4 running Japanese PDFT with the dedicated controller option enabled. Google Translate running on an Android phone is really handy since I do not speak nihongo.

    https://github.com/touchgadget/divaKey/blob/main/README_pictures.md

    As far as I can understand Project Alpaca eliminates the need for the adapter because it emulates a DS4. The adapter introduces some lag although lag config might eliminate/reduce the lag. But an ideal controller would not need an adapter.
     
    steelpuxnastik likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice