# HEM27EC Dither Box
## Description
Battery-powered minimal ST-4 dither timer for iOptron HEM27EC: two AAA cells, ATtiny1616 controller, opto-isolated RA+/RA-/DEC+/DEC- contact closures, physical interval/intensity selectors, DITHER NOW button, and low-power status LED. The previous ESP32-S3 USB-host design is preserved only as a conditional V2 archive.
## Project Details
- **Owner:** pereguerra
- **Created:** 7/21/2026
- **Last Updated:** 7/21/2026
- **Visibility:** Public
- **Implementation Details:** V1 baseline is a two-AAA ATtiny1616 ST-4 dither timer with opto-isolated contact closures; archived V2 USB-host design retained in project files.
- **Human Interface:** Buttons
- **Power Requirements:** Battery
- **Domain:** Astronomy
- **Connectivity:** ST-4
- **Software:** ESP-IDF
## Key Components
### BT1 — [Battery Holder SMD 2 Cells AAA](https://www.flux.ai/jharwinbarrozo/battery-holder-smd-2-cells-aaa~q7.md)
- Role: Energy Storage
- Manufacturer Name: MYOUNG
- Manufacturer Part Number: BH-AAA-B5AA001
- Part Type: Connector
- Role Details: Two AAA cells in series; no charger, no boost; expected VCC about 1.8V to 3.2V after reverse-protection MOSFET
- Datasheet URL: https://datasheet.lcsc.com/lcsc/2012311835_MYOUNG-BH-AAA-B5AA001_C964881.pdf
**Pins:**
- 1neg
- 1pos
- 2neg
- 2pos
### D1 — [150060RS73220](https://www.flux.ai/vasy_skral/150060rs73220~kj9.md)
- Datasheet URL: https://www.we-online.com/components/products/datasheet/150060RS73220.pdf
- License: https://creativecommons.org/licenses/by/4.0/
- Manufacturer Name: Würth Elektronik
- Role Details: Low-duty-cycle red status LED for heartbeat, dither-active, and low-battery/fault patterns
- Role: Status Indication
- Manufacturer Part Number: 150060RS73220
- Part Type: LED
**Pins:**
- A [pin 2]
- K [pin 1]
### J1 — [5555165-1](https://www.flux.ai/adrian95/5555165-1~umv.md)
- Role: Connector
- Manufacturer Part Number: 5555165-1
- Part Type: Connector
- Datasheet URL: https://www.verical.com/datasheet/te-connectivity-telephone-and-telecomm-5555165-1-128425.pdf
- License: https://creativecommons.org/licenses/by/4.0/
- Manufacturer Name: TE Connectivity AMP Connectors
- Role Details: 6P6C/RJ12 ST-4 connector; official HEM27 Figure 3 pinout: 1 NC, 2 common, 3 RA+, 4 DEC+, 5 DEC-, 6 RA-
**Pins:**
- 1 [pin 1]
- 2 [pin 2]
- 3 [pin 3]
- 4 [pin 4]
- 5 [pin 5]
- 6 [pin 6]
### J2 — [Pin Header 01x03 2.54mm Vertical](https://www.flux.ai/adrian95/pin-header-01x03-254mm-vertical~cp4.md)
- Role Details: 3-pin UPDI programming header: Pin 1 VCC, Pin 2 GND, Pin 3 UPDI
- License: https://creativecommons.org/licenses/by/4.0/
- Role: Debug
- Part Type: Connector
**Pins:**
- Pin_1 [pin 1]
- Pin_2 [pin 2]
- Pin_3 [pin 3]
### Q1 — [DMG2305UX-7](https://www.flux.ai/jwace81/dmg2305ux-7~06.md)
- Role: Reverse Polarity Protection
- Manufacturer Name: Diodes Incorporated
- Role Details: P-channel MOSFET ideal-diode style battery reverse-polarity protection with minimal drop at low V1 current
- Datasheet URL: https://www.diodes.com/assets/Datasheets/DMG2305UX.pdf
- Manufacturer Part Number: DMG2305UX-7
**Pins:**
- ~ [pin 3]
- ~ [pin 1]
- ~ [pin 2]
### S1 — [1TS028B-1600-0450-CT](https://www.flux.ai/lcsc/1ts028b-1600-0450-ct~chn6.md)
- Datasheet URL: https://storage.googleapis.com/graviton-electric-symbols/document_assets/lcsc/2001131709_HYP--Hongyuan-Precision-1TS028B-1600-0450-CT_C482008.pdf
- Role Details: DITHER NOW active-low momentary button; immediate dither and interval timer restart
- Manufacturer Part Number: 1TS028B-1600-0450-CT
- Product Info Url: https://lcsc.com/product-detail/New-Arrivals_HYP-Hongyuan-Precision-1TS028B-1600-0600-CT_C482008.html
- Manufacturer Name: HYP(鸿源精密)
- Part Type: Tactile Switches
- LCSC Part Number: C482008
- Package or Case Code: SW-SMD_4P-L2.8-W1.9-P1.20-LS3.0_1TS028B
- Role: Switching
- JLCPCB Part Class: Extended Part
**Pins:**
- 1 [pin 1]
- 2 [pin 2]
- 3 [pin 3]
- 4 [pin 4]
### SW1 — [DS04-254-2-01BK-SMT](https://www.flux.ai/jecstronic/ds04-254-2-01bk-smt~t2.md)
- Datasheet URL: https://www.cuidevices.com/product/resource/ds04-254-smt.pdf
- Role Details: Simple SPST ON/OFF power switch, DS04-254-2-01BK-SMT; one unambiguous ON and OFF state
- Role: Switching
- Manufacturer Part Number: DS04-254-2-01BK-SMT
- License: https://creativecommons.org/licenses/by/4.0/
- Part Type: Switch
- Manufacturer Name: CUI Devices
**Pins:**
- ~ [pin 1B]
- ~ [pin 1A]
### SW2 — [OS103011MA7QP1](https://www.flux.ai/adrian95/os103011ma7qp1~4fe.md)
- Role: Switching
- Manufacturer Name: C&K
- License: https://creativecommons.org/licenses/by/4.0/
- Part Type: Switch
- Manufacturer Part Number: OS103011MA7QP1
- Role Details: DITHER INTENSITY selector: SOFT / NORMAL / STRONG via active-low MCU inputs and internal pull-ups
- Datasheet URL: https://www.ckswitches.com/media/1428/os.pdf
**Pins:**
- COM [pin 2]
- MH1 [pin MH1]
- MH2 [pin MH2]
- NC_1 [pin 3]
- NC_2 [pin 4]
- NO [pin 1]
### SW3 — [OS103011MA7QP1](https://www.flux.ai/adrian95/os103011ma7qp1~4fe.md)
- Role: Switching
- Datasheet URL: https://www.ckswitches.com/media/1428/os.pdf
- Part Type: Switch
- Manufacturer Part Number: OS103011MA7QP1
- License: https://creativecommons.org/licenses/by/4.0/
- Role Details: INTERVAL selector: 60s / 120s / 300s via active-low MCU inputs and internal pull-ups
- Manufacturer Name: C&K
**Pins:**
- COM [pin 2]
- MH1 [pin MH1]
- MH2 [pin MH2]
- NC_1 [pin 3]
- NC_2 [pin 4]
- NO [pin 1]
### U1 — [ATTINY1616-SFR](https://www.flux.ai/lcsc/attiny1616-sfr~d0yd.md)
- Manufacturer Name: MICROCHIP(美国微芯)
- Role Details: ATtiny1616 low-power timer/controller; direct two-AAA operation, watchdog, RTC/PIT wake, internal VCC/battery measurement, UPDI programming
- Part Type: MICROCHIP
- Role: MCU
- JLCPCB Part Class: Extended Part
- LCSC Part Number: C145558
- Datasheet URL: https://storage.googleapis.com/graviton-electric-symbols/document_assets/lcsc/2304140030_Microchip-Tech-ATTINY1616-SFR_C145558.pdf
- Product Info Url: https://lcsc.com/product-detail/MICROCHIP_MICROCHIP_ATTINY1616-SFR_ATTINY1616-SFR_C145558.html
- Manufacturer Part Number: ATTINY1616-SFR
- Package or Case Code: SOIC-20_L13.0-W7.6-P1.27-LS10.3-BL
**Pins:**
- GND [pin 20]
- PA0/~{RESET}/UPDI [pin 16]
- PA1 [pin 17]
- PA2 [pin 18]
- PA3/EXTCLK [pin 19]
- PA4 [pin 2]
- PA5 [pin 3]
- PA6 [pin 4]
- PA7 [pin 5]
- PB0 [pin 11]
- PB1 [pin 10]
- PB4 [pin 7]
- PB5 [pin 6]
- PC0 [pin 12]
- PC1 [pin 13]
- PC2 [pin 14]
- PC3 [pin 15]
- TOSC1/PB2 [pin 9]
- TOSC1/PB3 [pin 8]
- VDD [pin 1]
### U2 — [TLP171A(TP,F](https://www.flux.ai/lcsc/tlp171atpcf~u57v.md)
- Manufacturer Part Number: TLP171A(TP,F)
- Package or Case Code: SOP-4_L3.9-W4.4-P2.54-LS7.0-BR
- Role Details: RA+ TLP171A normally-open PhotoMOS relay; pin 1 LED anode, pin 2 LED cathode, pins 3/4 bidirectional isolated output
- Datasheet URL: https://toshiba.semicon-storage.com/info/TLP171A_datasheet_en_20250819.pdf?did=13862&prodName=TLP171A
- JLCPCB Part Class: Extended Part
- Part Type: Solid State Relays - MOS Output (PhotoMOS)
- Role: Isolation
- Manufacturer Name: TOSHIBA(东芝)
- LCSC Part Number: C2153054
**Pins:**
- 1 [pin 1]
- 2 [pin 2]
- 3 [pin 4]
- 4 [pin 4]
### U3 — [TLP171A(TP,F](https://www.flux.ai/lcsc/tlp171atpcf~u57v.md)
- Manufacturer Part Number: TLP171A(TP,F)
- Package or Case Code: SOP-4_L3.9-W4.4-P2.54-LS7.0-BR
- Role Details: RA- TLP171A normally-open PhotoMOS relay; pin 1 LED anode, pin 2 LED cathode, pins 3/4 bidirectional isolated output
- Role: Isolation
- JLCPCB Part Class: Extended Part
- Datasheet URL: https://toshiba.semicon-storage.com/info/TLP171A_datasheet_en_20250819.pdf?did=13862&prodName=TLP171A
- LCSC Part Number: C2153054
- Part Type: Solid State Relays - MOS Output (PhotoMOS)
- Manufacturer Name: TOSHIBA(东芝)
**Pins:**
- 1 [pin 1]
- 2 [pin 2]
- 3 [pin 4]
- 4 [pin 4]
### U4 — [TLP171A(TP,F](https://www.flux.ai/lcsc/tlp171atpcf~u57v.md)
- Manufacturer Part Number: TLP171A(TP,F)
- Package or Case Code: SOP-4_L3.9-W4.4-P2.54-LS7.0-BR
- Datasheet URL: https://toshiba.semicon-storage.com/info/TLP171A_datasheet_en_20250819.pdf?did=13862&prodName=TLP171A
- Role: Isolation
- JLCPCB Part Class: Extended Part
- Role Details: DEC+ TLP171A normally-open PhotoMOS relay; pin 1 LED anode, pin 2 LED cathode, pins 3/4 bidirectional isolated output
- Part Type: Solid State Relays - MOS Output (PhotoMOS)
- Manufacturer Name: TOSHIBA(东芝)
- LCSC Part Number: C2153054
**Pins:**
- 1 [pin 1]
- 2 [pin 2]
- 3 [pin 4]
- 4 [pin 4]
### U5 — [TLP171A(TP,F](https://www.flux.ai/lcsc/tlp171atpcf~u57v.md)
- LCSC Part Number: C2153054
- Datasheet URL: https://toshiba.semicon-storage.com/info/TLP171A_datasheet_en_20250819.pdf?did=13862&prodName=TLP171A
- Manufacturer Name: TOSHIBA(东芝)
- Part Type: Solid State Relays - MOS Output (PhotoMOS)
- Role: Isolation
- JLCPCB Part Class: Extended Part
- Role Details: DEC- TLP171A normally-open PhotoMOS relay; pin 1 LED anode, pin 2 LED cathode, pins 3/4 bidirectional isolated output
- Package or Case Code: SOP-4_L3.9-W4.4-P2.54-LS7.0-BR
- Manufacturer Part Number: TLP171A(TP,F)
**Pins:**
- 1 [pin 1]
- 2 [pin 2]
- 3 [pin 4]
- 4 [pin 4]
*The full schematic, PCB layout, bill of materials, and interactive design are available at [https://www.flux.ai/pereguerra/hem27ec-dither-box~gh](https://www.flux.ai/pereguerra/hem27ec-dither-box~gh).*
---
*Generated from [https://www.flux.ai/pereguerra/hem27ec-dither-box~gh](https://www.flux.ai/pereguerra/hem27ec-dither-box~gh)*