Home

Awesome

BabyPod

This repository is for the hardware and initial setup. For the CircuitPython code that runs on the hardware, see the babypod-software repository. This documentation assumes you're using the latest commit of main from the software repository.

What is it?

BabyPod

BabyPod is a remote control for Baby Buddy. It's named that because it connects to Baby Buddy and has a click wheel like an old iPod.

Why use BabyPod instead of just your phone or something else, or even Baby Buddy in general?

Hardware

To build a BabyPod, you 3D print some parts, stuff it with some electronics with easy soldering, and load the software.

Parts, tools, and supplies needed

Here's what you need to build a BabyPod. Prices are USD at the time of authoring and you can possibly find parts cheaper elsewhere, but this is to give you a nominal idea of how much the project costs.

Note that you can get most of these parts from the manufacturer directly like Adafruit and Sparkfun, and also resellers like Digikey, Mouser, and if you're lucky, Micro Center locally. The prices on Amazon are usually inflated.

Deviate from the parts list at your own risk, but do not get a different battery! Adafruit batteries have polarities that match their own boards, and using a battery off Amazon or elsewhere may not match and destroy your board or even start a fire!

PartQuantityPrice
Adafruit ESP32-S3 Feather with 4MB Flash 2MB PSRAM1$17.50
Sparkfun 20x4 SerLCD1$26.95
Adafruit ANO Rotary Navigation Encoder to I2C Stemma QT Adapter1$4.95
ANO Directional Navigation and Scroll Wheel Rotary Encoder1$8.95
Lithium Ion Polymer Battery - 3.7v 2500mAh1$14.95
STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long2$0.95
STEMMA QT / Qwiic JST SH 4-pin Cable - 50mm Long1$0.95
Small Enclosed Piezo w/Wires1$0.95
Adafruit SPI Flash SD Card - XTSD 512 MB1$9.50
Adafruit PCF8523 Real Time Clock Breakout Board - STEMMA QT / Qwiic1$4.95
Short Feather Male Headers - 12-pin and 16-pin Male Header Set1$0.50
Short Headers Kit for Feather - 12-pin + 16-pin Female Headers1$1.50
FeatherWing Proto - Prototyping Add-on For All Feather Boards1$4.95

Note the headers are the short headers that Adafruit sells, not the full height ones that come with most boards. Do not use full height headers or the boards won't fit in the enclosure!

You will also need the following supplies. The manufacturer doesn't matter but some examples are linked below:

And lastly, tools:

Printing the enclosure

You can print the enclosure in either one or two colors. Whichever you choose:

If you're editing BabyPod.scad, your system needs the font "SignPainter" installed.

One color

Print Case.stl upside-down and Baseplate.stl as-is.

Two colors

Printing in two colors requires a printer that supports multiple filaments or clever use of GCODE.

Print Case.stl and Faceplate inlays.stl as a multipart object upside-down (top of the faceplate and inlays facing the bed) and Bottom case.stl as-is.

Layout

Here is where everything fits in the enclosure. The perimeter of each part has holes for self-tapping countersunk M2x4 screws and line up once you press the two parts together. If they don't line up, something between the two parts is in the way, like a wire.

Case.stl

Case

Baseplate.stl

Baseplate

Assembly

CircuitPython setup

Install CircuitPython 9.1.4 onto the Feather, even though it was probably preinstalled. You want to get the right version and erase any unnecessary files.

  1. Download CircuitPython 9.1.4 for your specific board. Get the .bin version, not .uf2.
  2. Connect the Feather to your computer via USB C.
  3. Press and hold the Boot button, briefly press Reset, and then release the Boot button. This puts the board in a bootloader mode.
  4. In Google Chrome, go to Adafruit's ESPTool.
  5. Click "Connect" and select the Feather. The device's name will vary, but ultimately you should see a successful connection message.
  6. Click Erase and wait about 15 seconds until you get a success message.
  7. Click the first "Choose a file..." button and select the .bin CircuitPython image you downloaded, then click "Program."
  8. When prompted to do so, press the Reset button on the Feather. A few moments later, a drive named CIRCUITPY should mount itself on your computer. Keep the Feather plugged in.

