Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
fpga_fan_controller [2016/08/25 20:07]
joel [iCE40 FPGA Implementation]
fpga_fan_controller [2017/12/06 11:18] (current)
Line 33: Line 33:
  
 ==== Packet Format ==== ==== Packet Format ====
 +Data is transmitted by a 2/3rd / 1/3rd PWM scheme at ~2000bps.
  
-^ Command     ^ Preamble  ^^ 4-bit Fan Id   ^^^^ Payload                   ^^^^^^^+{{:hunter_fan:pwm-modulation.png|}} 
 + 
 +^ Command     ^ Preamble  ^^ 4-bit Fan Id   ^^^^ 7-bit Payload             ^^^^^^^
 ^ Off         | 0   | 0      | LSB | ⋅   | ⋅   | MSB | 1 | 1 | 1 | 1 | 0 | 0 | 1 | ^ Off         | 0   | 0      | LSB | ⋅   | ⋅   | MSB | 1 | 1 | 1 | 1 | 0 | 0 | 1 |
 ^ Speed 1     | ::: | :::    | ::: | ::: | ::: | ::: | 1 | 1 | 1 | 0 | 0 | 0 | 1 | ^ Speed 1     | ::: | :::    | ::: | ::: | ::: | ::: | 1 | 1 | 1 | 0 | 0 | 0 | 1 |
Line 41: Line 44:
 ^ Lamp On/Off | ::: | :::    | ::: | ::: | ::: | ::: | 1 | 1 | 1 | 1 | 0 | 0 | 0 | ^ Lamp On/Off | ::: | :::    | ::: | ::: | ::: | ::: | 1 | 1 | 1 | 1 | 0 | 0 | 0 |
  
-{{:hunter_fan:pwm-modulation.png|}} 
 ===== iCE40 FPGA Implementation ===== ===== iCE40 FPGA Implementation =====
 I wanted to make use of the [[http://www.clifford.at/icestorm/|Yosys/Arachne-PNR/IceStorm]] open FPGA synthesis  tool-chain for the [[http://www.latticesemi.com/Products/FPGAandCPLD/iCE40.aspx|iCE40]], a small FPGA made by Lattice. I wanted to make use of the [[http://www.clifford.at/icestorm/|Yosys/Arachne-PNR/IceStorm]] open FPGA synthesis  tool-chain for the [[http://www.latticesemi.com/Products/FPGAandCPLD/iCE40.aspx|iCE40]], a small FPGA made by Lattice.
Line 55: Line 57:
  
 ==== Performance ==== ==== Performance ====
-The ideal quarter-wave antenna length for a monopole 350MHz is ~214mm. With a flying lead of this length, I found that the FPGA could transmit to a distance of 150m. This range is quite excessive, so I trimmed the antenna to ~50mm which the reduced the transmission distance a more reasonable distance.+The ideal quarter-wave antenna length for a monopole 350MHz is ~214mm. With a flying lead of this length, I found that the FPGA could transmit to a distance of 150m. This range is quite excessive, so I trimmed the antenna to ~50mm which the reduced the transmission range to a more reasonable distance.
  
 Given that there are only 16 id-codes possible with the 4-bit DIP switch, and that the transmit range is so long, and that the fans in my housing complex are presumably all the same type, it would be easy to prank the neighbors in the housing complex by transmitting random commands to all the ids at once.  Given that there are only 16 id-codes possible with the 4-bit DIP switch, and that the transmit range is so long, and that the fans in my housing complex are presumably all the same type, it would be easy to prank the neighbors in the housing complex by transmitting random commands to all the ids at once. 
fpga_fan_controller.1472170068.txt.gz · Last modified: 2017/12/06 11:18 (external edit)