Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:iot-open:hardware2:sensors_touch [2023/06/29 14:36] ktokarzen:iot-open:hardware2:sensors_touch [2023/11/23 10:37] (current) pczekalski
Line 1: Line 1:
-==== Touch Sensors ==== +====== Touch Sensors ====== 
-=== Button ===+{{:en:iot-open:czapka_b.png?50| General audience classification icon }}{{:en:iot-open:czapka_e.png?50| General audience classification icon }}\\ 
 +== Button ==
  
-A **pushbutton** is an electromechanical sensor that connects or disconnects two points in a circuit when force is applied. The button output discrete value is either //HIGH// or //LOW// +A **pushbutton** is an electromechanical sensor that connects or disconnects two points in a circuit when force is applied. The button output discrete value is either //HIGH// or //LOW// (figure {{ref>button1}}).  
- +<figure button1
-<figure label+{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:push_button_c.jpg?100 | Pushbutton}} 
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:push_button_c.jpg?100 | title}} +<caption>Pushbutton</caption>
-<caption>Pushbutton.</caption>+
 </figure> </figure>
  
-A **microswitch**, also called a miniature snap-action switch, is an electromechanical sensor that requires very little physical force and uses a tipping-point mechanism. Microswitch has three pins, two of which are connected by default. When the force is applied, the first connection breaks and one of the pins is connected to the third pin.+A **microswitch**, also called a miniature snap-action switch, is an electromechanical sensor that requires very little physical force and uses a tipping-point mechanism. The microswitch has three pins, two of which are connected by default. When the force is applied, the first connection breaks and one of the pins is connected to the third pin (figure {{ref>microswitch1}}).
    
-<figure label+<figure microswitch1
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:micro_switch_c.jpg?100 | title}} +{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:micro_switch_c.jpg?100 | Microswitch}} 
-<caption>Microswitch.</caption>+<caption>Microswitch</caption>
 </figure> </figure>
  
-The most common use of a pushbutton is as an input device. Both force solutions can be used as simple object detectorsor as end switches in industrial devices. The button can be connected to any available digital pin that must be configured as input or input with a pullup. In the configuration presented in the figure below pullup resistor is connected externally so there is no need to enable it in the microcontroller.+The most common use of a pushbutton is as an input device. Both force solutions can be used as simple object detectors or end switches in industrial devices. The button can be connected to any available digital pin configured as input or input with a pull-up. In the configuration presented in figure {{ref>pullup1}}, pull-up resistor is connected externallyso enabling it in the microcontroller is unnecessary.
  
-<figure label+<figure pullup1
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:sch_apz_shemas_button.png?200 | title}} +{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:sch_apz_shemas_button.png?200 | Schematics of Arduino Uno and a push button}} 
-<caption>Schematics of Arduino Uno and a push button.</caption>+<caption>Schematics of Arduino Uno and a push button</caption>
 </figure> </figure>
  
Line 51: Line 51:
 </code> </code>
  
-==Force Sensor== +== Force Sensor ==
- +
-A force sensor predictably changes resistance, depending on the applied force to its surface. Force-sensing resistors are manufactured in different shapes and sizes, and they can measure not only direct force but also tension, compression, torsion and other types of mechanical forces. Because the force sensor changes its resistance linearly it should be connected to analog input. It is also required o connect another resistor to form the voltage divider, as shown in the figure below. The voltage is measured by the internal ADC of the microcontroller.+
  
 +A force sensor predictably changes resistance depending on the applied force to its surface. Force-sensing resistors are manufactured in different shapes and sizes, and they can measure not only direct force but also tension, compression, torsion and other mechanical forces. Because the force sensor changes its resistance linearly, it should be connected to the analogue input. Connecting another resistor to form the voltage divider is also required, as shown in the figures {{ref>forcesensor1}} and {{ref>forcesensor2}}. The internal ADC of the microcontroller measures the voltage.\\
 Force sensors are used as control buttons, object presence detectors, or to determine weight in electronic scales. Force sensors are used as control buttons, object presence detectors, or to determine weight in electronic scales.
  
