Coder Social home page Coder Social logo

rotary-dial's Introduction

Rotary Dial

Arduino library to read numbers from a rotary dial (or otherwise using pulse dialing; see Wikipedia: Rotary dial).

front of a rotary telephone dial

This implementation is for the North American system, where [1, 9] pulses correspond to the numbers [1, 9], and 0 is represented by 10 pulses. This library was written for use with the dial demonstrated here and pictured above.

Connection & Circuit

On the back of the dial are two connections relevant for this implementation. One (the 'ready' switch) is normally open (NO), and is closed whenever the rotor is not at rest (specifically, as soon as the user draws back the rotor, and until it finishes returning). The other (the 'pulse' switch) is normally closed (NC), and is opened briefly for each pulse (roughly 10 - 20 Hz).

The expected circuit is:

     Rotary Dial                              Arduino
                      /---------------------- readyPin
  /- ready switch (NO) -- pull-up resistor -- VCC
 /-- pulse switch (NC) -- pull-up resistor -/
 \                    \---------------------- pulsePin
  \------------------------------------------ GND

The expected sequence is:

readyPin  pulsePin  state
HIGH      n/a       default (waiting)
LOW       LOW       ready to dial / for first pulse
LOW       HIGH      pulse received (number = 1)
LOW       LOW       ready for next pulse
LOW       HIGH      pulse received (number = 2)
LOW       ...       (repeat)
HIGH      n/a       rotation complete, count recorded

There is 15ms allowed for debounce, which is the implementation's only constraint on pulse speed.

See Also

Interrupt-based variant of reading a rotary dial.

rotary-dial's People

Contributors

markfickett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rotary-dial's Issues

Opeartion without READY PIN

I think it's not needed to use READY PIN, this can be implemented by using PULSE PIN alone.

Start counting pulses once first pulse is received.
Stop counting pulses and output the number if there was no pulse for predefined amount of time.
There are telephone standarts which define pulse durations and delays, so this can be reliably determined without need for second helping pin.

Even the phone line itself does not use this ready pin. They only use two wires for everything (dialing, ringing and voice). So there's no reason to use 3 wires to connect the dialer to arduino...

Can you please add such mode?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.