Skip to content

Instantly share code, notes, and snippets.

@erinzm
Last active November 23, 2015 00:12
Show Gist options
  • Save erinzm/9e26728c3c66a74aa2e9 to your computer and use it in GitHub Desktop.
Save erinzm/9e26728c3c66a74aa2e9 to your computer and use it in GitHub Desktop.
writeup about finding electrical lag

Measuring lag on MR controllers

The important thing is remembering that what you want to measure is the time between pressing a button or joystick and the motor beginning to run. The best way to measure this is as follows (you need a digital oscilloscope):

  • Open up a Logitech joystick and solder in two little wires to the a button's pads so that you get a current when it's pressed. Wire these to channel A of an oscilloscope.
  • Attach a pair of leads to a motor controller. Wire these to channel B of an oscilloscope.
  • Write software to run the motor when the button is pressed. Make it as simple as possible.
  • Set the oscilloscope to trigger and acquire on channel A rise (or fall depending on the wiring). Then you can see the distance between the button signal's rising edge and the motor signal's rising edge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment