* . *
  • About
  • Advertise
  • Privacy & Policy
  • Contact
Sunday, September 14, 2025
Earth-News
  • Home
  • Business
  • Entertainment
    Ryan Reynolds reveals he called a journalist who said mean things about John Candy – yahoo.com

    Ryan Reynolds Reveals the Moment He Stood Up to a Journalist Who Insulted John Candy

    Entertainment Community Fund Launches Program Supporting Entrepreneurs – Playbill

    Entertainment Community Fund Unveils Exciting New Program to Empower Entrepreneurs

    Behind the turntables: DJ Johnny Kage’s story of perseverance – yahoo.com

    Behind the Turntables: DJ Johnny Kage’s Inspiring Journey of Perseverance

    The other WWE star James Gunn wanted for Peacemaker instead of John Cena – yahoo.com

    The WWE Star James Gunn Originally Wanted for Peacemaker Instead of John Cena

    Quinta Brunson, John Stamos Join Entertainment and Technology Summit – Variety

    Quinta Brunson and John Stamos to Headline Thrilling Entertainment and Technology Summit

    ‘Breaking Bad’ star arrested for incident with neighbor. Here’s the latest – PennLive.com

    Breaking Bad’ Star Arrested Following Neighbor Dispute: Latest Updates

  • General
  • Health
  • News

    Cracking the Code: Why China’s Economic Challenges Aren’t Shaking Markets, Unlike America’s” – Bloomberg

    Trump’s Narrow Window to Spread the Truth About Harris

    Trump’s Narrow Window to Spread the Truth About Harris

    Israel-Gaza war live updates: Hamas leader Ismail Haniyeh assassinated in Iran, group says

    Israel-Gaza war live updates: Hamas leader Ismail Haniyeh assassinated in Iran, group says

    PAP Boss to Niger Delta Youths, Stay Away from the Protest

    PAP Boss to Niger Delta Youths, Stay Away from the Protest

    Court Restricts Protests In Lagos To Freedom, Peace Park

    Court Restricts Protests In Lagos To Freedom, Peace Park

    Fans React to Jazz Jennings’ Inspiring Weight Loss Journey

    Fans React to Jazz Jennings’ Inspiring Weight Loss Journey

    Trending Tags

    • Trump Inauguration
    • United Stated
    • White House
    • Market Stories
    • Election Results
  • Science
  • Sports
  • Technology
    What if artificial intelligence is just a “normal” technology? – The Economist

    What if artificial intelligence is just a “normal” technology? – The Economist

    Lincoln Trail College Receives $100,000 Grant from Marathon Petroleum Corporation for Technology Center – wwbl.com

    Lincoln Trail College Lands $100,000 Grant from Marathon Petroleum to Elevate Technology Center

    Aston Martin to integrate Pirelli’s cyber tyre technology in future models – Just Auto

    Aston Martin to Revolutionize Future Models with Pirelli’s Cutting-Edge Cyber Tyre Technology

    Figure Technology’s stock sizzles after IPO, as investors stay hungry for crypto deals – MarketWatch

    Figure Technology’s Stock Skyrockets After IPO Amid Surging Crypto Investor Excitement

    AI is the ‘most transformational technology’ in our lifetime, AMD CEO argues – Fox Business

    AMD CEO Declares AI the Most Transformative Technology of Our Era

    PAR Technology (PAR) Unveils AI-Powered Assistant Enhancing Restaurant Operations and Customer Engagement – simplywall.st

    PAR Technology Unveils AI-Powered Assistant to Revolutionize Restaurant Operations and Boost Customer Engagement

    Trending Tags

    • Nintendo Switch
    • CES 2017
    • Playstation 4 Pro
    • Mark Zuckerberg
