Network Time Protocol On The ESP32

Network Time Protocol (NTP) is one of the best ways to keep networked computers synchronized to the same time. It’s simple, lightweight, and not only allows computers to maintain a time standard together, but it also allows some computer manufacturers to save some money on hardware costs. The Raspberry Pi is perhaps the most well-known example of a low-cost computer without the extra expense of a real-time clock (RTC). While the Pi sets up NTP essentially automatically, other microcontrollers like the ESP32 don’t, but it is possible to configure them to use this time standard with some work.

For this project the MicroPython implementation for the ESP32 is required. MicroPython is a way of running Python code on microcontrollers or other embedded systems without all of the overhead that Python would normally require. Luckily enough, the NTP libraries are built right in so once MicroPython is running on the ESP32 it’s nearly as easy as calling the library. Of course you will have to make sure there is an internet connection, and then grab the time, sync it to the machine, and then set the timezone.

For a bonus exercise, the project’s creator [Bhavesh] suggests attempting to configure Daylight Savings Time, although this can be a surprisingly difficult problem to solve. In the meantime, there are a few other ways of installing a clock on a microcontroller like this one. An RTC module is an obvious choice, but you can also get incredibly accurate time by using a GPS module as well.

E-Paper Clock Displays Things In A Battery-Friendly Manner

Clock builds are a hacker staple, and many overflow with power-thirsty LEDs and network features. This build from [mattwach] takes quite the opposite approach, sipping away at its batteries thanks to an e-paper based design.

The build relies on a small Waveshare e-paper module which only requires power when the display is actually changing. When static, the display needs no electricity, and this helps save a great amount of power compared to OLED or LCD-based clocks.

An Atmega328p is the heart of the build, running off a 32.768 KHz clock crystal for a combination of precise timekeeping and low power draw. Time is ensured to be both precise and accurate thanks to a GPS module which allows the clock to sync to satellite time when powered up. It’s a common way to sync clocks to a high-quality time source. Most of the time, though, the GPS is kept powered down to save the 30-100 mA that the module typically draws when in use.

Other features include a temperature, humidity, and pressure sensor, with ambient pressure graphed over time. There’s also notification of sunrise and sunset times, along with the current phase of the moon. It’s all wrapped up in a case tastefully manufactured using 3D printed parts and some wooden CNC-cut panels for a nice rustic look.

With the e-paper display and the microcontroller configured for low-power operation, the clock will run for around 6 months on four AAA cells. Overall, it’s a nifty little clock that will provide the time, date, and other information without the need for an Internet connection. Video after the break.

Continue reading “E-Paper Clock Displays Things In A Battery-Friendly Manner”

Tetris Clock Gets Talkative Upgrade

Tetris is arguably one of the most popular video games of all time, and its famous bricks have become cultural icons in themselves, as seen in this clock build from [The Electronic Engineer].

The web interface allows the various sound options to be easily configured.

The basic concept of the Tetris clock is that falling bricks stick together in the shape of numbers to display the time. In this case, the clock is based on the version created by [Brian Lough] which we featured previously. It relies on an RGB LED matrix as a display.

However, the build has had a few upgrades courtesy of [The Electronic Engineer]. With the help of an I2S audio breakout board, the clock can play sounds at various times of day. It’s currently set up with clips from various cartoons announcing lunch and coffee break times. There’s also a web interface added in for configuration purposes, and some text tickers too.

It’s fun to see a popular open project get some upgrades as others dive in to build their own version. We’ve seen some other fun Tetris clocks before, too. Continue reading Tetris Clock Gets Talkative Upgrade”

A Simple Binary Coded Decimal Watch

Analog and LCD watches are both useful designs, but ultimately are mainstream timepieces. Using a binary watch is an easy way to set one’s self apart as a tech enthusiast, while impressing your hacker friends to boot.

One such build comes to us from [vishalsoniindia], and it uses a single bare PCB which is designed to mate directly to a traditional watch strap. The single tactile button on board is used to activate the watch, showing the current time in hours and minutes in binary-coded decimal on the watch’s LEDs. Long-pressing the button puts the watch in setting mode to correct the time as needed.

The watch relies on an ATtiny85 microcontroller, a lightweight and compact design which is more than powerful enough to run a simple watch. It’s paired with a 74HC595 shift register to run all the LEDs from a minimum number of pins, and there’s also a TP4056 charging circuit on board to keep the lithium-polymer battery topped off.

A project like this is a great way to learn all manner of basic electronics skills, from PCB design, to SMD soldering and even working with basic logic parts like shift registers. As a bonus, you get a cool watch out of it to boot.

