Connect with us

Convert uneven pulses

Discussion in 'General Electronics Discussion' started by Rick Johnson, May 11, 2016.

Scroll to continue with content
  1. Rick Johnson

    Rick Johnson

    22
    0
    May 11, 2016
    Hi guys
    Im using an old mechanical dial off a rotary phone as an input into an arduino board. The pulses have to be the same.
    Problem is for e.g. if I dial in an 8 as soon as I start dialing the contacts close and remain closed until my finger hits the stop on the dial. As soon as I release it the next 7 pulses are very fast. Is there any way to even that out say using a 555 timer so the pulses will be all the same
    Thanks
    Rick
     
  2. Alec_t

    Alec_t

    2,844
    760
    Jul 7, 2015
    If every number dialled has the same uneven character, can't you simply ignore the first pulse?
     
  3. Minder

    Minder

    2,970
    626
    Apr 24, 2015
  4. Minder

    Minder

    2,970
    626
    Apr 24, 2015
    I checked the ones I have and they are identical to these except NT made.

    You may be able to use the (RH) ON contact in the video as an interlock, as soon as you move the dial a fraction, the ON contact opens and does not close until the dial procedure is over, LH dial pulse contacts.
    There are three sets of contacts used.
    M.
     
  5. Rick Johnson

    Rick Johnson

    22
    0
    May 11, 2016
    Minder I dont have that dial just 2 sets of contacts

    Alec_t are you saying that in the Arduino sketch to ignore the first long pulse and use the next ones but to always add a one in the sketch
     
  6. Minder

    Minder

    2,970
    626
    Apr 24, 2015
    Are you sure you don't have them internally as that is very unusual?
    M.
     
  7. Rick Johnson

    Rick Johnson

    22
    0
    May 11, 2016
    Yup I got several and they just have two sets of contacts one is always on when the dial is at rest and the other opens and closes as the dial rotates.
     
  8. Minder

    Minder

    2,970
    626
    Apr 24, 2015
    That is what I was implying, could you not use the ON contact to indicate a count was impending and then use it when it closes again to terminate the count?
    Between the two the logic should be possible with a micro, although I only use Microchip, not Arduino.
    M.
     
  9. Alec_t

    Alec_t

    2,844
    760
    Jul 7, 2015
    Effectively. It's rather like Minder was saying: the first pulse alerts the Arduino.
     
  10. Colin Mitchell

    Colin Mitchell

    1,417
    312
    Aug 31, 2014
    A micro does not need even pulses. They can be as uneven as you like.
     
  11. Minder

    Minder

    2,970
    626
    Apr 24, 2015
    Also keep in mind the pulses are generated by an opening contact (negative logic) , IOW all you would need is a pull up resistor on an input and you would count a Hi every time the count contact opens = No. of pulses.
    The pulse contacts only open when the dial is released.
    Dial 0 = 10 pulses.
    M.
     
    BobK likes this.
  12. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    I second what Minder says. Simply count the falling edges.

    Bob
     
  13. Minder

    Minder

    2,970
    626
    Apr 24, 2015
    Just to be clear here, the dial contact is ALWAYS closed until the dial is released at a digit, it will then Open contact a number of time equal to the number on the dial, 1 =1pulse - 0 =10 pulses.
    M.
     
  14. Rick Johnson

    Rick Johnson

    22
    0
    May 11, 2016
    Ok guys thanks. So in the Arduino sketch your saying just count the closes. It will not matter that the first close is 2 seconds long and the others are 2 tenths of a second long
    Rick
     
  15. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    No, we are saying count the opens instead of the closes. Then all the pulses will come at the same interval, with the first one coming when you release the dial.

    Bob
     
  16. Rick Johnson

    Rick Johnson

    22
    0
    May 11, 2016
    Thanks guys Ill forget about the 555 timer and just count the opens in the sketch
    Rick
     
  17. Minder

    Minder

    2,970
    626
    Apr 24, 2015
    Keep in mind that a pair of N/C contacts that open on count do not have logic level per-se (1 or 0), they can be made either by way by configuration, source from +ve or sink to 0v.
    M.
     
  18. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Hey guys, I'm curious about something. Since the Rotary Phone system was never intended to dial at the speeds a uC achieves did they or the PBX incorporate any debouncing?

    Chris
     
  19. Minder

    Minder

    2,970
    626
    Apr 24, 2015
    Mainly all hardwired switching, the large stepping selector relay would step/rotate noisily in conjunction with the dial pulses.
    I have a working one in my shop, it really entertains the grand kids and their pals.
    M.
     
  20. Alec_t

    Alec_t

    2,844
    760
    Jul 7, 2015
    I doubt it. The pulses would probably be driving a chunky uniselector at the telephone exchange. Unlikely a few mS of bounce would affect it.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-