Thumb Joystick Retail. Tools and parts you'll need. Things you'll want to know. How does it work? Skill Level: Beginner. by MikeGrusin March 22, 2011

Similar documents
BehringerMods.com. Instructions for modification of Behringer SRC analog inputs and outputs

Arduino - DigitalReadSerial

How to Use an Arduino

RC Tractor Guy Controller V2.1 Assembly Guide

Adafruit TB A DC/Stepper Motor Driver Breakout Board

<Table of content> <Parts and description> <Circuit board Guide> <Pins> <Basics of Coding> <Intro to Arduino> <Intro> <Downloading Arduino IDO>

Adafruit 1-Wire Thermocouple Amplifier - MAX31850K

AT42QT1010 Capacitive Touch Breakout Hookup Guide

Adafruit 1-Wire GPIO Breakout - DS2413

AT42QT101X Capacitive Touch Breakout Hookup Guide

Lab 2.2 Ohm s Law and Introduction to Arduinos

Necessary software and hardware:

MigaOne-Arduino Tutorial: Position/Limit Sensing and Cycling with the Arduino Platform

USB Type A Female Breakout Hookup Guide

Adafruit 1-Wire Thermocouple Amplifier - MAX31850K

Arduino 05: Digital I/O. Jeffrey A. Meunier University of Connecticut

This is the Arduino Uno: This is the Arduino motor shield: Digital pins (0-13) Ground Rail

An open-source hardware+software project. For design files and additional documentation, please visit:

TLC5947 and TLC59711 PWM LED Driver Breakouts

Phi-panel backpack assembly and keypad options Dr. John Liu 12/16/2012

Serial.begin ( ); Serial.println( ); analogread ( ); map ( );

Robotics/Electronics Review for the Final Exam

Adafruit DS3231 Precision RTC Breakout

Goal: We want to build an autonomous vehicle (robot)

VKey Voltage Keypad Hookup Guide

Please see the Pin Descriptions section for more information about the 10 available connections.

Adafruit VL53L0X Time of Flight Micro-LIDAR Distance Sensor Breakout

Warranty Disclaimer. Limitation of Liability

PIC Dev 14 Through hole PCB Assembly and Test Lab 1

Rotary Encoder Basics

Bargraph Breakout Kit

StenBOT Robot Kit. Stensat Group LLC, Copyright 2018

IQ32 Upgrade Kit Assembly Instructions

SX1509 I/O Expander Breakout Hookup Guide

Note. The above image and many others are courtesy of - this is a wonderful resource for designing circuits.

Adafruit USB Power Gauge Mini-Kit

ZX Distance and Gesture Sensor SMD Hookup Guide

4 CHANNEL 5V RELAY MODULE

Create moving images in forward and reverse with your Arduino when you connect a motor to an H-bridge and some still images BATTERY POTENTIOMETER

Schematic Diagram: R2,R3,R4,R7 are ¼ Watt; R5,R6 are 220 Ohm ½ Watt (or two 470 Ohm ¼ Watt in parallel)

HUB-ee BMD-S Arduino Proto Shield V1.1

Make your own secret locking mechanism to keep unwanted guests out of your space!

