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

ESP8266: Discussion Verkabelung / Pinout #36

Closed
stefan123t opened this issue May 17, 2022 · 88 comments
Closed

ESP8266: Discussion Verkabelung / Pinout #36

stefan123t opened this issue May 17, 2022 · 88 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@stefan123t
Copy link
Collaborator

stefan123t commented May 17, 2022

Hallo Lukas, et. al.

Bzgl. der blauen LED auf dem NodeMCU / Wemos D1 mini ist es evtl. keine so gute Idee gewesen den Anschluss D4 (GPIO2) für CE des nRF24 Moduls zu verwenden. Sobald CE low wird leuchtet die blaue LED. Das passiert wohl auch im Falle eines TX per Serial IO.

Soll ich die Fritzing Layouts nochmal anpassen und gibt es eine empfohlene Verdrahtung, bzw. sollten noch andere GPIOs evtl. nicht /
anders verwendet werden ?
https://www.computerhilfen.de/info/esp8266-blaue-led-ausschalten-oder-blinken-lassen.html

Aktuell ist die Belegung in der getting started ESP8266 Dokumentation:
https://github.com/grindylow/ahoy/blob/main/doc/getting-started-ESP8266.md

Wire Connections

    +-----------+          +-----------+
    |  ESP8266  |--colour--| nRF24L01+ |
    |           |          |           |
    |       GND |---black--|[GND]      |
    |     +3.3V |----red---| VCC       |
    |        D4 |---grey---| CE        |
    |        D8 |--purple--| CSN       |
    |        D5 |---blue---| SCK       |
    |        D7 |---green--| MOSI      |
    |        D6 |---brown--| MISO      |
    |        D3 |--yellow--| IRQ       |
    +-----------+          +-----------+

@Sprinterfreak, ich habe auch schon Fritzing Layouts für den Raspberry Pi angelegt. Hier ist die IRQ Leitung nicht belegt. Offenbar unterstützt die RF24 Python Bibliothek für den RaspberryPi per pigpio auch IRQs aber das ist default nicht aktiv bzw. noch in Arbeit ?

Sollen wir das Getting Started auch von der Readme.md im Hauptarchiv verlinken, dann kommen evtl. weniger Fragen bzgl. Verkabelung ?

@stefan123t stefan123t changed the title ESP8266: Discussion ESP8266: Discussion Verkabelung / Pinout May 17, 2022
@lumapu
Copy link
Owner

lumapu commented May 17, 2022

Ich bin da komplett offen, meine Hardware steht und ich bin damit zufrieden. Wahrscheinlich gibt es hier andere, die sich mehr um die Hardware kümmern, ich sehe mich eher in der Software Ecke.

@lumapu lumapu added documentation Improvements or additions to documentation enhancement New feature or request labels May 17, 2022
@Argafal
Copy link
Contributor

Argafal commented May 20, 2022

I second this suggestion. I did not receive any communication from the inverter when using D4 and D3. As soon as I changed these two pins to D2 and D1 the communication started to work. I am using a Wemos D1 mini V3.

@stefan123t
Copy link
Collaborator Author

@Argafal I have 0.4.15 with the improved and optimized IRQ/Interrupt Handler running since almost 2 days without resets.
I would therefor prefer to close this issue and leave documentation as it is.
Would you kindly double check your cabling with the latest version of the ESP code ?

@TobiDD79
Copy link

TobiDD79 commented Jun 8, 2022

ich nutze einen wemos d1 mini und einem nrf modul mit externer antenne und habe mit obriger verkablung keinerlei rückmeldungem vom wr bekommen. nach tausch der pinbelegung von IRQ und CE bekomme ich nun endlich Datenpakete vom wr zurück.

+-----------+          +-----------+
|  ESP8266  |--colour--| nRF24L01+ |
|           |          |           |
|       GND |---black--|[GND]      |
|     +3.3V |----red---| VCC       |
|        D3 |---grey---| CE        |
|        D8 |--purple--| CSN       |
|        D5 |---blue---| SCK       |
|        D7 |---green--| MOSI      |
|        D6 |---brown--| MISO      |
|        D4 |--yellow--| IRQ       |
+-----------+          +-----------+

@Argafal
Copy link
Contributor

Argafal commented Jun 10, 2022

Good to hear of the improvement! I am afraid I cannot change the physical cabling right now, since I cannot access the hardware at the moment.

How is it for @TobiDD79, would you be able to check if the new code works for you with the original cabling (CE=D4, IRQ=D3)? It looks like we are using the same hardware and have the same problem.

@stefan123t
Copy link
Collaborator Author

@Argafal I have a WeMos D1 mini Pro around but I can't seem to find the nRF24L01+ modules with external PA Antenna, which I bought for this purpose at the moment. So my current setup is using a Lolin NodeMCU v0.1 and its working fine. I did not even add a capacitor to the module nor did I shield it using aluminium foil.

