Delaynie’s Status Report for 04/25/2026

PCB Version 2

Bugs:

  • LED control should not have gone on GPIO46. It’s a bootloader pin, and it doesn’t reliably work as a digital output. There are a couple of other unused pins nearby that can be used instead.
  • The LED control pin also needs a pull-up resistor because it is active-low. This means that when the ESP32 goes to sleep, the screen will still be on, blank white.
  • Green LEDs are way too bright (I see spots in my vision after looking at them). They also get a bit warm. These LEDs are just for debugging.
    • Yellow LEDs could also be a bit brighter.

Things that work:

  • The ESD protection diodes on the USB didn’t break it!
  • The buzzer works now that a pmos is being used.
  • The screen and stuff works after I rewired it.

Pictures of PCB rewire:

Button Debounce Requirements

  • Surprisingly, the buttons we are using aren’t that bouncy. After looking at the waveform, it doesn’t ring for more than 10 ms.

Delaynie’s Status Report for 04/18/2026

GNSS Time Acquisition Testing

  • Indoors, and even outdoors, it takes a while (more than a few seconds) for the time to resolve itself.
  • When to call the time and date “good”:
    • When gnss.getTimeValid() and gnss.getDateValid() return true, then the time and dates provided can be trusted for our purposes. The only major thing to be aware of is that it doesn’t guarantee leap seconds are correct (which means you have a +/- 1 second uncertainty).
    • Even when this happens, the number of satellites reported seen might be zero.
    • When inside the W3VC radio club near the window, it takes 1-2 minutes on average for the time and date to validate from a cold start. (This is different from simply resetting the MCU/code. When simply resetting code, time and date validation takes less time.)
  • A note about “valid” and “confirmed”:
    • There are four functions available: gnss.getTimeValid() , gnss.getDateValid() , gnss.getTimeConfirmed() , and gnss.getDateConfirmed() .
    • “Confirmed” is a more strict check than “valid”.
  • See GitHub repo for modifications on custom library this week.

BLE Schedule Uploading

  • Define a struct for each event to be sent from the desktop app to Remigotchi
#include <stdint.h>

typedef struct {
    // 32 bytes
    char name[32];
    // 2 bytes
    uint16_t period;
    uint16_t start_time;
    uint16_t end_time;
    // 1 byte
    uint8_t days_of_week;
    uint8_t padding[1];
} event_t;
  • Rewrote BLE Serial testbench, there were some bugs with the code blocking until a total of 4 bytes were sent. Now, it doesn’t block, but continuously polls the serial buffer.

Battery Monitor

  • I finally got around to testing the battery monitor, which is a 100 kOhm and 270 kOhm voltage divider connected to one of the ESP32’s GPIO pins.
  • Luckily, the Arduino framework provides a function analogReadMillivolts(), which does in fact work. So all I have to do is call that.
  • I confirmed with a Fluke 233 multimeter that values read by the aforementioned function are accurate.

New Tools and Knowledge

I needed to learn a bit more about how the SPI peripherals on the ESP32-S3 were set up. The main strategies I used were forums about ESP32 SPI usage, as well as ESP’s official documentation page and chip datasheets.

I also learned a bit about communicating with the GNSS module on the board. I learned how to use it by first looking up popular, well-tested libraries, and decided on the SparkFun GNSS V3 library. From there, I learned how to extract the time from the device by reading the library’s docs as well as the device’s datasheet.

Below is a photo of the LCD screen connected to a Remigotchi PCB used for field-testing the GNSS connectivity.

Delaynie’s Status Report for 4/4/2026

GPS

  • Copilot was able to do a lot in this area. Most of my work involved finding the right library to use, finding the right version of that library, and making sure it was properly installed.
  • There were some comments in the library source code explaining some nuance to the order in which functions should be called, so I had to refactor to touch that up a bit.
  • But for filling in functions like estimating UTC offset or calculating the day of the week, Copilot was quite helpful. It’s most useful when I already have the structure and clear inputs and outputs defined.
  • I tested the code by running the code, printing out the number of satellites in view, and printing the time and date received.
  • After I verified the ability to receive time of day from the satellites, I worked on integrating that functionality with the use of the ESP32’s RTC peripheral, and building that into a custom library that will provide the caller with the most accurate time possible.

