[기본 원리]
wind Sensor는 공기의 흐름을 측정하는 센서이다.
와이어에 열을 가해서 주위보다 높은 온도를 유지한다.
공기의 흐름은 와이어의 열을 식히게 되고. 회로는 높은 온도를 유지하기 위해 더 많은 전류를 흘리게 됩니다.
이 전류의 양을 바람의 양으로 환산한다.
Wind Sensor에 사용된 회로 개념도.
1. Thermistor는 바람이 많이 불거나 적게 불거나 상관없이 바람의 온도에 대응하며 변한다.
2. Hot Wire는 주변 온도 보다 높아지도록 가열된다.
3. 가열이 되면서 저항의 변화가 생기면 A, B의 전압차가 평형이 맞춰진다.
4. 이때 공기의 흐름이 생겨 백금의 온도가 흐름의 양에 따라 많이 식거나 적게 식는다.
5. 이때 생긴 온도변화로 백금 와이어에 저항값이 변경되어 전류의 양을 증감한다.
6. 흐르는 전류의 양을 계산하여 공기의 흐름 속도를 계산할 수 있다.
[소스코드 분석]
구동 예제 프로그램을 분석해 보자.
https://github.com/moderndevice/Wind_Sensor
void setup() {
Serial.begin(57600); // faster printing to get a bit better throughput on extended info
// remember to change your serial monitor
Serial.println("start");
// put your setup code here, to run once:
// Uncomment the three lines below to reset the analog pins A2 & A3
// This is code from the Modern Device temp sensor (not required)
pinMode(A2, INPUT); // 입력핀으로 설정
pinMode(A3, INPUT); // 입력핀으로 설정
digitalWrite(A3, LOW); // turn off pullups
}
void loop() {
if (millis() - lastMillis > 200){ // read every 200 ms - printing slows this down further
// 200mS마다 실행
TMP_Therm_ADunits = analogRead(analogPinForTMP); // 온도핀으로 부터 온도값 읽기
RV_Wind_ADunits = analogRead(analogPinForRV); // RV핀 값 읽기
RV_Wind_Volts = (RV_Wind_ADunits * 0.0048828125); // RV값(ADC)을 전압값(V)으로 변경
// these are all derived from regressions from raw data as such they depend on a lot of experimental factors
// such as accuracy of temp sensors, and voltage at the actual wind sensor, (wire losses) which were unaccouted for.
TempCtimes100 = (0.005 *((float)TMP_Therm_ADunits * (float)TMP_Therm_ADunits)) - (16.862 * (float)TMP_Therm_ADunits) + 9075.4;
zeroWind_ADunits = -0.0006*((float)TMP_Therm_ADunits * (float)TMP_Therm_ADunits) + 1.0727 * (float)TMP_Therm_ADunits + 47.172; // 13.0C 553 482.39
// aX^2+bX+c ??? 무슨 계산식인지
zeroWind_volts = (zeroWind_ADunits * 0.0048828125) - zeroWindAdjustment;
// This from a regression from data in the form of
// Vraw = V0 + b * WindSpeed ^ c
// V0 is zero wind at a particular temperature
// The constants b and c were determined by some Excel wrangling with the solver.
WindSpeed_MPH = pow(((RV_Wind_Volts - zeroWind_volts) /.2300) , 2.7265);
Serial.print(" TMP volts "); // 온도 전압
Serial.print(TMP_Therm_ADunits * 0.0048828125);
Serial.print(" RV volts "); // RV 전압
Serial.print((float)RV_Wind_Volts);
Serial.print("\t TempC*100 "); // 섭시 온도
Serial.print(TempCtimes100 );
Serial.print(" ZeroWind volts "); // 무풍시 전압
Serial.print(zeroWind_volts);
Serial.print(" WindSpeed MPH "); // 바람 속도
Serial.println((float)WindSpeed_MPH);
lastMillis = millis();
}
}
[회로도] 버전 1
Rev.C 회로도 및 분석자료.
https://www.electroschematics.com/measuring-air-flow/
- Wind Sensor Calibration: http://moderndevice.com/?p=10433
- Arduino Sketch For Calibrated Out: https://github.com/moderndevice/Wind_Sensor
[회로도] 버전2
Rev.P 회로도 및 분석자료
https://theorycircuit.com/air-flow-sensor-arduino-interfacing/
Wind Sensor Rev.C 공식 판매처 - $17
https://moderndevice.com/product/wind-sensor/
Wind Sensor Rev.P 공식 판매처 - $24
https://moderndevice.com/product/wind-sensor/
한국 판매처
http://mechasolution.com/shop/goods/goods_view.php?goodsno=1353&category=129
'Arduino' 카테고리의 다른 글
USB to I2C/UART Protocol Converter with GPIO (0) | 2020.09.22 |
---|---|
45만원짜리 현대모비스 전기자동차 완속 충전기 분해, 내부구조 살펴보자. (26) | 2020.09.18 |
[EVSE] OpenEVSE 사이트 구경 (하) (0) | 2020.09.15 |
[EVSE] OpenEVSE 사이트 구경 (상) (0) | 2020.09.15 |
[EVSE] 전기자동차 완속충전기 동작 원리 (4) | 2020.09.09 |
댓글