Skip to the content
2 layers35.1 × 32 mmMeaco attiny, the printed circuit board in 3D

Control a MeacoFan 1056 using Homebridge

Size
35.1 × 32 mm
Copper layers
2
Thickness
1.6 mm
Parts
17
Nets
12
Pads
45
Tracks, vias
65, 0
Pours
1
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
13 Mar 2024
Updated
13 Mar 2024

Overview

Meaco attiny is an open-source printed circuit board by AaronC81, from the AaronC81/meacofan-homebridge-controller repository on GitHub, published under the MIT licence. It is a 2-layer board of 35.1 × 32 mm with 17 parts on 12 nets, routed with 65 tracks and 0 vias.

It is built around the ATTINY85-20PU. Its parts include 4 resistors, 4 connectors, 2 diodes, 1 IC and 1 transistor. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

1

README

README.md

Meacofan HomeBridge Controller

This project connects a MeacoFan 1056 desk fan to HomeKit using Homebridge, enabling it to be controlled using your iOS device or Siri.

The PCB blasts the same IR commands as the fan's real remote control, accepting commands over I2C so that it can be controlled from a Raspberry Pi.

[!WARNING] This is quite rough around the edges. I wouldn't recommend building one of these yourself!

PCB

The PCB is a KiCad project in hardware/pcb. (The BOM is hopefully self-explanatory from the schematic!)

Once assembled, the on-board ISP port can be used to flash the ATtiny85. You'll also need to set appropriate fuses to use the internal 8 MHz clock, which the software relies on. The AVRDUDE flags for this are:

text
-U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m

(Note that, until the clock is increased with these fuses, you may need to slow down ISP communication speed: -B 125kHz)

Homebridge Plugin

homebridge-plugin contains a Homebridge accessory plugin which implements the Fan service. This sends I2C commands to the PCB to match the desired speed set through HomeKit. (HomeKit only supports 0%-100% speeds, so these are mapped onto the fan's 1-12 speed settings.)

You will need the i2c-tools package installed to provide the i2ctransfer command-line tool. Make sure that I2C is enabled in your raspi-config too. If everything is working OK, the device should appear at address 0x40 in i2cdetect.

Software

The software is written as a PlatformIO project targeting the ATtiny85, using the Arduino framework.

Communication

The ATtiny85 acts as a bit-banged I2C peripheral on address 0x40. Only one operation is supported, a single-byte write where the byte is in the following format:

text
  .--------------- checksum - number of 1s in rest of packet
.-'-.
c c c 1 s s s s
        '--.--'
           '------ new desired speed (0-12), 0 means off

These packets are designed to be idempotent, so your host should probably send these multiple times to account for the sloppy I2C bit-banging.

IR Commands

The fan operates with NEC-format IR codes at address 0x80. The individual commands are documented below:

PurposeCommandRaw
Power0x920x6D927F80
Vertical oscillation0x8A0x758A7F80
Horizontal oscillation0x870x78877F80
Eco0x810x7E817F80
Pre-on0x820x7D827F80
Pre-off0x830x7C837F80
Light0x9E0x619E7F80
Speed up0x890x76897F80
Speed down0x9F0x609F7F80

Enclosure

There's a very rough 3D printed enclosure which keeps the IR LED aimed in hardware/case.

Parts

17
QtyValueFootprintReferences
2Conn_01x02_MaleConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ3, J4
2LEDLED_THT:LED_D5.0mmD1, D2
110KResistor_SMD:R_0603_1608MetricR1
11KResistor_SMD:R_0603_1608MetricR3
12N3904Package_TO_SOT_THT:TO-92_InlineQ1
1330Resistor_SMD:R_0603_1608MetricR2
147Resistor_SMD:R_0603_1608MetricR4
1ATtiny85-20PPackage_DIP:DIP-8_W7.62mmU1
1Conn_01x04_MaleConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ2
1Conn_02x03_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_VerticalJ1
1SW_PushButton_Switch_THT:SW_PUSH_6mmSW1

The 13 most common of 17 parts.

Similar boards

  • 2 layers30.7 × 76.1 mmRepeater v2, the printed circuit board in 3D

    Repeater v2

    plusvic/simplebus2-intercom

    General description of the Simplebus2 protocol used by some Comelit's intercoms. Hardware for retransmitting Simplebus2 messages over UART.

    17 parts95CC0-1.0
  • 2 layers101.5 × 54 mmSimkarte, the printed circuit board in 3D

    Simkarte

    osmocom/osmocom-analog

    Software Implementation of analog cellular telephony systems like NMT, TACS, IMTS, A/B/C-Netz; mirror of https://gitea.osmocom.org/cellular-infrastructure/osmocom-analog

    15 parts32GPL-3.0
  • 2 layers76.2 × 50.8 mmJerboa-8, the printed circuit board in 3D

    Jerboa-8

    strickyak/jerboa-attiny85-mod-synth

    Modular Synthesizer using an ATtiny85 chip for each module.

    23 parts31MIT
  • 2 layersCastVolumeKnob, the printed circuit board in 3D

    CastVolumeKnob

    WebmasterTD/CastVolumeKnob

    Hardware Volume Knob for Google Cast devices

    18 parts25
  • 2 layers55.9 × 55.9 mmPrintplaat, the printed circuit board in 3D

    Printplaat

    floriaanpost/wonderfoon

    Een nieuwe implementatie van de wonderfoon

    14 parts24
  • 2 layers71.1 × 40.6 mmTiny blinky, the printed circuit board in 3D

    Tiny blinky

    Hack-a-Day/Remoticon_KiCad_Blender

    support files for the 2020 Remoticon KiCad to Blender > PCB renders workshop

    21 parts22
  • 2 layers242 × 60 mmRoothubs, the printed circuit board in 3D

    Roothubs

    gkiefer/home2l

    The Home2Ls - Smart Tools for a Private Home

    178 parts21

Questions

How big is the Meaco attiny PCB?

It measures 35.1 × 32 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Meaco attiny use?

17 parts, built around the ATTINY85-20PU. 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 Meaco attiny KiCad files?

From the AaronC81/meacofan-homebridge-controller repository on GitHub, at the commit this page was made from: the board is hardware/pcb/meaco-attiny.kicad_pcb and its schematic hardware/pcb/meaco-attiny.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Meaco attiny 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).