SPI Issues with the LCD Screen

<aside> ✅

Fix: In the User_Setup.h file in the library source code (terrible architecture by the way) make sure #define USE_HSPI_PORT is uncommented.

</aside>

  • Recall that we are using an external library for driving our LCD screen via SPI. That library is TFT_eSPI.
  • Simply changing the SPI pins between the breadboard version of the code and the version for the PCB did not work.
  • The board would completely crash somewhere within in the tft.init() function call. (To be clear, this is a function provided by TFT_eSPI).
  • So, I went back to the basics and ran the SPI testbench code from last week where it would simply send an incrementing byte across the line.
  • Both SPI buses simply sending an incrementing/decrementing value separately does work. Code is below.

SPI Sanity Check

#include <Arduino.h>

// #include <TFT_eSPI.h>      // Include the graphics library
// TFT_eSPI tft = TFT_eSPI(); // Create object "tft"

#include <SPI.h>
#define SPI2 FSPI
#define SPI3 HSPI

#define LCD_CIPO 13
#define LCD_COPI 11
#define LCD_SCLK 12
#define LCD_CS 10 // Chip select control pin
#define LCD_DC 9  // Data Command control pin
#define LCD_RST 3 // Reset pin (could connect to RST pin)

#define SHARED_COPI 38
#define SHARED_CIPO 39
#define SHARED_SCLK 40

#define SD_CS 41
#define RFID_CS 42

SPIClass lcd_SPI(SPI2);

SPIClass shared_SPI(SPI3);

#define BUTTON_1 14

void setup(void)
{
  pinMode(BUTTON_1, INPUT_PULLDOWN);
  while (!digitalRead(BUTTON_1))
  {
  }

  Serial.begin(115200);
  Serial.println("begin");

  pinMode(LCD_CS, OUTPUT);
  pinMode(SD_CS, OUTPUT);
  pinMode(RFID_CS, OUTPUT);
  digitalWrite(LCD_CS, HIGH);
  digitalWrite(SD_CS, HIGH);
  digitalWrite(RFID_CS, HIGH);

  lcd_SPI.begin(LCD_SCLK, LCD_CIPO, LCD_COPI, LCD_CS);
  shared_SPI.begin(SHARED_SCLK, SHARED_CIPO, SHARED_COPI, -1);

  // tft.init();
  // Serial.println("tft init");

  // tft.setRotation(1);
  // tft.fillScreen(TFT_DARKGREY);
  // tft.setTextFont(2);
}

uint8_t l = 0x00;
uint8_t s = 0x00;
void loop()
{
  Serial.printf("lcd spi = %x shared spi = %x\\n", l, s);

  lcd_SPI.transfer(l++);
  shared_SPI.transfer(s--);

  delay(250);

  // tft.fillRectHGradient(0, 0, 160, 50, TFT_MAGENTA, TFT_BLUE);
  // tft.setCursor(10, 10);
  // tft.print("Horizontal gradient");

  // tft.fillRectVGradient(0, 60, 160, 50, TFT_ORANGE, TFT_RED);
  // tft.setCursor(10, 70);
  // tft.print("Vertical gradient");
}
  • I went back and tried to make it not crash during tft.init() again.
  • What ultimately fixed it was simply configuring the library to use the HSPI port. It’s a line in the User_Setup.h file that you uncomment. I’m attaching a full copy of the User_Setup.h file to this web page for reference.
    • Interestingly and frustratingly, the ESP32-S3 doesn’t necessarily have FSPI, HSPI, and VSPI ports anymore. Instead it has two SPI peripherals, SPI2 and SPI3. However, the old terminology appears to have stuck around for backwards compatibility reasons. ChatGPT explains it some more at the beginning of this conversation here (scroll up all the way to the top).
  • Lastly, I added some SD card code from last week into this project, and I’ve verified that at the very least, I can display a static picture on the LCD screen and then

