Skip to the content
PCBKitNew board
2 layersEndless endless eight, the printed circuit board in 3D

Never ending summer again. (Solar-powered AVI player based on ESP32/ULP)

Copper layers
2
Thickness
1.6 mm
Parts
11
Nets
34
Pads
68
Tracks, vias
0, 0
Routed
Not yet
KiCad
KiCad 6 (file 20211014)
Created
14 Feb 2022
Updated
6 Mar 2022

Overview

Endless endless eight is an open-source printed circuit board by likeablob, from the likeablob/endless-endless-eight repository on GitHub, published under the MIT licence. It is a 2-layer board with 11 parts on 34 nets.

Its parts include 6 resistors, 2 transistors, 2 connectors and 1 IC. It belongs with the ESP32 boards of this library.

README

README.md

The clip played is from The Melancholy of Haruhi Suzumiya (2009).

Endless Endless Eight

A self-sustained AVI player to replay the summer days.

  • ESP32 to play MJPEG-AVI video files from microSD at 24 fps.
  • Utilizes ULP coprocessor for BAT voltage monitoring, Deep Sleep management etc.
  • 5V solar panel and small LiPo battery as the main power source.
  • (Planned) LTC3130-1 for more efficient power conversion.

BOM

WIP

  • ESP32 WeMos LOLIN32 Lite
  • ST7735 80x160 LCD module
  • microSD card (>= 2 GB)
  • 5V 2W solar panel

Prepare video files

All the video files to be placed on the MicroSD must be MJPEG-encoded AVI.

sh
# Transcode EP 12~19 to ee_%d.avi, with scaling and cropping
$ seq 12 19 | xargs -L 1 -P1 -I% bash -c 'ffmpeg -i ee_%.mp4 -r 24 -vf scale=160:-1,crop=160:80 -vcodec mjpeg -q:v 5 -an ee_%.avi -y'

See sdcard/ for a set of sample vid files. These are converted from BigBuckBunny.mp4.

sh
# The sample vid files were from
$ seq 12 19 | xargs -L 1 -P1 -I% bash -c 'ffmpeg -ss $(((% - 12)*2)) -to $(((% - 12 + 1) * 2)) -i BigBuckBunny.mp4 -r 24 -vf scale=160:-1,crop=160:80 -vcodec mjpeg -q:v 5 -an ee_%.avi -y'

Build firmware

sh
$ git clone https://github.com/likeablob/endless-endless-eight.git
$ cd endless-endless-eight

$ cp include/user_config.g.template cp include/user_config.h
$ code include/user_config.h

$ pio run || pio run # The very 1st run may fail due to ulptool-pio
$ pio run -t upload

Print enclosure

See ./enclosure.

How it works

State transitions

Centering on the deep sleep mode, this application has several wake-up states as depicted in the following diagram.

  • The application switches back-and-forth between the nominal mode and deep sleep depending on the battery voltage. (See Power management strategy for details.)
  • Also, under the certain condition, it wakes in;
    • Emergency mode to prepare for a complete power loss (See State persistence)
    • Periodic Reporting mode for reporting housekeeping data via MQTT
  • Basically every wake up transition is triggered by the ULP routine.
mermaid
stateDiagram-v2
    Playing: Playing Video (Nominal)
    [*] --> Playing
    Playing --> DeepSleep: At low battery
    DeepSleep --> Playing: At high battery

    DeepSleep --> Emergency: At very low battery
    Emergency --> DeepSleep: ASAP

    DeepSleep --> PeriodicReporting: Every 30 minutes
    PeriodicReporting --> DeepSleep: ASAP

Power management strategy

It's quite simple; Wake the Main CPU up if the battery voltage (BAT_V) >= 3.9 V and put into sleep if BAT_V <= 3.75 V.
The ULP co-processor executes own routine every one second, but still is able to keep the deep sleep current consumption at uA-level.

mermaid
flowchart TB
  subgraph CPU["Main CPU"]
    %% flow
    power_boot(" ")
    boot("Boot")
    check_ulp_boot{"Wake by ULP?"}
    init_ulp["Init ULP routine"]

    %% flow
    init_loop(" ")
    check_batv_sleep{"BAT_V <= SLEEP_TH"}
    sleep("Deep sleep")

    power_boot --> boot --> check_ulp_boot
    check_ulp_boot -->|"Yes"| init_loop
    check_ulp_boot -->|"No"| init_ulp --> init_loop

    init_loop --> check_batv_sleep
    check_batv_sleep -->|"Yes"| sleep
    check_batv_sleep -->|"No"| init_loop
    sleep -.-> |"Wake by ULP"| boot
  end

  subgraph ULP

State persistence