We’ve seen some similar designs over the years, as varied as the hackers that build them. Video after the break.

Continue reading “A Simple Binary Coded Decimal Watch”

Inside An 11 Ton Clock With 1,000 Pieces

We aren’t ashamed to admit it, but we like clocks. We’ve built quite a few and clock projects show up regularly in the pages of Hackaday. But there is one clock that is among the most famous in the world: Britain’s Big Ben. It has been getting some repairs and the BBC was nice enough to make a video of the giant mechanism.

Actually, the clock is not called Big Ben. That’s the name of one of the five bells in the Elizabeth Tower since 2012. Before that it was the Clock Tower, but everyone always calls it Big Ben. The giant clock weighs over 11 tons and has more than 1,000 pieces. Hard to imagine what it took to build such a thing in 1859.

Big Ben itself — the bell — weighs even more than the clock at over 15 short tons. But, of course, we are mostly interested in the clock itself. The design was apparently from a lawyer and an astronomer, both of whom liked clocks. Construction, however, fell to a professional clockmaker and — after his death — his stepson. Dennison, the lawyer, developed a superior gravity escapement that quickly became the standard for future tower clocks and was hailed as one of the great horological inventions of the 19th century.

The clock now has an electric motor that it can use as a backup. However, it is normally hand-wound three times a week. Winding the clock takes about 90 minutes. Adjusting the clock is also an interesting event. On top of the pendulum is a stack of penny coins. Adding a penny makes the clock run a little faster, removing one slows it down. Each penny is worth about 0.2 seconds/day.

It is great to see such a recognizable piece of 19th century tech get its 15 minutes of fame. Not that the tower isn’t famous, but very few people know what’s inside. The old clock is full of odd stories. The original bell broke when Dennison wanted to test it with a bigger hammer. The new bell made from the old metal also has a crack in it, but still is operational.

You probably aren’t going to reproduce this clock, but you can make something that works on the same principle. Or, try something a bit more steam-punk.

Continue reading “Inside An 11 Ton Clock With 1,000 Pieces”

Careful Cuts Lets Logger Last A Year On A Coin Cell

Coin cells are great for backup power for things like real-time clocks, or even for powering incredibly small mechanical devices like watches. But for something like a data logger, running on a standard microcontroller, most people would reach for a lithium cell of some sort. Not so with this build, though, which squeezes every joule of energy from a coin cell in order to run a data logger for a full year.

Won’t be needing that anymore.

Most of the design and engineering required to improve the efficiency of the data logger involve standard practices for low-power devices such as shutting off unnecessary components and putting the device to sleep when not actively running, but this build goes far beyond that. The Vcc pin on the RTC was clipped which disables some of its internal logic but still keeps its basic functionality intact.

All of the voltage regulators were removed or disabled in favor of custom circuitry that doesn’t waste as much energy. The status and power LEDs were removed where possible, and the entire data logger is equipped with custom energy-efficient code as well.

If you’re starting a low-power project, even one that isn’t a datalogger, it’s worth checking out this build to see just how far you can go if you’re willing to hack at a PCB with cutting tools and a soldering iron. As to why this data logger needed such a low power requirement, it turns out it’s part of a kit being used in classrooms and using a coin cell brought the price of the entire unit down tremendously. Even if you have lithium cells on hand, though, it’s still worthwhile to check out the low power modes of your microcontroller.

Thanks to [Adrian] for the tip!

Building A Pendulum Clock Out Of Lego

Pendulum clocks aren’t used quite as often these days as their cumbersome mechanics and timekeeping abilities have long been outshone by electronic alternatives. However, they’re still fun and they do work, so [PuzzLEGO] set about building a working example with Lego.

The rear view reveals the escapement built from Lego Technic parts.

The core of the clock is the escapement, a linkage which the pendulum can only turn in one direction. As the pendulum swings once per second, it lets the escapement gear turn one notch forward at a time, turning the gears of the clock which drive the hands. It’s powered with a falling weight in the form of a drink bottle full of water, which turns the gears of the clock via a chain.

The clock can only run for approximately an hour, so it’s set up with a second and minute hand instead of the more usual minute and hour hand. However, with the pendulum tuned to the appropriate length and the weight fitted, it pleasantly ticks and tocks the seconds away.

We’ve seen other great builds from [PuzzLEGO] before, too, like this inventive Rubik’s Cube build. Video after the break.

Continue reading “Building A Pendulum Clock Out Of Lego”