Bore Tide Clock

by rabbitcreek in Circuits > Microcontrollers

366 Views, 6 Favorites, 0 Comments

Bore Tide Clock

IMG_8328 2.jpeg
maxresdefault.jpg
BoreTideMovie

We live in unique environment here in Alaska. The inlet has the second highest tide in the world and the best Bagels. The Bagels come from Birch and Alder a small drive-thru restaurant that is located right along the sea. The chef/owner has worked all over the world and now chooses to make Bagels adjacent to where a couple times a day a Bore Tide wave forms that you can surf for miles along the inlet. The wave can be up to ten feet in height and its prediction is an art. The best algorithm is a guy in a weird van that you can see in the parking lots and pullouts all the way down the arm. He knows. He has surfed the waves for years and if you want to catch the wave you follow his lead. The sea has its own form of treachery and the mud flats at low tide have sucked in and killed a few people. The prediction of the height of the wave is based on the difference in height of the incoming tide and how low the previous low tide is. This will get you into the relative ballpark of how to anticipate a wave good enough to make the trip in your wetsuit down to one of the pullouts that occur at near hourly intervals from the low tide time in Anchorage. Since I have made a series of tide clocks, I made one dedicated to giving you the thumbs up/down for the next Bore Tide. And the bagel....well his are pretty magic and you need a little in your algorithm.

Supplies

IMG_8309.jpeg
IMG_8312.jpeg

Not much equipment for this build. I can all be built for about $35.

  1. Servo Digital High Torque Waterproof DS318MG $13
  2. Xiao ESP32 S3 $7
  3. RTC 3231 $3
  4. 5 volt Tx $3
  5. 6mm shaft
  6. 6mm servo connector $3
  7. Side Light LED $5
  8. Mounting board...Hardwood.. $10
  9. Bearing 3mm x 10mm x 6 mm

Print It

BoreTide v3.png
BoreTide v3.jpg

Obviously the star of the show is the wonderful Bagel and Hand that are 3D printed. These were done on a Bambu Labs P1P and done without support in PLA. The bagel didn't actually take that much work to make lifelike. I used a brown textured spray in artful coats in a couple different brown colors and then applied real sesame seeds and finally coated it over with clear epoxy. The hand was done in two colors and the "Bore Tide" was added in the slicer software for Bambu Labs...very handy. It was also coated in epoxy. The body that holds the servo and its screw in cover are in PLA without supports.

Wire It

IMG_8310.jpeg
IMG_8311.jpeg
IMG_8315.jpeg
IMG_8313.jpeg

I didn't do a detailed wiring diagram but the wiring is very simple. The RTC3231 module is modified to remove the charging resistor that prevents you from adding battery backup (see internet). Its connections are through I2C to D4 and D5 on the XIAO and the power and ground are taken from its 3V and Gnd on the microcontroller. The light strand is connected to the 5Volt feed from the transformer and its data pin is D8. The Servo is also connected to the the 5V feed and GND and its data pin is D7. The power to the microcontroller comes from the 5 volt line to USB in. Make sure you feed it at least 3 AMPS as the servo and microcontroller and lights use quite a bit of power.

Build It

IMG_8316 (1).jpeg
IMG_8297.jpeg
IMG_8308.jpeg
IMG_8298.jpeg
IMG_8295.jpeg
IMG_8319 2.jpeg
IMG_8307.jpeg

The build is pretty simple. Cut a square hole in the back of the mounting plate that fits the servo back. I used quite a thick piece of hardwood. A hole is also drilled for the access for the power out the back. The front is painted to look like a smear of cream cheese over the front surface. The front is sprayed with a high gloss clear finish and is sanded in between coats. The control box is assembled by embedding the press fit bearing into the hole in the cover plate. The hand has a 6mm shaft hole that is designed in the bambu slicing software to fit the bottom. The shaft is glued into position with superglue. A shaft joiner is used to allow you to remove the hand after assembly. The servo is bolted into position after the cover and its shaft are aligned with the bearing to allow free movement. There are two screw holes in the housing to allow screws to hold it to the back board. The side-light neopixels are led out through the hole in the side of the housing and the 3D printed ring is superglued at the correct height to accommodate the string. Some hot glue is used to hold the string in the holder. I used 33 lights for the circle. The bagel is velcro attached to the front of the main housing to allow dissembling. The shaft for the hand is cut to appropriate length and joined. To make it water resistant silicon grease is used in the front closure.

Program It

IMG_8317 (1).jpeg
IMG_8325 2.jpeg
IMG_8318 (1).jpeg

The programming for this unit had to get around some limitations of the ESP32 which in the newest iteration stopped the servo controls from working. I used the pwmWrite library instead. The led pin was designated as D8 and the servo pin D7. The other Libraries are dependent on tide location and I used Luke Millers R files to set up the tides for Anchorage. You can find a more detailed description in some of my other Instructable tide clock examples. Essentially, he has enabled the tide calculations based on about 30 parameters that are manageable on a microcontroller. It doesn't have to be connected to the internet to get reasonable calculations for the next 10 years. In this case I am using:TidelibAnchorageKnikArmCookInletAlaska.h. Multiple pallets were set up for the subtle color changes that take place in FASTLED. The software asks the RTC for the current time which has to be set up in the first uploading and cannot be in Daylight Savings Time. This will generate a current height for the tide for Anchorage. The tidal height is queried in 5 min increments until it finds the next high/low. To find the Bore tide you must know the tide height for the next low and the following high. So if your unit is turned on during a rising tide it ignores it until it finds the next low and its subsequent high and subtracts the two water levels to give the amount of tidal flow. This flow is then characterized as being a good or great bore tide >30 or poor to bad <25. This is done in a mapping statement that corresponds to the servo position: thumbs up and thumbs down. The lights are giving a duration effect to the next bore tide so you can get your wetsuit on. Usually up to twelve hours in between bore tides and the Neopixels correspond diminishing the Blue pixels to red over that period. The green group of pixels rotate around the rim every minute. The last function changes the time for day light savings.

Downloads

Using It

IMG_8324 2.jpeg
IMG_8293.jpeg

Like all RTC controlled projects the original time must be set in software before startup. In this case set the time for regular...not Daylight Savings time. The clock looks up the next high/ low and sets the arm according to the algorithm that has been used for predictions of the bore tide that most people use here in Alaska. The countdown Neopixels check the difference between the next low tide and the current time and update the light cycle every five minutes. The pallets that are used in the FastLED color shifts can be changed to suit your mood. Get your wetsuit (at least 5mil) and your bagel on the way.