No Result
View All Result
  • Home
  • Business
  • Entertainment
    Ryan Reynolds reveals he called a journalist who said mean things about John Candy – yahoo.com

    Ryan Reynolds Reveals the Moment He Stood Up to a Journalist Who Insulted John Candy

    Entertainment Community Fund Launches Program Supporting Entrepreneurs – Playbill

    Entertainment Community Fund Unveils Exciting New Program to Empower Entrepreneurs

    Behind the turntables: DJ Johnny Kage’s story of perseverance – yahoo.com

    Behind the Turntables: DJ Johnny Kage’s Inspiring Journey of Perseverance

    The other WWE star James Gunn wanted for Peacemaker instead of John Cena – yahoo.com

    The WWE Star James Gunn Originally Wanted for Peacemaker Instead of John Cena

    Quinta Brunson, John Stamos Join Entertainment and Technology Summit – Variety

    Quinta Brunson and John Stamos to Headline Thrilling Entertainment and Technology Summit

    ‘Breaking Bad’ star arrested for incident with neighbor. Here’s the latest – PennLive.com

    Breaking Bad’ Star Arrested Following Neighbor Dispute: Latest Updates

  • General
  • Health
  • News

    Cracking the Code: Why China’s Economic Challenges Aren’t Shaking Markets, Unlike America’s” – Bloomberg

    Trump’s Narrow Window to Spread the Truth About Harris

    Trump’s Narrow Window to Spread the Truth About Harris

    Israel-Gaza war live updates: Hamas leader Ismail Haniyeh assassinated in Iran, group says

    Israel-Gaza war live updates: Hamas leader Ismail Haniyeh assassinated in Iran, group says

    PAP Boss to Niger Delta Youths, Stay Away from the Protest

    PAP Boss to Niger Delta Youths, Stay Away from the Protest

    Court Restricts Protests In Lagos To Freedom, Peace Park

    Court Restricts Protests In Lagos To Freedom, Peace Park

    Fans React to Jazz Jennings’ Inspiring Weight Loss Journey

    Fans React to Jazz Jennings’ Inspiring Weight Loss Journey

    Trending Tags

    • Trump Inauguration
    • United Stated
    • White House
    • Market Stories
    • Election Results
  • Science
  • Sports
  • Technology
    What if artificial intelligence is just a “normal” technology? – The Economist

    What if artificial intelligence is just a “normal” technology? – The Economist

    Lincoln Trail College Receives $100,000 Grant from Marathon Petroleum Corporation for Technology Center – wwbl.com

    Lincoln Trail College Lands $100,000 Grant from Marathon Petroleum to Elevate Technology Center

    Aston Martin to integrate Pirelli’s cyber tyre technology in future models – Just Auto

    Aston Martin to Revolutionize Future Models with Pirelli’s Cutting-Edge Cyber Tyre Technology

    Figure Technology’s stock sizzles after IPO, as investors stay hungry for crypto deals – MarketWatch

    Figure Technology’s Stock Skyrockets After IPO Amid Surging Crypto Investor Excitement

    AI is the ‘most transformational technology’ in our lifetime, AMD CEO argues – Fox Business

    AMD CEO Declares AI the Most Transformative Technology of Our Era

    PAR Technology (PAR) Unveils AI-Powered Assistant Enhancing Restaurant Operations and Customer Engagement – simplywall.st

    PAR Technology Unveils AI-Powered Assistant to Revolutionize Restaurant Operations and Boost Customer Engagement

    Trending Tags

    • Nintendo Switch
    • CES 2017
    • Playstation 4 Pro
    • Mark Zuckerberg
No Result
View All Result
Earth-News
No Result
View All Result
Home Science

Hands On Extra: OCXO Clock

February 9, 2024
in Science
Hands On Extra: OCXO Clock
Share on FacebookShare on Twitter

Note: This post was originally published on the author’s Github repository for this project.

As described in the accompanying Hands On article, this project is a digital clock that uses a high stability 10 Megahertz oscillator as its timing reference. The oscillator is an oven controller crystal oscillator, or OCXO, a technology that has seen significant improvements in recent years, drawing much less power at a much lower price.