Proto-DB (#28310): Prototyping Daughterboard

ITG-3200 Hookup Guide

Assembly Instructions (8/14/2014) Your kit should contain the following items. If you find a part missing, please contact NeoLoch for a replacement.

A Hacker s Introduction to the Nokia N900

Adafruit 20W Stereo Audio Amplifier - MAX9744

RB-Ada-20. Pogo Pins (10 Pack) Description

ARDUINO MINI 05 Code: A000087

OpenSprinkler v2.2u Build Instructions

Hardware Overview. Onboard Sensors. Pressure, Humidity, and Temperature. Air Quality and Temperature

ROTOPOD PERISCOPE LIGHTING KIT

AXE Stack 18. BASIC-Programmable Microcontroller Kit. An inexpensive introduction to microcontroller technology for all ability levels

Laboratory 1 Introduction to the Arduino boards

Arduino Prof. Dr. Magdy M. Abdelhameed

PIC Dev 14 Surface Mount PCB Assembly and Test Lab 1

Part 2: Building the Controller Board

Create your own wireless motion sensor with

Cygnos360 V2 Installation Manual

Adafruit Optical Fingerprint Sensor

High Power (15W + 15W) Stereo Amplifier

ME 3210: Mechatronics Signal Conditioning Circuit for IR Sensors March 27, 2003

1/Build a Mintronics: MintDuino

Adafruit 20W Stereo Audio Amplifier - MAX9744

Number Name Description Notes Image 0101 Resistor, 100 ohm. brown-black-browngold. ¼ watt, 5% tolerance, red-red-brown-gold. brown-black-red-gold.

SM010, Assembly Manual PCB Version 1.0

Button Code Kit. Assembly Instructions and User Guide. Single Button Code Entry System

Light Sensor. Overview. Features

Si4703 FM Radio Receiver Hookup Guide

Cheap Control Systems. Cheap Six Channel (C6C) Servo Controller Version 2.3 OVERVIEW

Thursday, September 15, electronic components

Grove - Thumb Joystick

Digital Pins and Constants

How-To: Make an RGB combination door lock (Part 1)

OpenSprinkler v2.1u Build Instructions

Adafruit Metro Mini. Created by lady ada. Last updated on :12:28 PM UTC

MAG3110 Magnetometer Hookup Guide

Manual Version March 2007

Prototyping & Engineering Electronics Kits Basic Kit Guide

DUAL PUSh BUTTON PLUG[v1.1]

University of Hull Department of Computer Science C4DI Interfacing with Arduinos

MAIN PCB (The small one)

BLD04A Brushless DC Motor Driver

QUASAR KIT No DIGITAL DOWN TIMER 99 MIN WITH PIC

IME-100 ECE. Lab 3. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE,

Connecting LEDs to the ADB I/O

Universal Keying Adapter 3+

Device: PLT This document Version: 3.0. For hardware Version: 4. For firmware Version: Date: April 2014

Arduino Workshop. Overview. What is an Arduino? Why Arduino? Setting up your Arduino Environment. Get an Arduino based board and usb cable

Manual. Specifications. Contents. Options

MAIN PCB (The small one with the square cut out from one side)

Lesson 8: Digital Input, If Else

Cygnos360 V2 Installation Manual

Adafruit I2S MEMS Microphone Breakout

ROBOTLINKING THE POWER SUPPLY LEARNING KIT TUTORIAL

Arduino Programming. Arduino UNO & Innoesys Educational Shield

Advanced Strobe 1.0 Kit

Rover 5. Explorer kit

Product Manual. 4 Push-button Plug (A)

Hardware Overview and Features

Transcription:

Thumb Joystick Retail Skill Level: Beginner by MikeGrusin March 22, 2011 Thank you for purchasing our Thumb Joystick! Whether you're blasting aliens or driving a robot, you'll find it a very useful addition to your projects. Tools and parts you'll need...to attach the breakout board to the joystick: Soldering iron and solder A 5-pin 0.1" header (handy if you'll be inserting the joystick into a breadboard), or wires to connect the joystick to your project. Things you'll want to know How to solder to a PCB (it's easy, see our tutorials) How to program a microcontroller to read analog and digital inputs (don't worry, we'll have some example Arduino code below) How does it work? Imagine a volume control or other knob. These controls are generally made from potentiometers, which are variable resistors. By connecting the potentiometer as a voltage divider, you can get a varying voltage out of the device, which can be fed to an analog to digital converter on a microprocessor. This allows the software to read the knob position. This joystick contains two potentiometers, connected with a gymbal mechanism that separates the "horizontal" and "vertical" movements. (If the joystick is flat on a table, these movements are more "front / back" and "left / right", but you get the idea.) The potentiometers are the two blue boxes on the sides of the joystick. If you move the joystick while watching the center shaft of

