ESP32 multisnímač pro OpenSprinkler systém

Seznam článků

ESP32 multifunkční deska slouží pro další využití v projektu OSPy. Více o mém projektu zde a zde. Stránky projektu: https://opensprinkler.cz/ a zdrojové kódy na Githubu: https://github.com/martinpihrt/OSPy/tree/master/hardware_pcb/sensors_pcb_fw/ESP32.

Srdcem desky je čip Espressif ESP32, ke kterému jsou připojeny veškeré sondy (teplota, pohyb, kontakt, průtok, vlhkost). Ty se připojují pomocí šroubovacích svorek, nebo konektorů RJ11. Deska s řídícím systémem OSPy komunikuje přes Wi-Fi síť.

FREE (v příloze veškerá dokumentace: program pro ESP32, deska spojů...) - > pojato jako "open hardware"

 

Parametry desky - co lze připojit (pomocí svorek, nebo RJ11)

  • 4 ks teplotní čidlo DS18B20 (3 žilový kabel do 40 metrů pro každé čidlo)
  • 1ks pohybový vstup (spínač, nebo například PIR - možnost definovat typ připojení pull-up, nebo pull-down)
  • 1ks kontaktní vstup (spínač, nebo například PIR - možnost definovat typ připojení pull-up, nebo pull-down)
  • 1ks průtokoměr/vodoměr (kontakt, nebo otevřený kolektor ze snímacího prvku)
  • 1ks čidlo vlhkosti (připojení pomocí I2C sběrnice)
  • 1ks kontakt relé (spínací kontakt) pro ovládání zátěže
  • napájení 5V až 30V DC/ min 1A
  • nastavení pro připojení k Wi-Fi síti -> pomocí AP manažeru

Schéma zapojení

Deska spojů

Rozměry desky

Seznam součástek

 

označení hodnota odkaz tme.eu za ks ks celkem bez dph
IN jack 2.1mm x 5.5mm THM DC jack 

https://www.tme.eu/cz/details/neb21r/konektory-dc/lumberg/neb-21-r/

19,4 Kč 1 19,4 Kč
IC1 LM2576S-3.3/NOPB TEXAS INSTRUMENTS https://www.tme.eu/cz/details/lm2576s-3.3_nopb/stabilizator-napeti-obvody-dc-dc/texas-instruments/ 56,0 Kč 1 56,0 Kč
U1 ESP32-WROOM-32U (4MB) ESPRESSIF https://www.tme.eu/cz/details/esp32-wroom-32u/moduly-iot-wifi-bluetooth/espressif/esp32-wroom-32u-4mb/ 97,0 Kč 1 97,0 Kč
U1 ant Anténa; Bluetooth,WiFi,ZigBee; 4dBi; lineární; 34,9x9x0,1mm; U.F https://www.tme.eu/cz/details/1461530100/anteny-wifi-bluetooth/molex/ 51,0 Kč 1 51,0 Kč
R6, R7, R8, R12 10k 1206 https://www.tme.eu/cz/details/ar1206-10k-0.1%25/presne-rezistory-smd-1206/viking/ar06btcv1002/ 0,5 Kč 4 2,0 Kč
R1, R2, R3, R4, R9, R10 4k7 1206

https://www.tme.eu/cz/details/cq1206-4k7-5%25/rezistory-smd-1206/royal-ohm/cq06s4j0472t5e/

0,3 Kč 6 1,8 Kč
R5 330 Ohm 1206

https://www.tme.eu/cz/details/crcw1206330rjntabc/rezistory-smd-1206/vishay/

0,6 Kč 1 0,6 Kč
DRY, DS1, DS2, DS3, DS4, I2C, LEAK, MOT WEBP6-1 RJ11

https://www.tme.eu/cz/details/rj11gk/konektory-rj/ninigi/

13,7 Kč 8 109,6 Kč
IN, *K1, *K2 nebo místo RJ11 Svorkovnice - rozteč 3,5mm - dvojitá

https://www.tme.eu/cz/details/dg381-3.5-2p12/svorkovnice-do-plosnych-spoju/degson-electronics/dg381-3-5-02p-12-00a-h/

8,1 Kč 1 8,1 Kč
* nebo místo RJ11 DRYS, DS1S, DS2S, DS3S, DS4S, LEAKS, MOTS Svorkovnice - rozteč 3,5mm - trojitá

https://www.tme.eu/cz/details/dg381-3.5-3p12/svorkovnice-do-plosnych-spoju/degson-electronics/dg381-3-5-03p-12-00a-h/