@TobiDD79 wäre interessant zu wissen, ob die Original Schaltung bei Dir mit der 0.4.15/0.4.17 auch funktioniert ?
Ich konnte bisher keine Begründung finden, warum die nicht tun sollte.
Daher vermute ich es hängt eher mit den fehlerhaften Settings nach dem Erase EEPROM o.a. in der Zwischenzeit behobenen TX/RX Problemen zusammen.

@lumapu was ist denn der Default in der 0.4.17 ?
Ich habe das hier in der defines.h gefunden:

//-------------------------------------
// PINOUT (Default, can be changed in setup)
//-------------------------------------
#define RF24_CS_PIN         15
#define RF24_CE_PIN         2
#define RF24_IRQ_PIN        0

@stefan123t
Copy link
Collaborator Author

stefan123t commented Jun 21, 2022

Hier noch zwei Referenzen für die Anbindung der ESP8266 GPIOs generell

ESP8266 Pinout Reference: Which GPIO pins should you use?
https://randomnerdtutorials.com/esp8266-pinout-reference-gpios/

Label GPIO Input Output Notes Ahoy
D0 GPIO16 no interrupt no PWM or I2C support HIGH at boot, used to wake up from deep sleep
D1 GPIO5 OK OK often used as SCL (I2C)
D2 GPIO4 OK OK often used as SDA (I2C)
D3 GPIO0 pulled up OK connected to FLASH button, boot fails if pulled LOW IRQ
D4 GPIO2 pulled up OK HIGH at boot, connected to on-board LED, boot fails if pulled LOW CE
D5 GPIO14 OK OK SPI (SCLK) SCK
D6 GPIO12 OK OK SPI (MISO) MISO
D7 GPIO13 OK OK SPI (MOSI) MOSI
D8 GPIO15 pulled to GND OK SPI (CS), Boot fails if pulled HIGH CSN
RX GPIO3 OK RX pin HIGH at boot
TX GPIO1 TX pin OK HIGH at boot, debug output at boot, boot fails if pulled LOW
A0 ADC0 Analog Input X
Pinout (Wemos)
CSN D8 (GPIO15)
CE D4 (GPIO2)
IRQ D3 (GPIO0)

Und einzelner Boards im Speziellen

ESP8266 und ESP8285 Module Anleitung - Module und Boards
http://stefanfrings.de/esp8266/

Ich muß das mal ordnen und mir genauer ansehen, welche PINs / GPIOs am sinnvollsten sind.

Speziell #79 weist auch auf das Problem hin, daß an D4 / GPIO2 sowohl die blaue LED als auch der Serial Port beim Booten hängt:

Beim Booten serieller Ausgang, darf dabei nicht auf LOW gezogen werden. Kann nach dem Booten als normaler I/O Pin verwendet werden. Ist mit der blauen LED verbunden, die bei LOW Pegel leuchtet. Hat 12 kΩ Pull-Up Widerstand.

@stefan123t
Copy link
Collaborator Author

Version 0.4.19 braucht wieder mal / immer noch die Basic Settings:

02:26:46.624 -> I: connect to network 'YOUR_WIFI_SSID' ...
02:26:46.723 -> ...............................
02:26:51.474 -> I: RF24 Amp Pwr: RF24_PA_MIN
02:26:51.474 -> I: Radio Config:
02:26:51.474 -> SPI Frequency		= 1 Mhz
02:26:51.474 -> Channel			= 0 (~ 2400 MHz)
02:26:51.474 -> RF Data Rate		= 1 MBPS
02:26:51.474 -> RF Power Amplifier	= PA_MIN
02:26:51.474 -> RF Low Noise Amplifier	= Disabled
02:26:51.474 -> CRC Length		= Disabled
02:26:51.474 -> Address Length		= 2 bytes
02:26:51.474 -> Static Payload Length	= 32 bytes
02:26:51.474 -> Auto Retry Delay	= 250 microseconds
02:26:51.507 -> Auto Retry Attempts	= 0 maximum
02:26:51.507 -> Packets lost on
02:26:51.507 ->     current channel	= 0
02:26:51.507 -> Retry attempts made for
02:26:51.507 ->     last transmission	= 0
02:26:51.507 -> Multicast		= Disabled
02:26:51.507 -> Custom ACK Payload	= Disabled
02:26:51.507 -> Dynamic Payloads	= Disabled
02:26:51.507 -> Auto Acknowledgment	= Disabled
02:26:51.507 -> Primary Mode		= TX
02:26:51.507 -> TX address		= 0x0000000000
02:26:51.507 -> pipe 0 (closed) bound	= 0x0000000000
02:26:51.507 -> pipe 1 (closed) bound	= 0x0000000000
02:26:51.540 -> pipe 2 (closed) bound	= 0x00
02:26:51.540 -> pipe 3 (closed) bound	= 0x00
02:26:51.540 -> pipe 4 (closed) bound	= 0x00
02:26:51.540 -> pipe 5 (closed) bound	= 0x00
02:26:51.540 -> W: WARNING! your NRF24 module can't be reached, check the wiring
02:26:51.540 -> I: 
02:26:51.540 -> 
02:26:51.540 -> ----------------------------------------
02:26:51.540 -> I: Welcome to AHOY!
02:26:51.540 -> I: 
02:26:51.540 -> point your browser to http://192.168.X.Y
02:26:51.540 -> I: to configure your device
02:26:51.540 -> I: ----------------------------------------

