A Raspberry Pi Tidy Tide Tracker Predicts Propitious Promenades

The whims of the tides can make walking near the ocean a less than pleasant experience. A beautiful seascape one day may appear as a dismal, mucky, tidal flat the next. Frustrated over these weary walks, [Average Man] created a tidy tide tracker to predict propitious promenade periods.

A Raspberry Pi A+ pulls tide timing information off the web by scraping a web page using Python code. The time for the high tide, when the estuary will be full of water, is shown on a 4-digit 7-seg display. It’s all sandwiched between two smoked black panels to provide a neat case while still letting the LEDs show through.

The code comes from two projects [Average] recalled from a kickstarter timing project and a 7-seg display project. As he points out:

It’s great to learn programming from others, but it’s even better if you learn them well enough to remember, re-use and combine that code later on as well.

The display chips are mounted on a product of his own, the no longer available ProtoPal board. This is a Pi A+ size board with 288 prototyping holes and the standard connector for mounting on the Pi GPIO header. It keeps the project neat and clean.

WS2811 SPI Driver Using One Transistor and Passives


We love the WS28xx projects because even if we never plan to use them, the signal timing is like the most addictive puzzle game ever. For instance, check out this WS2811A driver which uses hardware SPI to generate the signals.

The WS28xx offerings place a microcontroller inside an RGB LED, allowing them to be individually addressed in very long chains or large matrices (still a chain but different layout). But the timing scheme used to address them doesn’t play well with traditionally available microcontroller peripherals. [Brett] had been intrigued by some of the attempts to bend hardware SPI to the will of the WS2811 — notably [Cunning_Fellow’s] work featured in this post. He took it a great step forward by simplifying the driver to just one transistor, three resistors, and a capacitor.

Click through the link above for his step-by-step description of how the circuit works (it’s not worth re-explaining here as he does a very concise job himself). The oscilloscope above shows the SPI signal on top and the resulting timing signal below. You will notice the edges aren’t very clean, which requires the first pixel to be very close to the driver or risk further degradation. But, since the WS28xx drivers feature a repeater which cleans up signals like this, it’s smooth sailing after the first pixel.


Rewriting WS2812 Driver Libraries for Optimization


We like [Tim’s] drive for improvement. He wrote a WS2812 driver library that works with AVR and ARM Cortex-M0 microcontrollers, but he wasn’t satisfied with how much of the controller’s resources the library used to simply output the required timing signal for these LED modules. When he set out to build version 2.0, he dug much deeper than just optimizing his own code.

We remember [Tim] from his project reverse engineering a candle flicker LED. This time, he’s done more reverse engineering by comparing the actual timing performance of the WS2812(B) module with its published specs. He learned that although several timing aspects require precision, others can be fudged a little bit. To figure out which ones, [Tim] used an ATtiny85 as a signal-generator and monitored performance results with a Saleae logic analyzer. Of course, to even talk about these advances you need to know something about the timing scheme, so [Tim] provides a quick run-through of the protocol as part of his write-up.

Click the top link to read his findings and how he used them to write the new library, which is stored in his GitHub repository.