Kali ini saya akan menjelaskan mengenai bagaimaa cara mengakses sensor MPX5700AP, seperti yang telah diketahui sebelumnya bahwa sensor ini adalah sensor yang digunakan untuk mengetahui tekanan udara dalam sebuah benda, baik itu di dalam botol, didalam ban, dan lainnya, sensor ini bisa mengukur dengan range 0 to 700 kPa (0 to 101.5 psi) - 15 to 700 kPa (2.18 to 101.5 psi), serta tegangan outputnya berada di range 0.2 to 4.7 volt. berikut penjelasan gambar dan detailnya.
Pin 1: Signal out (0.2 volts to 4.9 volts)
Pin 2: Ground
Pin 3: 5 Volts
Pin 4: No connection
Pin 5: No connection
Pin 6: No connection
Pin 2: Ground
Pin 3: 5 Volts
Pin 4: No connection
Pin 5: No connection
Pin 6: No connection
Features :
• Differential and Gauge Applications Available
• 1.4% Maximum Error Over 0° to 85°C
• Patented Silicon Shear Stress Strain Gauge
• Temperature Compensated Over –40° to +125°C
• Offers Reduction in Weight and Volume Compared to Existing Hybrid Modules
• Durable Epoxy Unibody Element
1. Minimum System
2. Program Bascom AVR
$regfile = "m16def.dat"
$crystal = 12000000
Config Lcdpin = Pin , Rs = Portc.6 , E = Portc.7 , Db4 = Portc.2
Config Lcdpin = Pin , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5
Config Lcd = 16 * 2
Ddrb.0 = 1
Config Adc = Single , Prescaler = Auto , Reference = Avcc
Cursor Off
Cls
Dim Dataadc As Word
Dim V As Single
Dim X As String * 5
Start Adc
Do
Dataadc = Getadc(0)
V = Dataadc * 5
V = V / 1023
X = Fusing(v , "#.##")
Locate 1 , 1
Lcd "adc= " ; Dataadc
Locate 2 , 1
Lcd "V= " ; X
Loop
3. Cara Merubah Volt ke kPa dan Psi dan mmHg
v =(float)(Dataadc*5.0)/1023.0
kpa = (float)((v / 5)-0.04)/0.0012858
Psi = (float)(kpa * 0.145)
mmhg = (float)(kpa * 7.5)
4. VIDEO HASILNYA
No comments:
Post a Comment