http://192.168.X.Y/setup

Setup

Pinout (Wemos)
CS: D8 (GPIO15)
CE: D4 (GPIO2)
IRQ: D3 (GPIO0)

Reboot device after successful save [x]
Save

@lumapu
Copy link
Owner

lumapu commented Jun 28, 2022

+-----------+          +-----------+
|  ESP8266  |--colour--| nRF24L01+ |
|           |          |           |
|       GND |---black--|[GND]      |
|     +3.3V |----red---| VCC       |
|        D3 |---grey---| CE        |
|        D8 |--purple--| CSN       |
|        D5 |---blue---| SCK       |
|        D7 |---green--| MOSI      |
|        D6 |---brown--| MISO      |
|        D4 |--yellow--| IRQ       |
+-----------+          +-----------+

mit dieser Belegung klappt es auch bei mir und war so frei es gleich als neuen Standard (Vorgabe nach Reset, kann individuell geändert werden) in die Firmware zu integrieren.

@stefan123t
Copy link
Collaborator Author

stefan123t commented Jun 29, 2022

Können wir auch die printDetails() als Debug Output verwenden ?
Hier wird zusätzlich das NRF24 model ausgegeben:
https://nrf24.github.io/RF24/RF24_8cpp_source.html#l00684

printf_P(PSTR("Model\t\t= "
     PRIPSTR
     "\r\n"), (char *)(pgm_read_ptr(&rf24_model_e_str_P[isPVariant]()])));

printPrettyDetails() hat interessanterweise keine Model Angabe.

Es könnte helfen fehlerhafte Modelle wie nrf24l01 anstelle von nrf24l01+ zu identifizieren.
Alternativ sollten wir isPVariant() aufrufen um die Plus-Variante zu prüfen.

Der Raspberry Pi code hat bereits einen Check mit isPVariant(), es fehlt also nur im ESP8266 code.

@lumapu
Copy link
Owner

lumapu commented Jun 29, 2022

sehr gut, das klingt sinnvoll, evtl. können wir gleich eine aussagekräftige Nachricht auf der index.html hinterlassen falls wir denken, das es nicht funktionieren kann.

@stefan123t
Copy link
Collaborator Author

Die Änderung in defines.h muss noch dokumentiert werden:

https://github.com/grindylow/ahoy/blob/main/tools/esp8266/defines.h#L11-L16

@lumapu
Copy link
Owner

lumapu commented Jul 4, 2022

Ich weiß nicht, ob meine letzte Änderung hier zu mehr Verwirrung geführt hat. Ich hatte nur den Kommentar von @TobiDD79 gelesen und meinen Aufbau von einem ESP-07 auf einen Wemos-D1-mini umgebaut. Ich habe es gleich so verdrahtet und es hat auch bei mir auf Anhieb geklappt - während das alte Pinout nicht bei allen klappt.

@stefan123t
Copy link
Collaborator Author

Hallo Lukas,
wir müssen entweder die ganzen Schematics anpassen und die Platinen von Holger u.a. "umlöten" / umkonfigurieren oder die beiden Zeilen in der defines.h wieder ändern...
Weiß auch nicht was weniger Irritationen und Aufwand verursacht. Ist halt so mit breaking changes / news 😃
Bei mir läuft es auf dem NodeMCU mit der alten Konfiguration schon mehrere Tage lang, ich kann mich an ca. 5 Tage erinnern, bevor ich eine aktuellere Version geflasht habe und rebooten musste.

@lumapu
Copy link
Owner

lumapu commented Jul 4, 2022

Ich würde ein revert auf die alte config vorschlagen. Das macht viel mehr Sinn, ich hatte nicht auf den Schirm, dass schon so viel davon abhängig ist.
Manchmal sind meine Scheuklappen aber auch nicht schlecht ;-P

@Argafal
Copy link
Contributor

Argafal commented Jul 5, 2022

