Learn More

전체상품카테고리

Current Page
  1. Home
  2. FSR Sensor

Cushion Sensor coding Kit

(해외배송 가능상품) New
공급사
공급사 공급사 바로가기
Basic Information
Product : Cushion Sensor coding Kit
Manufacturer : Self-production
Country : Republic of Korea
Price : $66.00
Code : P00000DX
Summary : Data acquisition about seated person's posture through Arduino
Domestic / International Shipping : oversea delivery
Payment for Shipping : Parcel Service
Shipping (Charge) : International Shipping Fee
수량 : 수량증가수량감소
Share
Share :
상품 옵션
Select item with details above
(Minimum Order : 1 or more / Maximum Order 0 or less) Size Charts

Select quantity

To add product, select an option in the above option box

Product List
Product Quantity Price
Cushion Sensor coding Kit up down 66 (  )
Total(Quantity) : 0 (0 item)

Combination Products

Buy together To purchase, please select the item.

 
Option Information
Select
Add
 
Option Information
Select
Add

Deals

Product Detail Information



Please see the technical document below. And see the Arduino source code in the bottom of this page


Link1) Archive,  Technical document(English) -Manual, CAD, ...

Link2) Mirror - BOX.COM - Manual, CAD, ... (You don't need to login or signup)





















Processing(https://processing.org/) - shows color map, COM(Center of Mass) gauge bar.
This SW displays 2 gauge bar. 1 for X direction(grey bar at just beneath the row 1) and 1 for Y (the most left grey bar)









Example 1) Basic, measures sensor values and output to the serial
In case of using Arduino NANO BLE 33, replace A3 with A7 in 16th line.  경우에는 16번째 줄의 'A3'를 'A7'로 바꿔주세요.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
 //  mux ic : 74HC4067. it can connect 16 pins with 4 signal pins
//  This shield adopts 2 mux ic. so it can connect 32 pins with 4 signal pis and 2 enable pins
int S0  = 5;
int S1  = 4;
int S2  = 3;
int S3  = 2;
 
//  mux ic selection pins. This shield uses 2 mux ic.
int En0 = 7;  //  Low enabled
int En1 = 6;  //  Low enabled
 
int controlPin[] = {S0,S1,S2,S3,En0,En1}; // same to {5, 4, 3, 2, 7, 6}
 
 
// adc pin, read sensor value. 
int ADC_pin = A3; // Arduino ProMicro : A3, Arduino NANO : A7
 
//  adc data buffer
const int NUM_OF_CH = 32;
int sensor_data[NUM_OF_CH];
 
 
 
void setup() {
  pinMode(En0, OUTPUT);
  pinMode(En1, OUTPUT);
 
  pinMode(S0, OUTPUT);
  pinMode(S1, OUTPUT);
  pinMode(S2, OUTPUT);
  pinMode(S3, OUTPUT); 
  
  Serial.begin(115200);
}
 
 
void loop() { 
  
  //  read adc value. scan 32 channels of shield.
  for(int ch = 0 ; ch < NUM_OF_CH ; ch++){ 
    sensor_data[ch] = readMux(ch);
  }
 
 
  //  print to serial port
  for(int ch = 0; ch < NUM_OF_CH; ch++){ 
    Serial.print(sensor_data[ch]);
    Serial.print(",");  // comma is used as a delimiter.
  }
  Serial.println(" ");  // end of line. carriage return.
 
  delay(10); // sleep for 10 milli seconds. It slow down the speed. You can delete this line.
}
 
 
int readMux(int channel){
 
  int muxChannel[NUM_OF_CH][6]={ //  6 means number of digital control pins for 2 mux ic.
    //  {S0,S1,S2,S3,En0,En1}
    {0,0,0,0,0,1}, //channel 0. '0': pin out low, 1 : pin out high. 
    {0,0,0,1,0,1}, //channel 1 It means S0=0, S1=0, S2=0, S3=1, En0=0, En1=1
    {0,0,1,0,0,1}, //channel 2
    {0,0,1,1,0,1}, //channel 3
    {0,1,0,0,0,1}, //channel 4
    {0,1,0,1,0,1}, //channel 5
    {0,1,1,0,0,1}, //channel 6
    {0,1,1,1,0,1}, //channel 7
    {1,0,0,0,0,1}, //channel 8
    {1,0,0,1,0,1}, //channel 9
    {1,0,1,0,0,1}, //channel 10
    {1,0,1,1,0,1}, //channel 11
    {1,1,0,0,0,1}, //channel 12. It means S0=1, S1=1, S2=0, S3=0, En0=0, En1=1
    {1,1,0,1,0,1}, //channel 13
    {1,1,1,0,0,1}, //channel 14
    {1,1,1,1,0,1}, //channel 15
    {0,0,0,0,1,0}, //channel 16
    {0,0,0,1,1,0}, //channel 17
    {0,0,1,0,1,0}, //channel 18
    {0,0,1,1,1,0}, //channel 19
    {0,1,0,0,1,0}, //channel 20
    {0,1,0,1,1,0}, //channel 21. It means S0=0, S1=1, S2=0, S3=1, En0=1, En1=0
    {0,1,1,0,1,0}, //channel 22
    {0,1,1,1,1,0}, //channel 23
    {1,0,0,0,1,0}, //channel 24
    {1,0,0,1,1,0}, //channel 25
    {1,0,1,0,1,0}, //channel 26
    {1,0,1,1,1,0}, //channel 27
    {1,1,0,0,1,0}, //channel 28
    {1,1,0,1,1,0}, //channel 29
    {1,1,1,0,1,0}, //channel 30
    {1,1,1,1,1,0}  //channel 31
  };
 
 
  // config 6 digital out pins of 2 mux ic.
  for(int i = 0; i < 6; i ++){
    digitalWrite(controlPin[i], muxChannel[channel][i]);
  }
 
  //read sensor value
  int adc_value = analogRead(ADC_pin);
 
  return adc_value;
}
cs



Example 2) Keyboard mapping. Making keyboard arrow key signal according to the COP (Center of Pressure)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
//    Seat cushion sensor keypad Ver 180712
//  Contact : sales@mdex.co.kr , Marveldex
//  Sitting and move forth, back, left, right then it makes keyboard event.
//  Change CONFIGURATION 1, 2 to make your event. 
 
