Sonoff DUAL R3 - ESP32

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Sonoff DUAL R3 - ESP32

#1 Post by jgrad » 17 Mar 2021, 13:47

Hi,

today I received my first Sonoff DUAL R3. I expected that it contains ESP8266 but unfortunately it has ESP32 build in.

Do somebody have experience flashing it with ESPeasy? pads for RX, TX, 3.3V and GND are accessible, for GPIO-0 I assume it is connected to build in button but still searching web for some schematics if exists.

It has 4MB Flash.

BRJ.
SONOFF_DUAL_exterior.jpg
SONOFF_DUAL_exterior.jpg (117.5 KiB) Viewed 27568 times
SONOFF_DUAL_ESP32.jpg
SONOFF_DUAL_ESP32.jpg (511.68 KiB) Viewed 27568 times
SONOFF_DUAL_FLASH.jpg
SONOFF_DUAL_FLASH.jpg (111.72 KiB) Viewed 27568 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff DUAL R3 - ESP32

#2 Post by TD-er » 17 Mar 2021, 14:14

Ooh, that's nice, to have the ESP32 on a Sonoff.
I will order one myself.

Did you already check the Tasmota documentation?
They really have a nice documentation collection of lots of those devices.

Micha_he
Normal user
Posts: 369
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Sonoff DUAL R3 - ESP32

#3 Post by Micha_he » 25 Mar 2021, 09:28

@jgrad: Any news? Did you get a ESPEasy-image to work on it?

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Sonoff DUAL R3 - ESP32

#4 Post by jgrad » 26 Mar 2021, 11:07

not yet, time limitations.
Since this is my first ESP32 device I am a bit more careful. First i was checking which predefined bin I will flash first - I decided that this will be ESP_Easy_mega_20210223_normal_ESP32_4M316k.bin.

For flasher tool - can I use same flasher tool for ESP32 as for ESP8266 - I currently use FlashESP8266.exe

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff DUAL R3 - ESP32

#5 Post by TD-er » 26 Mar 2021, 11:53

See also the flashing steps described here: https://espeasy.readthedocs.io/en/lates ... html#esp32
For the initial flash (from serial) you need the "factory" bin.
Later OTA updates can be done using the file you mentioned.

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Sonoff DUAL R3 - ESP32

#6 Post by jgrad » 27 Mar 2021, 19:21

Hi,

I followed instructions above and flashed ESP_Easy_mega_20210223_normal_ESP32_4M316k-factory.bin.

Seems that flashing went OK (similar responses as in instructions).

