Resurrect your old fan! Add Wifi connectivity and control it from anyway!
Project has been done in Amiqual4Home Equipex Creativity Lab - https://amiqual4home.inria.fr/
Spark Core with latest firmware updates :
sudo particle flash --usb cc3000 sudo particle flash --usb deep_update_2014_06
- 3 Relay tinkerkit
- A fan
- For this model, there are four buttons for three speed and one stop. They are connected to the input pullup sparkcore in D0, D1 , D2 which are assosié three relays control the motor speed.
- The motor speed are control by three wire :
- Blue = speed 1
- White = speed 2
- Red = speed 3
- connect each relay on a three wire and on live wire (brown 220v),The relay are connected to the output sparkcore in D3, D4 , D5 and Vin(5v), GND.
- for the sparkcore and the relay is supplied with 5V, install a portable charger transformer.
curl https://api.spark.io/v1/devices/'SPARK_CORE_ID'/fanAPI -d access_token='YOUR_TOKEN' -d "params=CMD_NAME"
For get the status :
- state = 0 : OFF
- state = 1 : SPEED1
- state = 2 : SPEED2
- state = 3 : SPEED3