Tiny USB Joystick

by 陳亮 in Circuits > Arduino

13918 Views, 57 Favorites, 0 Comments

Tiny USB Joystick

IMG_3454.jpg
IMG_3452.jpg
IMG_3451.jpg

This instuctables show how to make a very simple tiny USB joystick.

This instructables is related to Hall Effect USB Joystick for providing a low cost solution.

Preparation

IMG_3458.jpg
IMG_3459.jpg

Joystick

A 2-axis joystick breakout module

Digispark Dev Board

This is a tiny dev board that can emulate USB HID device, e.g. USB Keyboard, mouse or joystick

Others

A tiny breadboard, some breadboard wires and some pin headers

Pin Header Preparation

IMG_3460.jpg

Soldering pin headers to the board if not yet.

CAUTION Before Plug Into Breadboard

Digispark dev board power pins are not breadboard friendly!

This project only require 5V and GND pins, It is required bent the 5V pin a little bin outside, so it is not connect in the same row while plug into breadboard. Or you will Blow Something Out.

Assembly

IMG_3457.jpg
IMG_3462.jpg
IMG_3461.jpg
IMG_3463.jpg
IMG_3456.jpg

The pin placement for both board are unbalance, it need further pins to support the corners that does not have pin header.

Here are the connection summary:

Digispark -> Joystick
GND       -> GND
5V        -> 5V
P2        -> VRx
P5        -> VRy
P0        -> SW

Note:

  • SW trigger by press down the joystick
  • P3 and P4 is connected to USB, so any USB HID project cannot connect other things to these 2 pins
  • P2 still available for something else, e.g. a signal LED or an extra button
  • It is required analog input pins to read VRx and VRy value, Digispark P2 and P5 are the analog input pins. Some board may not enabled P5 (efuse RSTDISBL bit). You may test it by Arduino "blink" example on pin 5. You are required to re-burn the Bootloader or simply change the efuse to enable it. More details: https://www.instructables.com/id/Digispark-DIY-Th...

Ref.: http://eleccelerator.com/fusecalc/fusecalc.php?ch...

Program

Setup Arduino with Digispark support if not yet:

http://digistump.com/wiki/digispark

Download and program the source code:

https://github.com/moononournation/TinyUSBJoystick

Enjoy!

IMG_3455.jpg

Now you have a tiny device to help you operate with 2-axis analog value.