Skip to main content
Complete hardware documentation for the ED1 Citilab Board Rev 2.3.

Board overview

The ED1 is an ESP32-based educational development board designed by Citilab Edutec. It integrates multiple peripherals for learning embedded systems and IoT development.

Specifications

ParameterValue
MCUESP32-SIP (dual-core, 240MHz)
FlashIntegrated in SIP
RAM520KB SRAM
WiFi2.4GHz 802.11 b/g/n
BluetoothBLE 4.2
Power InputUSB-C (5V)
Battery16340/CR123A Li-Ion (3.7V)
Dimensions~80mm x 60mm

Block diagram

Components

Main controller

ComponentPart NumberDescription
U5ESP32-SIPMain MCU with integrated flash

Power management

ComponentPart NumberFunctionNotes
J1105450-0101USB-C ConnectorPower + data
U2NCP347USB Overvoltage ProtectionProtects against >5.5V
U1MP2607DL-LF-ZLi-Po Charger1A charge rate, load sharing
IC1PAM2401SCADJ5V Buck-BoostFrom battery to 5V
U9ADP21083.3V Step-DownSystem 3.3V rail
Q1, Q2NMOS/PMOSBattery ProtectionReverse polarity protection
BT116340/CR123ABattery Holder3.7V Li-Ion

Communication

ComponentPart NumberFunctionNotes
U6CP2102NUSB to UARTAuto-programming support
ANT1PRO-OB-4402.4GHz AntennaPCB antenna

Display

ComponentPart NumberInterfaceNotes
TFT1TFT-Z144SN005SPI1.44” 128x128 ST7735
LED MatrixWS2812XGPIO1232x8 (256 LEDs) external

Sensors

RefPartInterfaceAddrNotes
U13MXC6655XAI2C0x153-axis accelerometer
Q5ALS-PT19-315CADC (GPIO34)-Light sensor
U12TSOP75438TTGPIO35-IR RX 38kHz; GPIO33 on Rev 1.0

Input/Output

ComponentPart NumberFunctionNotes
T1-T6Capacitive padsTouch buttons6 buttons around display
SW1JS102011SAQNPower switchSlide switch, no GPIO
SW2PTS820Reset buttonHardware reset
U11MCP23009I2C GPIO Expander8 additional GPIO @ 0x20
U7, U8ULN2004AStepper DriversFor 28BYJ-48 motors
U10PAM8301AAFAudio AmplifierFor buzzer/speaker
Z1MLT-8530BuzzerDriven by amplifier

Connectors

ConnectorTypePinsFunction
J2-J102.54mm Header4GPIO expansion
J11Grove4I2C Grove connector
M1, M2JST-XH5Stepper motor (28BYJ-48)

Stepper motor control

The ED1 board includes built-in support for two 28BYJ-48 stepper motors via the MCP23009 I2C GPIO expander and ULN2004A Darlington driver arrays.

Signal path

MCP23009 to motor pin mapping

GPIOSignalDriverMotorCoil
GP0I2DU8 pin 1M2D
GP1I2CU8 pin 2M2C
GP2I2BU8 pin 3M2B
GP3I2AU8 pin 4M2A
GP4I1DU7 pin 4M1D
GP5I1CU7 pin 3M1C
GP6I1BU7 pin 2M1B
GP7I1AU7 pin 1M1A

28BYJ-48 specifications

  • Step angle: 5.625° (64 steps per motor revolution)
  • Gear ratio: 64:1
  • Steps per output revolution: 512 (full-step mode) or 4096 (half-step mode)
  • Operating voltage: 5V DC
  • Drive method: Full-step sequence (4 phases) - matching MicroBlocks implementation

MCP23009 initialization

The MCP23009 requires specific register initialization for motor control:
RegisterAddressValuePurpose
IODIR0x000x00Set all 8 pins as outputs
GPPU0x060xFFEnable internal pull-ups (required!)
GPIO0x09variesMotor coil patterns
Important: The GPPU register (pull-ups) must be enabled for reliable motor operation. Without this, the ULN2004A drivers may not receive proper signal levels.

Full-step sequence