13,1 Kč 0 0,0 Kč
C1, C3 100nF 1206 https://www.tme.eu/cz/details/12061c104k4t2a/kondenzatory-mlcc-smd-1206/avx/ 3,0 Kč 2 6,0 Kč
T1 2N7002E SOT23 https://www.tme.eu/cz/details/2n7002e-7-f/tranzistory-s-kanalem-n-smd/diodes-incorporated/ 1,8 Kč 1 1,8 Kč
K3 Svorkovnice - rozteč 5mm - dvojitá

https://www.tme.eu/cz/details/dg300-5.0-2p12/svorkovnice-do-plosnych-spoju/degson-electronics/dg300-5-0-02p-12-00a-h/

3,3 Kč 1 3,3 Kč
BOOT, EN, AP switch spst SMD 6mm https://www.tme.eu/cz/details/1301.9320/mikrospinace-tact/schurter/ 6,2 Kč 3 18,6 Kč
F5 200mA PTCFUSE-1206

https://www.tme.eu/cz/details/0zcj0020ff2e/polymerove-pojistky-smd/bel-fuse/

2,5 Kč 1 2,5 Kč
F1, F2, F3, F4, F6, F7, F8 20mA (50mA) PTCFUSE-1206

https://www.tme.eu/cz/details/0zcj0005ff2e/polymerove-pojistky-smd/bel-fuse/

2,5 Kč 7 17,5 Kč
K4 rele RM84-2012-35-1003

https://www.tme.eu/cz/details/rm84-2012-35-1003/elektromagneticka-rele-miniaturni/relpol/

35,0 Kč 2 70,0 Kč
DZ1 BZV55-C3V6.115

https://www.tme.eu/cz/details/bzv55-c3v6.115/zenerovy-diody-smd/nexperia/

0,7 Kč 4 2,8 Kč
D1, D2, D4 SK210 Schottky; SMD; 100V; 2A; SMB https://www.tme.eu/cz/details/sk210/diody-schottky-smd/dc-components/ 1,7 Kč 3 5,1 Kč
D3 red 1206 https://www.tme.eu/cz/details/osr51206c1e/diody-led-smd-barevne/optosupply/ 1,2 Kč 1 1,2 Kč
C2 1000uF/10V  https://www.tme.eu/cz/details/gt1000_10/elektrol-kondenzatory-tht-s-niz-imped/samxon/gt-1000u-10v/ 2,4 Kč 1 2,4 Kč
UART PSH02-04W https://www.tme.eu/cz/details/zl263-4sg/konektory-hrebinky/connfly/ds1024-1-4rf1/ 3,3 Kč 1 3,3 Kč
L1 HPI1260-101 FERROCORE https://www.tme.eu/cz/details/hpi1260-101/vykonne-tlumivky-smd/ferrocore/ 21,2 Kč 1 21,2 Kč
        bez dph 501,2 Kč
        s dph 606,5 Kč
        s pošt 726,5 Kč

Foto z osazování desky

5.3.2021 jsem objednal desky spojů u www.allpcb.com na článku se pracuje :-) Desky budou stát (10 ks) 52.68 dolarů a mají přijít do 15-30 dnů.

19.4.2021 desky z Číny jsou tady :-)

Animace

Napájení snímače (vstupy a výstupy)

Připojení čidel k desce (konektor RJ, nebo svorkovnice)

  • Teplota DS1-DS4 (DS18B20)
  • Kontakt
  • Průtok
  • Pohyb
  • Vlhkost, I2C, hladina - vzdálenost (sonic)

Teplota DS1-DS4

Kontakt

 

Průtok

Pohyb

Různé způsoby připojení pohybového čidla nalezneme zde: https://pihrt.com/elektronika/439-ospy-jak-pridat-a-pripojit-snimace?start=4

Vlhkost, I2C, vzdálenost (sonic)

Ultrazvukové čidlo JSNSR04T (V3) -> https://www.aliexpress.com/item/32863960886.html

Z webu Aliexpressu (prodejce)

The new version of SR04T-V3.0 recently released solves the problem of blind data jumps and improves the stability of the product. JSN-SR0T4-V3.0 ultrasonic ranging module can provide 21cm-600cm non-contact distance sensing Function, ranging accuracy can be as high as 3mm; the module consists of an ultrasonic sensor and control circuit integrated with transceiver. The usage of mode one is compatible with our HC-SR04 module
 
Features:
1. Small size and easy to use:
2. Low voltage and low power consumption:
3. High measurement accuracy;
4. Strong anti-interference;
5. Integrated closed waterproof probe with wire, suitable for wet and harsh measurement occasions
 
Product parameters:
Working voltage: DC: 3.0V-5.5V
Working current: less than 8mA
Probe frequency: 40kHz
The longest range: 600cm
Recent range: 20cm
Long range accuracy: ±1cm
Resolution: 1mm
Mileage angle: 75 degrees
Input trigger signal: 1. TTL pulse above 10uS; 2. Serial port sending command 0X55
Output echo signal Output pulse width level signal, or TTL
Wiring:
3-5. 5V (power +)
Trig (Control) RX
Echo (output) TX
GND (power-)
Working temperature: -20-+70 degree

  • Mode 2: M2 short connection is serial port controlled output
  • Mode 1: M1 short connection is automatic serial output
  • Mode 0: Mode floating = trigger pulse width output (factory default mode)
  • Mode 3: Mode welding 200K = automatic distance pulse width output
  • Mode 4: Mode welding 360K = low power pulse width mode output
  • Mode 5: Mode welding 470K = switch mode output
     
    Mode 1: Mode=open means no welding. The mode is explained as follows
     
    Basic working principle:
    (1) Adopt IO port TRIG to trigger ranging. Present a high level signal of at least 10us.
    (2) The module automatically sends eight 40khz square waves and automatically detects whether a signal returns;
    (3) When a signal returns, a high level is output through the IO port ECH0. The duration of the high level is the time from the transmission of the ultrasonic wave to the return. Test distance height = (high level time * speed of sound (348M/S))/2.
    (4) After the module is triggered for ranging, if the echo cannot be received (the reason exceeds the measured range or the probe does not face the measured object), the ECHO port will automatically become low after 40MS, marking this time The measurement ends, regardless of success.
     
    Mode 2: Mode=47K (or directly short M1 bit) UART automatic output
     
    The UART automatic output mode outputs the measured distance value (hexadecimal number) according to the UART communication format. This mode does not require an external trigger signal. The module can automatically measure every 100ms. The TX pin outputs the measured distance value after each measurement is completed.
     
    Mode 3: Mode=120K (or short M2 bit directly) UART controlled output
     
    The UART controlled output method outputs the measured distance value (hexadecimal number) according to the UART communication format. In this method, the trigger command oX55 signal needs to be added to the RX pin. The module measures once every time the command is received. The foot outputs the measured distance value. The command trigger cycle should be greater than 60ms.
     
    Mode 4: Mode=200K high level (PWM) pulse width automatic output
     
    Under the pulse width PWM automatic output, the module automatically measures at a period of 200ms, and outputs a pulse width high level corresponding to the distance after the measurement. Calculating distance mode reference mode 1.
     
    Mode 5: Mode=360K low power consumption (PWM) high level pulse width controlled output
     
    In low-power mode, the module's shut-down dog is disabled. This module is suitable for battery-powered users. The static power consumption is less than 70UA. The working distance measurement method is the same as mode 1.
     
    Mode 6: Mode=470K switch output
     
    The module will set a threshold value at the factory, the default is 1.5 meters. The module performs ranging every 200ms. When the detected distance value of the target is less than the set threshold, the Echo pin outputs a high level. The currently detected distance value is greater than the set threshold, and the Echo pin outputs a low power. In order to improve the stability, the factory defaults that the distance detected by the target for two consecutive times is less than the set threshold. Signal, no driving ability. Transistor drive relays should be added during application. If there are special requirements, you need to modify the threshold or other settings, you need to specify when purchasing.
Attachments:
Download this file (3D.zip)Data pro 3D tiskárnu[krabička]1840 kB14 Downloads2021-04-22 06:53
Download this file (a-pulldwn33V.png)Motion Pull-Down[3V3]268 kB15 Downloads2021-04-20 21:44
Download this file (a-pullup33V.png)Motion Pull-UP[3V3]228 kB14 Downloads2021-04-20 21:43
Download this file (b-pulldwn12V.png)Motion Pull-Down[12V]93 kB13 Downloads2021-04-20 21:44
Download this file (b-pullup12V.png)Motion Pull-UP[12V]90 kB12 Downloads2021-04-20 21:44
Download this file (D3V.PDF)D3V-163-3C5 OMRON[Katalogový list]882 kB8 Downloads2021-05-16 18:53
Download this file (eagle.zip)Data pro výrobu desky[Eagle, gerber]972 kB25 Downloads2021-03-05 12:42
Download this file (esp32-wroom-32_datasheet_en.pdf)ESP32[Katalogový list]512 kB31 Downloads2021-03-05 12:41
Download this file (pulldwn12Vmore.png)Motion Pull-Down[12V more probe]150 kB12 Downloads2021-04-20 21:46
Download this file (pullup12Vmore.png)Motion Pull-UP[12V more probe]146 kB14 Downloads2021-04-20 21:46
Download this file (pullup33V_more.png)Motion Pull-UP[3V3 more probe]232 kB12 Downloads2021-04-20 21:45
Download this file (rele_RM84.pdf)RM84-rele[Katalogový list]3283 kB30 Downloads2021-03-05 12:41
Download this file (RJ11GK.pdf)RJ11[Katalogový list]377 kB19 Downloads2021-03-05 12:41

Nemáte oprávnění pro vkládání komentářů.