Introduction: Largest Tide Clock in the World

Another clock like device for dramatizing the rolling anarchy of the sea. In Anchorage, where I live, we experience the second highest tides in the world. The greatest difference between the lowest and the highest measurement of water that courses by our house each day can be 35 feet! This is an incredible display...a whole ocean bay, miles across emptying out and then returning with a singular wave--a bore tide--that can be surfed on a regular basis. NOAA has a tidal station that regularly monitors this excursion. The heights are measured relative to a fixed datum point and the zero mark is an average over years of a group of low tides. Mathematical algorithms are used to find all the points in between because tides are nothing if not local. I have built multiple clocks which can pump out the tiny data bits but how best to dramatize the height of this transition except to build a clock that moves with the height of the tide! I chose a very big bobber to indicate the current tide height and its movement is controlled by a stepper motor connected to a timing belt which can be cut to any length--in this case 35 Feet! Depending on where you live you can customize your clock to whatever tide height you have. The occupants of the Bay of Fundy may want to build a larger one. The design is customizable to any machine seeking a large physical display of some sensor or quantity that wants to be expressed in feet rather than pixels.

Supplies

There are just a few components in this build. The main unit is a generic Nema 17 Stepper motor. The rest of the parts are as listed:

  1. TwoTrees Stepper Motor Nema 17 motor 42 BYGH 1.8 Degree $7
  2. Adafruit DS3231 Precision RTC Breakout $17 you can also use a generic for $2
  3. TTGO Esp32 display board $17
  4. Adafruit MPM3610 5V Buck convertor 21V in 5V out at 1.2 Amp $6
  5. Generic limit switch $1
  6. UniTak3D Upgrade X-axis Belt Tensioner 2020 Profile for Ender 3 $13
  7. 10M TimingBelt for 3D Printer, 2GT-6 Width 6mm TimingBelt with Steel Core $10
  8. Pololu DRV8825 High Current Stepper Motor Driver Carrier $23
  9. Power Supply 12V 3 Amps $6
  10. Variety of screws, inserts and power related things

Step 1: 3D Print Your Parts

All the parts in this build are 3D printed in PLA without support. Most are painted with generic spray paint. The bobber looks good in Cherry Red gloss and White gloss.

Step 2: Build It

The tide clock is composed of three pieces: 1. The bobber body 2. The stepper housing with bobber catcher and controls holding ESP32 microcontroller. 3. The top piece which has the timing belt tensioner. The stepper housing consists of 4 parts. The body which holds the stepper motor which is mounted on the standard 90 degree metal stepper motor front mount rack. This rack is held to the housing with two pre-placed holes to accommodate screw mountings. The rear door is held in place with 3 mm screws placed into the holes for heat placed inserts. The bobber catcher and the front boat prow shaped front are superglued to their positions on the body. The bobber consists of five parts. The upper and lower sections are have their respective male and female attachments superglued to their posts--make sure they will mate properly in terms of height when attaching them. The last part of the bobber mechanism is the curved attachment for the timing belt. The timing belt is attached to its inner lining with superglue. This is done at the last part of the setup once everything else is complete. This sheath is then attached to the inside of the bobber using a zip tie to hold it in place. Only one side of the timing belt is constrained in this manner and its best to utilize the joining area for the belt in this location. The timing belt is made into a loop in whatever dimensions you want...I bought 10 Meters of belt but larger amounts are available. The belt is easily joined into a loop with a cut section of around 5 cm apposed to mate with the ends of the loop--mating the inner teeth with superglue. Clamp this into position for a couple hours. The limit switch is glued into its location at the top of the body housing in its own designated box. Run its wires through the supplied holes. The ESP32 has a mounting slot where it sits--make sure that the holes to its buttons line up with the holes in the case and use a bead of hot glue to hold it in position. The button and access covers are superglued into position. The x axis belt tensioner is bolted into position in the top piece with 4 mm screws and nuts.

Step 3: Wire It

