This project detects pipe leaks and structural vibrations by monitoring acoustic and mechanical signals using dual accelerometers and piezoelectric sensors. The system combines a LIS3DH 3-axis accelerometer, an ADXL345 sensor, and two piezoelectric disc inputs to capture vibration patterns across different frequency ranges, then processes the data on an Arduino Uno for real-time leak detection.
Builders will receive a complete wiring diagram showing sensor integration with logic level shifting, a detailed parts list with JST connectors and supporting passive components, step-by-step assembly instructions for breadboard construction, and Arduino firmware that initializes both accelerometers via I2C and streams sensor data at 250 Hz for analysis and logging.
Wiring diagram
Gather all the parts
Assemble it in 6 steps
1. Разметьте плату под пайку
«Установите J1–J4 на краю платы. Проверьте номер первого контакта по маркировке корпуса. Поместите усилитель и защиту рядом с J1 и J2, согласователь рядом с J3 и J4.»
2. Соберите питание и смещение
«Не подключая USB, соедините земли. Соберите два отдельных делителя 10 кОм + 10 кОм. Плюс каждого конденсатора 10 мкФ — к смещению или 5 В согласно схеме, минус — к земле. Поставьте 100 нФ рядом с выводами 8 и 4 усилителя.»
3. Соберите два входа пьезодисков
«Повторите цепь по схеме для каждого канала. Полоска нижнего диода — к защищённому узлу, верхнего — к 5 В. На усилителе соедините выводы 1 и 2, затем 6 и 7. От выходов через 4,7 кОм идите к A0 и A1.»
4. Подключите шину и проверьте монтаж
«HV — 5 В, LV — 3,3 В. A4 — SDA, A5 — SCL. На стороне кабеля датчика CS соедините с питанием логики самого датчика, SDO с землёй. Сверьте кабели прозвонкой. С вынутыми датчиками проверьте отсутствие коротких замыканий; затем от USB измерьте 5 В, 3,3 В и оба смещения. Перед установкой датчиков снова отключите USB.»
5. Распаяйте ответные части JST-XH
«J1–J4 на одном краю, контакт 1 отметьте на каждой половине. J1/J2 — жёлтый SIG и чёрный GND. J3/J4 — оранжевый 3,3 В, чёрный GND, зелёный SDA, синий SCL. Связи между половинами на схеме обозначают сопряжение контактов, не отдельные провода. Для шага JST-XH 2,50 мм используйте подходящие посадочные отверстия или адаптер, не вдавливайте штыри в ряд с шагом 2,54 мм.»
6. Проверьте шины и ряды отверстий
«Прозвоните соседние отверстия пустой платы. На плате с отдельными площадками общий узел сформируйте пайкой короткой перемычки; на полосовой плате разрежьте дорожки между разными узлами. Справа у U1 установите C1 и C2 ножками прямо между красной шиной 5 В и чёрной GND; плюс C2 к 5 В. CB1/CB2 оставьте у своих делителей, плюс к смещению. CO1/CO2 оставьте у A0/A1. Шина 3,3 В отдельная. Прозвоните каждый кабель с вставленной и вынутой вилкой до подачи питания.»
Review all connections
1. Connections between "ri1" and "Arduino"
2. Connections between "j1" and "Arduino"
3. Connections between "j2" and "Arduino"
4. Connections between "j3" and "Arduino"
5. Connections between "j4" and "Arduino"
6. Connections between "ls" and "Arduino"
7. Connections between "u1" and "Arduino"
8. Connections between "c1" and "Arduino"
9. Connections between "c2" and "Arduino"
10. Connections between "rb1" and "Arduino"
11. Connections between "cb1" and "Arduino"
12. Connections between "dl1" and "Arduino"
13. Connections between "co1" and "Arduino"
14. Connections between "rb2" and "Arduino"
15. Connections between "cb2" and "Arduino"
16. Connections between "dl2" and "Arduino"
17. Connections between "co2" and "Arduino"
18. Connections between "ri2" and "Arduino"
19. Connections between "imu3" and "Arduino"
20. Connections between "imu4" and "Arduino"
21. Connections between "rt1" and "Arduino"
22. Connections between "dh1" and "Arduino"
23. Connections between "rt2" and "Arduino"
24. Connections between "dh2" and "Arduino"
25. Connections between "ro1" and "Arduino"
26. Connections between "rg1" and "Arduino"
27. Connections between "rg2" and "Arduino"
28. Connections between "ro2" and "Arduino"
29. Connections between "rz1" and "Arduino"
30. Connections between "rz2" and "Arduino"
31. Connections between "pz1" and "Arduino"
32. Connections between "pz2" and "Arduino"
33. Connections between "j1plug" and "Arduino"
34. Connections between "j2plug" and "Arduino"
35. Connections between "j3plug" and "Arduino"
36. Connections between "j4plug" and "Arduino"
Deploy the firmware
#include <Arduino.h>
#include <Wire.h>
constexpr uint8_t LIS=0x18, AD=0x53;
bool wr(uint8_t a,uint8_t r,uint8_t v){Wire.beginTransmission(a);Wire.write(r);Wire.write(v);return Wire.endTransmission()==0;}
bool rd(uint8_t a,uint8_t r,uint8_t *b,uint8_t n){Wire.beginTransmission(a);Wire.write(r);if(Wire.endTransmission(false))return false;if(Wire.requestFrom(a,n)!=n)return false;while(n--)*b++=Wire.read();return true;}
uint32_t next;
void setup(){
Serial.begin(230400); Wire.begin(); digitalWrite(A4,LOW);digitalWrite(A5,LOW);
Wire.setClock(100000); Wire.setWireTimeout(2500,true);
uint8_t id;
bool l=rd(LIS,0x0f,&id,1)&&id==0x33&&wr(LIS,0x23,0x88)&&wr(LIS,0x20,0x77);
bool a=rd(AD,0,&id,1)&&id==0xe5&&wr(AD,0x31,0x08)&&wr(AD,0x2c,0x0c)&&wr(AD,0x2d,0x08);
Serial.print(F("Quiet Pipe TEST LIS="));Serial.print(l);Serial.print(F(" AD="));Serial.println(a);
next=micros();
}
void loop(){
uint32_t t=micros(); if(int32_t(t-next)<0)return; next+=4000;
if(int32_t(t-next)>=0)next=t+4000;
uint16_t p=analogRead(A0),q=analogRead(A1);
uint8_t l[6]={},a[6]={}; bool okL=rd(LIS,0xa8,l,6),okA=rd(AD,0x32,a,6);
// Human-readable diagnostic snapshots, 25 lines/s; acquisition is 250 frames/s.
static uint8_t count; if(++count!=10)return; count=0;
Serial.print(t);Serial.print(',');Serial.print(p);Serial.print(',');Serial.print(q);
for(uint8_t k=0;k<6;k++){
const uint8_t *b=k<3?l:a;uint8_t i=2*(k%3);
Serial.print(',');if(k<3?okL:okA){int16_t raw=int16_t(uint16_t(b[i])|(uint16_t(b[i+1])<<8));Serial.print(k<3?raw/16:raw);}else Serial.print(F("NA"));
}
Serial.println();
}
// Analog inputs A0 and A1 are after their respective output RC filters.Remix this project
Make it yours in one click
Open a full copy of this project in your own Schematik workspace, diagram, code, parts, and assembly steps included. Swap the sensor, add features, or redesign the whole thing with AI. The author's original stays untouched.




