This is a project being done with the Alaska SeaLife Center. They were interested in a sea-related project that would involve their students in electronic construction and monitoring of the ocean environment. The design is relatively cheap to build for a large number of students -- about $8.00. The software used is a modified version used in the large solar based tide clock but reduced in size and uses coin-cell batteries instead of solar power. I imagine with daily queries of the clock the batteries should last a couple years--and they are easily replaced. The form factors were fun to come up with and introduced me to 3D printing. Also the circuit board design was a first and enables very fast construction of these units--I can build one from components to pushing the button in about 15 minutes. The housings take a little longer to come out of the printer about 1.5 hours. They require no support structures. They are fun little clocks and worked very well attached to our sea kayaks on our last outing. You can also stick them to your refrigerator. A tide clock that looks like the moon with a rocket coming out is cool anywhere.
Step 1: Gather Your Materials
To keep costs down all selections were based on easy mass buys from suppliers in China. Very few defective parts have been found. (So far only one bad RTC...) In fact with the vagaries and constant changes in sales patterns DHL now gets me parts cheaper and faster from China than Amazon...
1. Nano Mini USB With the bootloader compatible for arduino Nano 3.0 controller CH340 USB driver 16Mhz Nano v3.0 ATMEGA328P $2.00
2.1pcs 4pin 0.96" White/Blue/Yellow blue 0.96 inch OLED 128X64 OLED Display Module For Arduino 0.96" IIC I2C Communicate $2.26
3.1PCS DS3231 AT24C32 IIC Precision RTC Real Time Clock Memory Module For Arduino new original Replace DS1307 $0.70
4. 2*CR2032 Round Coin Button Cell Battery Storage Box Mini Button Battery Holder Case Box Adapter With Wire ON/OFF Switch Leads $0.70
5. Generic pushbutton--$0.02
6. 2032 batteries (3 required). $0.50
7. Plastic Housing 3 D printed--nothing.
8. PCB board -- $1.00 My boards were from PCBWay.com -- seemingly wonderful company to deal with.
All materials for less than $8.00 a student.
Step 2: Wire It
Designing the PCB board for this project was a definite learning experience on Eagle but made me appreciate the effort so many people go through to achieve a seamless build. The board had to have a minimal form factor and the parts had to fit without conflicting. I thought with such a simple schematic I would get it on the first try. Two shipments later I succeeded. The price of boards with PCBway is incredibly cheap -- Ten boards for $10.
The steps involved in populating the board are easy. The Nano comes with headers you have to solder on. It is then inserted and soldered onto the board. The Screen and RTClock are next; they come preheadered so all you have to do is solder them to the board. The battery holder is then filled with batteries and the wires are checked for polarity before soldering them to the appropriate holes on the board. I hot glued the battery holder to the board back. If you just want a bare bones tide clock with no housing you're done except for soldering a button to the board.
Step 3: Building the Moon
This is my first run with 3D printing. Totally worth learning. I bought a Creality10 and it was broken right out of the box but took only a day to find the print head was totally jammed with crap. Has worked like a charm since. I have used all free software for the rest. I borrowed the moon from Thingiverse and modified it in Meshmixer. The other conventional housing and parts were all done with Fusion 360 and with great help from web tutorials.
Everything was designed to be printed fast and without support so you could do a bunch of them and not take ten years. The conventional design (the clock that looks like a tiny arcade game) needs to have the screen connected by wires to the PCB board rather than being soldered directly. The screen is hot glued into position. The hole for the button is drilled through and the button--attached to its position on PCB board by wires-- is epoxied into place. The moon design is completed by drilling a small hole for the button near the roof of the moon and attaching the button with epoxy. The button wiring is then completed with wires to PCB board. The cartoon rocket is then attached with hot glue to the button top. The circuit boards are then stuffed in and the bottom sealed with hot glue so you can open them later to replace batteries or repurpose the software to Roomba your desk.
Step 4: Programming It
Like on the previous Tide Clock the software is based on Luke Millers very nice work: http://lukemiller.org/index.php/2015/11/building-a-simple-tide-clock/ In this case the software has been modified to give three different screens as long as the button is held down. The first giving the next HIGH/LOW with location information and date/time. The second giving current height of tide and end height. And the third giving a bar graph of how close the next tide is. Each of these files has to be modified for the location of your tide clock. (It won't travel well....) He includes the rhythmic utterances of the NOAA web site for various locations and a method of using R to generate any others that you want. As with any hardware containing a RTC be aware that you must set the clock in the first usage of the instrument by uncommenting this line: //RTC.adjust(DateTime(F(__DATE__), F(__TIME__))); on the initial run and than commenting it out again so that the battery powered RTC will keep its own timing from then on. The battery should run the RTC for a couple years and the other batteries hopefully will run the clock for a while--I estimated 2 uses/day for a couple years.
Step 5: Using It
Definitely not waterproof. And starfish don't want to eat them.