RFID Scanner

  • I first encountered an issue where the RFID scanner would not communicate back to the ESP32.
  • After looking at it with an oscilloscope, the SCLK and COPI lines looked normal. However, the COPI waveform looked incredibly weak.
  • I eventually realized that I did not have CS connected to the RFID scanner itself.
    • Part of this oversight was due to the fact that on the module’s silkscreen, there is no “CS” pin labeled. It’s just that the pin labeled “SDA” also doubles as the CS pin while being used for SPI 💀
  • After connecting a CS pin, the RFID scanner functioned just fine, and I was able to read the UID from an RFID tag.
  • Next, I need to verify that the RFID, SD card reader, and LCD screen all work in conjunction with each other.

PCB Work

  • Now that most of the elements on the PCB have been validated, and not to mention the deadline is drawing near, I went back to making edits to the schematic and redoing the layout.
  • I decided to completely redo the layout because I added a few things to the schematic, I got rid of all jumper bridges (we’re not in prototype mode anymore), and I wanted to prioritize a compact and smooth form factor.

Photos

Current layout and 3d model (components not yet routed):

What happens when you forget to include a CS line on your SPI-connected device:

Delaynie’s Status Report for 03/28/2026

SPI Struggles

  • This board uses a different set of SPI pins from the default Arduino SPI pins. Because of how the Arduino library and examples are written for SPI, and specifically, SD card interfacing, it makes this a little more difficult.
    • A lot of “out-of-the-box” example code fails when I try to run it.
  • After a lot of code failing, I decided to break the problem down further: first make sure the SPI pins that I want are indeed the ones being used. And only after that’s been confirmed worry about SD card interfacing.
  • The easiest way to do this is to simply have the ESP write a byte to the SPI bus, and look at the output with an oscilloscope. Luckily, there is a SPI.transfer(uint8_t) function provided by the library.
  • To make things even easier, I have the byte increment every cycle so that I know that what I’m looking at is in fact the data I’m trying to send and not something else. See below for full code.
  • This worked, click here to see a video of the oscilloscope measurements.
  • Also, I noticed my silkscreen labels are wrong—SPI CIPO and SPI_SCLK are swapped.

SPI Testbench Code

#include <Arduino.h>
#include <SPI.h>
#include <SD.h>

#define SD_COPI 38
#define SD_CIPO 39
#define SD_SCLK 40
#define SD_CS 41

void setup()
{
  Serial.begin(115200);
  delay(500);

  SPI.begin(SD_SCLK, SD_CIPO, SD_COPI, SD_CS);
}

uint8_t c = 0x00;

void loop()
{
  uint8_t x = SPI.transfer(c++);
  Serial.printf("transfer %x\\n", x);
  delay(500);
}

SD Card

  • Once I determined that I could interface with the correct set of pins for SPI, I started interfacing with the SD card.
  • I modified the code to see if I can successfully talk to the SD card. See below for code.
  • At first it failed. Specifically, somewhere in the card mounting, it failed. I formatted the micro SD card with my laptop, and tried again. It worked this time. I would have guessed that the library would be able to handle something like this, but I guess not. It may also be worth noting that this card was fresh out of the box.

SD Card Initialization Code

#include <Arduino.h>
#include <SPI.h>
#include <SD.h>

#define SD_COPI 38
#define SD_CIPO 39
#define SD_SCLK 40
#define SD_CS 41

void setup()
{
  Serial.begin(115200);
  delay(500);

  SPI.begin(SD_SCLK, SD_CIPO, SD_COPI, SD_CS);

  if (!SD.begin(SD_CS))
  {
    while (true)
    {
      Serial.println("failed to begin SD card.");
      delay(500);
    }
  }
  else
  {
    while (true)
    {
      Serial.println("success");
      delay(500);
    }
  }
}