-<figure label+<figure forcesensor1
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:preasure_sensor_c.jpg?100 | title}} +{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:preasure_sensor_c.jpg?100 | Force sensitive resistor}} 
-<caption>Force sensitive resistor (FSR)</caption>+<caption>Force sensitive resistor (FSR) </caption>
 </figure> </figure>
  
-<figure label+<figure forcesensor2
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:sch_apz_shemas_fsr.png?200 |title}} +{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:sch_apz_shemas_fsr.png?200 | Voltage is measured by applying and measuring constant voltage to the sensor}} 
-<caption>The voltage is measured by applying and measuring constant voltage to the sensor.</caption>+<caption>The voltage is measured by applying and measuring constant voltage to the sensor</caption>
 </figure> </figure>
  
Line 70: Line 69:
 <code c> <code c>
  
-//Force Sensitive Resistor (FSR) is connected to the analog 0 pin+//Force Sensitive Resistor (FSR) is connected to the analogue 0 pin
 int fsrPin = A0;  int fsrPin = A0; 
 //The analog reading from the FSR resistor divider //The analog reading from the FSR resistor divider
Line 78: Line 77:
   //Begin serial communication   //Begin serial communication
   Serial.begin(9600);      Serial.begin(9600);   
-  //Initialize the FSR analog pin as an input+  //Initialize the FSR analogue pin as an input
   pinMode(fsrPin, INPUT);    pinMode(fsrPin, INPUT); 
 } }
Line 92: Line 91:
 </code> </code>
  
-==Capacitive Sensor== +== Capacitive Sensor == 
-Capacitive sensors are a range of sensors that use capacitance to measure changes in the surrounding environment. A capacitive sensor consists of a capacitor that is charged with a certain amount of current until the threshold voltage. A human finger, liquids or other conductive or dielectric materials that touch the sensorcan influence charge time and voltage level in the sensor. Measuring charge time and voltage level gives information about changes in the environment. Ready-to-use sensors include an electronic element that performs measurements and returns digital information at the outputso they can be connected directly to a digital input pin.+Capacitive sensors are a range of sensors that use capacitance to measure changes in the surrounding environment. A capacitive sensor is a capacitor charged with a certain amount of current until the threshold voltage is reached. A human finger, liquids or other conductive or dielectric materials that touch the sensor can influence the sensor'charge time and voltage level. Measuring charge time and voltage level gives information about changes in the environment. Ready-to-use sensors include an electronic element that performs measurements and returns digital information at the output so that they can be connected directly to a digital input pin.\\ 
 +Capacitive sensors are input devices and can measure proximity, humidity, fluid level and other physical parameters or serve as an input for electronic device control. Sample sensor and its connection are presented in the figures {{ref>capacity1}} and {{ref>capacity2}}.
  
-Capacitive sensors are used as input devices and can measure proximity, humidity, fluid level and other physical parameters or serve as an input for electronic device control. +<figure capacity1
- +{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:touch_senor_c.jpg?200 Touch button module}} 
-<figure label+<caption>Touch button module</caption>
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:touch_senor_c.jpg?100 title}} +
-<caption>Touch button module.</caption>+
 </figure> </figure>
  
-<figure label+<figure capacity2
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:sch_apz_shemas_capacitive.png?200 | title}} +{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:sch_apz_shemas_capacitive.png?200 | Arduino and capacitive sensor schematics}} 
-<caption>Arduino and capacitive sensor schematics.</caption>+<caption>Arduino and capacitive sensor schematics</caption>
 </figure> </figure>
  
Line 135: Line 133:
 } }
 </code> </code>
 +
 +<note important>Most of the buttons and switches are of simple construction, so they are subject to a debouncing, as a single press or release of the switch may trigger many changes in the signal (not just a single swap from //LOW// to //HIGH// or opposite). This is because applying force and moving connectors is imperfect and may involve vibration and twinkling. We discuss this problem in the [[en:iot-open:introductiontoembeddedprogramming2:cppfundamentals:programmingpatterns|programming patterns chapter]].
 +</note>
en/iot-open/hardware2/sensors_touch.1688049394.txt.gz · Last modified: 2023/06/29 11:36 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0