Project tutorial
Just make it!! BT Smart Fan :)

Just make it!! BT Smart Fan :) © GPL3+

You can make Bluetooth Fan!!

  • 2,645 views
  • 3 comments
  • 12 respects

Components and supplies

Wizwiki 7500
WIZnet WIZwiki-W7500
×1
Arduino Motor Shield
×1
YWROBOT Easy Module Shield V1
×1
HC-06 Bluetooth Module
×1
Servos (Tower Pro MG996R)
×1
DC motor (generic)
×1

Necessary tools and machines

About this project

I will introduce a BT Smart Fan :)You can make bluetooth smart fan if you follow this contents.It is very easy and simple way.Let's start!

Step 1: Prepare materials


We need a several meterials

  1. WIZwiki-W7500 board
  2. Arduino Motor Shield
  3. Easy Module Shield(not absolutely necessary)
  4. JMOD-BT-1(HC-05) bluetooth module
  5. Servo motor(SG-90)
  6. DC motor(5V DC motor)
  7. Rubber eraser (just support DC motor any object)
  8. Some scatch tapes
  9. DC jack(connect Motor Shield)
  10. Some hexagon spacer nut/screw
  11. Some cables
  12. USB mini B type cable
  13. 5V DC Power Supply

They are all... for this project~!

Step 2: Hardware connection:Servo+WIZwiki-W7500

connect SG-90 Servo Motor and hex nut.

Step 3: Hardware connection:Servo+WIZwiki-W7500

Hex nut/screw connect each corner portion.

Step 4: Hardware connection:Servo+WIZwiki-W7500

the finished connect servo and WIZwiki-W7500.

Step 5: Hardware connection:DC motor + Rubber Eraser

DC motor and Rubber Eraser wrap with tape.

Step 6: Hardware connection:Arduino Motor Shield+DC Motor+DC jack

DC motor and DC jack connect Arduino Motor Shield~

Please refer to the picture.

Step 7: Hardware connection:Arduino Motor Shield+WIZwiki-W7500

Motor Shield mounted on the WIZwiki-W7500.

Step 8: Hardware connection:Servo + DC motor

DC Motor maounted on the Servo.

Step 9: Hardware connection:Arduino Motor Shield + Easy Shield

Easy Shield mounted on the Arduino Motor Shield.

Step 10: Hardware connection:Easy Shield + Servo

Servo cable connect to easy shield (GND,VCC,SDA(change function to PWM using software))

Step 11: Hardware connection:Easy Shield + JMOD-BT-1

JMOD cable connect to easy shield pin (GND,VCC,TX,RX).

Step 12: Hardware connection:Connect power supply

DC jack and USB cable connect.

Step 13: Prepare development environment

I prepared mbed develpment environment by the following site.https://developer.mbed.org/

You not installed Tool, Just use Internet.

To get start with mbed.org go on side https://developer.mbed.org/ and create free account.

If you are ready open compiler and create first project.

Step 14: Reference Software : mbed

Source code is https://developer.mbed.org/users/justinkim/code/BTSmartFan_WIZwiki-W7500/

You import this program and compile using mbed internet compiler.

You can get bin file.

Step 15: Reference Software : Smart phone

download smartphone application.

blueterm is bluetooth serial terminal.

Step 16: How to run : Test result


https://www.youtube.com/embed/KhBnYOspxHQ?feature=oembed

You can see the test result by the video.Thank you for your attention.

Code

BTSmartFan_WIZwiki-W7500 C/C++
BTSmartFan_WIZwiki-W7500
/**
 ******************************************************************************
 * @project  Smart BT Fan
 * @author  Justin Kim
 * @version V1.0.0
 * @date    29-JUN-2015
 * @brief   Main program body
*******************************************************************************
**/
 
/* Includes ------------------------------------------------------------------*/
#include "mbed.h"
#include "Servo.h"
 
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
Serial pc(USBTX, USBRX);
Serial bt(PA_14, PA_13);
Servo myservo(D14);
PwmOut Motor(D3);
DigitalOut direction(D12);
 
/* Private function prototypes -----------------------------------------------*/
 
/* Private functions ---------------------------------------------------------*/
/**
   * @brief     Main Function
   * @param  None
   * @retval    None
   */
int main(void)
{
    char ch;
    pc.baud(115200);
    bt.baud(115200);
    pc.printf("Hello World!\n\r");
    bt.printf("Hello World!\r\n");
    
    direction.write(1);
    Motor.period_ms(1);
    
    while(1)
    {
        if(bt.readable())
        {
            ch=bt.getc();
            pc.printf("%c",ch);
            bt.printf("%c",ch);
                                  
            if(ch == '*')
            {
                myservo = 0.5;
            }
            else if(ch == '+')
            {
                myservo = myservo + 0.1;
            }
            else if(ch == '-')
            {
                myservo = myservo - 0.1;
            }     
            else if(ch == '@')
            {
                Motor.write(0.8);
            }
            else if(ch == '!')
            {
                Motor.write(0);
            }
        }
        
        else if(pc.readable())
        {
            ch=pc.getc();
            bt.printf("%c",ch);
            pc.printf("%c",ch);            
                        
            if(ch == '*')
            {
                myservo = 0.5;
            }
            else if(ch == '+')
            {
                myservo = myservo + 0.1;
            }
            else if(ch == '-')
            {
                myservo = myservo - 0.1;
            }
            else if(ch == '@')
            {
                Motor.write(0.8);
            }
            else if(ch == '!')
            {
                Motor.write(0);
            }
        }
    }
}

Schematics

All stacking position
just stacking
Smartfan

Comments

Similar projects you might like

My FAN ARM (control servo with WiFi)

Project tutorial by Lee

  • 2,468 views
  • 0 comments
  • 4 respects

Remote and Voice Controlled Smart Fan

Project tutorial by Paul Trebilcox-Ruiz

  • 4,188 views
  • 3 comments
  • 19 respects

Smart BT Lock with Custom Number

Project tutorial by jegatheesan

  • 3,756 views
  • 2 comments
  • 22 respects

BOFF - Alexa Enabled Open Smart Fan

Project showcase by Stephen Harrison

  • 7,799 views
  • 6 comments
  • 28 respects

Smart BT Door Lock (Simple Arduino)

Project showcase by Arun

  • 8,547 views
  • 1 comment
  • 20 respects

Smart Home - Smart Rules using ARTIK Cloud & Photon

Project tutorial by Raghavendra Ponuganti

  • 3,864 views
  • 2 comments
  • 12 respects
Add projectSign up / Login