uint8_t c = 0x00;

void loop()
{
  // uint8_t x = SPI.transfer(c++);
  // Serial.printf("transfer %x\\n", x);
  // delay(500);
}
  • I then moved on to reading and writing text to and from files. That test was a success.

 

Delaynie’s Status Report for 3/21/2026

This week, I continued working on figuring out how we’re going to use Bluetooth in Remigotchi’s firmware. I built a testbench that implements BLE Serial, where you can stream bytes from one device to another once they are connected via BLE. This simplifies the firmware that we need to write by a lot. Instead of us directly manipulating GATT tables and defining our own standard of communication, we can treat it like something closer to just a serial stream. That being said, we will probably still have to handle things like our own error detection/correction and data packet structure. I also began testing our custom PCB that we received earlier this week. BLE works! I can get a serial stream to and from it via USB-C. The power seems functional enough. The charger IC gets up to 75 deg C while charging, which is mildly concerning, but potentially still within spec, so I’ll have to check on that. I tested the passive buzzer and realized that it’s unnaturally quiet. I measured the peak-to-peak voltage and eventually looked back at the datasheet and realized I wired the NMOS driver on the wrong side of the buzzer. It should be pulling the buzzer down, and the NMOS source has a stable “ground” so that the gate-source voltage is definitively 3.3V or 0V when being driven by the GPIO pin. To fix this, I’ll de-solder the buzzer from the PCB with a hot air gun, attach jumper wires to it, and use a breadboard NMOS to wire it up correctly and see if that works.  Below is a picture of what my schematic is on the left, compared to the recommended application from the datasheet on the right.

I’m a week or two behind schedule because we underestimated how long it would take for the PCB to get here. According to our original schedule, I think I would be either ordering or testing the second PCB by now. However, I still need to confirm with Italia whether or not the pinouts for the RFID reader and LCD screen work. To catch up, I’ll spend extra time next week testing the PCB.

Deliverables I want to have done next week are: working breadboard model of adjusted passive buzzer circuit, testbench firmware proving that the micro SD card slot works, testbench firmware proving that getting the time of day via GPS works, and testbench firmware proving that the RFID reader works.

Delaynie’s Status Report for 3/14

This week, I began writing a testbench for familiarizing myself with the BLE software interface in Arduino/ESP-IDF. It took some trial and error until I found a sample code that was able to effectively utilize the BLE hardware in the first place.

My main responsibilities include hardware design and testing, and I am a bit behind because the PCBs didn’t arrive last week. To catch up this week, I am going to continue working on the BLE firmware while I wait for the boards to arrive (should be Tuesday), and then test the boards when they get here.

Next week, I need to have an updated schematic done, and the week after that, the final board design and layout.

Delaynie’s Status Report for 3/7/2026

Over the past two weeks, I finished the layout for the PCB, finalized all 39 parts that are being placed on it, and ordered it. After ordering, JLC reached out to me because there was one small issue with two of the three LEDs I selected. These LEDs were in a reverse-mount package, meaning they are placed on the board “upside down,” and also require a hole drilled through the board for their light to shine through. I did not realize this, and thought that they were just your normal 1206 SMD LEDs. After emailing JLC, I replaced the reverse-mount LEDs with normal ones.

Additionally, I worked with my team to complete our Design Report due before spring break. My contributions included detailing certain design decisions and tradeoffs we thought through, as well as calculating conservative estimates for Remigotchi’s power requirements. We concluded that Remigotchi would, at most, require a 2000 mAh 1S lipo battery to ensure a full day’s worth of power.

Also, I started drafting some ideas for what the menu options in Remigotchi are going to look like, and how users are going to navigate through them. Below are notes I wrote down. They are just a first draft, and are not set in stone.