each potentiometer, you'll see that each of the potentiometers pick up movement in only one direction. Clever, isn't it! This joystick also contains a switch which activates when you push down on the cap. The switch is the small black box on the rear of the joystick. If you push down on the cap, you can see a lever pushing down on the head of the switch. The lever works no matter what position the joystick is in. Cool! Assembly The retail package includes the joystick and a "breakout board" (the red printed-circuit board, or PCB). You'll solder the breakout board to the joystick. Once this is done, it will be much easier to connect the joystick to your project (you won't have to solder wires to all those little pins). To attach the breakout board to the joystick, follow these steps: 1. Test-fit the breakout board to the joystick. If any pins on the joystick are bent, gently straighten them. The joystick goes into the side of the board with the white outline (not the side with the SparkFun logo). Insert the joystick into the board, matching the white outline, and ensure that all the pins go into their holes (if they don't, you may not have the joystick oriented correctly).

2. If everything fits OK, carefully solder the pins from the opposite side of the board (the side with the SparkFun logo). Never soldered before? It's easy, check out our tutorials. If this is your first time soldering, practice a bit before working on this board. Before and during soldering, ensure that the joystick stays tight against the breakout board. There are 14 solder connections to make, including the four posts at the corners of the joystick. 3. If you'd like to connect a 5-pin header to the board, or solder bare wires to the output holes, you may do that now. Once you're done soldering, you're ready to use your joystick! Use it! The breakout board provides five labeled connections. You'll connect these lines to your project or microcontroller: VCC: connect this to your positive supply (usually 5V or 3.3V) VERT: this is the vertical output voltage (will be half of VCC when the joystick is centered) HORIZ: this is the horizontal output voltage (will be half of VCC when the joystick is centered) SEL: this is the output from the pushbutton, normally open, will connect to GND when the button is pushed (see example code below) GND: connect this to your ground line (GND)

Note that the pushbutton (SEL) is connected to GND when pressed, and open (disconnected) when unpressed. Use a pullup resistor on your digital input so that when it's unpressed, your input will read 1 (HIGH), and when pressed, the input will read 0 (LOW). Many microcontrollers have internal pullup resistors you can use for this purpose. See the example code below for how to do this on an Arduino. Here's an example Arduino sketch which sets up the microcontroller to read the inputs, and then continuously prints the values to the serial monitor. If you're using a different microcontroller, the steps should be similar; you'll just need to determine how to read analog and digital inputs on your device. // Thumb Joystick example // Mike Grusin, SparkFun Electronics 3/11 // This code is free, baby. Use it however you like. // This sketch shows the basic operation of the Thumb Joystick (COM- 09032) and breakout board (BOB-09110). // The joystick outputs two analog voltages (VERT and HORIZ), and one digital signal (SEL) for the pushbutton. // Connections to joystick (change if you use different pins): const int VERT = 0; // analog const int HORIZ = 1; // analog const int SEL = 2; // digital // Also connect the joystick VCC to Arduino 5V, and joystick GND to Arduino G ND. // This sketch outputs serial data at 9600 baud (open Serial Monitor to view). void setup() { // make the SEL line an input pinmode(sel,input); // turn on the pull-up resistor for the SEL line (see http://arduino.cc/en/tutorial/digitalpins) digitalwrite(sel,high); } // set up serial port for output Serial.begin(9600); void loop() { int vertical, horizontal, select; // read all values from the joystick vertical = analogread(vert); // will be 0-1023 horizontal = analogread(horiz); // will be 0-1023

select = digitalread(sel); // will be HIGH (1) if not pressed, and LOW (0) if pressed } // print out the values Serial.print("vertical: "); Serial.print(vertical,DEC); Serial.print(" horizontal: "); Serial.print(horizontal,DEC); Serial.print(" select: "); if(select == HIGH) Serial.println("not pressed"); else Serial.println("PRESSED!"); Tips Because of resistor manufacturing tolerances, the joystick may not read exactly half of VCC when at rest. You may want to make a note of the "zero" reading, and hardcode that value into your program if necessary. This joystick is a low-power device. The analog and switch outputs should be connected only to high-impedance inputs, such as I/O ports on a microcontroller or op-amp inputs. Don't try to hook the joystick directly to LEDs, motors, or other high-current devices (more than 1mA), or you may damage it. Have fun! Enjoy your new joystick! If you have questions or problems (or want to show us what you're building), please don't hesitate to contact us at techsupport@sparkfun.com. https://www.sparkfun.com/tutorials/272 3/22/2017