Electronic Project 34: A simple guide on how to make an automatic alarm system using the Force Sensitive Resistor, Relay, Buzzer and Arduino Uno

in #utopian-io8 years ago (edited)

What Will I Learn?

At the end of this tutorial:

♦ The readers will be able to create an automatic alarm system using the force sensitive resistor, buzzer, relay and arduino uno.

♦ The readers will be able to know how the circuit works.

♦ Learn to apply the circuit in the future electronic projects

Introduction

In this tutorial, we will create an automatic alarm system using the force sensitive resistor and a buzzer including relay and arduino uno. The buzzer will give sounds automatically when the force sensitive resistor activates.

You can read more about Force Sensitive Resistor Here

image.png

Requirements

Electronic Components

♦ Arduino Uno

♦ Force Sensitive Resistor

♦ Resistor

♦ Transistor

♦ Buzzer

♦ Relay

♦ Breadboard

♦ Connecting wires

Software

♦ Fritzing application

Difficulty

♦ Advance

Tutorial Contents

Using the fritzing software, we will create our circuit diagram, arduino codes and prototype using the breadboard

Part I. Schematic Diagram

So first let us construct our circuit diagram.

image.png

Select the electronic components needed for the circuit in the fritzing library. We need 1 arduino uno, 1 Force Sensitive Resisitor, 1 transistor, 1 buzzer, 1 switch and 2 resistors.

image.png

Arrange the components before constructing the circuit.
In arranging the components, place all the components for the input side (left side) of the arduino and the components for the output side (right side).
Our input component will be the fsr sensor and at output side we have the amplifier circuit and the buzzer. Our amplifier circuit is compose of 2 resistor and 1 transistor.

image.png

Now let us construct our circuit diagram.

At the input side of our circuit, we have the force sensitive resistor sensor. This sensor has two pins, 1 for source voltage, one for the input data signal and for ground terminal. So now, we will connect the fsr sensor to the 5v source from the arduino uno and the other terminal for the analog pin 3 of our microcontroller as you can see in the figure below.

image.png

At the output side of our circuit, we need only one output pin that will be connected to our amplifier circuit. You can select which digital output pin do you like, for this tutorial I will use pin 13.

image.png

The amplified output from the collector terminal of our amplifier circuit will be fed to the external series circuit compose of the switch and the buzzer.

image.png

Now this is our final circuit diagram.

image.png

Once our fsr sensor detects force, its resistance will change proportional to the force being applied. If the resistance decreases, it allows current to flow through the pin 3 of our microcontroller that will be serve as the input signal.

image.png

Upon receiving the input signal from the fsr sensor, our microcontroller was programmed to give an output signal to pin 13.

image.png

This output signal from pin 13 is then fed to the base resistor of our amplifier circuit to be amplified. Once amplified, it will be connected to the switch and buzzer. This signal will triggers the buzzer to give an alarm. The purpose of the switch is to manually on or off the buzzer if the fsr sensor continues to detect forces.

image.png

Part II. Code

Now let us do programming of our Arduino uno.
Click on code to start.

image.png

The input pin for our microcontroller is the pin 3 and for the output pin is pin 13.

int fsrPin = 3 ;   // select the input pin for the fsr sensor
int resPin = 13; // select the pin for the base resistor
int fsrValue = 0// initial value store from our fsr sensor

image.png

void setup() {
  // declare each Pin as an INPUT:
  pinMode(fsrPin, INPUT);
// declare each pin as an OUTPUT:
pinMode(resPin, OUTPUT);
}

image.png

void loop() {
  // read the fsr and store it in the variable fsrValue:
  fsrValue = analogRead(fsrPin);
// if the force sensitive resistor detects force 
  if (fsrValue >= threshold) {
digitalWrite(resPin, HIGH);
else if
digitalWrite(resPin, LOW);
}

image.png

Here are our arduino codes.

int fsrPin = 3 ;   // select the input pin for the fsr sensor 
int resPin = 13; // select the pin for the base resistor 
int fsrValue = 0// initial value store from our fsr sensor 
  void setup() { 
  // declare each Pin as an INPUT: 
  pinMode(fsrPin, INPUT); 
// declare each pin as an OUTPUT: 
pinMode(resPin, OUTPUT); 
} 
void loop() { 
  // read the fsr and store it in the variable fsrValue: 
  fsrValue = analogRead(fsrPin); 
// if the force sensitive resistor detects force 
  if (fsrValue >= threshold) { 
digitalWrite(resPin, HIGH); 
else if 
digitalWrite(resPin, LOW); 
}

Part III. Breadboard

Click on the breadboard.

image.png

Arrange each component in the breadboard before connecting.

image.png

Now connect each component if you don’t know how to connect using breadboard just read my previous tutorial about how to construct a circuit in the breadboard

image.png

Application

The readers can create their own automatic buzzer alarm using the fsr sensor and a relay like this example below.

link source

Curriculum

Here are my other tutorials for electronic projects.

ELECTRONIC PROJECTS

Tutorial 1

Tutorial 2

Tutorial 3

Tutorial 4

Tutorial 5

Tutorial 6

Tutorial 7

Tutorial 8

Tutorial 9

Tutorial 10

Tutorial 11

Tutorial 12

Tutorial 13

Tutorial 14

Tutorial 15

Tutorial 16

Tutorial 17

Tutorial 18

Tutorial 19

Tutorial 20

Tutorial 21

Tutorial 22

Tutorial 24

Tutorial 25

Tutorial 26

Tutorial 27

Tutorial 28

Tutorial 29

Tutorial 30

Tutorial 31

Tutorial 32



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @rfece143 I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x