According to the Gantt chart, all hardware development is on schedule. I achieved my deadline of ordering the PCB by the Friday before spring break. However, it’s possible I may fall behind schedule if the boards don’t arrive soon. I’m supposed to test the PCB next week, and I may have to push that back by a few days. At the time of writing this, manufacturing and PCBA has completed, and the boards are on their way to the JLC shipping center. I expect them to arrive sometime before next Friday. To catch up and keep this project on schedule, I will work on testbench firmware while I wait. This will start out as basic sample programs to ensure that the ESP32 can effectively communicate with the other sensors and devices onboard.

Deliverables I hope to have next week are a completed and finalized idea for menu architecture, to be discussed with Italia. Additionally, I’ll have a more detailed PCB test plan before the boards actually arrive. I’ll start out by simply testing electrical connections, then move onto testing it’s DC-DC conversion capabilities, make sure I’m able to flash the ESP32 onboard, then move onto running some sample firmware to make sure I mapped the pins correctly.

 

Delaynie’s Status Report for 2/21/2026

This week, I nearly completed the schematic.  I just have a few questions regarding exactly how the pins on the LCD screen work, and once those are answered, I will be ready for layout.

While I am waiting for some answers (determined experimentally) on how the LCD screen pins work, I found and verified component footprints.  This helps ensure that I don’t fall too far behind.  Once I am confident of pin connections, I can begin layout right away.  For this first spin of our PCB, layout and dimensions don’t need to be exact.  This board is going to be a proof-of-concept, and we will order a second board once we are confident in the functionality of this electrical design.

To mitigate risk in this electrical design, I added additional breakout header pins to every connection on the microcontroller.  Additionally, I put solder jumpers on all the connections to the auxiliary components.   Therefore, it is easy to change a connection or pinout if we need to, and this design can have multiple functions.

Next week, I need to have the PCB ready to order before spring break!

Delaynie’s Status Report for 2/14/2026

## Screen test with ESP32 Dev board

– Had trouble wiring the ESP32 to the display to use 8-bit protocol because [the guide from Adafruit](https://learn.adafruit.com/adafruit-2-4-color-tft-touchscreen-breakout/8-bit-wiring-and-test) had hardcoded the pinouts for an Arduino Uno, and the pinout wasn’t compatible 😡.

– Pivoted to finding another library: [TFT_eSPI Library](https://doc-tft-espi.readthedocs.io/starting/).

– Widely recommended for ESP32 and other microcontrollers, according to Google AI summary.

– Despite its name, it does support both SPI and 8-bit protocols for ESP32 and the ILI9341 display driver.

– Before getting started with 8-bit, I decided to make things even simpler and try to make it work with SPI first.

– After wiring up everything and flashing the example code, the screen was still blank white.

– Looking at the SPI guide from Adafruit, I realized I had to solder together 3 of the 4 jumpers on the back.

– After that, it worked.

– I hooked it up to a power supply. The whole system uses about 300 mW

  • Image of setup:

## Work on pcb schematic

– added battery charging circuitry

– added USB-C circuitry

– decided to put SD card slot

– current schematic:

Schedule

My progress is on schedule, and in order to keep it that way, I will finish the schematic by the middle of next week, and begin working on the layout.

Delaynie’s Status Report for 2/7/2026

This week, I prepared for and presented the Project Proposal on Wednesday. Additionally, I worked with Italia to spec out some of the hardware, choosing which components are the best fit for our application, while taking into consideration cost, size, power consumption, and performance. Below is a screenshot of the bill of materials we are beginning to compile.

According to our Gantt chart, we are slightly ahead of schedule because none of our tasks start until next week. Therefore any work listed on the Gantt chart this week is considered ahead of schedule, for now. However, to make sure I stay on schedule, I need to be focused on Monday to finish specing parts and then move on to researching and prototyping firmware.

Deliverables due by the end of next week are deciding on all main components, as well as having the bulk of the research on which embedded software platform to use.