好文档就是一把金锄头!
欢迎来到金锄头文库![会员中心]
电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本

压力传感器与arduino.docx

14页
  • 卖家[上传人]:m****
  • 文档编号:393746901
  • 上传时间:2022-10-01
  • 文档格式:DOCX
  • 文档大小:1.10MB
  • / 14 举报 版权申诉 马上下载
  • 文本预览
  • 下载提示
  • 常见问题
    • FSR Sample Project压力感应电阻是弯曲压力传感器的一种,简称FSR,FSR是一种随着有效表面上压力增大而输出阻值减小的高分子薄膜,FSR并不是测压元件或形变测量仪,尽管她们有着相似的性能并且此类压力感测电阻不合用于精密测量,但是FSR却是一款敏捷度较高的传感器这是它的性能曲线下面是几款不同型号的FSR今天要简介的这款是FSR-402,它的有效面积约为19.63平方毫米(直径为5mm的圆),下面是它的尺寸标注图,有效面积是顶部的小圆   FSR的厚度为0.2mm—1.25mm,这款FSR-400的厚度为0.3mm压力敏感范畴是从100g到2kg声压敏捷度是从0.1kg/cm²到10 kg/cm²在安装时有几种注意事项:1、要尽量选择稳固,光滑且平坦的安装表面;2、当你的安装表面是曲面时,你安装FSR时势必会弯曲它,这样一来FSR就会受力,就会一定限度上影响到FSR的精确度,因此要注意尽量不要将FSR的有效表面安装在曲面上(注:是圆形有效表面不可弯曲,而长尾部可以弯曲);3、要保持接触表面的清洁;4、受力不要超过它的额定值;5、尽量不要将它焊接到万用板或没有属于它的特定封装的电路板上,以免尾部会受热变形;6、若用导线将其接入电路,注意最佳要用热缩管将尾部两部分隔开。

      将FSR接入电路,有如下两种接法:   我用Arduino读出它的模拟值,模拟值范畴方案一是0~1024,方案二是1024-0这里我做了个小实验,使用的是方案一的接法,如图:我在11PWM接口连接了一种LED,并将FSR读出的模拟值赋给LED,这样通过LED的亮度我们就可以看出读出模拟值和压力的大小了尚有一点要阐明 的是,可以看到我并没有严格的按照安装阐明上的去使用,这是由于这里我只是为了测试一下而做的一种小实验,并且并不但愿破坏它将来长期的使用价值,事实上 我们应当严格遵守安装细则的,以免损坏FSR下面是程序代码:int ledpin=11;int potpin=0;int val;int i;void setup(){  pinMode(ledpin,OUTPUT);  pinMode(potpin,INPUT);  Serial.begin(9600);}void loop(){  val=analogRead(potpin);  analogWrite(ledpin,val);  Serial.println(val); }    可以看到当我用力按FSR有效表面时,LED在发光,并且LED会随着我用力的大小而变化亮度。

      另附几张将FSR安装到LG-NS机械手夹持器上的安装流程图Simple Code for Analog FSR Measurements/* FSR simple testing sketch.  Connect one end of FSR to power, the other end to Analog 0.Then connect one end of a 10K resistor from Analog 0 to ground   int fsrPin = 0; // the FSR and 10K pulldown are connected to a0int fsrReading; // the analog reading from the FSR resistor divider void setup(void) { // We'll send debugging information via the Serial monitor Serial.begin(9600); } void loop(void) { fsrReading = analogRead(fsrPin);   Serial.print("Analog reading = "); Serial.print(fsrReading); // the raw analog reading  // We'll have a few threshholds, qualitatively determined if (fsrReading < 10) { Serial.println(" - No pressure"); } else if (fsrReading < 200) { Serial.println(" - Light touch"); } else if (fsrReading < 500) { Serial.println(" - Light squeeze"); } else if (fsrReading < 800) { Serial.println(" - Medium squeeze"); } else { Serial.println(" - Big squeeze"); } delay(1000);}Testing an FSRThe easiest way to determine how your FSR works is to connect a multimeter in resistance-measurement mode to the two tabs on your sensor and see how the resistance changes. Because the resistance changes a lot, a auto-ranging meter works well here. Otherwise, just make sure you try different ranges, between 1 Mohm and 100 ohm before 'giving up'. 。

      点击阅读更多内容
      关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
      手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
      ©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.