RFID On PCB1.3

With or without RFID it's better to use the RFID branch.
During all the setting and test please disable the watchdog
Check line 130 to 140 on mower.h
I try to remove the Master one or merge the rifd branch but GitHub is new for me :blink:
Here the new txt file for setup Raspberry
https://github.com/Boilevin/AzuritBer/blob/RFID/Txt%20file/setup%20raspberry.txt
 
Esp32 is paired with phone. then I changed from mower.h

Code:
#define BLUETOOTH_BAUDRATE  19200       // baudrate used for communication with Bluetooth module (Ardumower default: 19200)

#define ESP8266_BAUDRATE    115200      // baudrate used for communication with esp8266 Wifi module
#define BLUETOOTH_PIN       1234
#define GPS_BAUDRATE  9600              // 9600 for M6n ,19200 or 38400 for BN880,M8Nother module


// ------ used serial ports for console, Bluetooth, ESP8266 -----------------------------

// Due has two serial ports: Native (SerialUSB) and Programming (Serial) -
// we use 'SerialUSB' for 'Console' so the Raspberry PI receise all data
// we use 'Serial' for 'Console' so the PC receise all data
 
//#define Console Serial
//#define CONSOLE_BAUDRATE    115200       // baudrate used for PC

#define Console SerialUSB
#define CONSOLE_BAUDRATE    115200       // baudrate used for Raspberry PI console


#define RaspberryPIPort SerialUSB
#define ESP8266port Serial2              // ESP32 (was serial1)
#define Bluetooth Serial1                // Ardumower default (was serial2)
#define GpsPort Serial3

Do I need to change something else also? pfodapp connection fails.. rx/tx is 3.3v just like with hc05 and vin 5v
 
What is the soft Inside the ESP32?
Is the RFID board is connected to ESP32 (If the setup part of the RFID fail the loop is never executed, so Nothing is send to DUE).
Normaly you have to use ESP32_RFID Inside the ESP32 with all the Serial2.print.


