fpga_fan_controller [2016/08/25 19:42] joel [GNU Radio] |
fpga_fan_controller [2017/12/06 11:18] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== FPGA Fan Controller ====== | ||
- | My Ceiling fan is controlled by a [[https:// | ||
- | {{: | ||
- | {{: | ||
- | {{: | ||
- | |||
- | Internally the device uses a [[http:// | ||
- | |||
- | ===== Capture ===== | ||
- | ==== Gqrx ==== | ||
- | {{: | ||
- | |||
- | I used my RTLSDR and [[http:// | ||
- | |||
- | * When buttons are pressed, bunches of packets are transmitted in [[https:// | ||
- | * The carrier frequency is not at all accurately tuned to 350MHz, and drifts significantly based on the transmitter' | ||
- | |||
- | |||
- | ==== Inspectrum ==== | ||
- | {{: | ||
- | |||
- | [[https:// | ||
- | |||
- | Analysis of the transmissions captured by Gqrx revealed that the packets are sent in a PWM (pulse-width modulation) scheme over OOK. | ||
- | ==== GNU Radio ==== | ||
- | {{: | ||
- | |||
- | {{: | ||
- | |||
- | With the modulation of the packets now known, I used GNU radio to construct a real-time version of the Inspectrum demodulator. | ||
- | |||
- | ==== Packet Format ==== | ||
- | |||
- | ^ Command | ||
- | ^ Off | 0 | 0 | LSB | ⋅ | ⋅ | MSB | 1 | 1 | 1 | 1 | 0 | 0 | 1 | | ||
- | ^ Speed 1 | ::: | ::: | ::: | ::: | ::: | ::: | 1 | 1 | 1 | 0 | 0 | 0 | 1 | | ||
- | ^ Speed 2 | ::: | ::: | ::: | ::: | ::: | ::: | 1 | 1 | 1 | 0 | 0 | 1 | 0 | | ||
- | ^ Speed 3 | ::: | ::: | ::: | ::: | ::: | ::: | 1 | 1 | 1 | 0 | 1 | 0 | 0 | | ||
- | ^ Lamp On/Off | ::: | ::: | ::: | ::: | ::: | ::: | 1 | 1 | 1 | 1 | 0 | 0 | 0 | | ||
- | |||
- | {{: | ||
- | ===== iCE40 FPGA Implementation ===== | ||
- | {{: | ||
- | {{: | ||
- | {{: | ||
- | {{: |