The step sequence matches the MicroBlocks “ED1 Stepper Motor” library, which was used as the reference implementation. MicroBlocks is the official programming environment for the ED1 board. Source: MicroBlocks ED1 Library
PhasePatternMotor 1 (upper nibble)Motor 2 (lower nibble)
0A+D0x900x09
1A+B0xC00x0C
2B+C0x600x06
3C+D0x300x03
Timing: ~2ms between steps (1500µs in MicroBlocks)

ESPHome usage

Include the stepper package:
packages:
  stepper: !include packages/stepper.yaml
This exposes Home Assistant entities for controlling both motors:
  • Number entities: Set step count (-4096 to +4096) for precise positioning
  • Button entities: Quick rotation (CW/CCW 512 steps = full rotation)
  • Stop button: Immediately stop motors and power down coils
The package uses direct I2C register writes (not the ESPHome mcp23008 component) for reliable timing and compatibility with the MicroBlocks implementation.

Power system

Power sources

  1. USB-C (5V): Primary power, also charges battery
  2. Battery (3.7V): 16340/CR123A Li-Ion cell

Power rails

  • VBUS: Raw USB voltage (5V)
  • VDD_IN: After overvoltage protection
  • VBAT: Battery voltage (3.0-4.2V)
  • VDD5: Regulated 5V (from buck-boost)
  • VDD33: Regulated 3.3V (system rail)
  • VDD3A: Analog 3.3V (for ESP32)

Charging

  • Charge IC: MP2607DL with load sharing
  • Charge Rate: 1000mA (set by R6)
  • Status LEDs: STAT1, STAT2, DONE, CHR

Battery protection

When battery is inserted with wrong polarity, Q1 and Q2 transistors isolate the battery from the system, preventing damage.

Power switch (SW1)

The slide switch on the right side of the board (JS102011SAQN) connects/disconnects the battery from the power circuit. This is a purely mechanical switch with no GPIO connection.

Battery monitoring limitations

The ED1 board has no built-in battery monitoring capability. The following cannot be detected programmatically:
FeatureStatusReason
Battery voltageNot availableVBAT not connected to any ADC pin
Charging statusNot availableSTAT1/STAT2 only connected to LEDs
USB connectedNot availableVBUS not connected to any GPIO
Power switch stateNot availableSwitch is mechanical only
The charger status signals (STAT1, STAT2, DONE, CHR) from the MP2607DL are routed only to LED drivers (NL7SZ97), not to ESP32 GPIOs.

Hardware modification for battery monitoring

To read battery voltage, add an external voltage divider to an analog expansion port: This divides the 3.0-4.2V battery range to ~1.5-2.1V, safe for the ESP32 ADC. ESPHome configuration:
sensor:
  - platform: adc
    pin: GPIO36
    name: "Battery Voltage"
    attenuation: 11db
    filters:
      - multiply: 2.0 # Compensate for voltage divider
    update_interval: 60s

Datasheets

Component datasheets are included in docs/datasheets/:

Hardware revisions

This documentation primarily covers ED1 Rev 2.3, but packages have been tested on both revisions.

Revision differences

ComponentRev 1.0Rev 2.3
AccelerometerLIS3DH (0x19)MXC6655XA (0x15)
I/O ExpanderMCP23017 (0x20)MCP23009 (0x20)
Stepper Driver ICsULN2004AULN2004A
IR EmitterGPIO32 (Untested)Not available
IR ReceiverGPIO33GPIO35 (Tested OK)

Compatibility notes

  • Core packages (display, buttons, sensors, buzzer, etc.) work on both revisions.
  • Stepper package (packages/stepper.yaml) is designed for Rev 2.3’s MCP23009.
  • IR Features:
    • Rev 2.3: Receiver works reliably on GPIO35. No emitter hardware.
    • Rev 1.0: Receiver on GPIO33, emitter on GPIO32 (both untested in this project).
  • Accelerometer is not yet implemented in ESPHome packages

Identifying your revision

Check the I2C scan on boot (in ESPHome logs):
  • 0x15 + 0x20 = Rev 2.3 (MXC6655XA + MCP23009)
  • 0x19 + 0x20 = Rev 1.0 (LIS3DH + MCP23017)
The original KiCad design files and full schematics are available from Citilab.