The basic platform here is an OCXO combined with an Arduino Nano. The Nano offers far more processing power than is necessary for performing a simple hours-minutes-seconds type clock but is cheap and simple to use. However, the raw 10 MHz clock signal from the OCXO cannot be used to drive the Nano directly. The Nano uses a 16 MHz ceramic resonator for its system clock and it is not easy to change the frequency of this, to say 10 MHz, without significant modification to the Nano’s firmware because the 16 MHZ clock signal is used to derive the timing signal for the USB connection needed to load programs onto the microcontroller. A physical switch to switch between 16 MHz and 10 MHz after the program was loaded was an option, but not very practical.

Instead, the approach was to use interrupts. As with all microprocessors, the Nano supports interrupts, which, when triggered, can pause the currently running program code running, move the CPU’s registers to a memory location, carry out an interrupt service routine and then return the controller to normal operation by restoring the registers. Interrupts can generally be triggered by a clock-driven timer or an input on a dedicated external pin. The Nano includes three interrupt timers, and Timer0 and Timer1 can also be driven by an external clock source through the T0 and T1 pins. The timers work by being loaded with a binary number, which is then decremented every time a pulse is detected at their corresponding pin. When the timer reaches zero, an interrupt is triggered. Changing the number loaded into the timer alters the interval between interrupts. Timer0 is 8-bits where as Timer1 is 16 bit.

However, it was still not possible to drive the timers directly with the 10 MHz signal from the OCXO. When used with an external clock on T0 or T1, the signal at the pin is sampled relative to the 16 MHz system clock. Using a maximum Nyquist sampling factor of 2.5, a realistic maximum external input frequency of 6.4 MHz results—any higher and incoming pulses at the pin will be missed. Adding a 4-bit binary counter after the OCXO’s output results in one pulse being emitted by the counter for every 16 pulses it receives, as the counter counts from 0000 to 1111. With the OCXO operating at 10 MHZ, the counter’s output signal frequency is then 625 kHz. Consquently, having the timer count down from 62500 will result in an interrupt every tenth of a second. Seconds, minutes, and hours are then updated appropriately.

Components

I chose an Arduino Nano as the clock’s microcontroller because it offer the same capabilities as larger Arduino controllers but is in a more compact form factor and is very cheap. In particular, it includes the usual SPI and I2C interfaces which make it easy to interface to modern displays with their built-in drivers. The OCXO is a Raltron Electronics OX4120A-D3-5-10.000-3.3. Any suitable OCXO could be used, even one with a difference frequency by changing the divider ratio. It also comes in a standard 14-pin dual-in-package (DIP) package configuration, although only 4 pins are actually used. The OCXO is a 3.3-volt part, so a LD1117V33C linear low-drop-out (LDO) voltage regulator derives this voltage from the 5-volt system voltage that is provided by the USB-C connection used to power the clock. A second, identical, regulator provides 3.3V to the display. The regulator type is not critical, alternative LDO or switching types could be used. The 4-bit counter is 74HC191. Although the counter is powered by the 5V system voltage, its input is compatible with the OCXO’s 3.3V logic level so a voltage shifter is not necessary.

The display is made up of six Adafruit CharliePlex FeatherWings. Each CharliePlex consists of 7×15 pixel array of LEDs which can be driven individually in a graphical mode or using fonts built into the Adafruit_IS31FL3731 library. They are communicated with via an I2C connection. The address of each CharliePlex can be set to one of two values: by default 0x74 but you can be changed to 0x77 by bridging a link with solder. To drive multiple displays I used a breakout board with the TCA9548A I2C expander chip, which lets me connect multiple CharliePlex’s and address each on a separate I2C bus, avoiding address collisions.

A single rotary encoder with a momentary press switch is used as the user interface. This gives the clock a modern minimalist feel. Separate press switches could of course be used with only minimum changes to the hardware and/or software.