Do they have to resolder? Isn't it sufficient to just update the configuration to the pins actually used? Whereas anyone who actually HAS problems with the default pin layout actually DOES have to physically change the connections.

What I dislike about the old defaults is that they cause problems in a number of documented cases. This might make it hard for newcomers to get started: imagine you just put the hardware together, flash the software the first time, and now you don't get any response from the inverters. It will take a long time to identify that the cause of the problem is the default pin layout, and not anything YOU got accidentally wrong with the inverter serials, version of the RF module, etc.. I remember that I nearly gave up after three hours when trying it the first time, until I re-soldered from the default pins to an alternative pin layout and everything just magically worked all of a sudden. I feel that this initial hurdle could have been easily avoided with a different default. Am I wrong?

Alternative suggestion, could there at least be a sentence in the documentation? Something on the lines of "If you do not get any response from the inverters, try swapping pins D4 and D3 for D2 and D1, both physically and in the software configuration. Using pins D4 and D3 caused problems for some users in the past depending on their individual hardware choices."

@lumapu
Copy link
Owner

lumapu commented Jul 5, 2022

Everyone has the ability to contribute even to the documentation ;-)

I think we should discuss here a little bit the pros and cons before changing anything. I soldered only once using the changed Pinout. It started working immediately so I decided to make it the new default.

CS - D8 (GPIO 15)
CE - D3 (GPIO 0)
IRQ - D4 (GPIO 2)

@stefan123t
Copy link
Collaborator Author

I had it up and running with the old Pin out for ages. So I do not know why it would give troubles to some. Can those that claim it gives troubles in the old config give some hints on why that would fail and why the new is different and works.
As I tried to make a case with the pins that are usable for IRQ according to the above table only GPIO16 is not usable for interrupts.
I think that it should be backwards compatible in case we make changes, otherwise those having already etched their boards have to fix the setting for each software update.
So if you can make a strong case that really shows it works one way and it does not work the other way around I am more than willing to change the documentation. But until now I have only read reports that someone tried it either way and it worked. But none (including myself) has proven / verified that it does (or does not) work both ways.

@Argafal
Copy link
Contributor

Argafal commented Jul 7, 2022

@stefan123t I tried it first with the old default pin layout and could not get it to work no matter what I did: The software reported a successful connection to the RF module, but I never got any data whatsoever from the inverters. At that stage the software was still highly experimental, so I suspected that my inverter types could have been different and tried and tried and tried on the software side.

Eventually I found the solution hidden in a post on the mikrocontroller forum by Olaf A. He wrote:

"Hatte mir das NRF24LE01+ mit externer Antenne gekauft und einige D1 mini V3, hatte jedoch nie Empfang. Kaufte verschiedene NRF24LE01+ und testete alle möglichen Kombinationen durch. Erst als ich D3 und D4 auf D1 und D2 umverdrahtete, mit der entsprechenden Setup-Änderung, konnte ich problemlos alles empfangen."

Once I found this post I resoldered to D2 and D1, and I immediately got responses from the inverters without touching the software (well, except for updating the pinout configuration of course).

As to why it fails with D4 for some and not for others, I couldn't say. One interesting bit is that both Olaf A and I use the Wemos D3 mini version 3. Maybe it's connected to the blue LED on D4 and the D1 mini v3 in particular?

@Argafal
Copy link
Contributor

Argafal commented Jul 7, 2022

Everyone has the ability to contribute even to the documentation ;-)

Let's first see if what we come up with in this discussion. If it is decided that the old pin layout stays as it is I would indeed be happy to propose a sentence or two for the documentation. That would at least give new users that encounter the same problems that Olaf A and I had some ideas what they could try. If the default pin layout changes then such a sentence in the documentation is of course not needed at all.

@lumapu
Copy link
Owner

lumapu commented Jul 7, 2022

Interesting Point: Are there different versions of Wemos D1 mini?
On mine the is no printed version, I ordered one from AZ delivery.

I knew already that GPIO16 hasn't interrupt capabilities, I figured it out several years ago. My idea regarding the Interrupts in this project is the RF24 Library, because it maybe die not use the interrupt capabilities correct. I already discuss with @stefan123t how we move further in another issue #83 here. Once this is solved we should try all the points and make a decision.

Maybe we can think of some auto detect or setup assistant on a fresh installation.

@permissionBRICK
Copy link

permissionBRICK commented Jul 8, 2022

I had the same issue, switching to D1=CE and D2=IRQ fixed it. Also the default pinout in the graphic is CE=D4, IRQ=D3, but the default config in the code is switched CE=D3, IRQ=D4

@billy0xff
Copy link

Ich habe alle Pinouts durchprobiert, mit keiner ist die Kommunikation zum Inverter erfolgreich.

das zuletzt getestete Pinout:
CS -> D8 (GPIO15)
CE -> D1 (GPIO5)
IRQ -> D2 (GPIO4)

