Author Topic: How would you "inject" a signal into a trigger on an Xbox One controller?  (Read 2334 times)

Offline rich84

  • Guppy
  • *
  • Posts: 4
  • Post quality +0/-0
  • Acidmods User
Hi everyone,

I am looking at the 1708 model controller. The trigger switch uses a hall sensor to measure how far it has been pressed.

This hall sensor has 3 pins: Ground, Volts in, Volts out. Volts out is used as the signal. I would like to be able to use an Arduino to "override" the signal from the trigger and insert my own.


How should I wire this up? I am thinking wire Arduino GND to GND, and voltage output of Arduino to VO on the controller.


The hall sensor seems to output ~1V when not pressed, so should I send 1V from the Arduino to simulate the trigger not being pressed? And/or do I need to do anything else to "bypass" the hall sensor so I'm not sending voltage out from both the arduino and the hall sensor at the same time?



Many thanks for any suggestions!
« Last Edit: January 24, 2020, 10:03:33 AM by rich84 »

Offline RDC

  • Administrator
  • Around the block
  • *
  • Posts: 2609
  • Post quality +90/-2
  • Gender: Male
  • The CGnome Project
You need a scope and/or LA that can do Analog, the DMM doesn't really cut it for those things. ;)

The Halls are the Allegro A1304, VCC, Vout, GND, pins 1,2,3 respectively.

Quote
    3
[        ]
 1    2

The Hall sensor outputs gets lower with increased Trigger pull. That's where a scope or LA would come in handy as that ~1v measurement really isn't what it seems. The VCC is a pulsed 3.3v, so they are not on all the time and a DMM isn't going to measure that correctly.

If all you want to do is make a full Trigger pull with the Arduino, then just wire up any IO to the Vout and drive it Lo, but leave the IO setup as an Input when not used so it doesn't interfere with the existing Trigger function.

If you're after masking the actual Trigger pull, then it's a bit more involved, as is making it so you can drive the Trigger over it's full range to keep the Analog feature of it, aka only making it a half or say 1/3 Trigger pull.
Screwing up is one of the best learning tools, so long as the only thing you're not learning is how to screw up.

Offline rich84

  • Guppy
  • *
  • Posts: 4
  • Post quality +0/-0
  • Acidmods User
Thanks - that makes sense.


What I would really like to do is be able to mask the trigger pull totally - to effectively cut/block the input for short periods of time.

In that case, would sending the full ~1V from the Arduino to Vout work in theory? Or not because it cant reproduce the exact pulse/timings?
« Last Edit: January 24, 2020, 04:02:27 PM by rich84 »

Offline RDC

  • Administrator
  • Around the block
  • *
  • Posts: 2609
  • Post quality +90/-2
  • Gender: Male
  • The CGnome Project
You don't really need to adhere to those timings, though it would be ideal to so it can't be detected. I have no idea if they are even doing anything like that, but if M$ ever wanted to see if the Trigger lines were being screwed with it's easy for them to do so with the way they have that all setup. It could just as easily be they have everything there pulsed to keep the battery drain lower also as the Triggers are off longer than they are on.

That 1v isn't 1v, it's more like ~1.5v for ~400us, though it's ~800us total including the rise/fall times. You can't drive the Vout to the exact voltage unless you were to go thru a divider or use a DAC, and I really have no idea what effect it would have driving it to 3.3v all the time. That's not going to kill anything, but it's not the norm for the controller either, but it would mask any Trigger pull.

Also, you're going to want to connect the Arduino after the RC filter of the Hall sensor, not directly to pin 2 of it. On the 1708 controller just use TP67 and TP68 for RT and LT respectively.


The Triggers are sampled around 125Hz, so 125 times per second.

RT Not pulled to Full pull. Wasn't done particularly fast, but these 22 samples only took the controller ~170ms to do.



RT Full pull and released, same deal.


Screwing up is one of the best learning tools, so long as the only thing you're not learning is how to screw up.

Offline rich84

  • Guppy
  • *
  • Posts: 4
  • Post quality +0/-0
  • Acidmods User
Thank you so much for the detailed response. I will try this shortly. Should the controller and Arduino share a common ground or would that not matter?

Offline RDC

  • Administrator
  • Around the block
  • *
  • Posts: 2609
  • Post quality +90/-2
  • Gender: Male
  • The CGnome Project
Yes ground the Arduino to the controller. Power the Arduino from the controller's 3.3v rail as well so all the IO are 3.3v max.
Screwing up is one of the best learning tools, so long as the only thing you're not learning is how to screw up.

Offline rich84

  • Guppy
  • *
  • Posts: 4
  • Post quality +0/-0
  • Acidmods User
Any tips on how to solder a wire to these test points? They are so small I am worried they are going to fall off if I try and solder them. Not sure if there is another/better way to connect something up here

Offline RDC

  • Administrator
  • Around the block
  • *
  • Posts: 2609
  • Post quality +90/-2
  • Gender: Male
  • The CGnome Project
Use smaller wire and practice on something you can ruin first. ;)

Secure the wire with a dab or two of hot glue after soldering it in place, but do not glue on top of the solder joint, glue the wire back a little from the solder joint to the board, in case you need to undo it for any reason.
Screwing up is one of the best learning tools, so long as the only thing you're not learning is how to screw up.

 

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