Electronic Project 7: Starting the DC motor using the Force Sensitive Resistor

in #utopian-io8 years ago (edited)

What Will I Learn?

At the end of this tutorial you will be able to:
♦ know how to start a dc motor using an FSR sensor.
♦ apply this mechanism in any related electronic projects.
♦ improve an existing electronic projects

Requirements

**Electronic Components **
♦ Arduino
♦ 5V relay
♦ 10k ohms Resistor
♦ Transistor
♦ 5V external supply (battery)
♦ 5V DC motor
♦ PCB
♦ Connecting wires

Software
♦ Fritzing application

Difficulty

-Advanced

Tutorial Contents

Using the fritzing software, we will create our circuit diagram, PCB layout and arduino codes.
Part I. Schematic Diagram
So first let us construct our circuit diagram.

  1. Open the fritzing software.
    image.png
  2. Select the electronic components needed for the circuit in the fritzing library.
    image.png
  3. Connect the circuit diagram.
    image.png
  4. Connect the FSR to the 5v pin of the arduino uno.
    image.png
    The digital input pin number 13 will be connected to the input of the 5v relay as you can see in the figure below.
    image.png
    For the final circuit diagram
    image.png
    image.png

The force sensing resistor is an electronic component that changes its resistance when a force, pressure & mechanical stress are being applied. When a force is applied to the FSR, its resistance decreases and allowing current to flow.
image.png

This current is then fed to the analog input of the arduino and it is programmed to activate or to give output when the force sensing resistor triggers. The digital output is then fed to the base resistor of the transistor. This transistor will act as a switch. Allowing a current output at the collector terminal.
image.png
This current output from the transistor is then fed to the 5V relay. The relay will trigger, switching the battery to connect to the dc motor making it to activate.

image.png

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

  1. image.png
    So in our code, we take consideration that our input signal will be based on the functionality of the force sensitive resistor.
    We will choose which analog pin input do we use, so in this tutorial I will use pin number 3 (Analog input). The digital output (pin number 13) is connected to the base resistor of the transistor’s input.

int fsrsensorPin = 3;
int baseresistorPin = 13;
int fsrsensorValue = 0; // variable to store the value coming from the FSR sensor

image.png

void setup()
{
pinMode(baseresistorPin, OUTPUT); // declare the baseresistorPin as an OUTPUT:
}

image.png

void loop()
{
fsrsensorValue = analogRead(fsrsensorPin); // read the value from the FSR sensor:
digitalWrite(baseresistorPin, HIGH); // turn the transistor’s baseresistorPin on
delay(fsrsensor500); // stop the program for milliseconds:
digitalWrite(baseresistorPin, LOW); // turn the transistor’s baseresistorPin off:
delay(fsrsensor1000ms); // stop the program for milliseconds:
}

image.png

Now this is our Arduino Codes

int fsrsensorPin = 3; 
int baseresistorPin = 13; 
int fsrsensorValue = 0; 
void setup() {
pinMode(baseresistorPin, OUTPUT); 
}
void loop() {
fsrsensorValue = analogRead(fsrsensorPin); 
digitalWrite(baseresistorPin, HIGH); 
delay(fsrsensor500ms); 
digitalWrite(baseresistorPin, LOW); 
delay(fsrsensor1000ms); 
}

Part III. PCB Layout
Click on the PCB.
image.png

Arrange or design your circuit on the pcb.
image.png

Click on the autoroute to enable the autoconnect for the circuit layout.
image.png
Drag the connection according to your layout.
image.png

Now let us design our circuit layout on the PCB.
image.png

Application

The user can use the output part of the circuit to control the lights when the FSR sensor is being pressed or touch. And also you can make your own electronic projects that need a force sensitive resistor to control the output.

The link below is an example of FSR used in controlling led lights.

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



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 @forkonti, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

good writing I like. expand the work again, and more articles. hopefully a little science that you provide useful to the reader
do not forget to follow me @amirdesaingrafis

greetings follow me and follow me. thank you
super greetings @amirdesaingrafis

thanks @amirdesaingrafis ..sure..next time..

A great tutorial for beginners to follow, I used to use Proteus software to design my circuits but this one looks more advanced.

wow..thanks @aamirijaz ..i guess you like electronics..

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

Coin Marketplace

STEEM 0.12
TRX 0.34
JST 0.033
BTC 124520.29
ETH 4711.77
BNB 1312.62
SBD 0.78