Load the BabyPod software

  1. Download the latest release of the BabyPod software.
  2. Extract the release zip or tarball.
  3. Copy everything from the extracted release release to the CIRCUITPY drive, overwriting anything already on the drive.

Even though there isn't much to copy, it might take a few minutes.

Create settings.toml

  1. Rename settings.toml.example on the CIRCUITPY drive to settings.toml. Make sure your OS doesn't sneak a .txt extension onto it.
  2. Open settings.toml in a text editor and modify it as comments in the file show, then save it.
  3. Wait a few seconds, then unplug the Feather from your computer.

Soldering

Overview

Here is a logical diagram of how everything connects. The FeatherWing isn't pictured and this isn't physically how everything is laid out in the enclosure; this just shows what pins go where. Don't start soldering yet!

Fritzing diagram

Before you start

Before soldering, orient yourself to where everything mounts to the 3D printed parts. You want to use just enough wire to reach each connection point, but not too much excess or you won't be able to fit everything inside the enclosure.

It may help to keep Adafruit's pinout documentation of the Feather open while you're soldering. Pay very close attention to soldering wires to the FeatherWing proto. Always be aware of which side has the shorter or longer header, and if you're looking at it upside down or right-side up. Triple check which pin you're soldering to before you actually do it!

There are a few important points to keep in mind when using the FeatherWing Proto:

Many of the boards ship with headers included. Don't solder those!

Solder rotary encoder

Solder the rotary encoder dial to its breakout board. It only fits one way. Be careful not to skip any connections.

Solder headers

  1. Solder the short female headers to the top of the Feather (i.e., the side with all the components on it).
  2. Solder the short male headers to the bottom of the FeatherWing Proto.. The printed text on the FeatherWing must be on top and the long pins of the headers and their plastic retainer on the bottom.

Solder connections to the FeatherWing Proto

Solder the following connections from the respective devices to the FeatherWing Proto:

DevicePin/WireTo
PiezoBlack wireGND
PiezoRed wireA3
Flash SD cardVIN3V
Flash SD cardGNDGND
Flash SD cardSCKSCK
Flash SD cardMISOMI
Flash SD cardMOSIMO
Flash SD cardCS10
Rotary encoder boardINT11

The piezo wires are very thin, so be careful. Less solder is best.

You will not solder any wires to the LCD nor to the RTC, and only one wire gets soldered to the rotary encoder.

Mount components

When screwing in components, use just enough force to keep things in place. Don't over-tighten the screws or you'll strip the non-existent threads in the 3D printed parts and need to print them again.

The plugs on STEMMA QT cables only fit one way. Don't use a lot of force or you can easily bend one of the thin pins in their ports.

  1. Connect the LCD to the rotary encoder using one of the 100mm STEMMA QT cables. It doesn't matter which port on the rotary encoder you use. On the other STEMMA QT port on the rotary encoder, plug in another 100mm STEMMA QT cable. It'll later connect to other components, but not yet.
  2. Screw the rotary encoder into place with four M2.5x4 screws. The set of pins on it, including where you soldered the INT wire, should face towards the cutout for the LCD and the star with the Adafruit logo by the outer edge of the case with the STEMMA QT connectors pointing to the top and bottom of the case.
  3. Use four M2.5x6 screws to screw the LCD into place into the case. The "QWIIC" connector (what Adafruit calls "STEMMA QT") should point towards the rotary encoder and the LCD screen faces out towards the cutout for it.
  4. Set aside the case for now.
  5. Press the piezo into place in its circle on the baseplate with the hole facing down and the wire protruding through the cutout in the circle. You can keep the white bit of tape on.
  6. Screw the Flash SD board into place above the piezo with two M2.5x4 screws with the components facing up.
  7. Put the CR1220 battery into the RTC; note the polarity. Screw the RTC into place with four M3x4 screws with the battery facing up. The direction doesn't matter.
  8. Screw the Feather into place with the USB C port facing towards the cutout in the case and the female headers facing up. Use two M2.5x4 screws for the larger holes and two M2x4 screws for the smaller ones.
  9. Plug the 50mm STEMMA QT cable into the Feather's port and into the nearest port on the RTC, then connect the STEMMA QT cable from the assembled case with the rotary encoder into the other port on the RTC.
  10. Press the battery into its retainer with the cable by the bottom-left, assuming the Feather's USB C port is facing you. Don't plug in the battery's cable into the Feather yet.
  11. Press the FeatherWing Proto into the Feather's female headers. Be careful the pins are aligned and you're not off-by-one.