Inverter am Netz angeschlossen und via Labornetzgerät am DC-Eingang versorgt -> grüne LED blinkt im 4-Sekunden Takt für "keine Kommunikation zum DTU".

Statistics:

Receive success: 0
Receive fail: 104
Frames received: 0
Send Cnt: 310

Inverter 'HM400_0' is not available and is not producing
MQTT: not connected

Serielle Konsole:

.....

I: [NTP]: 2022-07-09 14:23:21
I: Inverter #0 I: no Payload received! (retransmits: 0)
I: Requesting Inverter SN 1121xxxxxxxxx
I: Transmit 27 | 15 80 13 35 19 78 56 34 12 80 0B 00 62 C9 8F 59 00 00 00 05 00 00 00 00 99 67 AF
E: while retrieving data: last frame missing: Request Retransmit
I: Transmit 27 | 15 80 13 35 19 78 56 34 12 80 0B 00 62 C9 8F 59 00 00 00 05 00 00 00 00 99 67 AF
E: while retrieving data: last frame missing: Request Retransmit
I: Transmit 27 | 15 80 13 35 19 78 56 34 12 80 0B 00 62 C9 8F 59 00 00 00 05 00 00 00 00 99 67 AF
I: Inverter #0 I: no Payload received! (retransmits: 2)
.... etc.

Was könnte das noch sein?

@stefan123t
Copy link
Collaborator Author

stefan123t commented Jul 10, 2022

@billy0xff,

I: Requesting Inverter SN 1121xxxxxxxxx
I: Transmit 27 | ... 80 13 35 19 ...

Deine Seriennummer dürfte also 112180133519 sein.
Es ist ungewöhnlich eine Seriennummer mit 80 am Anfang zu haben.
Ich habe in unserer Liste bisher nur Seriennummern mit 112163..112174 für die 1121-Modelle.
Ich meine irgendwo im Sourcecode gelesen zu haben, daß die ersten Stellen der Seriennummer dem Baujahr entsprechen ?

edit:
In https://www.mikrocontroller.net/attachment/559626/Micro-inverse_system_related_product_ID_coding_rules-A3-20190712.docx
steht es:

2. Last eight coding rules
For products such as micro-inverters, DTUs, repeaters, etc., the rules are as follows:
The 5th to 12th digits are the production serial number and are used as the RF communication address of the micro-inverter/DTU/repeater, among which:
The "5" digit is the year of production (time provided by the welder), the "1" is for 2015, and so on
The "67" bits are the production week (the time provided by the welding factory), and the range is "152".
The "8~12" bits are the pipeline coding (currently in decimal), the micro-inverter, repeater, and DTU share the same pipeline sequence, which is coded in sequence and must not be repeated, a total of 99999 bits.

112180133519 entspricht dem Baujahr 8=2022 (1=2015) und KW01, also erste Januar Woche 2022.

Vielleicht hast Du auch eine neuere Firmware auf dem Wechselrichter ?

E: while retrieving data: last frame missing: Request Retransmit

Er bekommt keine Pakete vom Wechselrichter als Antwort übermittelt.
Stimmt das Präfix 1121 oder hat Dein HM-400 ein anderes Präfix ?

@permissionBRICK yes, we know that there is a mismatch between documentation and code right now (since v0.4.20-0.4.22 at least). Could you specify the Wemos D1 model you are using and could you retry with the D3/D4 connection but matching config in the settings ?

@stefan123t
Copy link
Collaborator Author

Are there different versions of Wemos D1 mini?

@lumapu yes there are at least three different models (mini, lite and pro) and several versions according to Stefan Frings page:

Das Wemos D1 Mini Board gibt es in folgenden Versionen:

Version ESP Chip Flash MByte LED an GPIO2 Antenne Lithium Laderegler
Wemos D1 Mini Lite v1 ESP8285 1 ja Leiterschleife nein
Wemos D1 Mini v2 ESP-12 Modul (=ESP8266) 4 nein Leiterschleife nein
Wemos D1 Mini v3 ESP8266 4 ja Leiterschleife nein
Wemos D1 Mini Pro v1 (oder -16) ESP8266 16 ja Keramikantenne und ext. Antennenanschluss nein
Wemos D1 Mini Pro v2 ESP8266 16 ja Keramikantenne und ext. Antennenanschluss ja

Die oberen vier Boards haben die gleichen Abmessungen, das letzte mit Laderegler ist etwas länger.
Alle Versionen haben einen USB-UART (CH-340) und einem Low-Drop Spannungsregler. Alle freien I/O Pins des ESP
Chips sind herausgeführt, aber nicht der CHIP_EN Pin.

@permissionBRICK
Copy link

permissionBRICK commented Jul 10, 2022