You will see the fritzing diagram above but after looking at it--its really useless. The RTC is connected to the ESP32 with standard I2C connections to GPIO pin 21 for SDA and pin 22 for SCL. It is also supplied with power from the 3V pin on the board and ground. The limit switch is connected to Pin 17 and ground. The wiring of the Pololu DRV8825 High Current Stepper Motor Driver is complicated and it is best if you follow the suggestions on the Pololu web site for the Driver on adding the capacitor and adjustment for the maximum current for this stepper motor. You have to be careful in this step or you can burn up both. I used GPIO pin 25 for the direction and GPIO pin 33 for stepping. The RST pin was connected to 3V on the board and the EN pin was connected to GPIO 32--very useful for turning on/off power to the stepper in between adjustments in bobber position to prevent overheating of the stepper. The B1B2A1A2 have to be configured for your stepper but is easily done. The ground is connected to the board ground and the 12V is connected to the power on the board. The Adafruit buck convertor is connected to the 12V power supply and its output to the 5V board connector. A power input plug for the wall wart power supply is routed through the hole in the main case.

Step 4: Program It

I used a couple custom libraries to make the whole process simpler. One is ESP_FlexyStepper a very nice library for using ESP32 for focused work with the Pololu DRV8825 stepper unit. It has a lot of flexibility and control for fine tuning the stepper movement which is needed if your using the height of the unit involved. Im also using the FastLED library to control the timing of events when it checks tide and checks the position of the bobber which is done every 15 minutes and every 720 minutes. This can of course be changed in the EVERY_N_MINUTES(720) software in the loop function. The software is again based on the nice microcontrollers software: http://lukemiller.org/index.php/2015/11/building-a-simple-tide-clock/. The library has to arranged for the particular area of tidal flow and included with the software package. In this case:"TidelibValdezPrinceWilliamSoundAlaska.h". For Anchorage and the second highest tide I would use another library. The function waterLevel prints the future high and low on the TFT screen. The other functions finish the reporting on the screen. The setup function starts the Real time clock and here is where you have to set the time if your RTC hasn't been set before. There is a battery backup which once its set will allow power to be disconnected without effecting the time. The stepper motor function is also initiated here. Since it is a stepper motor setup you will not know where the bobber is until you run the findEndPoint() function. This allows the stepper to pull down the bobber until it hits the limit switch in the home cage and then send it up 400 steps to its baseline position. All these functions when activating the stepper start the motor by bringing low the enable pin to add power to the Pololu motor unit and then swing the pin High to stop power and cool the stepper. The position of the bobber is held easily without power as the line is very light. stepper.setStepsPerMillimeter(5.5) is in the findEndPoint function and probably should be measured manually when your setting up your unit to make sure what your distance traveled per step is accurate--you don't want to jam your bobber. The loop function has nested commands to evaluate tide position and bobber position and it also has a mapping and constrain function to plan how far your excursion is on your stepper motor--these are explained in the comments in the software.

Step 5: Using It

Setting up the clock is pretty easy. If your like most places around the US the tidal expanse may not be that great--Hawaii only a couple feet. But whatever it is, the height is manifested in 1/2 the length of your 6 mm timing belt which is generically available for 3D printers in any length you want. You could also use this to output temperature, humidity and weather conditions---Im going to have mine download the wave height from our favorite surfing buoy (yes we do have good surfing here in Alaska!) it sometimes reaches quite extraordinary wave heights! To complete the installation measure twice the distance of the output you want and add a foot on either side just to make sure it doesn't hit an endpoint. Glue the timing belt together with superglue. Then glue this section into position in the holder within the bobber and zip tie it into position with the holes in the bobber liner. Mount the tensioner at the top of your wall with about 10 mm slack in the timing belt and loosen the tensioner so that you can tension it when mounted to the wall. After proper tensioning--not too tight--run the software. The position function directs it downwards to the limit switch. If it goes up instead reverse the belt (front to back...). The software gets the bobber position and then after 15 minutes will raise it to current relative tide location. It is soundless except for the mild corrections every so often.