Testing before final assembly

At this point, you should have all the connections made, except the battery. You can test the BabyPod by plugging in the USB C cable and seeing if it starts up. If you get to the main menu, all your connections are good. You should also hear the piezo beep when it starts up.

Once assembled, it should look similar to this:

Assembled but open BabyPod

In this picture, the battery is connected, but you do that later.

Final assembly

If the test passed, continue on:

  1. Unplug the USB C cable from the Feather.
  2. Plug the battery into the Feather. It will boot up the BabyPod, so be careful as the Feather and other components are now live.
  3. Carefully press together the two 3D printed parts, being sure to align the USB C hole to the Feather.
  4. Screw them together with the countersunk self-tapping M2 screws. Be especially careful not to over-tighten!
  5. Shove the little bit of transparent 1.75mm filament into the hole next to the USB C connector until it is flush with the outside of the case. It acts as a light pipe for the Feather's charge LED.

Basic usage

Controls

ButtonEffect
<kbd>⊙ Center</kbd><ul><li>Power on (brief press when BabyPod is off)</li><li>Power off (press and hold 3 seconds)</lil><li>Accept current selection</li><li>Toggle checkbox on/off</li><li>Dismiss message</li></ul>
<kbd>↻ Rotation</kbd><ul><li>Move selection up/down</li><li>Increase/decrease number</li></ul>
<kbd>◀ Left</kbd><ul><li>Go back/cancel</li><li>Abort current timer</li><li>Change settings (home screen only)</li></ul>
<kbd>▶ Right</kbd><ul><li>Accept selection/save</li><li>Dismiss message</li></ul>
<kbd>▲ Up</kbd><ul><li>Move selection up</li><li>Increase number</li></ul>
<kbd>▼ Down</kbd><ul><li>Move selection down</li><li>Decrease number</li><li>Force reset (press and hold)</li></ul>

Holding <kbd>⊙ Center</kbd> to turn off the BabyPod and holding <kbd>▼ Down</kbd> to reset it only work when the BabyPod is waiting for input from you, like showing a menu or running a timer. If the BabyPod is busy doing something, like loading data from or sending data to Baby Buddy, wait for the operation to complete.

The orange LED by the USB C port is illuminated when the battery is charging. If it is not illuminated, the battery is fully charged or the USB C cable isn't inserted fully, is faulty, or is connected to a bad power supply.

The soft power control options with pressing or holding <kbd>⊙ Center</kbd> are only enabled if USE_SOFT_POWER_CONTROL is enabled in settings.toml. Additionally, enabling this option will make the BabyPod shut off automatically after five minutes of inactivity except during timers.

Messages

The percentage at top-right is the battery level.

The last feeding on the main menu, if shown, denotes the last feeding method:

LabelMeaning
RRight breast
LLeft breast
RLBoth breasts
BBottle

Various messages are shown at startup and during typical usage:

