2017. 7. 30. 04:43ㆍArduino
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 |
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
'Arduino' 카테고리의 다른 글
[아두이노 부품] Arduino Adafruit NeoPixel (0) | 2017.08.04 |
---|---|
[아두이노 부품] Arduino vibration module 아두이노 진동 모듈 (0) | 2017.08.02 |
[아두이노 부품] Arduino turning on LED light with softpot (0) | 2017.08.01 |
[아두이노 기초] Arduino Breadboard 아두이노 빵판 사용 (0) | 2017.07.30 |
[아두이노 기초] Arduino Digital output 아두이노 LED 불켜기 (1) | 2017.07.29 |