@stefan123t I did that originally, but no matter how I set the config it didnt work.
pic
its a v2... i think?

@rhobin242
Copy link

....keine Änderung - gleiche Fehlermeldungen und keine Daten vom WR...

@martinriedel
Copy link
Contributor

Unter System steht bei Radio nrf24l01+ is connected?

@rhobin242
Copy link

UAAAAAHHHHHHH!!!!!! ICH GLAUB ES NICHT! ::))))))))))))
nach 2 min läuft alles wie es soll! Netzteil - wer soll darauf kommen... :))
Sorry für den Aufriss und danke!

@martinriedel
Copy link
Contributor

Kein Thema ;)

@rhobin242
Copy link

@martinriedel
Hallo Martin, leider hat sich nach etwa 2 Stunden die Kommunikation wieder verabschiedet :((
Ich habe jetzt erstmal die Verkabelung wieder auf die ursprüngliche Konfiguration (mit D3 und D4) zurückgelötet und auch den Kondensator eingelötet. Netzteil mit 2,4 A.
Alles bislang ohne Erfolg, der WR ist "connected", die gleichen Fehlermeldungen wie heute mittag schon.
Hast Du noch eine Idee?

@cibis8
Copy link

cibis8 commented Mar 1, 2023

Hallo rhobin242,
ich hatte ähnliche Probleme wie du und hab mit diversen PIN Konfigurationen eine bei mir dauerhaft sehr gut funktionierende Lösung gefunden. CS auf D8, CE auf D4, IRQ auf D1 (nur auf D1 hatte ich Erfolg!). Entsprechende Anpassungen natürlich auch in der "Settings" - "System Config" durchgeführt. Es konnte mir keiner sagen, warum dies nur bei D1 funktioniert und nicht an einem andern PIN. Vielleicht klappt das bei dir ja auch. Netzteil habe ich ein Standard USB Netzeil 5V 1A. Den Elko (100uF 25V) habe ich nachträglich eingefügt. Aktuelle Entfernung von der Ahoy DTU ca 2-3m bei einem Testaufbau/Testbetrieb meiner Anlage. In Zukunft habe ich hier etwa 14-15m zu überbrücken.

@rhobin242
Copy link

@cibis8
Hi cibis8, das nervige ist, das heute morgen beim Aufruf des WebUIs die Live-daten zu sehen waren. Leider kam offenbar nur ein einziges Datenpaket an - dann nix mehr. Nach einem Reboot des ESP war wieder alles auf NULL. Also scheint die Datenübertragung zumindest in seeehr unregelmäßigen Abständen zu funktionieren. Also kann die PIN-Belegung nicht ganz falsch sein.Und dann immer wieder diese Fehlermeldungen:

10:14:21 I: resetPayload: id: 0
10:14:21 I: sendControlPacket cmd: 0
10:14:21 I: TX 15B Ch40 | 51 81 81 22 07 85 66 28 95 81 00 00 b0 01 1a
10:14:21 I: clearCmdQueue
10:14:21 I: (#0) enqueuedCmd: 5
10:14:22 W: while retrieving data: last frame missing: Request Retransmit
10:14:22 I: (#0) sendTimePacket
10:14:22 I: sendTimePacket 5

Zum Haareraufen!

@cibis8
Copy link

cibis8 commented Mar 1, 2023

Hast du denn einmal IRQ auf PIN D1 gelegt? ich wäre auch fast daran verzweifelt, dass gar nix übertragen wurde außer diese Fehlermeldungen. Ich vermute einmal das der IRQ an den anderen PINs Fehler verursacht.. warum auch immer (Störung des IRQs?!?) Nach dem ich den auf D1 legte läuft das Teil nun schon seit dem 20. Februar ohne Probleme. Scheinbar gibt es da doch Unterschiede bei den Baugruppen, da viele ja gar keine Probleme hatten oder haben.

@rhobin242
Copy link

Kann ich gerne mal ausprobieren....
Im Moment ist die Situation so, dass etwa alle 30 Minuten die Daten einmalig korrekt übertragen werden und dann wieder nur diese Fehlermeldungen. Über das MQTT-Protokoll sehe ich tatsächlich, dass immer dann, wenn die Fehlermeldungen erscheinen, ein unvollständiger Satz an Daten übertragen wird. Also bspweise die Werte für Spannung und Leistung, aber kein A-Wert...

@rhobin242
Copy link

@cibis8
IRQ auf D1 hats auch nicht gebracht :(((
Dafür steht unter dem Menüpunkt "System"/Unterpunkt "Radio":
nrf24l01+ is connected
Datarate 250 kbps
Power Level HIGH
RX success 0
RX fail 0
RX no answer 16
RX frames received 0
TX count 96

Auffällig ist imho der "RX no answer"-Wert von 16 und die 0 bei der empfangnen Frames.
Ansonsten wie gestern: unregelmäßig, höchstens einmal pro Stunde werde Daten empfangen. Die Verbindung steht also es werden keine vollständigen Datensätze übertragen.
Noch jemand 'ne Idee?

@lumapu
Copy link
Owner

lumapu commented Mar 5, 2023

wenn ich das hier alles so lese würde ich nochmal die Powerversorgung prüfen/optimieren
Ansonsten Kabel so kurz wie möglich zwischen ESP und nrf und so wenig wie möglich Steckkontakte

Hinweis: der issue steht auf close, ich glaube nicht, dass hier noch viele mitlesen

@rhobin242
Copy link

Moin lumapu,
es hat sich jetzt so einigermaßen eingependelt, nicht alle 30 sec, aber 2 mal alle 5 Minuten, das reicht mir eigentlich aus. Aber ich wollte die Module jetzt sowieso in ein Gehäuse packen, dabei werde ich die Verbindungskabel soweit wie möglich kürzen. Stromversorgung ist über jeden Zweifel erhaben.

Danke für den Hinweis bzgl. "Close", aber ich wollte nicht noch einen neuen Thread aufmachen und mir dann anhören müssen "Warum liest Du nicht den Thread #36". Nix für ungut! :))

@Eddy-Fischer
Copy link

@cibis8 Hat der wirklich USB-C? Sieht für mich nach Micro-USB aus. Im Dropdown unter System wäre die Frage ob unter Radio is connected oder is not connected steht. Wenn du aber die Micro-USB Variante hast musst du nichts umstellen

Hi Martin, ich habe bei Ahoy-DTU unter System die Meldung bei Radio: NRF24L01+ is not connected. Was könnte mein Fehler sein? Ich habe die Kabelverbindung 5 Mal überprüft und sie sind richtig. Ich benutze Wemos D1 Mini V4 (mit USB C) und NRF24L01+ (ohne Antene). Danke im vorraus. Gruss Ed

@martinriedel
Copy link
Contributor

@googoostoned Bei mir funktioniert es wie ich es hier beschrieben habe. Falls das bei dir nicht klappt spinnt entweder der ESP, die Kabel sind teilweise kaputt oder eben das Funkmodul. Das ist schwer zu sagen

@Eddy-Fischer
Copy link

@googoostoned Bei mir funktioniert es wie ich es hier beschrieben habe. Falls das bei dir nicht klappt spinnt entweder der ESP, die Kabel sind teilweise kaputt oder eben das Funkmodul. Das ist schwer zu sagen

Danke für die prompte Antwort. Das Teil NRF24L01+ ist bei mit 8 verbogenen Pins angekommen. Der Verkäufer hat es mit normalen Briefumschlag geschickt. Wahscheinlich ist das Teil bereits kaputt. Gruss Ed

@martinriedel
Copy link
Contributor

@googoostoned das ist ärgerlich. Ich hätte noch ein Funkmodul übrig wenn du willst. Schreib mir mal an donmarten@googlemail.com wenn du Interesse hast

@Eddy-Fischer
Copy link

Danke für das Angebot. Es lohnt sich nicht das Modul per Post in die Schweiz zu schicken. Ich hole mir ein Paar von aliexpress.

@martinriedel
Copy link
Contributor

@googoostoned kannst dich trotzdem mal melden wenn du willst, hätte da eine Idee ;)

@Eddy-Fischer
Copy link

@googoostoned kannst dich trotzdem mal melden wenn du willst, hätte da eine Idee ;)

Habe soeben 2 Mails geschickt. Die erste Mail ist versehentlich verschlüsselt. einfach ignorieren.

@Fabfab321
Copy link

Hallo zusammen,
ich habe keine Ahnung, wie man hier ein neues Thema eröffnet :-(
Und da mein Problem genau das gleiche wie von "Rhobin242" ist, hänge ich mich mal hier ran.
Bin wirklich am verzweifeln.
Welche Infos muss ich zur Verfügung stellen, damit ihr mir helfen könnt? Oben genannte Tipps habe ich alle ausprobiert (Pin D3 + D4 tauschen und im System ändern oder auf D1...
Vielen Dank vorab

@Eddy-Fischer
Copy link

Hallo zusammen, nach mehrere Versuche, funktioniert mein Ahoy DTU (Wemos D1 Mini V4 mit USB C und NRF24L01+ ) . Das einzige, was ich gemacht habe: Jumper-Kable IRQ von NRF24L01+ mit D1 von Wemos D1 Mini V4 mit USB C zu verbinden und danach die Setting im Ahoy-Weboberfläche entsprechend zu machen. Frag bitte nicht warum da ich sowieso Anfänger in Mikrokontroller. Gruss Ed

@Fabfab321
Copy link

Fabfab321 commented Mar 19, 2023

ich hab es jetzt tatsächlich auch geschafft!!!!!!!!
Hab IRQ auf D2 gemacht...da ging es dann!
Vermutlich eine fehlerhafte Lötstelle auf D1 und D3.. keine Ahnung:-)

@rhobin242
Copy link

Hi Leute - ich bins nochmal.
Nachdem ich - wie vorgeschlagen - eine Menge Konfigurationen ausprobiert habe, ist es mir gelungen, den Empfänger einigermassen ans Laufen zu bringen unter Benutzung der RX- und TX-Pins wie weiter oben beschrieben. Alles verlötet, Kondensator verbaut.
Es kamen dann alle paar Minuten Daten an, aber extrem unregelmäßig - manchmal auch 30 Minuten. Das ist erstmal ok ist, da die ganze Sache ja nicht zeitkritisch ist. Aber ab und an sprang morgens die Kommunikation erst gar nicht an und das war mir dann doch etwas zu nervig.
Ich hatte schon einige Zeit das ESP-Modul in Verdacht und habe mir einfach nochmal ein neues gekauft.
Und siehe da:
Ausgepackt, verkabelt nach Default-Belegung, mit einfachen Jumper-Käbelchen, kein Kondensator - und die Kommunikation rennt wie's Lottchen! Alle 30 s neue Daten! :)))))
Ich schreibe das hier nochmal rein, da ja immer wieder neue Leute mit dem gleichen Problem zu kämpfen haben und auf diese geschlossene Diskussion treffen.
@lumapu
Vielleicht in der Doku oder sonstwo auf dieses Problem hinweisen - ist zwar doof, aber eben nicht zu ändern, diese ESP-Module schwanken offensichtlich in der Qualität - Chinascheiß eben!
Vielen Dank nochmal an alle, die Hinweise gegeben haben und an lumapo für dieses ganze Projekt! LG R.

@lumapu
Copy link
Owner

lumapu commented Mar 22, 2023

vielen Dank für das Rennen deiner Erfahrung. Echt schade, dass das so eine Schwankung unter den Modulen ist.

@bscholtes
Copy link

bscholtes commented Mar 31, 2023

I used http://stefanfrings.de/esp8266/ as orientation but it is not clear to me
why switching D1,D2 oder D3,D4 is a solution having https://www.makershop.de/plattformen/d1-mini/wemos-d1-mini/

In this case the blue LED is not flashing anymore ...

@Fossi99
Copy link

Fossi99 commented Apr 3, 2023

Hallo,

ich habe aktuell auch Probleme mit meiner Ahoy DTU 0.6.0.
Im Display wird der WR als offline angezeigt.
Die SN und die Einstellungen zu den Modulen habe ich 1/1 von einer bestehenden DTU übernommen.
Im Serial/Control kommt immer nur folgende Meldung:
18:12:14 I: resetPayload: id: 0
18:12:14 I: (#0) prepareDevInformCmd 0x0b
18:12:14 I: TX 27B Ch75 | 15 83 07 08 99 86 96 04 16 80 0b 00 64 2a fa de 00 00 00 00 00 00 00 00 db ae 96
18:12:14 I: (#0) nothing received

Menuepunkt System: nrf24l01+ is connected

Folgende Komponenten habe ich verbaut:
ESP32-CH340C-TYPE C
NRF24L01 + PA + LNA
1,3 inch OLED modul (4 PIN)

Folgende Verkabelung habe ich erstellt
image

Auffällig finde ich auch, dass die DTU relativ träge reagiert.

@AiRLAC
Copy link

AiRLAC commented May 14, 2023

Ich hatte schon einige Zeit das ESP-Modul in Verdacht und habe mir einfach nochmal ein neues gekauft. Und siehe da: Ausgepackt, verkabelt nach Default-Belegung, mit einfachen Jumper-Käbelchen, kein Kondensator - und die Kommunikation rennt wie's Lottchen! Alle 30 s neue Daten! :))))) Ich schreibe das hier nochmal rein, da ja immer wieder neue Leute mit dem gleichen Problem zu kämpfen haben und auf diese geschlossene Diskussion treffen. @lumapu Vielleicht in der Doku oder sonstwo auf dieses Problem hinweisen - ist zwar doof, aber eben nicht zu ändern, diese ESP-Module schwanken offensichtlich in der Qualität - Chinascheiß eben! Vielen Dank nochmal an alle, die Hinweise gegeben haben und an lumapo für dieses ganze Projekt! LG R.

Vielen Dank für diesen tollen Vorschlag – nach ein paar Stunden Fehlerbehebung habe ich gerade das ESP ausgetauscht und es begann zu funktionieren!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests