WIFI Perimeter Sender(English): Unterschied zwischen den Versionen

Aus www.wiki.ardumower.de
Wechseln zu: Navigation, Suche
(WIFI PERIMETER SENDER)
(TESTING)
Zeile 119: Zeile 119:
 
== TESTING ==
 
== TESTING ==
  
BEFORE CONNECTING TO CHARGER ADJUST THE DC/DC OUT TO 9V or more BUT MAXIMUM 12V
+
[[File:warning.png]] BEFORE CONNECTING TO CHARGER ADJUST THE DC/DC OUT TO 9V or more BUT MAXIMUM 12V

Version vom 16. März 2021, 20:32 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 SSID and password 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") if you want that mower can start and stop sender 2 or 3 over WIFI.

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

Now you can set the last value:

DcDcOutVoltage set it according your DC/DC voltage regulator output (MAX 12V)

USE_STATION set to 0 if it's area2 or area3 without charging station or 1 if it's the main area

USE_PERI_CURRENT set it to 1 if you want to detect when perimeter wire is cut

PERI_CURRENT_MIN it's the min value to detect that wire is cut

USE_BUTTON set to 0 because not use actually

USE_RAINFLOW set to 0 because not use actually

WORKING_TIMEOUT_MINS when robot is not in station signal is send for this max duration.

#define USE_STATION     0 // a station is connected and is used to charge the mower
#define USE_PERI_CURRENT      1     // use Feedback for perimeter current measurements? (set to '0' if not connected!)
#define USE_BUTTON      1     // use button to start mowing or send mower to station not finish to dev
#define USE_RAINFLOW    0     // check the amount of rain not finish to dev on 31/08/2020
#define WORKING_TIMEOUT_MINS 300  // timeout for perimeter switch-off if robot not in station (minutes)
#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


TESTING

Warning.png BEFORE CONNECTING TO CHARGER ADJUST THE DC/DC OUT TO 9V or more BUT MAXIMUM 12V