All of the components used in this project have through-hole packaging for easy construction. A bill of materials with Digikey product reference numbers are available in my Github repository.

Printed Circuit Board

The printed circuit board was designed in KiCad. The PCB design is made available in the repository both as KiCad files and in Gerber format for others to have fabricated or modify under the creative commons licence.

The final board is not complex and designed as a double sided board which is easy to solder. It is can be easily broken into two sections along two cutouts, either with a saw or scoring and snapping. If broken into section, pads are provided so that headers can be soldered in to plug one board behind the other, making a more compact form suited to a desk clock. In this form, the “top” board holds the display and rotary encoder, with all else on the back board. The rotary encoder is fitting in the centre of the board, but this could course be moved to elsewhere and attached via flying leads. The prototype PCB was ordered through JCL in China, but any PCB fabrication house would do. The bottom portion of the board contains the Arduino, the I2C expander, the OCXO, divider chain and voltage regulators. The voltage regulators are mounted with the tabs facing outwards so heatsinks can be fitted if required. This wasn’t found necessary in the prototype, but if, for example the displays are driven at a high overall brightness it may be necessary. If the boards are mounted one behind the other, they should be placed back to back, so all the components will be accessible from the back of the clock. This will make the clock easier to hack later if required. M3 holes are fitted in the board for easy mounting and these line up for the upper and lower parts of the board if they are mounted back to back. Metal spacers can be fitted to provide the correct clearance and mechanical stability. Two mounting holes are also fitted above and below the OCXO. This is to provide mechanical stability. The OCXO is a relatively heavy component and held into the board simply by four pins in a DIP socket. This is also mounted vertically, so not particularly stable. A piece of wire can be threaded through the two holes with its ends twisted together to hold the OCXO in place. Cable ties could also be used, or a clamp if available. There are two sets of schematics, PCBs and gerbers files. This is because the TCA9548A modules comes in two flavours. The Adafruit one has a spacing of 0.6 inches between the rows (the “N” version) while some modules available on eBay have a 0.7 inch spacing. Double check which one you are using before fabricating the PCBs.

Software

The software is also available in my Github repository. The source code relies on only two additional libraries, the aforementioned Adafruit_IS31FL3731 and the common Wire library which enables serial communication, essential for I2C connection to the display. Driving the displays requires individually programming each of the 105 LEDs on each CharliePlex. This is done using a set of look-up tables (LUTs) that are defined right after the library includes in the source code. There is one LUT per numeral. It is obvious by looking at them which numeral is stored in which LUT, and it is simple to replace the LUTs with a new set, representing a different font. Next, setup code checks that all of the CharliePlexes are functioning correctly and will send a debug message to any connected computer over the USB serial interface if not. Next Timer1 is configured to accept pulses from an external clock and to count down from 62499. This is 62499 and not 62500 to account for the time needed to reset the counter each time it reaches zero and triggers an interrupt of the program’s main loop. The primary function of the main loop is to call the subroutine that reads the rotary encoder. The encoder subroutine tries to eliminate switch bounce and is also easily modifiable. The main loop also updates the display, but only when a flag bit has been set by the interrupt timer. There is also a brightness variable here which is user settable as is the variable for temporarily increasing the brightness of a digit when it is being set. The code for the Timer1 interrupt service routine follows the main loop. This is called ten times a second, and takes care of incrementing the seconds, minutes, and hours as needed. A pair of LEDs between the seconds and minutes, and another pair of LEDs between the minutes and hours are also flashed here, toggling on and off every half second. Their function could be easily changed if desired. The final subroutine handles transmitting update to the display via the TCA9548A I2C expander chip.

Accuracy

