An electronic device to remind us to sip water slowly all day rather than gulping a liter in one go

Overview

The doctors tell me it is a good idea to hydrate steadily rather than chugging.

The trouble is that I get deep into whatever I’m doing (such as building this project) and forget to sip for a long time.

In comes Sippy, a little device that reminds me to keep it steady and track progress through the day.

Every 10 minutes the red LED lights up, time to take a drink. Press the button to count a sip and reset the timer. LCD displays a progress bar, elapsed time since last sip, and the battery level.

  • Arduino compatible (Adafruit ProTrinket 3v) controller
  • Wooden enclosure to make it rugged, compact, and pretty
  • Character LCD display to show the results
  • Battery operated, with internal charger via USB

GitHub

Source code, schematic, and CAD files are available in the hc-sippy GitHub repository.

Final Device

We start at the end, with some pictures of the final product.

view of the final product in 3/4 profile
view of the final product top
view of the final product bottom

The top view shows the on/off switch and the USB charging port. The angle of the shot makes the alignment look awful, but the USB port and the hole in the wood line up well.

The bottom shows the FTDI programming port so I can upload new firmware and do serial debugging.

front view of the device

LCD display:

  • Upper left is a nearly full progress bar
  • Upper right shows 44 out of a target 48 sips have been recorded
  • Lower left indicates it has been 24 seconds since the last sip was recorded
  • Lower right is the battery indicator. This firmware version shows the raw ADC reading. Future versions will show it as a %, but I need to let the battery run all the way down to get a lower bound (which it conveniently records in EEPROM so the value will be there on next boot).

Prototype

And now we jump from the end, back to the beginning.

Like all good projects, this one started out with a solderless breadboard and a fermented soybean paste container.

view of the prototype enclosure
view of the prototype face plate
view of the prototype electronics

This prototype allowed me to test out a few different things:

  1. Battery Charging - This is my first project that contains an internal battery charger, and I wanted to test out charging and discharging.
  2. LCD - The LCD module is rated for 5v, but works at 3v3. I wanted to see that in operation for a little while before committing to a permanent design.
  3. Functionality - Sometimes what makes sense in my laboratory does not translate to real world operation. The prototype let me actually use the device and tweak the operation.

Enclosure Construction

Once the prototype is complete, it is time to map out the final structure. The goal was to keep it compact but sturdy.

Fusion 360 allows me to design the 3d space for the electronics, and also play with the layout of the visible components on the face plate.

The LCD presented some complexity because the shape has several depths due to wires and LED backlights that protrude. Calipers, F360 and some patience is all it took.

screen shot of 3d model in fusion 360

With the 3d model complete, I now know the dimensions of the wood stock required. The perfect piece of Cherry wood was right there on top of my pile.

  • Rough cut the two halves.
  • Drill and countersink screws in the 4 corners.
  • Belt sander to match the halves perfectly.
  • Hand sand to make it smooth like butter.
  • 2 coats sanding sealer.
  • 3 coats Polycrylic.
the raw blocks of wood destined to become sippy
the blocks of wood after screws and sanding
sanding sealer and polycrylic drying time

CNC Milling

For this project, I pushed my CAM limits further than before with the unique cuts on this project requiring many milling operations.

In the end, this one used:

  • 15 milling jobs
  • 4 endmills
  • 5 stock setups

It took lots of thought in the design, but then cutting was really straight forward.

The next two pictures show the bottom half of the enclosure as it progresses from rough milling with the 3/4 inch endmill to the 1/8 inch. Note how the corners get much tighter radius.

You can see some burn marks where my 3/4 inch endmill did a helix spiral ramp down at a much too slow speed, leaving the bit spinning over the same spot for way too long. The smell of burning Cherry was somewhat pleasant to the nose, but not to the psyche of the mill operator.

the bottom pocket carved with 3/4 inch endmill
the bottom pocket after carving with both 3/4 and 1/8 endmills

The top half of the enclosure had additional complexity due to the components that poke through and also the artwork. The exterior-facing holes were carved from the front using a 1/8 downcut endmill to leave a very nice clean hole in the woodgrain. Then the bulk of the material and interior features were carved from behind.

A seasoned machinist or wood worker might notice a small flaw on the bottom wall (not the floor, but rather the side) of the pocket. Also might notice additional clamps from left pic to middle pic. Yeah, that’s a consequence of me pushing the depth of cut and speed of milling further, without adding more secure clamping. DIVES FOR THE STOP BUTTON!!!!

Once the clamps were adequate, I was able to push that 3/4 rough bit deep and fast, which is a fantastic discovery for future projects, as the old depth/speed left this as the waaaaay longest part of carving.

the top half, carved face first
the top half, carved from behind, rough
the top half, carved from behind, fine

The final picture gives a good view of the various depths of carving required to properly fit the buttons and LCD display.

CNC Calibration

A DIY home built hobby CNC machine is a fantastic tool, but it requires intense patience and TLC.

First milling operation was the GND/RST text on the bottom side. Immediately obvious that the carve was off by a few mm in the Y axis.

Second milling operation was the On/Off text on the top side. Also off in the Y axis, but not by the same amount as the first carve.

Third milling operation was the USB port on the top side. This one was replete with issues.

  • With the wood standing tall on end, I should have made a fixture to secure it in rigid position.
  • With the upcut endmill, I should have clamped it straight down in addition to laterally.

Another diving for the STOP button, I caught the mill just in time before any real bad damage happened.