#include "Keyboard.h"
 
 
//----------------------------------------------
//  CONFIGURATION 1 - Keymap) Arrow key
char KEY_MAP_row_1st   = KEY_UP_ARROW;    // ↑
char KEY_MAP_row_3rd   = KEY_DOWN_ARROW;  // ↓
char KEY_MAP_COP_left  = KEY_LEFT_ARROW;  // ←
char KEY_MAP_COP_right = KEY_RIGHT_ARROW; // →
 
//----------------------------------------------
//  CONFIGURATION 2 - Keymap) for FPS shooting game
//char KEY_MAP_row_1st   = 'w';
//char KEY_MAP_row_3rd   = 's';
//char KEY_MAP_COP_left  = 'a';
//char KEY_MAP_COP_right = 'd';
 
//  Function keys :  https://www.arduino.cc/reference/en/language/functions/usb/keyboard/keyboardmodifiers/
//  Ascii keys : http://www.asciitable.com/ 
 
//----------------------------------------------
//  CONFIGURATION 3 - Pressure threshold to make key event. the value in the cop range (-1.0 ~ 1.0)
//        If the value is bigger than the threshold, the key will be pressed. 
const float THRESHOLD_COP_forth   = 0.3;    // Make key event when COP Y is bigger than this value.
const float THRESHOLD_COP_back    = -0.85;  // Make key event when COP Y is smaller than this value.
const float THRESHOLD_COP_left    = -0.22;  // Make key event when COP X is smaller than this value.
const float THRESHOLD_COP_right   = 0.22;   // Make key event when COP X is bigger than this value.
 
//----------------------------------------------
//  CONFIGURATION 4 - Threshold to ignore. If the sum value is lower than this threshold, then ignore.
const int THRESHOLD_SUM_row_1st   = 60;   // 1st row, front row
const int THRESHOLD_SUM_row_3rd   = 60;   // 3rd row, back row
const int THRESHOLD_SUM_row_2nd   = 105;  // 2nd row, left and right
const int THRESHOLD_SUM_VERT      = 60// SUM? PRESSURE?
 
//----------------------------------------------
//  Constant
const int CONST_SEAT_CELL_NUM_TOTAL = 31// Total number of sensor cells = 31.
const int CONST_SEAT_CELL_NUM_ROW_1ST = 6;
const int CONST_SEAT_CELL_NUM_ROW_2ND = 15;
const int CONST_SEAT_CELL_NUM_ROW_3RD = 10;
 
 
 
//----------------------------------------------
//  variables
int adc_value[32]; // Sensor value packet buffer
bool is_key_pressed[256];  // cacheing if pressed.
 
//----------------------------------------------
//  HW pins
int En0 = 7;  //  4 to 16 decoder 0, Low enabled
int En1 = 6;  //  4 to 16 decoder 1, Low enabled
 
int S0  = 5;
int S1  = 4;
int S2  = 3;
int S3  = 2;
int SIG_pin = A3; // common output of two decoder
 
 
void setup() {
  Serial.begin(115200);
  pinMode(En0, OUTPUT);
  pinMode(En1, OUTPUT);
 
  pinMode(S0, OUTPUT);
  pinMode(S1, OUTPUT);
  pinMode(S2, OUTPUT);
  pinMode(S3, OUTPUT);
 
  ResetKeyboardLog();
  Keyboard.begin();
  Keyboard.releaseAll();
}
 
void loop() {
   // Read 32 sensor cells.
  for(int i = 0 ; i < 32 ; i++){
    adc_value[i] = readMux(i);
  }
 
 
  /*
   *    Sensor index.
   *    Sensor position and index.
   *    For example, adc_value[14], position is 3rd of 1st row.
   *    adc_value[2] is 3rd of 3rd row.
   *    adc_value[5] is 1st of 2nd row.
   *  1st row (6 cells):                       10, 12, 14, 16, 18, 20
   *  2nd row (15 cells) :   5, 6, 7, 8, 9, 11, 13, 15(center), 17, 19, 21, 22, 23, 24, 25
   *  3rd row (10 cells) :                 0, 1, 2, 3, 4, 26, 27, 28, 29, 30
   *
   *    COP of X is calculated by the 2nd row values.
   *    COP of Y is calculated by the 1st and 3rd row values.
   */
 //---------------------------------------------------------
 //     Calculate COP Y by 1st, 3rd row
 //---------------------------------------------------------
  int sum_row_1st = adc_value[10]+adc_value[12]+adc_value[14]+adc_value[16]+adc_value[18]+adc_value[20];
 
  int sum_row_3rd =   adc_value[0]+adc_value[1]+adc_value[2]+adc_value[3]+adc_value[4]
                    +adc_value[26]+adc_value[27]+adc_value[28]+adc_value[29]+adc_value[30];
 
  int sum_vertical = sum_row_1st + sum_row_3rd;
 
  double avg_row_1st = sum_row_1st / CONST_SEAT_CELL_NUM_ROW_1ST;
  double avg_row_3rd = sum_row_3rd / CONST_SEAT_CELL_NUM_ROW_3RD;
 
  float cop_vertical = 0.0;
  if0 < sum_vertical) {
    cop_vertical = (avg_row_1st * (1+ avg_row_3rd * (-1)) / (avg_row_1st + avg_row_3rd);
  }
 
  //  Make key event. 
  if( sum_vertical < THRESHOLD_SUM_VERT) {
    KEY_Release(KEY_MAP_row_1st);
    KEY_Release(KEY_MAP_row_3rd);
  }
  else {
    if(THRESHOLD_COP_forth < cop_vertical) {
      KEY_Release(KEY_MAP_row_3rd);
      KEY_Press(KEY_MAP_row_1st);
    }
    else if(cop_vertical < THRESHOLD_COP_back) {
      KEY_Release(KEY_MAP_row_1st);
      KEY_Press(KEY_MAP_row_3rd);
    }
    else {
      KEY_Release(KEY_MAP_row_1st);
      KEY_Release(KEY_MAP_row_3rd);
    }
  }
 
 //---------------------------------------------------------
 //     Calculate COP X by 2nd row
 //---------------------------------------------------------
  int sum_row_2nd =  adc_value[5]+adc_value[6]+adc_value[7]+adc_value[8]+adc_value[9]
                    +adc_value[11]+adc_value[13]+adc_value[15]+adc_value[17]+adc_value[19]
                    +adc_value[21]+adc_value[22]+adc_value[23]+adc_value[24]+adc_value[25];
 
  //  Normalize to -1.0~1.0
  //  Normalized COP = SUM {Position x adc_value[i]} / (SUM[adc_value] x Half length)
  //  X Position : -7~7, Half length : 7
  int sum_wp_horizon = (  (-7)*adc_value[5]+(-6)*adc_value[6]+(-5)*adc_value[7]
                          +(-4)*adc_value[8]+(-3)*adc_value[9]+(-2)*adc_value[11]
                          +(-1)*adc_value[13]+(0)*adc_value[15]
                          +(1)*adc_value[17]+(2)*adc_value[19]+(3)*adc_value[21]
                          +(4)*adc_value[22]+(5)*adc_value[23]+(6)*adc_value[24]
                          +(7)*adc_value[25] ) / 7.0// divide 7.0 ==> unitize. (-7.0~7.0)
 
  float cop_horizon = 0.0;
  if(0 < sum_row_2nd) {
    cop_horizon = sum_wp_horizon / (double)sum_row_2nd;
  }
 
  //  Make key event - left, right
  if(sum_row_2nd < THRESHOLD_SUM_row_2nd) {
    KEY_Release(KEY_MAP_COP_right);
    KEY_Release(KEY_MAP_COP_left);
  }
  else {
    //  press left
    if(cop_horizon < THRESHOLD_COP_left) {
      KEY_Release(KEY_MAP_COP_right);
      KEY_Press(KEY_MAP_COP_left);
    }
    //  press right
    else if(THRESHOLD_COP_right < cop_horizon) {
      KEY_Release(KEY_MAP_COP_left);
      KEY_Press(KEY_MAP_COP_right);  
    }
    //  release left, right
    else {
      KEY_Release(KEY_MAP_COP_right);
      KEY_Release(KEY_MAP_COP_left);
    }
  }
 
  //  print
  //  Print_XY(cop_horizon, cop_vertical);  
  
  delay(10);//delay
}
 
