Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: wiring cmt2300a esp32 devkit #998

Open
4 of 16 tasks
001oc opened this issue Jun 19, 2023 · 26 comments
Open
4 of 16 tasks

Documentation: wiring cmt2300a esp32 devkit #998

001oc opened this issue Jun 19, 2023 · 26 comments
Labels
question Further information is requested

Comments

@001oc
Copy link

001oc commented Jun 19, 2023

Hardware

  • ESP8266
  • ESP32
  • Raspberry Pi

Modelname: ESP32 DevKit
Retailer URL: ______

nRF24L01+ Module

  • nRF24L01+ you verified this is a Plus model capable of the required 256kBit/s mode
  • square dot indicates original Nordic Semicon chip
  • round dot indicates copy-cat / counterfeit SI labs chip

Antenna:

  • circuit board
  • external antenna (SMA)

Power Stabilization:

  • 100uF Electrolytic Capacitor
    connected between +3.3V and GND (Pin 1 & 2) of the NRF Module
  • Voltage stabilizing motherboard

Version / Git SHA:

Version: ..__
Github Hash: _______

Build & Flash Method:

  • AhoyDTU Webinstaller
  • VSCode - Platform IO
  • Arduino
  • ESP Tools

Debugging:

  • USB Serial Log (attached)
  • Setup settings (use our templates ... to be added)

I am looking for a wiring diagram to connect a cmt2300a to a esp32 devkit. I want to connect solely a cmt21300a (no nrf24l01+). Connecting the csb and fscb is straight forward but where is irq connected to. As the systems settings have solely 3 input fields (csb, fcsb, irq) where to connect the sclk ping of the cmt2300a.

Right now I am getting constantly something like:

