Tilt Sensor. Created by lady ada. Last updated on :04:38 PM UTC

Similar documents
Adafruit MicroLipo and MiniLipo Battery Chargers

(for example A0) on the Arduino you can expect to read a value of 0 (0V) when in its upright position and 1023 (5V) when it is tilted.

Li-Ion & LiPoly Batteries

Multi-Cell LiPo Charging

All About Batteries. Created by lady ada. Last updated on :22:29 PM UTC

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Force Sensitive Resistor (FSR) Created by Ladyada

USB, DC & Solar Lipoly Charger

Bill of Materials: Car Battery/charging system diagnostics PART NO

Battery Power for LED Pixels and Strips

Lockpicking Tools: User Guide

SM361 RIG SWITCH CONSTRUCTION MANUAL

2.007 Design and Manufacturing I, Spring 2013 EXAM #2

Using 1.75mm Filament on Ultimaker 2

The Easy Driver gives you the capability to drive bipolar stepper motors between 150mA to 700mA per phase.

How to Choose a Truck Scale Intercom System

Troubleshooting Guide for Limoss Systems

Lab 4.4 Arduino Microcontroller, Resistors, and Simple Circuits

Repairing Standing Lamp That Won't Turn On

A device that measures the current in a circuit. It is always connected in SERIES to the device through which it is measuring current.

what you need to do is hit the taper housing as hard as you can with your hammers AT THE SAME TIME and at a slight angle, what will happen is you

LAB 3 SeaMATE PufferFish Practice Board

The Starter motor. Student booklet

1 of 2 9/4/ :27 AM

Pressure and presence sensors in textile

Batteries generally classifies into two main groups: primary and secondary battery types. Primary batteries are

Circuit Basics and Components

DIY Synth Kit - Manual

A Simple Motor. Materials: one drywall screw one 1.5 V alkaline battery six inches of plain copper wire one small neodymium magnet

PLEASE READ THOROUGHLY PRIOR TO USING VILO Vinyl Liner Leak Locator

BATTERY BOOSTER SHIELD

HOW TO REPARE A DENT

REMOTE OPERATION OF POINTS

How Much Does It Cost To Turn A Automatic Into A Manual

Uno Compatible Pogobed Kit

Simple Eurorack Row. Kit Builder's Guide. 4mspedals.com

Soldering Pi2Go Lite. Soldering the Line-Follower PCB

All Credit to Jeff Goin and Scout Paramotoring

Project Report EMF DETECTOR

LAMBO VERTICAL DOOR HOW TO GUIDE

Converting an A to 12v and Adding Turn Signals Bill Lee

Basic Electricity. Mike Koch Lead Mentor Muncie Delaware Robotics Team 1720 PhyXTGears. and Electronics. for FRC

This is the H-bridge in it's off position. All four switches are turned off and no power is provided to the motor.

Troubleshooting Guide for Okin Systems

BASIC ELECTRICAL MEASUREMENTS By David Navone

PARTS LIST. Beams: 72x. 16x. 64x. 16x. 12x. 2x Breadboards CYB x TotemDuino 1x LabBoard 1x 30cm 34way Flat Cable 1x Power Supply 12v 1,5A

Using your Digital Multimeter

How to choose correct battery(s).

Brushed. Brushed. Brushed Motor

Harry s GPS LapTimer. Documentation v1.6 DRAFT NEEDS PROOF READING AND NEW SNAPSHOTS. Harry s Technologies

Simple Line Follower robot

HOW TO USE A MULTIMETER, PART 4: MEASURING CURRENT (AMPERAGE)

[0. Title] Biased Weight Alignment Procedure for Bent Axle Alignment by Stan Pope, 4 August 2013

Sensing the position of throttle valve using Throttle Position Sensor

Assembly Guide for RedBot with Shadow Chassis

QUASAR ELECTRONICS KIT No WINDSCREEN WIPER CONTROLLER

QUASAR KIT No THYRISTOR - TRIAC TESTER

Bill Conkling July 2012

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

Mens et Manus. Brushless Motor Design

IDL Dragonfly Manual

Hub Stands -- VERSION 5.0

Alternative Fuels for Cars. Ian D. Miller Theodore Roosevelt Elem.

Circuit Training. A Selection of Simple, Fun Electronic Projects using the Electricity Box provided with the Heather's Hut project

UltraSmartCharger TM