But after flashing I expected to find wifi network with SSID "ESP Easy" but nothing :(

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff DUAL R3 - ESP32

#7 Post by TD-er » 27 Mar 2021, 20:44

You can also try to send the SSID and WiFi key via serial and then save it.
Maybe you also need to reboot it (recent bug I fixed this week)

Code: Select all

wifissid,YourSSID
wifikey,YourWiFiPassword
save

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Sonoff DUAL R3 - ESP32

#8 Post by jgrad » 28 Mar 2021, 11:37

I connected serial terminal and saw following pattern rolling all the time

Code: Select all

INIT : Booting version:  (ESP32 SDK v3.2.3-14-gd3e562907)
37 : Info   : INIT : Free RAM:290120
38 : Info   : INIT : Cold Boot - Restart Reason: CPU0: Vbat power on reset CPU1: for APP CPU, reseted by PRO CPU
39 : Info   : FS   : Mounting...
82 : Info   : CRC  : SecuritySettings CRC   ...OK
86 ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DOUT, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5816
entry 0x400806ac
▒U37 : Info   :

Then I changed power supply (before it was powered from serial adapter used for programming) and got expected behaviour with "Easy ESP" SSID.

Logged in successfully and was able to switch on/off build in relays (Tools->Command) connected to GPIO14 and GPIO27

I have to check also inputs (S1, S2) which shall be connected to GPIO32, GPIO32.

WIFI status led is GPIO13 (inverted)

Based on info I was able to collect SONOFF DUAL R3 use CSE7761 power metering chip - I dont know if there is support within ESPeasy builds.
Last edited by jgrad on 28 Mar 2021, 15:27, edited 1 time in total.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff DUAL R3 - ESP32

#9 Post by TD-er » 28 Mar 2021, 13:34

The CSE7766 is supported: https://github.com/letscontrolit/ESPEas ... SE7766.ino
Not sure what differs with the CSE7761

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Sonoff DUAL R3 - ESP32

#10 Post by jgrad » 28 Mar 2021, 15:26

seems that:
* CSE7766 is single channel with UART interface
* CSE7761 is dual channel with SPI interface

deon.dup
Normal user
Posts: 10
Joined: 08 Sep 2019, 08:58
Location: South Africa

Re: Sonoff DUAL R3 - ESP32

#11 Post by deon.dup » 24 Apr 2022, 15:10

Goth the Dual R3 going with the advice from this post - Thank you. Now trying to figure out the CSE7766 (P077), after I installed the Power version of mega-20220328, over the air. Acitvated a CSE7766 device, quite easily. However no readings on V, I and P. Not sure what parameters should be loaded, I used all the defaults. Any advice? Could not really get anything but these posts.

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Sonoff DUAL R3 - ESP32

#12 Post by Ath » 24 Apr 2022, 15:38

The hardware (GPIO) configuration can be extracted from this Blakadder page (also showing the Tasmota configuration, but that's not usable by ESPEasy, only the GPIO info).
The predefined plugin settings for Sonoff Pow R1 are the first I'd try to see if that returns anything usable. Possibly the calibration values need adjustment too.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff DUAL R3 - ESP32

#13 Post by TD-er » 24 Apr 2022, 20:30

Just curious, what exact build are you using?
If using the core 3.x and/or "beta" builds, then I think you're seeing the same issue I experienced here: https://github.com/letscontrolit/ESPEasy/issues/3991

deon.dup
Normal user
Posts: 10
Joined: 08 Sep 2019, 08:58
Location: South Africa

Re: Sonoff DUAL R3 - ESP32

#14 Post by deon.dup » 24 Apr 2022, 20:38

Hi there

I’m using the 22020328 Power version for the ESP32 4M on a Sonoff Dual R3. Your post seems to suggest that perhaps it doesn’t work as before, so perhaps I should go to an earlier release.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff DUAL R3 - ESP32

#15 Post by TD-er » 24 Apr 2022, 20:49

Please mention the exact bin file you used, which is shown on the sysinfo page.
And/or the line describing the SDK

Edit:
Oh overlooked the "ESP32" aspect.
Then it may be a different issue.
Not sure if that plugin was ever tested on ESp32 by the way.

deon.dup
Normal user
Posts: 10
Joined: 08 Sep 2019, 08:58
Location: South Africa

Re: Sonoff DUAL R3 - ESP32

#16 Post by deon.dup » 24 Apr 2022, 21:18

Not sure if this is the exact detail you’re looking for, using mega-20220328 Energy 4M for ESP32. Reverted back to ESP_Easy_mega_20211224_energy_ESP32_4M316k.bin to test, but with same result. Also not sure of settings, maybe the comms to UART should also be setup?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff DUAL R3 - ESP32

#17 Post by TD-er » 24 Apr 2022, 21:50

I think this plugin is not going to work with ESP32 right now.
At least not without changing some code.
It is using hard-coded Serial0 for it, without offering to set the GPIO pins for it.
This one should be modified to use the ESPEasySerial wrapper to allow for a transparent configuration of the serial port.
Without it, it will very likely not going to work on your setup.

deon.dup
Normal user
Posts: 10
Joined: 08 Sep 2019, 08:58
Location: South Africa

Re: Sonoff DUAL R3 - ESP32

#18 Post by deon.dup » 25 Apr 2022, 07:11

Thanks much appreciated. That’s a step too far for me right now, although I’ll look at the code to at least have a look at your suggestion.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff DUAL R3 - ESP32

#19 Post by TD-er » 25 Apr 2022, 12:51

We will fix it, but this may take some time to do so.
Please keep an eye on the GitHub issue I linked as the needed changes mentioned in there will also make it work on ESP32.

deon.dup
Normal user
Posts: 10
Joined: 08 Sep 2019, 08:58
Location: South Africa

Re: Sonoff DUAL R3 - ESP32

#20 Post by deon.dup » 25 Apr 2022, 15:04

Hi

Do you refer to #4020, created today?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff DUAL R3 - ESP32

#21 Post by TD-er » 25 Apr 2022, 15:07


User avatar
M*I*B
Normal user
Posts: 319
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: Sonoff DUAL R3 - ESP32

#22 Post by M*I*B » 09 Jun 2023, 22:25

Hello shere (again),

if memberlist.php?mode=viewprofile&u=1491 allows it, I'd like to join this thread.
Since yesterday I also have two of the DUALR3 (and also a 4CHPRO... comes later then). Flashing was no problem and the rest works too, except the powermeter-chip...

My two questions:
  • Is the ESP_Easy_mega_20230508_energy_ESP32_4M316k May 8 2023 the right version for this? Based on the prefix "energy" I only assumed that.
  • Is there somehow now support for the CSE7761?
DLzG
Micha

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Sonoff DUAL R3 - ESP32

#23 Post by Ath » 09 Jun 2023, 22:55

Hm, that CSE7761 doesn't seem to be compatible with the quite similar CSE7766 that is supported by EAPEasy. I've ordered one of those units, and will investigate what's different to be able to support it.
/Ton (PayPal.me)

User avatar
M*I*B
Normal user
Posts: 319
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: Sonoff DUAL R3 - ESP32

#24 Post by M*I*B » 09 Jun 2023, 23:03

... jgrad have investigate that before:

[quote=jgrad post_id=51554 time=1616937997 user_id=1491]
seems that:
* CSE7766 is single channel with UART interface
* CSE7761 is dual channel with SPI interface
[/quote]

If I take a look at Tasmota it sems that GPIO 25 & 26 are used as TX/MOSI & RX/MISO. I think SS are always L (make sense if that the only SPI- device there) and CLK comes hardwired from the ESP somewhere...


OHHH, stop it!
That is the new DUALR3- version 2v0. This version use an other chip: BL0930 is it then on the V2 PCB:


But who can read that datashet??? https://pdf1.alldatasheet.com/datasheet ... L0930.html
DLzG
Micha

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests