Introduction: Sea Urchin Hat Tide Clock

Another tide clock but this one has the unique ability to size up the tide level and present it on the the cusp of a sea urchin wearing a hat. That has to be unique so far. Sea Urchins have some sort of brainless quality that makes them, with very little encouragement, wear funny hats. In this case (above) 3D printed plastic hats are brought down to their watery home and deposited on their heads and the little buggers just position them carefully on the tops of their bodies. So what better way to exposition "Data is Beautiful" than to allow their hat position relative to a background of Noob LED spray to designate how far between low and high tide you are. The tide information is obtained via an ESP32 calling on a commercial API for tidal information...the charge for which is quite nominal. The information is stacked and presented on a TTGO screen microcontroller which also controls a small servo connected to a 3D printed echinoderm of your choice. A sand dollar was tried as well as a sea urchin skeleton with magnetically attached Fascinators--the word for those fancy weird hats that British rich woman wear to coronations and horse races. The construction is quite simple and cheap relying on an external housing of pure bamboo and the use of the internal baffles to hold the clock mechanism in place.

Supplies

The external housing is made out of a length of bamboo pole that is quite--thick about 5 inches in diameter, but honestly this measurement is adaptable to a different design. If you don't have access to natural bamboo you could also 3D print a round housing or use some big box combination of PVC.

  1. Bamboo pole section 5 inches by 6 inches deep with one of the baffle segments about 1/2 way up the tube.
  2. TTGO Esp32 display module --$18
  3. AGFRC 2PCS Micro 9g Servo Servo Motor Kit - Digital 11g Metal Gear Mini Servo for RC Helicopter Airplane Boat Controls, Control Angle 180° $10 The cheaper versions make too much noise...
  4. Noods flexible LED strands X 2 $8 Adafruit ...various colors...
  5. 5 x 2 mm minimagnets

Step 1: 3D Print Parts

All of the parts are printed on stock settings in PLA without support.

Step 2: Build It

The unit is built of a 3D printed housing that holds the servo mounted to the back of the internal baffle in the bamboo. The first step is to obtain a suitable sized bamboo section with the baffle about 1/2 way in the internal structure and about 5 inches long. Drill a10 mm hole in the center of the baffle and mount the servo holder with the 3D printed mounting holes with 4 mm bolts. In some cases the servo mount is not square with mounting hole and must be shimmed in some fashion to make sure the mount for the 3D printed echinoderm spins squarely. The 3D printed holders for the two Noods of opposite colors are glued into position after the Noods are placed in the threaded lines--these usually do not require any glue to hold them in position. These Noods must be connected to the output of the microcontroller so appropriate access holes are drilled to allow connections to the back of these plates. The attachment mounts for connecting your chosen echinoderm are glued into the shell and the echinoderm is attached to the servo output. Mounting holes for the 5 x 2 mini magnets are spaced around the rim of the bamboo housing to accommodate the spacing of the hats. These holes are 2 mm deep and 5mm wide and one magnet is glued into each hole. Opposite pole magnets are glued into each of the hats. The sea urchin "head" receives another magnet for attaching the hats.

Step 3: Wire It

The wiring is straight forward...sorry about the usual unhelpful fritzing diagram which I always provide. Five volts is provided by a wall-wart transformer to a plug in the side of the unit in the back section. Power from this is directly sent to the Servo and the microcontroller with grounding. The servo pin is connected to GPIO pin 17 on the microcontroller. The two led Noods are attached to pins 32 and 33. These provide the 3 volt power to each strand depending on high or low tide.

Step 4: Program It

The basic outline of the program involves downloading tidal information from https://www.worldtides.info web site and parsing it out using Arduino JSON. The first part of the program requires that you input your Wifi credentials in an add on file called "notes.h". It contains only two variables: myWifi and myPassword for getting your ESP to log on to the web.

Brian Lough has a YouTube video out https://www.youtube.com/watch?v=NYP_CxdYzLo about using Arduino JSON to obtain information from various API's using ESP32. The information in his video was invaluable in writing the code for this Instructable and Arduino JSON is a remarkable and very easy to use program for me. MakeHTTPRequest() makes the request for tidal hi and low limits for the the next day or so and places the information into epochHiLow (epochTime for next hi or low corrected for location) and hiLow ( bool with 1 for high and 0 for low) that corresponds to the epochTime. Find the line: client.print("/api/v3?today&extremes&lat=20.783&lon=-156.467&localtime&datum=CD&key=PlaceApikeyhere") and replace lat and lon with your current location and add the API key you obtained to get tidal calls for your current location.

The rest of the program carefully parses the information from the API feed and determines relative to a call for the current time where the rotation of the servo controlling the Echinoderm should move. It also determines which output for the color strands for high and low tide. See the programming section from:https://www.instructables.com/Gecko-Tide-Clock/

Step 5: Using It

The only adjustments you have to make are the location of the endpoints for the servo mechanism. By adjusting the printable nut in the 3D files you can adjust how the sea urchin is tightened onto the servo stem. Once the correct Wifi credentials are typed in the ESP32 should boot up and print "connected" to indicate it has gotten onto your Wifi system and following this it will print out a list of the impending high/low tides over the next couple days. It will slowly go down the list making the high and low tide measurements and printing out the % to next high and low tide and moving the servo to those limits. The Hats for the urchin can be changed at your whim.