MessageMeaning
Starting up...Initial code is booting up.
Connecting...Establishing Wi-Fi connection (DHCP, etc.). This doesn't necessarily mean connected to Baby Buddy yet, just the Wi-Fi network.
Going offlineWi-Fi connection failed so offline mode was forced.
Low battery!Battery is less than 15% charged.
Getting feeding...Getting most recent feeding from Baby Buddy to show on the main menu
Setting clock...Syncing the RTC; happens if clock was never set or about once daily
Getting children...Getting child list from Baby Buddy. The first one is used. This only appears once unless you clear NVRAM.
Saving...Sending data to Baby Buddy or SD card, depending on whether you're online or offline.
Canceling...Deleting the currently active timer
Checking status...Checking for a currently running timer, or starting a new one if it doesn't exist
Checking timers...Seeing if there's a known timer running so the main menu can be skipped and that timer resumed
Checking messages...Checking notes if there's a message of the day

Sounds

The piezo makes some chimes and beeps to keep you informed. Remember you can turn off the piezo in the settings.

SoundReason
StartupThe BabyPod is starting up
Low batteryBattery is less than 15% charged
SuccessSaving data was successful, either to Baby Buddy (if online) or to the SD card (if offline)
ErrorSomething went wrong, most likely a failed request to Baby Buddy
Idle warningThe BabyPod is on, but no timer is running and it's been left idle, so you're being reminded to turn off the BabyPod if not in use.
ChimeHappens every minute during tummy time, or 15 minutes into feeding and then every minute after 30 minutes have elapsed during feeding. The tummy time chime is to keep track of your baby's progress without watching the screen. The feeding timer is to remind you it's still running and about the time to switch breasts.
InfoThe BabyPod is going offline because the Wi-Fi connection failed. You will need to manually go online later; it won't try on its own.
ShutdownYou held <kbd>⊙ Center</kbd> for three seconds so the BabyPod is shutting down.
Message of the DayThere's a message of the day available

User settings

The user of the BabyPod can configure some of its settings directly through its interface (i.e., not just through settings.toml). To access settings, from the home screen, press <kbd>◀ Left</kbd>.

Some options aren't shown if hardware support isn't available or something is configured in settings.toml.

SettingDefaultEffectNotes
Play soundsOnEnables (on) or disables (off) sounds played through the piezo
Off after timersOffShut down (on) or keep powered on (off) the BabyPod after a timer is savedOnly shown on devices with soft power control enabled
OfflineOffEnters (on) or leaves (off) offline mode; see that section belowOnly shown on devices with offline support (hardware RTC and SD card)

Settings are persisted to NVRAM so they remain in effect across power cycles and battery discharges.

Offline usage

You should go offline when:

To go offline:

  1. On the main menu, press <kbd>◀ Left</kbd> to enter settings.
  2. Scroll down to Offline and press <kbd>⊙ Center</kbd> to check it.
  3. Press <kbd>▶ Right</kbd> to save.

The main menu will now show ◀☐ at the bottom-right indicating that you're offline.

To go back online, repeat the same steps as above but uncheck the Offline checkbox. The BabyPod will show a progress bar as it reconnects to Baby Buddy and replays everything that happened while you were offline. Once complete, the main menu will now show ◀✓ to show that you're online.

Don't go offline unless you need to. By staying online, you sync data regularly to Baby Buddy.

When you are online, you can turn off the BabyPod while a timer is running, then turn it back on and the timer resumes as if nothing happened. This is because timers run in Baby Buddy itself. When you are offline, timers run directly on the BabyPod, so turning off the BabyPod will cancel the timer.

If you don't see the offline option, your BabyPod is missing either the RTC or the SD card reader, or they failed to initialize.

Message of the day

You can push a message of the day (MOTD) to a BabyPod. The message can be up to 20 characters in length. To do this:

  1. Create a new note in Baby Buddy with your desired text.
  2. Tag it with "BabyPod MOTD", creating the tag if it doesn't exist.

BabyPod will consume the MOTD by checking notes every few hours for a note with that tag. If it finds one, it shows a modal to the user with a special chime. The note is deleted so it doesn't get consumed twice. If multiple BabyPods connect to the same instance of Baby Buddy, the first one to pull the note wins.

BabyPod will only try to consume MOTDs if online, there's an RTC available, and it's been a while since the last check.

Troubleshooting

Power and wiring-related

Software-related

Other things to check