int readMux(int channel){
  int controlPin[] = {S0,S1,S2,S3,En0,En1};
 
  int muxChannel[32][6]={
    {0,0,0,0,0,1}, //channel 0
    {0,0,0,1,0,1}, //channel 1
    {0,0,1,0,0,1}, //channel 2
    {0,0,1,1,0,1}, //channel 3
    {0,1,0,0,0,1}, //channel 4
    {0,1,0,1,0,1}, //channel 5
    {0,1,1,0,0,1}, //channel 6
    {0,1,1,1,0,1}, //channel 7
    {1,0,0,0,0,1}, //channel 8
    {1,0,0,1,0,1}, //channel 9
    {1,0,1,0,0,1}, //channel 10
    {1,0,1,1,0,1}, //channel 11
    {1,1,0,0,0,1}, //channel 12
    {1,1,0,1,0,1}, //channel 13
    {1,1,1,0,0,1}, //channel 14
    {1,1,1,1,0,1}, //channel 15
    {0,0,0,0,1,0}, //channel 16
    {0,0,0,1,1,0}, //channel 17
    {0,0,1,0,1,0}, //channel 18
    {0,0,1,1,1,0}, //channel 19
    {0,1,0,0,1,0}, //channel 20
    {0,1,0,1,1,0}, //channel 21
    {0,1,1,0,1,0}, //channel 22
    {0,1,1,1,1,0}, //channel 23
    {1,0,0,0,1,0}, //channel 24
    {1,0,0,1,1,0}, //channel 25
    {1,0,1,0,1,0}, //channel 26
    {1,0,1,1,1,0}, //channel 27
    {1,1,0,0,1,0}, //channel 28
    {1,1,0,1,1,0}, //channel 29
    {1,1,1,0,1,0}, //channel 30
    {1,1,1,1,1,0}  //channel 31
  };
 
  //loop through the 6 sig (muxChannel has 6 values)
  for(int i = 0; i < 6; i ++){
    digitalWrite(controlPin[i], muxChannel[channel][i]);
  }
 
  //read the value at the SIG pin
  int val = analogRead(SIG_pin);
 
  return val;
}
 
void Print_XY(float x, float y) {
  Serial.print("x= ");
  Serial.print(x);
  Serial.print(", y= ");
  Serial.println(y);  
}
 
void ResetKeyboardLog(){
  memset(is_key_pressed, false256);
}
 