Dielectric Withstand Tester

Ignition Installation Troubleshooting Tips/Frequently-Asked Questions

Lab 4: Robot Assembly

U-Score U-Score AAC Rank AAC Rank Vocabulary Vocabulary

Load Cell Amplifier HX711 Breakout Hookup Guide

Now that we are armed with some terminology, it is time to look at two fundamental battery rules.

There was some debate whether or not there was a write up, with Pictures, for replacing the ignition switch.

In this installment we will look at a number of things that you can do with LEDs on your layout. These will include:

IMI vibration switch USER MANUAL INSTALLATION - OPERATION - MAINTENANCE

Kelly KDC Series/PM Motor Controller User s Manual

Drum 2 disk brake conversion. Stop That Car!

DIY Synth Kit - Manual STUTTER SYNTH

How to replace your Turbo Actuator Step by Step

Illustrated guide to changing the mode of a Spektrum DX6 transmitter

Things to do at home

Kelly HSR Series Motor Controller with Regen User s Manual V 3.3. Kelly HSR Opto-Isolated Series Motor Controller with Regen.

Vehicle Reaction Timer Instructions

10/12/2015 boostcontrol

Button Bounce. Fryad M. Rashid and Pei-Lin Chung

715B CONTROL SERIES. Instruction Manual Line Voltage DC Brushless Motor Control CONTROLS. Phone (317) Fax (317)

How to Build with the Mindstorm Kit

DragonTail The DragonTail

Speakers and Motors. Three feet of magnet wire to make a coil (you can reuse any of the coils you made in the last lesson if you wish)

SERVICING FRONT BRAKE CALIPERS BY PAUL WEISSLER Illustrations by Russell J. von Sauers and Ron Carboni Published on: June 12, 2001

Solar Power Unit. 1 Description. 2 Task. 3 Setup. Erasmus+ ERASMUS+-project: BE02-KA

Little Friendlies Musical Soft Ball

Traffic Lights - fully assembled - just connect to DC or DCC. Level Crossings - assembled - N & OO versions - DC / DCC

HOW TO USE A MULTIMETER, PART 1: INTRODUCTION

Driver Fatigue Monitor. MR688 User Guide

Temperature Sensor. Positive + (to 5 volts.) Ground. To A0 To GND Signal. To 5v

Escaping the Kill Zone (Ramming)

CHAPTER 2. Current and Voltage

Step 1 Wiring your remote start. Installation Tips for your Remote Start system (for GM vehicles) V3.3 revised 9/12/2013

Charles Flynn s Permanent Magnet Motor.

Installing Rear Brake Pads on a WK Jeep

Transcription:

Tilt Sensor Created by lady ada Last updated on 2017-12-26 10:04:38 PM UTC

Guide Contents Guide Contents Overview Basic Stats Testing a Tilt Sensor Connecting to a Tilt Sensor Using a Tilt Sensor Simple Tilt-Activated LED Reading Switch State with a Microcontroller Example Projects Buy a Tilt Sensor 2 3 4 5 7 8 8 8 11 13 Adafruit Industries https://learn.adafruit.com/tilt-sensor Page 2 of 13

Overview Tilt sensors allow you to detect orientation or inclination. They are small, inexpensive, low-power and easy-to-use. If used properly, they will not wear out. Their simplicitiy makes them popular for toys, gadgets and appliances. Sometimes they are referred to as "mercury switches", "tilt switches" or "rolling ball sensors" for obvious reasons. They are usually made by a cavity of some sort (cylindrical is popular, although not always) and a conductive free mass inside, such as a blob of mercury or rolling ball. One end of the cavity has two conductive elements (poles). When the sensor is oriented so that that end is downwards, the mass rolls onto the poles and shorts them, acting as a switch throw. Tilt switches used to be made exclusively of mercury, but are rarer now since they are recognized as being extremely toxic. The benefits of mercury is that the blob is dense enough that it doesnt bounce and so the switch isnt susceptible to vibrations. On the other hand, ball-type sensors are easy to make, wont shatter, and pose no risk of pollution. Adafruit Industries https://learn.adafruit.com/tilt-sensor Page 3 of 13