After you have into Test File a test prog to be sure the RFID work (it's ESP32_RFID_PC_TEST).
Use it without the PCB1.3 and check the IDE console to see the setup part and compare with my jpg file.

If it did not work test the ESP32 alone with a simple "HelloWord" print on serial each 1 second.


Normaly the BT parts is very simple, it's only passthrou:


Code:
#include "BluetoothSerial.h"
BluetoothSerial ESP_BT;
 void setup() {
  Serial2.begin(19200);
  ESP_BT.begin("ESP32_BT01");
}
void loop() {
  while (ESP_BT.available()) {
    Serial2.write(ESP_BT.read());
  }
  while (Serial2.available()) {
    ESP_BT.write(Serial2.read());
  }
}


I can't see what you change in the mower.h.
The #define BLUETOOTH_BAUDRATE 19200
is OK for me.
 
Swapped these, because esp32 is connected to where hc05 was

Code:
#define ESP8266port Serial2              // ESP32 (was serial1)
#define Bluetooth Serial1                // Ardumower default (was serial2)

Software is 'ESP32_PFOD_PASSERELLE_OK.ino" (downloaded 30.6.) and rfid board is connected
 
Hi
Thanks for helping with Raspberry. The Pi is running.
Actually i dont have the ESP32.
When i try to run: python3 PiArdu.py
then i get this Errors:

ERREUR DE CONNECTION
0
Traceback (most recent call last):
File "PiArdu.py", line 2664, in
checkSerial()
File "PiArdu.py", line 208, in checkSerial
response1=ser.readline()
NameError: name 'ser' is not defined

Or do i have to run a different version like PiArdu96.py or PiArdu207.py or ....
Thanks and best regards,
Bjoern
 
Can you show me the config.py ?
You need to connect the PI at Native USB on DUE.

Also i am going to see that The Raspbian is not strech but a new version so i check.

Do you use strech or the last version Buster.?
 
Hi
Up to now the Pi is not connected. That might the reason. OK, understand.
The config is the default.
I am using the new Version from here: github.com/Boilevin/AzuritBer/blob/RFID/...etup%20raspberry.txt

Now i tested an older version: PiArdu88.py
This one is starting without Error and i got the nice UI.

Best,
Bjoern
 
The version is the number after PiArdu so the 207 is the last one.
I need to change in github the config.py.

Into config.py ,you need to set the NanoConnectedOn Pi to false, because i suppose you have not a nano connected.

And start again the PiArdu or Piardu207
You need to see data coming each 500 ms in botom left on the console parts.

For the version it's not my soft but directly the OS itself
 
I tested esp with test code and it read tags. 15 cm away, amazing! But now pfodd connection wont work even with hc05?? Something went wrong but what?? :D Tested also another due but same problem
 
Cool that the reader work like expected (It's the more complex wiring process)

Are you sure that you set the correct serial port into mower.h,normaly you have Nothing to change and the wiring is simple.
Copy and past all the mower.h from GitHub and replace it in your code.
RX to TX and TX to RX.
Other possibility, change the name of the BT into ESP32 soft ESP_BT.begin("ESP32_BT01"); test with ESP_BT.begin("ESP32_BT333")
And redo the pairing
Test with arduremote
Or simply restart your phone and delete all paired module into Bluetooth
 
Did the pi receive the rfid read tag, you can see it in the pi console
If yes the serial communication between due and esp32 is ok so check the Bt phone side.
If no
Upload a simple passthrou code into the due to read the serial2 and send it to serial ide console . When you read a rfid tag , you need to receive something.
 
To Test the serial communication : Simply test without PCB1.3
Connect a Due RX2(17) to ESP32 TX2 and Due TX2(16) to ESP32 RX2
Connect the RFID reader to ESP32 with the ESP32_RFID code from github.

Power the ESP32 using DUE 5V to ESP32 Vin and GND to GND
Power the Due with you PC usb cable

Use this kind of code into the DUE and check the console when you read a tag (When remove it)


Code:
void setup() {
  // put your setup code here, to run once:
  Serial2.begin(19200);
  Serial.begin(19200);
 
}

void loop() {
  // put your main code here, to run repeatedly:

  while ( Serial2.available()) {
    Serial.print(Serial2.read());
  }
  
  delay(10);
}


If it's OK can you take a photo of the BT connector on PCB1.3 (Are you sure to use RX,TX,GND and VCC)
it's Strange how it's locate on PCB1.3,maybe a bad printing on PCB
 
I broke something on pcb. Also console wont work when due is plugged to pcb, it takes no commands but "start screen" comes. d or v does nothing. When unplug due console start to work.
Also noticed when insert commands via piardu pfodapp can receive but not send anything, so pcb rx side is broken but tx working.
tx0 and rx0, pins 0 and 1 what are these and why those are connected to pcb? pins 14-19 are serial1-3 wlan, bt, gps
 
I broke something on pcb
Very Strange the ESP32 is 3.3V so you can't break Something or only bad solder ?
On the soft you have
Serial 2 use for Bluetooth
Serial 1 use for WIFI ESP8266
Serial 3 use for GPS but maybe a workarround need for the PCB

You can test on the 3 Serial port to be sure.
For Serial1
Try to connect the ESP32 on P44 and set JP6 to 5V and JP11 to 3.3V
Change into code
#define Bluetooth Serial1 // Ardumower default
#define GpsPort Serial2[/code]
 
Bernard schrieb:
To Test the serial communication : Simply test without PCB1.3
Connect a Due RX2(17) to ESP32 TX2 and Due TX2(16) to ESP32 RX2
Connect the RFID reader to ESP32 with the ESP32_RFID code from github.

Power the ESP32 using DUE 5V to ESP32 Vin and GND to GND
Power the Due with you PC usb cable

Use this kind of code into the DUE and check the console when you read a tag (When remove it)


Code:
void setup() {
  // put your setup code here, to run once:
  Serial2.begin(19200);
  Serial.begin(19200);
 
}

void loop() {
  // put your main code here, to run repeatedly:

  while ( Serial2.available()) {
    Serial.print(Serial2.read());
  }
  
  delay(10);
}


If it's OK can you take a photo of the BT connector on PCB1.3 (Are you sure to use RX,TX,GND and VCC)
it's Strange how it's locate on PCB1.3,maybe a bad printing on PCB
esp32 directly on due send constant 0 to serial console and nothing else when card is present.
 
Zuletzt bearbeitet von einem Moderator:
I add to build a second rfid reader the last week so i can tell you if i can explain your issue.
But communication betwwen Due and ESP32 actualy work like a charm in my Denna and better than with the HC05
 
Oben