Smart Fan

In this project, you can see the temperature from Blynk and turn on the fan remotely.

Note

Before starting this project, we recommend that you complete Get Start with Blynk. The following will give you a clear understanding of Blynk.

Required Components

In this project, we need the following components.

It’s definitely convenient to buy a whole kit, here’s the link:

Name

ITEMS IN THIS KIT

LINK

Raphael Kit

337

Raphael Kit

You can also buy them separately from the links below.

COMPONENT INTRODUCTION

PURCHASE LINK

GPIO Extension Board

BUY

Breadboard

BUY

Jumper Wires

BUY

Resistor

BUY

Power Supply Module

-

L293D

-

ADC0834

-

Thermistor

BUY

DC Motor

BUY

1. Wiring

../../_images/wiring_blynk_motor.png

2. Create Widget and Datastream

  1. Click on the menu icon in the upper right corner and select edit dashboard.

    ../../_images/sp220913_180231.png
  2. Add a Switch widget and a Label widget to the Dashboard.

    ../../_images/sp220914_175437.png
  3. Create a Datastream (I used V3) for the Switch widget. It will be used to turn on the Motor.

    ../../_images/sp220914_155911.png
  4. Create a Datastream for the Label widget(I used V0). It will be used to display the temperature. Set DATA TYPE to String.

    ../../_images/sp220914_175616.png
  5. When finished, click Save And Apply at the top right.

    ../../_images/sp220913_182300.png

3. Run the Code

  1. Edit the code

cd ~/blynk-raspberrypi-python
sudo nano blynk_motor.py
  1. Find the line below and past your BLYNK_AUTH_TOKEN.

BLYNK_AUTH = 'YourAuthToken'
  1. Run the code.

sudo python3 blynk_motor.py
  1. Go to Blynk, on the Dashboard you can check the temperature via Label widget; you can turn on/off the fan via Switch widget.

  2. If you want to use Blynk on mobile devices, please refer to How to use Blynk on mobile device?.