While not as precise or flexible as a full accelerometer, tilt switches can detect motion or orientation simply. Another benefit to them is that the big ones can switch power on their own. Accelerometers, on the other hand, output digital or analog voltage that must then be analyzed with extra circuitry. Basic Stats These stats are for the tilt sensor in the Adafruit shop which is very much like the 107-2006-EV. Nearly all will have slightly different sizes & specifications, although they all pretty much work the same. If there's a datasheet, you'll want to refer to it Size: Cylindrical, 4mm (0.16") diameter & 12mm (0.45") long. Price: $2.00 at the Adafruit shop Sensitivity range: > +-15 degrees Lifetime: 50,000+ cycles (switches) Power supply: Up to 24V, switching less than 5mA Datasheet Adafruit Industries https://learn.adafruit.com/tilt-sensor Page 4 of 13

Testing a Tilt Sensor Testing your sensor is simple. Put your multimeter into continuity-test mode and touch the probes to the two leads. Then tilt to determine the angle at which the switch opens and closes. When pointing down, the switch is Open Loop (no continuity). Adafruit Industries https://learn.adafruit.com/tilt-sensor Page 5 of 13

When pointing up, the switch is closed (low resistance / continuous). Adafruit Industries https://learn.adafruit.com/tilt-sensor Page 6 of 13

Connecting to a Tilt Sensor Tilt switches are pretty hardy, you can easily solder to them, clip the leads, plug them into breadboards, use alligator clips, etc. The only care you should take is to avoid bending the leads too much as they may break off. Adafruit Industries https://learn.adafruit.com/tilt-sensor Page 7 of 13

Using a Tilt Sensor Tilt switches have a little ball inside, and it will bounce around a little inside the can. Don't be surprised if the connection is a little intermittant instead of 'constant' Simple Tilt-Activated LED This is the most basic way of connecting to a tilt switch, but can be handy while one is learning about them. Simply connect it in series with an LED, resistor and battery. Tilt to turn on and off. Reading Switch State with a Microcontroller Note that the layout above shows a 10K pullup resistor but for the code I use the 'built-in' pullup resistor that you can turn on by setting an input pin to HIGH output (its quite neat!) If you use the internal pull-up you can skip the external one. Adafruit Industries https://learn.adafruit.com/tilt-sensor Page 8 of 13

Adafruit Industries https://learn.adafruit.com/tilt-sensor Page 9 of 13

/* Better Debouncer * * This debouncing circuit is more rugged, and will work with tilt switches! * * http://www.ladyada.net/learn/sensor/tilt.html */ int inpin = 2; int outpin = 13; // the number of the input pin // the number of the output pin int LEDstate = HIGH; int reading; int previous = LOW; // the current state of the output pin // the current reading from the input pin // the previous reading from the input pin // the following variables are long because the time, measured in miliseconds, // will quickly become a bigger number than can be stored in an int. long time = 0; // the last time the output pin was toggled long debounce = 50; // the debounce time, increase if the output flickers void setup() { pinmode(inpin, INPUT); digitalwrite(inpin, HIGH); pinmode(outpin, OUTPUT); } // turn on the built in pull-up resistor void loop() { int switchstate; reading = digitalread(inpin); // If the switch changed, due to bounce or pressing... if (reading!= previous) { // reset the debouncing timer time = millis(); } if ((millis() - time) > debounce) { // whatever the switch is at, its been there for a long time // so lets settle on it! switchstate = reading; // Now invert the output on the pin13 LED if (switchstate == HIGH) LEDstate = LOW; else LEDstate = HIGH; } digitalwrite(outpin, LEDstate); } // Save the last reading so we keep a running tally previous = reading; Adafruit Industries https://learn.adafruit.com/tilt-sensor Page 10 of 13

Example Projects A simple video showing an LED being turned on by the tilt switch. Simple video showing a mercury type tilt sensor Another basic video, this one shows a tilt sensor connected to an Arduino which then controls a servo This clock uses a tilt sensor to set the alarm. To snooze, tilt it over. Jiggle-ometer, a Arduino->Pachube->SecondLife conduit for motion This project uses an accelerometer, but a simple game controller could be made with tilt switches Adafruit Industries https://learn.adafruit.com/tilt-sensor Page 11 of 13

Adafruit Industries https://learn.adafruit.com/tilt-sensor Page 12 of 13

Buy a Tilt Sensor Buy a Tilt Sensor (http://adafru.it/173) Adafruit Industries Last Updated: 2017-12-26 10:04:38 PM UTC Page 13 of 13