Connect with us

Oscillator

Discussion in 'General Electronics Discussion' started by Jordy Dominicus, Apr 21, 2016.

  1. Jordy Dominicus

    Jordy Dominicus

    5
    0
    Apr 12, 2016
    Hello,

    I finished building my digital clock and it's working fine. At the moment I increase the minutes by pressing a button, but I'd like a signal that gets high once per minute. I could use a 555 timer, but they aren't really accurate. Is there an another easy way to create a more accurate oscillating signal? Thanks :)
     
  2. hevans1944

    hevans1944 Hop - AC8NS

    3,964
    1,891
    Jun 21, 2012
    Line operated or battery operated? 50 Hz power-line frequency? Easy enough to divide the power-line frequency with digital counter to create one pulse per minute. Or program a PIC to do that, which is the approach I would recommend. The absolute simplest PIC will be more than adequate for the task.

    You can safely get 100 Hz pulses from the power line by using a small center-tapped 6.3 VAC filament transformer to drive the base of an NPN transistor through two 1N4148 small-signal diodes and a 1 kΩ current-limiting resistor. Connect the center-tap to circuit common and the diodes between the ends of the secondary winding and the base of the transistor, anodes to the transformer and cathodes (connected together) to the current-limiting resistor. Connect the emitter to circuit common. Connect the collector to a 1 kΩ pull-up resistor, the other end of which is connected to +Vcc logic supply.

    Positive-going pulses will appear on the collector, centered time-wise on the zero crossings of the power line and occurring only when the transistor is turned off. Count those 100 Hz pulses with a software counter to generate an output pulse every minute... or what ever interval you want your digital clock to increment.

    You may want to add a 10 kΩ resistor between the transistor base and emitter connections to make sure the transistor turns off at the zero crossings.

    If battery operated, the internal RC oscillator in a PIC is probably accurate enough, but it runs at 1 MHz so more counts and a different program will be needed. You can "calibrate" the RC oscillator by changing a program variable that is downloaded to the PIC when you program it, or you can use an external resonator for more accurate clocking of the PIC.
     
    Last edited: Apr 21, 2016
  3. dorke

    dorke

    2,344
    663
    Jun 20, 2015
    @Hop,
    I wouldn't go the AC line way.
    1. It is not accurate at all about ±5%
    2. It is relatively expansive(transformer)

    The way to go is with a CD4060 + 32.768kHz clock crystal (dirt cheap,and may be yanked out of a broken digital clock-almost all of them have one)
     
    hevans1944 likes this.
  4. cjdelphi

    cjdelphi

    1,098
    104
    Oct 26, 2011
    Yeah a gate oscillator!

    doesn't the 4046 bring it down to 2 hertz where a fliplop then divides it by 2?
     
  5. dorke

    dorke

    2,344
    663
    Jun 20, 2015
    Yes it does ,
    it is a 14 stage divider and another FF is needed to get it to 15 .
    But,this FF can be merged easily in the clock design.
     
  6. duke37

    duke37

    5,131
    692
    Jan 9, 2011
    @dorke
    I imagine that the line frequency in the Netherlands is much better than +/-5%.
    In the UK it never seems to vary much at all and the grid add in lost cycles to maintain clocks. They told me to set clocks at midnight on sunday when the cycles have been corrected.
     
  7. dorke

    dorke

    2,344
    663
    Jun 20, 2015
    Yes you are correct ,
    It is smaller by a factor of 10.
    My bad, I should have written ±0.4% (49.8 Hz to 50.2 Hz)
    But still ,It may cause a noticeable clock error ,which can be easily eliminated with a crystal osc.
    Here is an interesting line frequency accuracy monitoring site.
     
    Last edited: Apr 22, 2016
  8. hevans1944

    hevans1944 Hop - AC8NS

    3,964
    1,891
    Jun 21, 2012
    Ah, yes! I totally agree. The ubiquitous 32.768 kHz clock crystal used in millions (maybe even billions by now) of cheap wrist watches and battery powered wall clocks is the logical and best choice for creating a one-minute clock pulse with an appropriate divider. I should have suggested it. Thanks, @dorke.

    The transformer/diode/transistor circuit was a leftover from a problem I solved in the 1960s: how to trigger a pair of SCRs at the zero-crossing of the line voltage to minimize the RFI generated when switching on a large inductive load. In that particular instance a large solenoid actuated a heavy steel shutter. The device was already built and creating havoc with sensitive nearby data acquisition electronics. I was called in to "fix" it.

    Today you can purchase off-the-shelf solid-state AC switches that delay turn-on until the next zero-crossing of the AC line. Almost all of them now have this zero-line-voltage-switching "feature" at no extra cost. I still use the circuit for bread-boarding because it is so simple and reliable. I usually connect the transistor collector output to a Schmitt trigger inverter to obtain a faster logic-compatible edge transition. In the original circuit, the transformer was connected through two current-limiting resistors to the bases of each of two NPN transistors whose collectors were tied together to a single pull-up resistor.

    At that time I didn't worry about the reverse voltage being applied to the base-emitter junction of the transistor that wasn't conducting... an engineering decision that I got away with using 2N3904 transistors because they tolerate up to 6 VDC reverse bias. The voltage from center-tap to each end of the filament transformer winding is about 4.5 V peak. The width of the collector pulse is very narrow because of the gain of the transistor, so it served nicely as a zero-centered, transformer-coupled, trigger pulse for back-to-back connected SCRs. It would also work nicely for TRIACs but the system was already built and TRIACs were not a viable alternative. Ergo, shoehorn in a "fix" to trigger the existing SCRs.

    I will leave it to someone else to detail the divider chain necessary to create a pulse once each minute while I wipe the egg off my face.:)
     
  9. Colin Mitchell

    Colin Mitchell

    1,417
    314
    Aug 31, 2014
    wouldn't go the AC line way.
    1. It is not accurate at all about ±5%

    That's not true at all. They deliver the exact number of cycles over a period of a day.
     
    hevans1944 likes this.
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.
Similar Threads
There are no similar threads yet.
Loading...
Electronics Point Logo
Continue to site
Quote of the day

-