+21622886281
App Inventor Arduino DC Motor

Control a fan with smartphone and Arduino

Purpose of this tutorial:

In this tutorial, we will control a small fan by bluetooth using the Arduino board and a smartphone.This is why we will create two programs: a mobile application with App Inventor for the smartphone and a program for the Arduino board.

Necessary components

  • Arduino
  • Smartphone
  • Fan
  • Relay
  • Test plate

  • Connecting wires

Mounting

To carry out the assembly, you can connect:

Relay:

  • pin (S) to digital pin 4 of  Arduino

  • pin (-) to GND pin of  Arduino

  • pin (+)  to 3.3V pin of Arduino

  • (ON) pin to 5V pin of Arduino

Fan:

  • the first terminal to the COM pin of the relay

  • the second terminal to the GND pin of the Arduino

Bluetooth module:

  • the GND pin to GND of Arduino

  • the VCC pin to the 5V pin of Arduino

  • the RXD pin  to the digital pin 3 of Arduino

  • the TXD pin  to the digital pin 2 of Arduino

Program

Here is the program that allows you to connect the Arduino board to the smartphone and receive a message containing the order to start or stop the fan.

Creation of the application with App Inventor:

We are going to create a mobile application named ‘start_ventilateur_arduino’ with App Inventor which allows remote control of the fan.

We propose to create the design of the application, with the following visual:

Programming with App Inventor

To program the application, App Inventor offers us to use the Blocks space, which allows you to create a program in the form of a block diagram. Very easy to use but requiring a little programming logic.

Here is the program of the application created in the Blocks area of ​​the Inventor App:




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top