Arduino: How to Use a Force Sensitive Resistor (Force Sensor)

Поделиться
HTML-код
  • Опубликовано: 5 июн 2016
  • Parts:
    Force Sensor (Square): amzn.to/2x3xE1s
    Force Sensor (Round): amzn.to/2IXegYT
    Arduino Uno: amzn.to/2LeZ1ZK
    Arduino Starter Kit: amzn.to/2rQT651
    This video explains how to use a Force Sensitive Resistor to control an LED.
    Code/Electrical Diagram: goo.gl/wSQJIU
  • ХоббиХобби

Комментарии • 179

  • @jacobgunderson493
    @jacobgunderson493 5 лет назад +4

    Your video is amazing! I love the animation style!

  • @adamress1
    @adamress1 3 года назад +1

    Great video. It is explained perfectly couldn't have asked for anything better! 👍

  • @arslanlatif8625
    @arslanlatif8625 6 лет назад

    awesome work. exactly what i was looking for, ok so what i want to do is to use two sesnors, get data from each and correspondence to each enable a counter and in the end add the data od both and store it. kindly guide about how can i initiate a counter for these both sensor and how store it . thanks,

  • @klapauciusdede
    @klapauciusdede 6 лет назад +1

    And if I want to use a display in place of the LED to show the pressure value, how would the code result?

  • @shantanukingaonkar6224
    @shantanukingaonkar6224 6 лет назад +1

    Can you the program to get directly the value of force applied instead of LED GLOWING application . I actually want the reading of the stress or strain applied ....also can you suggest any strain guage and module to measure strain on vehicle parts .. compatible with Arduino.

  • @maikels.8680
    @maikels.8680 6 лет назад

    hey mate! is it possible to stream the force which is meassured due to the pressure on the sensor on to a display? and do you have any idea on who the sketch should be like?

  • @7mamwait
    @7mamwait 5 лет назад

    thank you .... but can i make bigger size of it?

  • @blakemckinney6180
    @blakemckinney6180 Год назад +1

    QUESTION: how would you modify the code in order to output the force [N] as resistance changes? I'd like to see the force values in the Serial Monitor of the Arduino IDE.
    Thanks. Also, excellent video!

  • @ionu795
    @ionu795 6 лет назад

    Very useful video! But how can rewrite code if i have 4 or 5 LEDs and these LEDs turn on depending on the pressure on the sensor?
    Example: if i press the sensor with half of my power then 2 or 3 sensor will light, and if i apply all my power all the 5 sensors will light. Thank you!

  • @BigBBradley1
    @BigBBradley1 4 года назад

    hi great vid, im trying to got say 16 with a mux 4016 and self mapping but im not great with the coding thanks.

  • @dariavidisheva2046
    @dariavidisheva2046 5 лет назад

    What if i would like to use an Arduino Uno Wireless to have the LED light up once the force has been applied to the sensor remotely?

  • @jeremyhunter2319
    @jeremyhunter2319 4 года назад

    How many of these FSRs can an arduino handle? What might be better, if not Arduino, if I wanted to receive feedback from 20 or more?

  • @tetianakhotiaintseva562
    @tetianakhotiaintseva562 7 лет назад +3

    Could you please give a list of all the hardware that you used (including cables, board, etc)? I am a total beginner and I have a hard time figuring out what I need to buy to make a setup like this.

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад +4

      Hardware:
      Arduino Uno Board
      Jumper cables
      Bread board
      Force sensor (AKA force sensitive resistor)
      Resistors (10K Ohms)
      You'll also need a computer for programming, and the Arduino IDE software, which is free to download: www.arduino.cc/en/main/software
      To get started with Arduino, you should look for an Arduino Starter Kit online. Here's a pretty cheap and simple kit on Amazon: a.co/4A4fLy1
      It includes all of the hardware listed above, except for a force sensor.
      You can buy the force sensor used in the video here: a.co/aBGnz16
      You could also probably find a cheaper one on eBay.
      Let me know if you have any other questions or need more help getting started!

  • @mehulparashar4657
    @mehulparashar4657 4 года назад

    hey sam my led wont get ON is it because i used 10k resistor for both the FSR and LED? please help asap

  • @crecio1827
    @crecio1827 6 лет назад

    Is there any way i can contact you about a project that i am planning? I would like your opinion on it.

  • @jansirani8210
    @jansirani8210 6 лет назад

    How can you indicate LED for a particular force ...like threshold...so that if it exceeds, led should glow..

  • @DvirLevy
    @DvirLevy 6 лет назад

    Great video!!
    How many if these little sensors can the arduino handle?
    How would I go about hooking up 50 sensors with LEDs?

    • @SamsNeatProjects
      @SamsNeatProjects  5 лет назад

      You can get a component called a shift register that allows you to control more components. I'm not sure exactly how they work or how to use them though.

  • @rajkumarbisoyi7982
    @rajkumarbisoyi7982 7 лет назад

    nice video

  • @RexGalilae
    @RexGalilae 7 лет назад

    You were the chosen one!!

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад +1

      Rex Galilae Sorry, its over. I lost the high ground

  • @Dav3523
    @Dav3523 6 лет назад

    Hi, Sam.
    Thanks for the video - it was helpful.
    I don't understand why one pin of the force sensor goes both to A0 and (through a resistor) to ground?
    I suspect it has something to the increase in voltage as the pressure gets greater, but ... why?

    • @SamsNeatProjects
      @SamsNeatProjects  5 лет назад

      Lol, honestly I don't really understand exactly why the wiring works there. I took physics classes that explained it and everything but I never fully got it. I think part of it is that the resistor is there to prevent shorting, but there's definitely more to it that I don't have a real answer for. Sorry for the late and pretty unhelpful response, but let me know if you're still working on this and I can try to do some more research.

  • @prathameshsawant8003
    @prathameshsawant8003 Год назад

    Hello,
    Thank you for the informative videos.
    I am planning a project, where change in load should change the LED colour bulbs. E.g. 0-5kg - Red, 5-10kg - orange, 10-15kg - yellow and 15-20kg green.
    Can you please help with the layout and code?
    It will be very helpful. Thank you

  • @karensummers7454
    @karensummers7454 4 года назад

    Great video! So if i was collecting data on the amount of force, how would I get the force value in N rather than voltage?

    • @SamsNeatProjects
      @SamsNeatProjects  4 года назад +1

      Karen Summers Just put something 1N on the sensor and use that value and the value when nothing is on the sensor (0N) and then use the arduino map() function or your own formula to convert. You’ll need to calibrate it yourself though since the sensors aren’t consistent enough to always output the same voltages for the same amount of force. Also would be a good idea to test your formula against known forces

  • @ximenesbr
    @ximenesbr 7 лет назад

    Hi! This sensor can measure pressure in a range of measurement and also be reliable if put him on a pad, as in a drum pad for example?

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      Leonilton Ximenes yep, it should work for a drum pad!

  • @yoyoioana16
    @yoyoioana16 7 лет назад

    hello! nice video. Do you happen to know some easy to use sensors that measure weight?

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      There are load sensors that measure weight pretty well. You can also buy straight up weight sensors that are used in scales.

  • @Jesuslpzx
    @Jesuslpzx 6 лет назад

    Hi dude! amazing video. How can i turn another led when it is not pressed? like green when is pressed and red when it´s not.

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      Jesus Lp Z wire up a second LED just like the first except with a different digital pin.
      Then create a new int for the second LED in the code.
      Also, in the if statement add a second digitalWrite that turns the red LED off and in the else statement add a second digitalWrite add another digital writer that turns the Red LED on.
      Let me know if you need more info!

  • @Benjijart
    @Benjijart 6 лет назад

    I'm planning on making an electric skateboard of sorts and my plan is to have this sensor on the deck and place my foot on it to start the motor (and maybe have a way to have the force of my foot correspond to the rpm of the motor). How would I go about hooking this up to through the arduino then to the esc and then to the motor? and could I use a more compact arduino like nano?

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      Benjijart I don't have much experience interfacing an ESC with Arduino but I think you could map the range of the sensor output to a 0-255 scale (assuming that's what scale the ESC uses)
      So it would call a certain amount of power to the motor based on the voltage measured by the analog pin reading the FSR

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      Benjijart you should be able to use a nano with the force sensor but I'm not sure about the ESC

    • @Benjijart
      @Benjijart 6 лет назад

      Thanks! I'm looking into the details right now. I might be able to have the force sensing resistor act like a potentiometer or something like that.

  • @kakoru0505
    @kakoru0505 6 лет назад

    how long do u have to hold down the pressure plate for it to activate? for example if a nerf gonna bullet hit and bounced right of so there was only contact for like a forth of second, would this still activate?

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      It will read the nerf dart. In this example, the sensor is updating every 100 milliseconds (10 times a second), which should be enough time for the dart to register. You can also just decrease the delay to something like 25 ms, and it still will work.

  • @alejandroavila3927
    @alejandroavila3927 6 лет назад

    So how do you convert the voltage into Newtons and wouldn't you need a conversion factor to do so? In a previous comment you had mentioned that the voltage range is from 0-1000 volts, where did you happen to get that?

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      Alejandro Avila it's approximately a range from 0-1000, but I'm not sure of the exact range. I don't think it's measured in volts though. You can map the values to newtons if you place something with a known weight of the sensor.
      Use the value that the sensor reads with that weight and use the map command
      Int newton sensor = Map(int sensor, 0, sensorvaluegoeshere, 0, knownweightgoeshere)

  • @lowlyhollow
    @lowlyhollow 7 лет назад

    So im working on opening a solenoid valve without using momentary switches, would this work? And do i have to program it to work or can i just solder the switch using regular wires?

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      I'm not entirely sure.
      This sensor acts as a resistor/potentiometer, so if you can find a way to implement it like those components then you should be able to do it without code. Otherwise you will need to use programming and a micro-controller.

  • @TheDJkarsy
    @TheDJkarsy 7 лет назад

    is there a way to set it so it can be used as a dimmer? or am i looking at the wrong sensor? many thanks!

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      Do you mean using it like a dimmer switch for a light?
      I'm pretty sure that is possible. Could you explain what you're trying to do a little more?

  • @anthonytolladay1184
    @anthonytolladay1184 6 лет назад

    How would you add an LED indicator for incrimental increases in pressure? Say like an EQ display, showing one bar for one pound, and four bars for four pounds?

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      This may not be the most elegant approach, but you could have four if statements.
      (This is pseudo-code, not actual arduino code)
      if (force >= 1 lb)
      turn on first LED
      if (force >= 2 lb)
      turn on second LED
      if (force >= 3 lb)
      turn on third LED
      if (force >= 4 lb)
      turn on fourth LED
      else
      turn off all LEDs
      This way, when a force of four pounds is applied, each if statement would be triggered, and every LED would turn on.

  • @TKilaSkillz
    @TKilaSkillz 7 лет назад

    Hi,
    Do you think I could used a FSR to power an electric steam iron when pressure is applied to the FSR?
    Thanks

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      If you can hook up an electric steam iron to an Arduino or other micro controller then you can also control it with the FSR. The difficult part will be hooking up the iron.

    • @TKilaSkillz
      @TKilaSkillz 7 лет назад

      Sam's Neat Projects Thanks for your response

  • @alejandroavila3927
    @alejandroavila3927 6 лет назад

    Helpful video! Once it is outputting the values in serial print, what are those values being measured in(in terms of units)/

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      Alejandro Avila I believe it's in volts, but it's not the exact units for volts.
      I'm pretty sue it's just on a scale from 0-1000
      0 being "no electricity" and 1000 being " a lot of electricity"
      Since the force sensor is actually just a resistor
      You can figure out the conversion to kg or N roughly by applying the maximum amount of force or mass that you would expect and measuring the value that is printed. (Pretend for 100 N it's 900)
      So then we could map the output from the force sensor
      By doing
      Map(forceSensor, minoriginal, maxoriginal, minNewtons, maxNewtons)
      Which with our example would be
      Map(forceSensor, 0, 900, 0, 100)

    • @alejandroavila3927
      @alejandroavila3927 6 лет назад

      Is there a way to adjust the code so it outputs the values in pounds because my sensor's force range is from 0-25lbs(0-110N) and I want it to be outputted in pounds?

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      Alejandro Avila yep
      Just do the test I described above and then instead of doing serial.println(force)
      Do
      Int pounds = map(force, 0, (max reading from test), 0, (maximum weight applied during test));
      Serial.println(pounds);

    • @alejandroavila3927
      @alejandroavila3927 6 лет назад

      Okay thank you very much :)

  • @amitcyberprince227
    @amitcyberprince227 7 лет назад

    hello,
    is this possible to see the reading in serial port ,,,,, means "force values"....!

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      If you're talking about adding text in front of the values then yes.
      Just write
      "Serial.print("Force Value:");
      Serial.println(force);
      "

  • @DannyGeurts
    @DannyGeurts 6 лет назад

    is it possible to trigger a audio file to play, using the vs1053 mp3 shield, when force is applied

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      If you can get the shield to work, then yes. I'm not familiar with that specific shield though.
      I believe that all you would have to do is add the statement that plays the file for the MP3 shield in the force sensor if statement.

  • @rishikapujari6037
    @rishikapujari6037 7 лет назад

    Hi, I'm trying to integrate the round force sensor in a prosthetic arm project. The fingers are actuated by servo motors which must stop when the sensor encounter an object (because while programming the motors, we cannot take into account the size of the object being grasped).
    What value of force sensor output is required for this purpose? Like, at what value of output must the motors be commanded to stop?
    Thank you.

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад +1

      Rishika Pujari each force sensor is a little bit different, so you'll just need to find the value when the sensor has no force applied and then the value when you apply different forces with your hand. You can determine the value by printing analogRead:
      Serial.println(analogRead(A0)
      Let me know if you need any more help.
      Good luck with your project!

    • @rishikapujari6037
      @rishikapujari6037 7 лет назад

      Sam's Neat Projects Thank you, I'll let you know how it goes.

  • @stefantomovic9626
    @stefantomovic9626 7 лет назад

    Do you know how sensitive these are? Say, could they be used in a wind tunnel?

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      I just tried blowing on mine pretty hard and it worked. Should be sensitive enough for a wind tunnel. It just outputs the resistance.
      Also, if the wind tunnel isn't strong enough to push down on the force sensor alone, then you could construct something that catches more wind. Just attach a small wood/foam square on the bottom of a piece of foam board or card-stock and attach it to the Force sensor. The card-stock would catch more wind, pushing the small piece of foam/wood down in a concentrated spot.
      Digram:
      _________________

  • @vonkleomarcuelo745
    @vonkleomarcuelo745 8 лет назад

    how to know how much force you will put in the code? or you just estimated it? thanks :)

    • @SamsNeatProjects
      @SamsNeatProjects  8 лет назад

      I just estimated it. However, you can see how much force the sensor reads by opening the serial monitor while the program is running. (The magnifying glass icon in the top right of the Arduino Programming application)
      Hope that helps! Let me know if you have any more questions.

  • @sunflower-bp6np
    @sunflower-bp6np 6 лет назад

    This is my first time looking up for fsr.. please can you make a move in depth video about the range of voltage range of pressure etc...

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      queen bee Lol, not gonna lie I honestly don’t know much about how it really works. I just knew how to wire it and code it.

    • @sunflower-bp6np
      @sunflower-bp6np 6 лет назад

      Sam's Neat Projects its ok... if you learn anything about it make a future video too... thanks

  • @dhiexviii
    @dhiexviii 6 лет назад

    Hello. Is it possible to make it activate a gps and inform a phone?

  • @johnstanley6970
    @johnstanley6970 5 лет назад

    What steps would you have to take to make this work on a 12v circuit?
    Also how would you make a circuit with 2 or 3 bulbs?
    A reply would be appreciated, Thanks

    • @SamsNeatProjects
      @SamsNeatProjects  5 лет назад +1

      You can use a series of if statements. So like
      if(force < 200){
      Light up 2 LEDs
      }
      if(force < 300)
      {
      Light up 3 LEDS
      }
      etc.

    • @johnstanley6970
      @johnstanley6970 5 лет назад

      @@SamsNeatProjects I put the bulbs in series and the voltage loss means the bulbs lose power as the voltage passes through. Is there any way to stop this?
      Thank you.

  • @Rabianurguven
    @Rabianurguven 5 лет назад

    wow you draw up these :O

  • @rebeccamergia9101
    @rebeccamergia9101 5 лет назад

    What do you do when at the compiling stage, it states 'Sketch uses 2232 bytes (6%) of program storage space. Maximum is 32256 bytes'

    • @alexliu694
      @alexliu694 5 лет назад

      That means it loaded correctly.

  • @mekiaskebede1082
    @mekiaskebede1082 5 лет назад

    is there anyway to make the force sensor wireless?

    • @SamsNeatProjects
      @SamsNeatProjects  5 лет назад

      Not that I know of, sorry. There's probably some type of Arduino product or an electrical component that can help you out but I have no idea what that would be.

  • @naiwen94
    @naiwen94 6 лет назад

    Can i use this to act as a switch to activate a circuit. Can ir sense light weight or small force?

    • @naiwen94
      @naiwen94 6 лет назад

      can i use a simple circuit that without using arduino to activate the function of this resistor?

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      johnny hii I believe you can. It should act similar to a potentiometer, which is a variable resistor.

  • @mertcapkin7263
    @mertcapkin7263 6 лет назад

    Does it only work with a human finger, or also with something covered, such as asheet of plexiglass?

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      Mert Capkin it will work with anything that applies force, so plexiglass would work

    • @mertcapkin7263
      @mertcapkin7263 6 лет назад

      Sam's Neat Projects thanks for the info :)

  • @edwindlp9327
    @edwindlp9327 7 лет назад

    This can be used for measure weight??

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      Edwin De Leon Pulido not very accurately. It's best for measuring whether something heavier is touching the sensor, not measuring how heavy something is

  • @nathanwood2369
    @nathanwood2369 7 лет назад

    Hello I am trying to make a weight sensor for a Nerf gun to say how many bullets it has but is there a way to way in kilograms and make it turn into a number? thank you for this tutorial by the way.

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      Mass units aren't always super reliable with this sensor, but I think it's possible.
      You could find the highest possible weight that you want to use and measure its resistance on the sensor (analogRead). Then you can use the map command with the object's actual weight and the value on the force sensor like this
      int massKg = map(analogRead(A0), 0, (number for max resistance output on force sensor), 0, (number for the highest possible actual mass IN KG). It will automatically convert the data from analogRead to Kg. Again, it may not be very reliable though.
      Sorry for the late response.

  • @alexc7095
    @alexc7095 5 лет назад

    Hey man, how would i go about connecting multiple preassure sensors and reading all the data at once ? Say 5 or 3 preasure sensors from wich i need to get data simoultanious.

    • @SamsNeatProjects
      @SamsNeatProjects  5 лет назад

      Alex C basically copy the variables code in the video and rename them like “sensor1”, “sensor2”, etc
      Then when it prints you can add something in each print statement like “sensor1: “ so you can tell which data goes to which sensor

    • @SamsNeatProjects
      @SamsNeatProjects  5 лет назад

      So add the extra sensors and wire them the same (but use different analog A# ports as seen in the code below)
      Here's the code:
      int pressurePin1 = A0;
      int pressurePin2 = A1;
      int pressurePin3 = A2;
      int force1;
      int force2;
      int force3;
      void setup() {
      Serial.begin(9600);
      }
      void loop() {
      force1 = analogRead(pressurePin1);
      force2 = analogRead(pressurePin2);
      force3 = analogRead(pressurePin3);
      Serial.println("1: " + force1 + " 2: " +force2 + " 3: " + force3);
      delay(100);
      }

    • @SamsNeatProjects
      @SamsNeatProjects  5 лет назад

      Let me know if that code works

    • @MrJ20i
      @MrJ20i 5 лет назад

      @@SamsNeatProjects Hi, Sir. I already try this multiple fsr pressure sensor coding. But i have a problem, it show like this:-
      invalid operands of types 'const char*' and 'const char [7]' to binary 'operator+'
      ....this error is for line Serial.println("1: " + force1 + " 2: " +force2 + " 3: " + force3);
      How can I fix this problem Sir?

  • @purplefurture6960
    @purplefurture6960 4 года назад

    why do we need resistors ?

  • @M2CREATIVE
    @M2CREATIVE 7 лет назад

    Not able to read your fritzing diagram, can you show your breadboard in another way or explain what pins need to go to what on a diagram on a Bboard not fritzing?

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      You're talking about the fritzing linked in the description right?
      Pause at 2:35 for a real life view
      Here's another version of the Fritzing that shows the Force sensor more clearly: samsneatprojectblogcode.blogspot.com/2016/06/force-sensor-code-and-wiring.html
      Here's a written version:
      5V Arduino: connect to the Positive channel on the breadboard (one of the long, horizontal, top channels)
      GND Arduino: Connect to the negative channel on the breadboard (the other long top channel)
      Force Sensor: Connect the legs to two vertical channels on the breadboard.
      Left Leg of FSR: Connect a wire from the channel that the left leg is in to the long positive channel.
      Right Leg of FSR: Attach one leg of 10k Ohm resistor that connects to another vertical channel. The other leg of the resistor should connect to the negative long channel. In the Right leg FSR Channel, also attach a wire that connects to A0 on the arduino.
      Let me know if this cleared things up, or if you need more help

  • @jeganesansinnarajah7355
    @jeganesansinnarajah7355 7 лет назад

    is the output is in newton or what?

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      Jeganesan Sinnarajah output is how much voltage runs through the pin, since the force sensor is actually just a resistor that changes resistance when more force is applied.
      You can use the map() command to map it to newtons if you need specific units

  • @jacobtumminaro1426
    @jacobtumminaro1426 7 лет назад

    I am using three different pressure sensors, so for the coding I would set the other two pressure sensors to different analog ports, correct?

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      Jacob Tumminaro correct

    • @jacobtumminaro1426
      @jacobtumminaro1426 7 лет назад

      I am also just displaying the amount of pressure in newton on an led screen. My email is jacobtumminaro@yahoo.com and my phone number is 2192996497.

    • @jacobtumminaro1426
      @jacobtumminaro1426 7 лет назад

      Wow, thank you so much for the quick response, I will be subscribing.

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      Jacob Tumminaro are you having trouble displaying the force or are you all set on that one?

    • @jacobtumminaro1426
      @jacobtumminaro1426 7 лет назад

      Sam's Neat Projects I am having trouble displaying the force, I don't know the code for it.

  • @clutch302tc
    @clutch302tc 6 лет назад

    How would I be able to find out how much kg/lbs is applied. Would like to see a digital readout.

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      clutch302tc Alejandro Avila the sensor outputs a range from approximately 0-1000, but I'm not sure of the exact range. You can map the values to kg/lbs if you place something with a known weight of the sensor.
      Use the value that the sensor reads with that weight and use the map command
      Int mass = Map(int sensor, 0, sensorvaluegoeshere, 0, knownweightgoeshere)

    • @sofeemnasim6563
      @sofeemnasim6563 6 лет назад

      What is int sensor value here

  • @nicehatthanks
    @nicehatthanks 7 лет назад

    Great Video, Any chance for the data sheet, I would like to know how much force in newtons the sensor can register. Thanks!

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад +1

      learn.adafruit.com/force-sensitive-resistor-fsr/overview
      0-100 N

  • @olumsuzks3718
    @olumsuzks3718 7 лет назад

    Force sensor sensetive for the hand only or what?

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад +1

      +ölümsüz ks it's sensitive to any force that's applied

  • @chakreeshminnal7456
    @chakreeshminnal7456 6 лет назад

    could I use a 1000 ohm resistor instead of a 10,000 ohm resistor ?

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      I'm not entirely sure. I think you should be alright, but the values will be pretty different than in the video. I'd stick with 10,000 to be safe.

  • @sissyboo111111
    @sissyboo111111 4 года назад

    Why did you need the 10k resistor?

    • @SamsNeatProjects
      @SamsNeatProjects  4 года назад

      Shaina Sexton Might not be necessary since the sensor always offers some resistance but I added it just to be safe. Basically just to avoid shorting the arduino board

  • @MegaAmooor
    @MegaAmooor 7 лет назад

    Hi! Can you please explain how I can use the force sensor to activate a sound? And if you have/know of any tutorial vids for that. Would be much appreciated!

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад +1

      Amr Saad check out the instrument video and the piezo buzzer video on my channel. Just replace the ultrasonic sensor in the instrument video with the force sensor and it should work

    • @MegaAmooor
      @MegaAmooor 7 лет назад

      Awesome. And would the coding be the same?

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      Amr Saad it's going to be a little bit different. Instead of doing calculations and everything for the ultrasonic sensor you can just replace its code with the force sensor code in this video (excluding the LED lighting up)

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      Amr Saad let me know if you need more of an explanation than that and I can write some quick example cose

    • @MegaAmooor
      @MegaAmooor 7 лет назад

      Sure thing. Thanks a ton!

  • @ycdantywong
    @ycdantywong 5 лет назад

    Are these sensors measuring kg/cm or kg/mm?

    • @SamsNeatProjects
      @SamsNeatProjects  5 лет назад

      They don't output a measurement. It's just reading the voltage from the sensor.

    • @MrDman4djob
      @MrDman4djob 5 лет назад

      @@SamsNeatProjects How would we go about converting that sensor voltage to G or KG?

  • @reaperbombgaming4986
    @reaperbombgaming4986 7 лет назад

    Is there a way to just press the sensor once making the light stay on.

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      Yep! Do you want to be able to press it once to turn it off as well?

    • @reaperbombgaming4986
      @reaperbombgaming4986 7 лет назад

      Sam's Neat Projects yes

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      +ReaperBOMB GAMING look up toggle switch Arduino code

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      +ReaperBOMB GAMING you'll need to add another variable called previousState. It basically checks to see if the previous button state was on or off. If the previous state is different than the current force then the light should turn on and stay on. There are resources about toggle switches that will explain it better. Tell me if you need more help or if the other resources don't explain it well

    • @reaperbombgaming4986
      @reaperbombgaming4986 7 лет назад

      +Sam's Neat Projects Ok I will look into it. Thanks

  • @DownhillAllTheWay
    @DownhillAllTheWay 6 лет назад

    Does it just detect pressure or no pressure, or can it be used as an analog device? If so, what is its sensitivity? Can it, for example, be used for a letter scale, or for a bathroom scale? Does pressure have to be evenly distributed over the surface? For example, would it give a different reading if a snooker ball was placed on it, from if a snooker ball was placed on a piece of Styrofoam on it to distribute the pressure?

    • @power-max
      @power-max 6 лет назад

      As mentioned in the video this sensor is a variable resistor (varies with force).

  • @Pornoelch13
    @Pornoelch13 8 лет назад

    Hey Sam! First of great tutorial! i am currently working on a similar project. but instead of lighting up a led i want to produce sound with a piezo, if the force sensor is pressed. the 10k resistor you connected to ground works as a voltage divider right? if i am not completely wrong, i basically just have to exchange the led in your project with the piezo, rework the code with the sounds (obviously :D) and set the force sensore to a certain pressure and tell it what to do, if the value gets higher or stays lower right?

    • @SamsNeatProjects
      @SamsNeatProjects  8 лет назад

      Right! If you just put the Piezo Buzzer in the place of the LED it should work. By the way, you don't need the 220 ohm resistor on the Piezo like you need for the LED.
      Tell me if that works or if you need any more help!

  • @yobeh7380
    @yobeh7380 7 лет назад

    how do I use pressure sensor to off the led?

    • @yobeh7380
      @yobeh7380 7 лет назад

      and how do I use pressure sensor to speed out or slow down my servomotor?

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      Reverse the off and on in the LED code

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      Can you show me how your code is currently set up?

    • @yobeh7380
      @yobeh7380 7 лет назад

      Sorry ,that is just my hypothesis😂😂😂

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      Ah, got it. There's a link to sample code in the description. For the LED you just switch digitalWrite(LED, HIGH) to digitalWrite(LED, LOW) (And vice versa).
      For the servo you can use a function called map, which allows you to map the input data from the pressure sensor to the position of a servo.
      www.arduino.cc/en/Reference/Map

  • @alejandroavila3927
    @alejandroavila3927 6 лет назад

    How do you make the sensor more sensitive?

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      Alejandro Avila when you say more sensitive do you mean more precise? Or more likely to change values when a very small amount of pressure is applied?

    • @alejandroavila3927
      @alejandroavila3927 6 лет назад

      Both

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      Alejandro Avila do some testing with values. Change the threshold in the if statement to be much lower.

    • @alejandroavila3927
      @alejandroavila3927 6 лет назад

      Sam's Neat Projects I meant like making it more sensitive without putting much force because as of rn I have to put a lot of force to begin my readings

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      Alejandro Avila I don't know of a way to do it through programming or wiring, but you could try placing a very small weight over the sensor. The object should be light enough that it doesn't cause a change in sensor readings, but it will make it so that you have to apply less force to start getting data.
      This only works if the sensor is facing up though, since it relies on gravity.
      Something like folded cardstock or a half a deck of cards might work.

  • @iPaaax
    @iPaaax 7 лет назад

    Why are you using a resistor on a LED?
    Thanks for awnsering :)

    • @SamsNeatProjects
      @SamsNeatProjects  7 лет назад

      If you power the LED through direct 5V for too long it will burn out the LED. Using a resistor is better for the LED.

    • @iPaaax
      @iPaaax 7 лет назад

      I have a board that has 3,3V. If have a LED with it, but don't know which one. Any idea if I still need a resistor?

    • @danielhawkins3392
      @danielhawkins3392 7 лет назад +3

      I've only recently gotten into electronics i read as a good rule of thumb that 15mA is a good amount of amperage you want running through an average led.
      R = V/I
      R = 3.3/0.015
      R = 220 ohms
      if your using the arduinos 5V pin
      then 330 ohms

  • @akyle96
    @akyle96 2 года назад

    If I wanted to connect several hundred pressure sensors, how would I do that?

    • @SamsNeatProjects
      @SamsNeatProjects  2 года назад +1

      There’s a component that you can use to control lots of components at once but I don’t remember what it’s called. Something with bits? I’ve been looking it up but can’t find it

    • @SamsNeatProjects
      @SamsNeatProjects  2 года назад

      If I remember correctly basically it sends a lot of signals in a row and then the component keeps track of the order of the signals and then transfers those signals to tons of components. That way you could send “turn A on, turn B off, turn C on” from one pin and then the component would know to turn the output pin for A on, B off, and so on. You might still need multiple arduinos but that would help cut the cost down

    • @SamsNeatProjects
      @SamsNeatProjects  2 года назад

      Wait what’s the project? Do you need to read every sensor individually or is it like if any of the hundreds are pressed something will happen? If it’s the latter you could probably find some wild electrical engineering way to connect them all in series and then check for voltage changes

    • @akyle96
      @akyle96 2 года назад

      @@SamsNeatProjects it is for inventory management, I need to be able to tell from a web server if there are items on basically as many items on shelves as possible using FSR pressure sensors.

    • @SamsNeatProjects
      @SamsNeatProjects  2 года назад

      @@akyle96 yeah that might just be using multiple arduinos and multiple bit registers (I think that’s the name I just remembered it)

  • @kristoffergaard8648
    @kristoffergaard8648 6 лет назад

    In the beginning you said that voltage increases with force. That is not true, more force (less resistance) will decrease voltage and increase current. (V=IR) As resistance decreases, so does voltage.

    • @SamsNeatProjects
      @SamsNeatProjects  6 лет назад

      Oh shoot, you're right. Good catch!
      My bad, I hadn't gone through the E&M section of my physics class yet.

    • @stinkreynolds7185
      @stinkreynolds7185 6 лет назад

      Kristoffer Gaard If he used it on the high part of a voltage divider and tapped the middle, he'd be correct, but otherwise you're right.

  • @gamerpaddy
    @gamerpaddy 8 лет назад

    why are they so damn expensive? 11 bucks a piece even on aliexpress

    • @SamsNeatProjects
      @SamsNeatProjects  8 лет назад

      I found an $8 round Force Sensor on eBay with free shipping. Still right around $10 though... r.ebay.com/rJ5nK9
      There's also a cheaper type of sensor called a piezo-electric pressure sensor. You can get them for around $2 for 20 pieces. However, I haven't used these before so I don't know how similar they are to force sensitive resistors, or if they even have the same function. r.ebay.com/cwzRHl

    • @gamerpaddy
      @gamerpaddy 8 лет назад

      Well thanks, but no shipping to germany.
      the problem with these is that only one manufacturer makes them (Interlink) so they can dictate the prices.
      piezo only react when force changes, not when allready applied. they are much more like a capacitor, the FSR are resistors.

  • @DownhillAllTheWay
    @DownhillAllTheWay 6 лет назад

    Surely the point of this video is the commentary. So why distract from it with a music track? What purpose does the music serve?

    • @DownhillAllTheWay
      @DownhillAllTheWay 6 лет назад

      Sam's Neat Projects responded : "What purpose does your collection of RC airplanes and mediocre poetry serve? "
      That's not an argument in favour of a music track in competition with your commentary. You show all the suave sophistication of Donald Trump -
      Reporter : What do you say about your sexual proclivities?
      Trump : I'm going to smash ISIS
      Reporter : Did you have any collusion with Russia?
      Trump : Look at what Hillary Clinton did.
      Me : What purpose does the music track serve?
      You : What purpose do your videos serve?
      None of these answer the question. It's called a Straw Man - when faced with an argument that you can't defeat, make some intentionally misrepresented proposition that is easy to demolish, and make that your argument. The analogy comes from the straw man that was used in times past for bayonet practice - much easier to defeat than a real soldier.
      You asked a question, so unlike you, I'll answer it. My videos serve to entertain, and sometimes to inform those who wish to look at them - for example, the furniture making video shows a method for carving oak that I have never seen anywhere else, so the video was to pass on that method. Are they mediocre? Of course they are. I'm not a professional film maker, nor am I (with reference to the poetry) an actor, either professional or amateur - but that doesn't preclude having a bit of fun. Should I be ashamed of that? Most RUclips videos are mediocre, as is yours - but that's OK. Like me, you're not motivated by professionalism. I don't think you do it in the hopes of making a few pennies from RUclips, as you don't beg people for a thumbs-up, and "please subscribe to my channel" - on the contrary, you end with "If you have questions, ask them below, and I'll try to help". Well, I asked a question, but if it was beyond your abilities to answer, you could have just said "Sorry, I don't know - I haven't experimented with those properties of the device". My guess is that you were motivated by a desire to pass on what you had discovered about force sensitive resistors - an admirable motivation to the benefit of all who are interested. I really wanted to learn about them for a project I'm starting, but in my case, a life-long sufferer with ADHD, I was unable to follow the commentary, despite listening to the video three times, because I was distracted by the music. Naturally, I was frustrated by it, and I believe my question was a valid one - what is the purpose of it? To make more people listen to a commentary about force-sensitive transducers? To make them understand better? To my mind, the music has no pro's and all con's in this context. To those who want to listen to music, there's plenty of it on RUclips. I spend a good deal of time doing just that.
      It would be great if RUclips allowed for separate tracks for commentary and music, so one or the other could be switched off - but they don't.

    • @jumbo6498
      @jumbo6498 6 лет назад

      Relax. It was you who chose to pick on something trivial.

    • @SamsNeatProjects
      @SamsNeatProjects  5 лет назад

      Oh man, I just saw this. I don't remember replying that, but that was really mean on my part if I did. I'm really sorry about that, man. I'd imagine that I thought I was being funny at the time, and I'm assuming I realized that it wasn't even funny shortly after and then deleted the comment. That's no excuse though. Either way, it's incredibly messed up to say unnecessary mean stuff about someone's passions, and it sounds like I did just that. Once again, I really am sorry that I said that.