[아두이노 부품] Arduino softpot membrane potentiometer 아두이노 압력감지센서

2017. 7. 30. 04:43Arduino


3M softpot membrane potentiometer는 아두이노 보드로 들어오는 아날로그 값을 확인할 수 있음.


Potentiometer처럼 손잡이를 돌리는 것이 아니라, 터치를 하고 압력을 가해서 다양한 저항을 준다.


터치만 인지하는 것이 아니라 어디를 터치 했는지도 알려주기 때문에 좋다.


다양한 크기 및 모양이 있어서 많은 곳에 쓰이고 있다.


Softpot 센서는 어디에 터치를 했는지에 따라 터치를 한 곳의 저항이 다른 곳과 달라진다. 따라서 어디를 눌렀는지 파악을 할 수 있는 것이다.


Potentiometer처럼 작동을 해서 다른 부품없이 직접 아두이노와 연결해서 softpot을 사용할 수 있다.




You all know the potentiometer, you turn it, and you can read on your arduino where it was turned to. 

Well 3M makes a product called the softpot that is a linear touch potentiometer. So instead of turning a knob, you touch it.


The really nice thing about these is that they are great for prototypes because you can tell where someone touched it. So if you place a piece of paper with some printed buttons over it, you can mock up surface touch buttons. Or if you need to prototype a rotary touch wheel like the old ipods, but don’t want to get involved with complex capitative sensors, you can do that too.

There are a million uses for these, and they come in a few sizes, shapes, and even offer high temperature versions.


Hooking it up

The softpot sensors change their resistance depending on where they are touched. And because they work just like potentiometers you don’t need any extra parts to use them with your arduino. We can just plug in the middle pin to an analog in pin on the arduino and we are ready to go.




이런 식으로 구성이 돼서,





이렇게 터치를 하거나 압력을 가하게 되면, 접촉이 되는 부분을 인식 해서 값을 알려준다.








아래 동영상은 위 사진의 화살표 방향처럼 softpot위에서 아래로 가면서 압력을 가했을 시, 나오는 출력 값들을 캡쳐한 것이다.


위로 갈수록 1023, 아래로 갈수록 10에 가까워짐.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
int softpotPin = A0; //analog pin 0
 
void setup(){
  digitalWrite(softpotPin, HIGH); //enable pullup resistor
  Serial.begin(9600);
}
 
void loop(){
  int softpotReading = analogRead(softpotPin); 
 
  Serial.println(softpotReading);
  delay(200); //just here to slow down the output for easier reading
}
 
cs

아두이노 analogRead 값은 0에서 1023까지의 값을 출력을 하는데, 터치를 하고 있지 않으면 1023을 계속 출력을 하고 터치를 하게 되면 터치한 곳의 값을 출력을 한다.

가운데를 누르게 되면 512가 나올 것을 예상을 하지만,

내가 누른 곳의 위치를 세밀하게 반환을 하는 것에 문제가 있어서 정밀한 위치를 반환하는데 있어서는 좀 더 찾아봐야할 것 같음.



그리고 Softpot을 사용하는데 주의해야할 점!!!

Softpot 윗쪽과 아랫쪽을 1초 이상 동시에 누르는 경우, 순식간에 뜨거워져서 탈 수 있으니 주의해야한다.

원형 모양의 softpot인 경우 각별히 주의해야하는데, 저 빨간색 부분이 softpot 처음과 끝이 맞닥트리는 곳이기 때문에 누르면 탈 수 있다.

그래서 저 부분은 안 건드리는 것이 좋다.





The arduino analogRead will vary between 0 and 1023 depending on where you touch it, (1023 when not being touched) and is linear, so it will be about 512 if touched in the middle.


WARNING!!!!!

If you touch the softpot at the top and the bottom at the same time, it will get really hot, really quick, and if you leave it for more than a second, you may burn it up. I have no clue why. But beware!

This is especially an issue on the round version. If you press down dead center on the bottom (where the straight parts come off of), you will be pressing on both sides of the pot and it will again get super hot and melt. SO DONT PRESS IT IN THE MIDDLE BOTTOM