void  KEY_Press(byte key_index) {
  if(is_key_pressed[key_index] == false) {
      Keyboard.press(key_index);
      is_key_pressed[key_index] = true;
  }
}
 
void KEY_Release(byte key_index){
    Keyboard.release(key_index);
    is_key_pressed[key_index] = false;
}
 
cs



Reviews

Post your review here.

There are no posts to show

Q & A

Product related questions and answers

There are no posts to show

Terms & Policy

  • Payment

    We accept the following forms of payment:
    - Credit Card
      - Visa
      - MasterCard
      - American Express
      - Discover
    - PayPal
  • Shipping

    Shipping Method : Parcel Service

    Shipping Area : A Region.

    Shipping Cost : International Shipping Fee

    Shipping Time : 3 - 5 days

    Please take into consideration that some products may take additional time for delivery and processing.
    Important: Your order is shipped once your payment has been cleared. Please contact our customer service center if you would like to request an exchange or return on your order.

    - Customs and Duties

    The recipient will be held responsible for international shipments which may be subject to import duties and taxes. Please be advised that these charges are levied by the destination country and we do not have control over them. In the case that the recipient refuses to receive the parcel, the order will be returned to Korea and will not be re-shipped. Relevant expenses (round-trip shipping, customs, etc.) will be deducted from the refund.

  • Returns & Exchanges

    1. Requirements:

    Please take into consideration that we only accept qualifying returns but not exchanges. Refunds are issued once the returned products clear our inspection.

    1) An item is eligible for cancellation if:
    -you posted a Return request within 24 hours of payment and your order is still under “Pending” status (if your order is under “Queued for Shipment” status, please contact our customer service center) or
    -the order is delayed for more than 10 days since payment and you have not received any notification regarding the delay; or
    -the ordered item is out of stock.

    2) We accept return(s) if:

    -you receive a product different from your order; or

    -you receive a defective product.

    **Return Instructions

    (1) Post a return request on our Return forum within three days of receipt. You are required to attach the photos of the received product(s) and include the item code, the order number, and the reason for the return.

    (2) A customer service representative will be in contact to assist you by email or phone.

    (3) Items returned must be in their original condition, which includes tags and any packaging. Also, you need to include a note of your order number, name, and user ID.

    *Please be advised that returns are accepted ONLY IF you followed the instructions above and your return request has been approved by our staff. Returns that are shipped to us without any prior consent are not accepted.

    *Please note that EVEN the defective/incorrect item(s) must be returned with all of the tags and labels intact. The item(s) must be sent in their original packaging and unworn.

    *Please include all contents of the original package and free gifts (if applicable) in your return packaging.

    * Shipping fee for any return caused by our fault will be paid by the company. However, if EMS’ cash on delivery is not possible then you can scan the return receipt and either mail it with the item to return or post an image of it on the forum. The shipping fee will be refunded once the returned item has arrived.

    3) We do not accept return(s) if:

    -you are returning the items just because you changed your mind (on size, color, etc.)
    -you are returning shoes, bags, or any other accessories
    -the products are damaged due to your mishandling
    -your return request is not approved by our staff

    The following items are not considered defective:

    * Items that are originally manufactured without tags or labels
    * Items with creases that may have been made while shipping
    * Items with unsatisfactory/incomplete finish due to mass production

    4) If there is a missing item from your order:

    *Contact our customer service center by phone or by forum (if you cannot reach us by phone) within 1 day of delivery.
    *Please keep all contents of the original package including packaging material (boxes, plastic bags etc.) with you until you are instructed otherwise.

    Please note that we may not be able to process the refund for your missing item if you lose or damage any packaging material.

Shop Community

Shop Notice

Shop Notice

MORE

FAQ

FAQ

MORE

sales@mdex.co.kr

  • (+82)32.624.3870
  • FAX
  • AM 09:00 ~PM 05:30 (Holiday weekends off) / Lunch hour PM 12:30 ~PM 01:30
  • INDUSTRIAL BANK OF KOREA
  • ACCOUNT : 614-009295-56-00017
  • SWIFT Code : IBKOKRSE
  • Marveldex Inc.

MORE

BANK INFO

BANKINDUSTRIAL BANK OF KOREA

ACCOUNT614-009295-56-00017

SWIFT CODEIBKOKRSE

CS Center

TEL(+82)32.624.3870

FAX(+82)2.6442.7749

Private Contact