The OX4120A-D3-5-10.000-3.3 used in this project is a fixed OCXO—its frequency can not be adjusted. Other OCXOs allow adjustments to be made by applying a control voltage to one of the pins, but I went with the simpler oscillator its stability was believed to be high enough for this project not to require adjustment. To check the accuracy of the clock requires an even higher accuracy reference clock. The best the author had in his lab was a HP 53150A frequency counter with its own OCXO reference. It was last calibrated in 2013. When measuring the OCXO reference the frequency on the counter fluctuated between 10,000,000 and 9,999,999. This suggests an agreement, and hence accuracy, of better than 1 part in 10,000,000. Being newer, it is likely that the OCXO in this clock is better than HP counter!

>>> Read full article>>>
Copyright for syndicated content belongs to the linked Source : IEEE – https://spectrum.ieee.org/ocxo-clock

Tags: ExtraHandsscience
Previous Post

Build the Most Accurate DIY Quartz Clock Yet

Next Post

Why Bloat Is Still Software’s Biggest Vulnerability

World Athletics Championships 2025: Ryan Crouser, in only competition of year, wins third straight shot put world title – Olympics.com

World Athletics Championships 2025: Ryan Crouser, in only competition of year, wins third straight shot put world title – Olympics.com

September 14, 2025
A potentially K-shaped economy creates dilemmas for the Fed – The Hill

Navigating a K-Shaped Economy: The Fed’s Tough Road Ahead

September 14, 2025
Ryan Reynolds reveals he called a journalist who said mean things about John Candy – yahoo.com

Ryan Reynolds Reveals the Moment He Stood Up to a Journalist Who Insulted John Candy

September 14, 2025
The Surprising Health Benefits of Doing Jigsaw Puzzles, According to Experts – marthastewart.com

Unlock Unexpected Health Benefits by Doing Jigsaw Puzzles

September 14, 2025
Foreign hack of John Bolton’s AOL account cited as part of reasoning for searching his house – CNN

Foreign hack of John Bolton’s AOL account cited as part of reasoning for searching his house – CNN

September 14, 2025
‘We’ve done it before’: how not to lose hope in the fight against ecological disaster – The Guardian

We’ve Done It Before”: Finding Hope and Strength in the Fight Against Ecological Disaster

September 13, 2025
AI Can Generate Code. Is That a Threat to Computer Science Education? – Education Week

Is AI-Generated Code a Challenge for the Future of Computer Science Education?

September 13, 2025
Aldi’s $7 Salmon & Sweet Potato Dog Food Has Pups Going Wild – yahoo.com

Aldi’s $7 Salmon & Sweet Potato Dog Food Has Pups Going Wild

September 13, 2025
What if artificial intelligence is just a “normal” technology? – The Economist

What if artificial intelligence is just a “normal” technology? – The Economist

September 13, 2025
Saints to sign DL Jonah Williams to active roster – Yahoo Sports

Saints to sign DL Jonah Williams to active roster – Yahoo Sports

September 13, 2025

Categories

Archives

September 2025
MTWTFSS
1234567
891011121314
15161718192021
22232425262728
2930 
« Aug    
Earth-News.info

The Earth News is an independent English-language daily published Website from all around the World News

Browse by Category

  • Business (20,132)
  • Ecology (819)
  • Economy (838)
  • Entertainment (21,716)
  • General (17,021)
  • Health (9,882)
  • Lifestyle (853)
  • News (22,149)
  • People (841)
  • Politics (847)
  • Science (16,048)
  • Sports (21,338)
  • Technology (15,820)
  • World (821)

Recent News

World Athletics Championships 2025: Ryan Crouser, in only competition of year, wins third straight shot put world title – Olympics.com

World Athletics Championships 2025: Ryan Crouser, in only competition of year, wins third straight shot put world title – Olympics.com

September 14, 2025
A potentially K-shaped economy creates dilemmas for the Fed – The Hill

Navigating a K-Shaped Economy: The Fed’s Tough Road Ahead

September 14, 2025
  • About
  • Advertise
  • Privacy & Policy
  • Contact

© 2023 earth-news.info

No Result
View All Result

© 2023 earth-news.info

No Result
View All Result

© 2023 earth-news.info

Go to mobile version