The picture on the left shows the result:

  1. Warped USB hole (left wall should be straight but instead is rounded from when the upcut bit threw the wood).
  2. Deep inside, along the top wall of the hole, you can actually see the side profile of the interior pocket. The hole was supposed to be 2.8 mm closer, which would have avoided the pocket entirely
  3. The USB micro housing from the ProTrinket, aligned too close to the wall of the hole, rather than perfectly centered like in the CAD design. Hand files and some elbow grease created enough room for the wire/connector to slide right in there.
usb port carved in misaligned location
scrap of wood with grid of holes for CNC calibration

Also, carving a calibration grid on some scrap helped me realign my X axis (which when skewed, manifests as errors in the Y direction) and locate some loose screws.

Pups

When your CNC tests your patience, go for a walk. These guys will never object to another chance to chase some squirrels up a tree.

cutest pup in the world
pair of cutest pups in the world
cutest pup in the world

Painting and Mask Fail

peeled sealer on Gnd/Rst text
back of oramask showing failed stain and sealer

My standard approach for painting detailed graphics and text is:

  1. Stain the wood with conditioner and stain
  2. Seal the wood with sanding sealer and polycrylic
  3. Apply oramask stencil
  4. Carve through mask
  5. Seal carved area with sanding sealer
  6. Paint the carve
  7. Peel the mask
  8. Seal over the whole surface (both painted and non-painted areas) with Polycrylic
watching paint dry on the front of the enclosure
watching paint dry on the top of the enclosure
paint on front of enclosure after peeling the mask

When I laid down the mask on the Gnd/Rst text area, I missed the desired location by a smidge.

Gently peel, only to discover it is ripping up the sealers all the way down to the wood. Fail!

No matter, this text is really only for me when I’m wearing my programmer hat, so I’ll just leave it colored raw wood. Leave the mask in place for other carving locations, and if it peels the seal then we deal with it later.

It did peel the seal. Over the On/Off text. Over the Hedge Court logo graphic text.

BUT…the painted text remained crisp, so just seal over it a bunch of times with more.

The end result is beautiful, effectively conveys text, and is sealed for protection.

Not sure what went wrong. This technique has never failed me. Some theories:

  1. Untested on this specific wood. Maybe this Cherry doesn’t like me.
  2. Supplies getting old/expired. Maybe I need to discard the 5 year old Polycrylic or Sanding Sealer.
  3. Did not wait enough time between stain coats. Maybe I need to read the instructions and pay attention to the difference between 15 minutes (what I waited) and 4-6 hours (what is instructed) between coats.

Assembly

Prior to painting, I test fit the electronic components of the user interface. Very happy moment for a robot builder when the pieces slide into place like a glass slipper. It is truly gratifying going from conceptual 3d design in software to an actual piece of real thingie you can hold in your hand.

assembling buttons and LCD display, unpopulated
assembling buttons and LCD display, populated

The multi-depth pockets and holes for the LCD display and buttons worked out perfectly.

assembling buttons and LCD display, unpopulated
assembling buttons and LCD display, populated

One feature of Sippy is the USB Charging Port. To recharge the LiPo battery, the user must connect a USB-B micro cable to the ProTrinket’s receiver housing.

This may exert force on the components inside the enclosure, both during insertion and extraction. I wanted this thing to be secure.

The ProTrinket has 3 mounting holes for 2M screws. My hands are the size of frozen turkeys, making this 2 mm work a real treat. Go slow, take many deep breaths, be patient and get everything aligned.

A drop of clear nail polish on each 2M nut to lock everything tight against vibration out in the real world.

attaching ProTrinket to the enclosure, outside view
attaching ProTrinket to the enclosure, inside view

Electronics

Schematic designed in Eagle, .sch file available in GitHub repository.

sippy schematic circuit design

Battery Charger

Battery charging and switching between USB power and internal power is performed by AdaFruit LiOn Backpack.

  • The prototype has the fast charging pad open, charging with 100 mA of current. Using a 1200 mAh battery leads to 12 hour charging time. Booooo!!!!
  • The production model has the fast charging pad closed, using 500 mA of current and < 3 hours charging. Yaaaaay!!!!

The production model also has the power switch jumper sliced carefully with a utility knife and rigged to a switch protruding from the enclosure.

AdaFruit LiOn Backpack, back side
AdaFruit LiOn Backpack, front side

Battery Monitor

LiPo single cell batteries range from 4.2v at full charge to 3.7v at full dead. Monitoring this from a 3v3 device requires a voltage divider, conveniently made from two resistors and a capacitor. ProTrinket ADC measures the voltage between the resistors, displaying the value on the LCD and also storing min/max values into EEPROM. This lets me validate my calculations of expected min/max readings, which were spot on, thank you very much!

Inside the enclosure, I heat shrank everything like crazy to keep it secure and free from short circuits.

voltage divider, before heat shrink
voltage divider, after heat shrink

Soldering Progress

As you move from a pile of parts in a tray to a final device, you move from lots of freedom and maneuvering space to tight quarters and short wires. Go slow, play soothing music, verify every connection 7 times. I hate diagnosing short circuits after the fact, so I pay very close attention up front.

soldering progress, overview of two halves
soldering progress, controller close up

Once soldering is complete and the unit is tested, time to carefully pack all the wires into the enclosure and screw it shut tight.

There is a “point of no return” feel to applying the Cyanoacrylate glue and pressing the components into permanent place. Simultaneously scary and exciting.

final electronics, before packing
final electronics, after packing

Conclusion

You made it! Congrats, a nice wall of text and 41 pictures (with 2 repeats!) complete this story.

Sippy is a smashing success, already serving to shape hydration habits.

Future changes include:

  • Change battery monitor from raw ADC reading to percentage
  • Implement a dual tracker so it can work for both liquid hydration and protein intake.
view of the final product in 3/4 profile