The play state such as a file playing, its position and loop count etc. are kept over deep sleep or even complete power outage, thanks to Nagato RTC SLOW MEM and Non-Volatile Storage. The former is volatile but survives deep sleep, and the latter is nothing but a reserved region in flash.

In short there are two pathways for each storage.

  • A. Save to RTC_SLOW_MEM before entering deep sleep. Restore from RTC_SLOW_MEM after waking up from deep sleep.
  • B. Save to NVS at very-low battery voltage. Restore from NVS on boot.

Note: About B., the ULP routine wakes the main CPU in the Emergency mode when BAT_V <= 3.55 V. This happens only once and the related flag will be cleared by the main CPU after normal wake up.

mermaid
flowchart
  %% nodes
  init(" ")
  check_ulp_boot{"Wake by ULP?"}
  restore_from_nvs["Restore from Non-volatile storage"]
  restore_from_rtc["Restore from RTC SLOW RAM\n(Volatile, Deep-sleep persistent)"]
  check_ulp_flag_emergency{"Emergency Mode?\n(caused by very low battery)"}
  save_to_nvs["Save to Non-volatile storage"]
  sleep("Deep sleep")
  init_loop("Main Loop")
  check_low_bat{"Low battery?"}
  save_to_rtc["Save to RTC SLOW MEM"]

  init ---> check_ulp_boot
  check_ulp_boot -->|"Yes"| check_ulp_flag_emergency
  check_ulp_boot -->|"No"| restore_from_nvs --> init_loop
  check_ulp_flag_emergency --> |"Yes"| save_to_nvs --> sleep
  check_ulp_flag_emergency --> |"No"| restore_from_rtc --> init_loop

  init_loop --> check_low_bat
  check_low_bat --> |"Yes"| save_to_rtc --> sleep
  check_low_bat --> |"No"| init_loop

  sleep -.-> init

LICENSE

MIT

Dependencies

This projects is here thanks to a lot of superb OSS libraries. See platformio.ini for details. Thank you to all the devs.

Parts

11
QtyValueFootprintReferences
410kResistor_SMD:R_0603_1608MetricR2, R3, R4, R5
10.96in_80x160_st7735s_LCD_moduleConnector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_VerticalJ1
1100Resistor_SMD:R_0603_1608MetricR1
12kResistor_SMD:R_0603_1608MetricR6
1Micro_SD_Card_DetConnector_Card:microSD_HC_Hirose_DM3BT-DSF-PEJSJ2
1Q_NMOS_GSDPackage_TO_SOT_SMD:SOT-23Q1
1Q_PMOS_GSDPackage_TO_SOT_SMD:SOT-23Q2
1esp32_wemos_lolin32_litewemos_lolin32_lite:esp32_wemos_lolin32_liteU1

Questions

What parts does the Endless endless eight use?

11 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Endless endless eight KiCad files?

From the likeablob/endless-endless-eight repository on GitHub, at the commit this page was made from: the board is kicad/endless-endless-eight.kicad_pcb and its schematic kicad/endless-endless-eight.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Endless endless eight design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers60 × 30 mmController, the printed circuit board in 3D

    Controller

    google/mozc-devices

    Circuit diagrams and firmware source code for Gboard DIY keyboards

    11 parts3kApache-2.0
  • 2 layers103 × 30.5 mmTS Front Endcap, the printed circuit board in 3D

    TS Front Endcap

    EEVengers/ThunderScope

    ThunderScope GitHub Repo

    11 parts1.3kMIT
  • 2 layers26 × 30 mmExpansion Card, the printed circuit board in 3D

    Expansion Card

    FrameworkComputer/ExpansionCards

    Reference designs and documentation to create Expansion Cards for the Framework Laptop

    11 parts1.1kCC-BY-4.0
  • 2 layers53.9 × 23.2 mmBuffer, the printed circuit board in 3D

    Buffer

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    11 parts1kGPL-3.0
  • 2 layers10 × 20 mm2 connector Sensor Board, the printed circuit board in 3D

    2 connector Sensor Board

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    11 parts915
  • 2 layersFet module, the printed circuit board in 3D

    Fet module

    ByteWelder/Decktility

    A handheld PC

    11 parts855CC-BY-SA-4.0
  • 2 layers47 × 33 mmSevensegment led display module, the printed circuit board in 3D

    Sevensegment led display module

    tardate/LittleArduinoProjects

    a collection of "Little Electronic & Arduino Projects", most involving electronics or an Arduino in one way or another!

    11 parts803MIT
  • 2 layers42.5 × 36.8 mmDevboard, the printed circuit board in 3D

    Devboard

    basilfx/TRADFRI-Hacking

    Hacking IKEA TRÅDFRI products, such as light bulbs, window blinds and other accessories.

    11 parts743CC-BY-4.0