Connect with us

555 timer ic problem

Discussion in 'General Electronics Discussion' started by samwitch, Mar 22, 2021.

Scroll to continue with content
  1. samwitch

    samwitch

    2
    0
    Mar 22, 2021
    Hey everyone,

    I have a project with an LM555 timer and need to calculate how much time it takes for an input to go from LOW to HIGH and then to LOW again.

    Basically, I want to know the period of a square wave generated by the LM555 timer.

    I did it with Arduino using the function Pulseln. But I need to do this using a Beaglebone and programming in C++ (Using QtCreator).

    Is there a way to "open" the function PulseIn so I know what it does?

    Thank you in advance.
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    11,424
    2,621
    Nov 17, 2011
    The title is seemingly misleading.
    Insufficient information.
    Do you want to calculate the period of the 555 timer? Or do you want to measure the period of the timer using the beaglebone?
    What is your circuit setup? We can help only on the basis of information you provide.
     
  3. Harald Kapp

    Harald Kapp Moderator Moderator

    11,424
    2,621
    Nov 17, 2011
    You could look it up in the Arduino libraries.
    But probably unnecessary. You can measure an interval using several methods:
    • interrupt driven: The edge of the timer signal triggers an interrupt, the interrupt routine saves the current time, When the same edge appears one period of the timer later, the interrupt is triggered again . Now the interrupt routine saves the new time. The difference between the two timestamps is the period of the timer. This method should be pretty accurate as the interrupt will be handled (almost) immediately regardless of the cpu load.
    • by polling: Your program constantly polls the input where the timer is connected. When the program detects an edge (rising or falling, which one is irrelevant), it stores the current time. When the program next detects the same edhe (again rising or falling, must be the same as before), it saves the new time and calculates the period from the difference in the two times. This method is less accurate than the interrupt method as the delay between two polls of the input pin may depend on the cpu load.
     
  4. samwitch

    samwitch

    2
    0
    Mar 22, 2021
    Thanks so much Harald,really useful
     
  5. WHONOES

    WHONOES

    1,124
    311
    May 20, 2017
    It's easy enough to calculate the period using the sums on page 10 of Texas Instruments Datasheet. See link below for the sheet.
    Don't forget that the value of C in the calculations is expressed in Farad's.

    Alternatively you could use an oscilloscope to measure the period(s) of your circuit.

    LMC555 CMOS Timer datasheet (Rev. M)
     
  6. Audioguru

    Audioguru

    3,241
    702
    Sep 24, 2016
    There is a huge difference between an old LM555 and a new Cmos LMC555.
     
  7. WHONOES

    WHONOES

    1,124
    311
    May 20, 2017
    In what way?
     
  8. Audioguru

    Audioguru

    3,241
    702
    Sep 24, 2016
    Different input impedance, different minimum supply voltage and different switching speeds.
     
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

-