Pretty tide clock
By Rob Zwetsloot. Posted
If you’ve ever lived near the sea, you’ll know that it never gets old to walk along the beach, especially when the weather is good. For Levi Maaia, it turned out the weather wasn’t the main problem.
“I live 200 feet above the Pacific on an ocean cliff,” Levi explains. “I try to make it a weekly ritual to walk down the cliff to the shore. However, it’s disappointing to reach the seaside stairs, expecting a nice sandy walk, only to find waves lapping against the base of the bluff.”
Advertisement
Christmas is coming – keep Santa on the right track with our Raspberry Pi gift guide!
For us landlubbers, tides aren’t always something we have to think about, although Levi was familiar with the tide clocks where he grew up. Not being able to find one for his new Californian home, Levi decided to make his own: “It displays current tide height in feet, predicted hours until next tide and predicted height of the next tide using analogue meters and LED lights.”
Tidal changes
Making a clock wasn’t quite as easy as he first thought, though.

“Growing up in Rhode Island, round, four-segmented tide clocks were a common sight in homes near the Atlantic,” Levi tells us. “But after moving to California, I noticed that these simple analogue clocks were nowhere to be found here. As it turns out, there’s a good reason for that. Similar to many coastal areas around the Pacific and some of the northern Mediterranean coast, the US west coast has a more complex tidal pattern, which means that without constant adjustment, a basic tide clock would get out of sync with the ‘mixed semi-diurnal’ tides here in just a few days.”
This meant Levi needed a way to keep the clock up to date with the NOAA (National Oceanic and Atmospheric Administration) tide data, which led him to turn to Raspberry Pi. “The device stays accurate as long as it has a Wi-Fi connection,” Levi says. “The red light on the right side of the front panel indicates a rising tide and the green light on the left illuminates when the tide is falling. All of the meters and lights are driven by the GPIO pins on a Raspberry Pi 3B+ running a Python script that gathers tide predictions from the US National Oceanic and Atmospheric Administration’s API. The script converts the raw tidal data into PWM values to drive the meters and the binary state voltage for the LEDs.”
Sea worthy
As well as the electronic aspect of the project, Levi was keen to make it look more rustic to camouflage the internal tech, using analogue gauges and a wooden fascia. “Obviously there are more efficient ways to communicate tide predictions than with analogue meters,” Levi admits. “A digital display driven by a Raspberry Pi could easily show graphs and numbers based on the tide API. But I wanted something more rustic but just as accurate. They say measure twice and cut once. I must have tinkered mentally with the physical build design a thousand times over the past two years.

“So when it finally came time to assemble it, I had a very clear vision of how it should look, down to the brass plaque declaring that the information displayed was for ‘Santa Barbara Harbor’.”
According to Levi the finished project works ‘really well’, which hopefully means he’s been able to go for his weekly walks without worrying about the tide since completing it.
Rob is amazing. He’s also the Features Editor of Raspberry Pi Official Magazine, a hobbyist maker, cosplayer, comic book writer, and extremely modest.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
M314 Alien Motion Tracker
Game over, man. Game over. It’s the ultimate tracker from Aliens.
Read more →
Christmas Gift Guide in Raspberry Pi Official Magazine 160
There’s a ton of great stuff in issue 160, including the incredible motion scanner, inspired by the film Aliens. It’s beautiful, it uses Raspberry Pi technology and makes a satisfying ping sound, and the best thing about it is that it actually works, thanks to a DreamHAT+ radar board. Yes, you too can join the […]
Read more →
Win a Raspberry Pi 500+ and Raspberry Pi Monitor!
Fancy getting the most powerful Raspberry Pi desktop setup? Raspberry Pi 500+ and Raspberry Pi monitor pair perfectly together for a portable – and fixed – desktop computer, powered by Raspberry Pi. We have a set to give away, and you can enter below. A Raspberry Pi 500+ & Raspberry Pi Monitor
Read more →
Sign up to the newsletter
Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.