shielded cable

mstrens
Messages : 2611
Enregistré le : 27 févr. 2018 12:58

Re: shielded cable

Message par mstrens »

Do not use the 24V power supply at all (it could be the source of noise) but connect
- the ESP32 to a pc via usb
- the STM32 to a pc via USB+STlink
- keep only 3 wires between the 2 boards (Gnd, TX and TX)

If the problem is still there, most likely there is some kind of unexpected contact between RX and TX pins on ESP32 side or on STM32 side.
Meaning that when TX on ESP32 side goes low, it generates a pulse that forces RX to go low on RX pin on the same ESP32.
The contact is for sure not with a low resistance otherwise it should not work most of the time.

You could also try to add a resistor (e.g. 1K) between RX (from ESP32) and 3.3V (ESP32) to force the level to High when the TX pin on STM32 is in high impedance and check if the problem is still there (when the boards are powered only by the PC).
geostein8888
Messages : 68
Enregistré le : 03 déc. 2020 11:42

Re: shielded cable

Message par geostein8888 »

Hello,
no luck for me, still the same problem. I connected now the stm32 with the st-link cable to the pc, and the esp with the usb cable. disonnected the 5v pin between both, no other power supply was used now
after 7% it went idle and stopped working

Georg
mstrens
Messages : 2611
Enregistré le : 27 févr. 2018 12:58

Re: shielded cable

Message par mstrens »

Strange. So it is not really a noise issue inducted on the wires.
I think it is:
- some kind of resistance existing between the 2 signals wires (or adjacent pins)
- a bad soldering on the gnd wire (or on a gnd soldering on the board)
- a bad ESP32 (did you already tried another one) or a bad STM32 (but you already tried another one I think).

If you have one you can also try adding a 1K resistance as said before
geostein8888
Messages : 68
Enregistré le : 03 déc. 2020 11:42

Re: shielded cable

Message par geostein8888 »

i rechecked and re-soldered all boards now, same problem. i also checked the soldering with a magnifying glass to see if there is something not good soldered or a short circuit.
Hopefully i will get tomorrow 3 more ESPs, what i ordered already yesterday. A friend of my tries to get an oscilloscope, to see what happens on the lines

Georg
geostein8888
Messages : 68
Enregistré le : 03 déc. 2020 11:42

Re: shielded cable

Message par geostein8888 »

right now i observed, that the esp with display is restarting every time - i disconnected the gerbl board to see if this is still happening, and yes the tft is showing a reset every some seconds

i changed now the usb cable, now its fine - so forget this

i started a new milling job, and now also the resetting is there with this cable after i had to push a button after a tool change pause

Georg
Modifié en dernier par geostein8888 le 22 déc. 2020 13:18, modifié 1 fois.
mstrens
Messages : 2611
Enregistré le : 27 févr. 2018 12:58

Re: shielded cable

Message par mstrens »

Usually ESP32 is restarting when there is no enough power provided.
When wifi check the data (even if there is no data) , the ESP32 consumes nearly 1A.
Some USB port on PC does not provide 1A (normal USB is 0.5A).

One way to avoid those current peaks is to disable the Wifi (it is an option in the config.h file or you can change it based on a file that exist on the SD card when booting (see e.g. the readme on github)
geostein8888
Messages : 68
Enregistré le : 03 déc. 2020 11:42

Re: shielded cable

Message par geostein8888 »

just recompiled with disabled wifi, the reset is away, but after some time it goes still into idle mode and stops the milling process
and to be on the safe site, i also soldered the cables instead of the dupont connectors

Georg
mstrens
Messages : 2611
Enregistré le : 27 févr. 2018 12:58

Re: shielded cable

Message par mstrens »

geostein8888 a écrit : 22 déc. 2020 13:35 just recompiled with disabled wifi, the reset is away, but after some time it goes still into idle mode and stopps the milling process

Georg
With still some message like "Oo" on the TFT I expect?

You can try the to add a 1k resistor if you have one ( 1k can be replaced by other value e.g. between 0.5k and 2k).
To exclude an issue with the GRBL board, you could remove the STM32 from the board and connect directly the STM32 pins (Rx, Tx) to the ESP32 board. Just to be sure.

Note: If you want to analyse the data flow between the 2 boards, you could also use an USB serial (FTDI) or a logic analyser (cost only a few €)
https://fr.aliexpress.com/item/40001465 ... hweb201603_
geostein8888
Messages : 68
Enregistré le : 03 déc. 2020 11:42

Re: shielded cable

Message par geostein8888 »

Hello,
without the gerbl board the display shows directly an alarm, while the endswitches are not closed
i will see to find some resistors today to try this also

Georg
mstrens
Messages : 2611
Enregistré le : 27 févr. 2018 12:58

Re: shielded cable

Message par mstrens »

geostein8888 a écrit : 23 déc. 2020 09:41 Hello,
without the gerbl board the display shows directly an alarm, while the endswitches are not closed


Georg
Indeed, I forgot this.
Did you plug the STM32 on a breadboard for this test?
If so, you could easily add 3 wires on the breadboard to connect the STM32 pins used for limit switches to Gnd.

if not, it is also possible to change a parameter in GRBL in order to declare that you use (for testing) normally open contact for limit switches. In this case, you do not have to add the wires.

If you do not know the pins being used or which parameter to change I can look for this info.
Répondre