12:55:54 I: [NTP]: 2023-06-19 10:55:54 UTC
12:55:56 I: resetPayload: id: 0
12:55:56 I: (#0) ) Requesting Inv SN xxxxxxxxxxxx
12:55:56 I: TX 868.00Mhz | 56 80 72 73 91 81 00 XX XX XX XX XX 14 14 83 
12:56:07 I: enqueued cmd failed/timeout
12:56:07 I: resetPayload: id: 0
12:56:07 I: (#0) ) Requesting Inv SN xxxxxxxxxxxx
12:55:56 I: TX 868.00Mhz | 56 80 72 73 91 81 00 XX XX XX XX XX 14 14 83 
12:56:07 W: CMT TX failed, code: 2

Thanks

@001oc
Copy link
Author

001oc commented Jun 19, 2023

maybe that is important too. I have used the self compiled current hms branch.

@lumapu
Copy link
Owner

lumapu commented Jul 3, 2023

that branch is not updated any more, please use development03. I will delete the hms branch in near future

@lumapu lumapu added the question Further information is requested label Jul 3, 2023
@001oc
Copy link
Author

001oc commented Jul 4, 2023

@lumapu - thanks for your advice, I have moved to develeopment branch shortly after I having started my question. But this is not an answer to my question. I am looking for a wiring diagram for solely having a CMT2300A connected to the ESP - idealy I would like to have an advice how to config this inside the software. Thanks

@mirek-z
Copy link

mirek-z commented Jul 4, 2023

Hello
I join the question about esp32+cmt2300a configuration

@lumapu
Copy link
Owner

lumapu commented Jul 4, 2023

Have you checked the issue #904?

Bei mir hängt das Modul am VSPI (SCK und MOSI)

Daraus ergibt sich als feste Pins, ESP zu CMT:
D23 - SDIO
D18 - SCK

und frei wählbar:
D17 - CSB
D26 - FCSB
D34 - GPIO3

@mirek-z
Copy link

mirek-z commented Jul 4, 2023

I'm not doing well, could I write a call?
cmt2300
sclk
sdio
csb
fcsb
these 4 pins to what pins in esp32.
i only have cmt module without nrf32.
and then how to set it in the software because there are only settings for the cmt module:
csb
fscb
irq
I will be grateful for help because somehow it doesn't work :)

@001oc
Copy link
Author

001oc commented Jul 4, 2023

@lumapu
Yes, I checked that before, thanks. The question there is if and how to operate nrf24l01 and cmt2300a both together parallel - which is working at all. My question is how to run solely a cmt2300a without a nrf24l01. I dont habe any HM, I only have HMS and HMT running.

@lumapu
Copy link
Owner

lumapu commented Jul 4, 2023

I did a quote on the interesting part, the pinning. Ahoy will support both generations, it depends on your settings which module will be used.

@mirek-z do you need a translation of my post before?

@mirek-z
Copy link

mirek-z commented Jul 4, 2023

definitely yes, because the soft has CSB, FCSB and IRQ settings and CMT has SCLK SDIO CSB FCSB, how to set it in the soft?

@jmeister79
Copy link

jmeister79 commented Jul 5, 2023

Same Problem here.
Wired up CMT to an ESP32 and cannot get it working.
What does IRQ mean?
The Boards are wired as follows:

CMT:
GPIO12 - SCLK
GPIO14 - SDIO
GPIO27 - CSB
GPIO26 - FCSB

nrf:

GPIO4 - CE
GPIO5 - CS
GPIO18 - SCK
GPIO23 - MOSI
GPIO19 - MISO
GPIO16 - IRQ

However, I cannot bring the NRF to work: "your NRF24 module can't be reached, check the wiring, pinout and enable"

CMT says:

15:34:05 I: TX 865.00Mhz \| 15 80 42 26 55 81 00 17 65 80 0b 00 64 9e d9 cd 00 00 00 00 00 00 00 00 7c c5 8b
15:34:05 W: CMT TX failed, code: 2

And I am not sure what to select for IRQ of the CMT.

Nils

@lumapu
Copy link
Owner

lumapu commented Jul 5, 2023

for the CMT part I use the following pinout with an ESP32-30 Pin module:
grafik

SDIO has to be connected to D23-VSPI-MOSI and cannot be placed somewhere else. Same for SLCK, it has to be connected to D18-VSPI-SCK

For IRQ (Interrupt Request) you need a interrupt capable pin of you ESP, I use D34 for that.


For NRF (optional) you can use the following pins:
D14: SPI-CLK
D12: SPI-MISO
D13: SPI-MOSI

for CS, CE and IRQ you have free choice.

@mirek-z
Copy link

mirek-z commented Jul 6, 2023

I have it exactly as described, but in the console I have it all the time:

19:56:43 I: TX 868.00Mhz | 56 81 03 73 23 81 00 17 65 02 15 21 14 14 41
19:56:43 W: CMT TX failed, code: 2

i only have cmt 2300 and esp32 module. I am trying to connect to HMS-2000 4T

@mirek-z
Copy link

mirek-z commented Jul 6, 2023

and shouldn't the microinverter be disconnected from the dtu? or something? wires well connected and no contact with hms

@lumapu
Copy link
Owner

lumapu commented Jul 7, 2023

would be nice if you post the serial output from booting up Ahoy

@mirek-z
Copy link

mirek-z commented Jul 8, 2023

20:15:36 I: enqueued cmd failed/timeout
20:15:36 I: resetPayload: id: 0
20:15:36 I: (#0) Requesting Inv SN xxxxxxxxxxxxx
20:15:36 I: (#0) prepareDevInformCmd
20:15:36 I: TX 865.00Mhz | 15 81 03 73 23 81 00 17 65 80 0b 00 64 a9 a7 c8 00 00 00 00 00 00 00 00 86 7c e7 
20:15:36 W: CMT TX failed, code: 2

@lumapu
Copy link
Owner

lumapu commented Jul 8, 2023

I meant the log during boot up - once the CMT module was initialized. I think the ESP can't communicate with your radio

@mirek-z
Copy link

mirek-z commented Jul 9, 2023

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:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
E (488) esp_core_dump_flash: No core du▒▒partition found!
E (488) esp_core_dump_flash: No core dump partition found!
I: Initializing FS ..
I:  .. done
I: Settings valid: true

---------
         AhoyDTU Info:
Version: 0.6.15
Github Hash: 2c1a32f

---------
         AP MODE
                SSID: AHOY-DTU
PWD: esp_8266
IP Address: http://192.168.4.1
---------

Wifi event: 0
Wifi event: 2
Wifi event: 10
Wifi event: 11
Wifi event: 10
connect to network 'DOM 29' ...
I: added inverter HMSxxxxxxxxxx
I: added inverter HMSyyyyyyyyyy
I: resetPayload: id: 0
I: resetPayload: id: 1
I: resetPayload: id: 2
I: resetPayload: id: 3
I: resetPayload: id: 4
I: resetPayload: id: 5
I: resetPayload: id: 6
I: resetPayload: id: 7
I: resetPayload: id: 8
I: resetPayload: id: 9
scanning APs with SSID DOM 29
reconnect in 8 seconds
reconnect in 7 seconds
reconnect in 6 seconds
I: Iv: 0
I:
I: Iv: 1
I:
Wifi event: 1
reconnect in 5 seconds
BSSID 0: 14 eb b6 af 8 4
reconnect in 1 seconds
reconnect in 0 seconds
try to connect to AP with BSSID: 14 eb b6 af 8 4
reconnect in 19 seconds
reconnect in 18 seconds
I: Iv: 0
I:
I: Iv: 1
I:
reconnect in 17 seconds
Wifi event: 5
I: connectionEvent
Wifi event: 4
I: connectionEvent

[WiFi] Connected
Wifi event: 7
I: connectionEvent


--------------------------------
Welcome to AHOY!

point your browser to http://192.168.1.112 (Station)
to configure your device
--------------------------------

[WiFi] AP disabled
Wifi event: 11
Wifi event: 10
Wifi event: 11
I: [NTP]: 2023-07-09 07:07:03 UTC
I: resetPayload: id: 1
I: (#1) Requesting Inv SN 114483188222
I: TX 868.00Mhz | 56 83 18 82 22 81 00 17 65 02 15 21 14 14 A8
I: resetPayload: id: 0

@lumapu
Copy link
Owner

lumapu commented Jul 22, 2023

sieht eigentlich gut aus, weiß nicht wo es hakt.

@mirek-z
Copy link

mirek-z commented Jul 25, 2023

maybe from the beginning.
is this diagram ok?
esp32_e49

@lumapu
Copy link
Owner

lumapu commented Jul 25, 2023

your pinnumbering is wrong, check https://www.studiopieters.nl/esp32-pinout/
3.3V for the ESP32-38 is pin 2. Then P34 is pin 6 and P26 is pin 11.
The other connections are correct.

@DejanBukovec
Copy link

@jmeister79 did you make it work ? I have ebay board which have same configuration(OpenDTU pinout):
"clk": 12,
"cs": 27,
"fcs": 26,
"sdio": 14,

Im set this setting:
slika

But can't test it because still waiting inverter... When Im insert some serial of HMS inverter and check console I get this:

11:50:37 I: resetPayload: id: 0
11:50:37 I: (#0) prepareDevInformCmd 0x0b
11:50:37 I: TX 865.00Mhz | 15 73 51 13 41 81 00 17 65 80 0b 00 64 e1 e1 ed 00 00 00 00 00 00 00 00 7d 47 ae 
11:50:37 W: CMT TX failed, code: 2
11:50:42 I: resetPayload: id: 0
11:50:42 I: (#0) enqueCommand: 0x01
11:50:42 I: (#0) enqueCommand: 0x0b
11:50:42 I: (#0) prepareDevInformCmd 0x01
11:50:42 I: TX 865.00Mhz | 15 73 51 13 41 81 00 17 65 80 01 00 64 e1 e1 f2 00 00 00 00 00 00 00 00 47 c1 07 
11:50:42 W: CMT TX failed, code: 2
11:50:47 I: resetPayload: id: 0
11:50:47 I: (#0) prepareDevInformCmd 0x0b
11:50:47 I: TX 865.00Mhz | 15 73 51 13 41 81 00 17 65 80 0b 00 64 e1 e1 f7 00 00 00 00 00 00 00 00 1d f4 67 
11:50:47 W: CMT TX failed, code: 2
11:50:52 I: resetPayload: id: 0
11:50:52 I: (#0) enqueCommand: 0x01
11:50:52 I: (#0) enqueCommand: 0x0b
11:50:52 I: (#0) prepareDevInformCmd 0x01
11:50:52 I: TX 865.00Mhz | 15 73 51 13 41 81 00 17 65 80 01 00 64 e1 e1 fc 00 00 00 00 00 00 00 00 27 8d 25 
11:50:52 W: CMT TX failed, code: 2
11:50:57 I: resetPayload: id: 0
11:50:57 I: TX 868.00Mhz | 56 73 51 13 41 81 00 17 65 02 15 21 14 14 e3 
11:50:57 W: CMT TX failed, code: 2

@jmeister79
Copy link

jmeister79 commented Aug 20, 2023 via email

@aditiyagio
Copy link

aditiyagio commented Nov 23, 2023

@lumapu
I have done this, but the inverter data is not yet available, do I need certain settings again?
what is the correct configuration?

I use an HMS microinverter and an Ebyte E49 900M20S chip

My Trial :

I : enqueued cmd failed/timeout
I : resetPayload: id : 0
I : (#0) Requesting Inv SN 114483763078
I : (#0) enqueCommand: 0x01
I : (#0) enqueCommand: 0x0b
I : (#0) prepareDevInformCmd 0x01
I : TX 865.00Mhz | 15 83 76 30 78 81 00 17 65 80  0b 00 65 5d c8 53 00 00 00 00 00 00 00 00 ce 7b c6

@mo0815
Copy link

mo0815 commented Jul 5, 2024

i have desolderd the Nrf modul now it workes fine20240705_135011.jpg

@stefan123t
Copy link
Collaborator

@001oc @mirek-z do you still have an issue with wiring the CMT2300A connections ?

@stefan123t stefan123t changed the title wiring cmt2300a esp32 devkit Documentation: wiring cmt2300a esp32 devkit Oct 27, 2024
@001oc
Copy link
Author

001oc commented Oct 27, 2024

As @mo0815 statet after removing the NRF modul it seams to be working - i believe it is a problem with either the poor quality modul or the power supply or both of them.

I have done a couple dozend of opendtus and from my expieriences its always a problem with either cheap NRF modules or more often poor powersupplies. Most of my problems were solved when using a reliable and proven capable power supply. If that does not helped, the problem was typically a cheap chinese rebuild of an NRF module. Mostly they are functioning in general but have difficulties to establish a reliable radio signal which mostly ends up in (at least) unstable function. After using good quality power supply and spending some bucks more per NRF modul these problems never come up again. When following this simple rules you will see that opendtu is a very stable and reliable project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

8 participants