WIFI Perimeter Sender(English): Unterschied zwischen den Versionen

Aus www.wiki.ardumower.de
Wechseln zu: Navigation, Suche
(PROGRAMMING ESP32)
(PROGRAMMING ESP32)
Zeile 64: Zeile 64:
 
If the sender don't have access to your home WIFI ,you need to use raspberry PI as access point and use the pi SSID and password.
 
If the sender don't have access to your home WIFI ,you need to use raspberry PI as access point and use the pi SSID and password.
  
ssid    = "your acces point ssid";  // put here your acces point ssid
+
ssid    = "your acces point ssid";  // put here your acces point ssid
password = "password";  // put here the password
+
password = "password";  // put here the password
  
 
Now put a static IP (the last number need to be unique on your network and different for each sender)
 
Now put a static IP (the last number need to be unique on your network and different for each sender)
 
On Piardu config.py you need to set the correct IP according sender (Sender1AdressIP="10.0.0.150",Sender2AdressIP="10.0.0.151",sender3AdressIP="10.0.0.154")
 
On Piardu config.py you need to set the correct IP according sender (Sender1AdressIP="10.0.0.150",Sender2AdressIP="10.0.0.151",sender3AdressIP="10.0.0.154")
  
staticIP(10, 0, 0, 154); // put here the static IP
+
staticIP(10, 0, 0, 154); // put here the static IP
gateway(10, 0, 0, 1); // put here the gateway (IP of your routeur)
+
gateway(10, 0, 0, 1); // put here the gateway (IP of your routeur)
  
  

Version vom 14. März 2021, 11:28 Uhr

WIFI Perimeter sender.

WIFI PERIMETER SENDER

Hardware

You need :

1 ESP32 DEV KIT V1 (or later but with same pin diagram).

Esp32-1.jpg Esp32-2.jpg Esp32 layout.png


1 INA3221 3-Channel DC Current Sensor :

INA3221.jpg


1 I2C Small OLED Display

OLED-Display-1.jpg


1 DC/DC Converter

DC DC converter.jpg

1 L298N motor Driver.

L298N-1.jpg


WIRING

Now you need to connect everything together.

Option 1

It's the same that standard sender Only one perimeter wire is used.

Sender ESP32 Ina3221 wiring.jpg

Option 2

2 area perimeter wire are possible.


Sender 2 loops ESP32 Ina3221 wiring.jpg


Option 3

1 area perimeter wire and 1 DC motor for a door. Be careful that the code is not actually write for this feature.


Sender with door ESP32 Ina3221 wiring.jpg


PROGRAMMING ESP32

Use code locate into github: https://github.com/Boilevin/AzuritBer/tree/master/Sender%20WIFI

Select for example sender_ESP32_INA3221_2loops (it's the 2 loops version)

Now check the 40 firsts line of code and adjust according your need.

If your home WIFI is OK at the sender location ,you need to use your home value.

If the sender don't have access to your home WIFI ,you need to use raspberry PI as access point and use the pi SSID and password.

ssid     = "your acces point ssid";   // put here your acces point ssid
password = "password";  // put here the password

Now put a static IP (the last number need to be unique on your network and different for each sender) On Piardu config.py you need to set the correct IP according sender (Sender1AdressIP="10.0.0.150",Sender2AdressIP="10.0.0.151",sender3AdressIP="10.0.0.154")

staticIP(10, 0, 0, 154); // put here the static IP
gateway(10, 0, 0, 1); // put here the gateway (IP of your routeur)


  1. define USE_STATION 0 // a station is connected and is used to charge the mower
  2. define USE_PERI_CURRENT 1 // use Feedback for perimeter current measurements? (set to '0' if not connected!)
  3. define USE_BUTTON 1 // use button to start mowing or send mower to station not finish to dev
  4. define USE_RAINFLOW 0 // check the amount of rain not finish to dev on 31/08/2020
  5. define WORKING_TIMEOUT_MINS 300 // timeout for perimeter switch-off if robot not in station (minutes)
  6. define PERI_CURRENT_MIN 100 // minimum milliAmpere for cutting wire detection



You need to use Arduino IDE to upload code into ESP32, It's easy and exactly same process that for Arduino DUE or Mega ,but need to select the correct board.

Add the ESP32 board to your arduino IDE: for more info see : https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/boards_manager.md

Open your Arduino Ide 1.8 or later

Select ESP32 DEV Module and correct COM port

Ide-setting-30.png Ide-setting-35.png



To upload code do not forget : At the end of compilation when you see "connecting ....." --> push the BOOT button locate on ESP32 DEV KIT for 5 sec to start uploading

Ide-setting-40.png Esp32 boot.png