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

Connecting ESP8266 to a Bigtreetech SKR 1.3 #372

Closed
kkberg opened this issue Sep 19, 2019 · 60 comments
Closed

Connecting ESP8266 to a Bigtreetech SKR 1.3 #372

kkberg opened this issue Sep 19, 2019 · 60 comments

Comments

@kkberg
Copy link

kkberg commented Sep 19, 2019

I'm just trying to connect the ESP8266 to my SKR 1.3 board with a stepdown from 5v to 3.3v.
I connected Rx and Tx also converted power 3.3 from SKR 1.3. . I'm an electronics NOOB and tried my best to get it working. But only connecting 5v GND Rx Tx does not start Wifi on the ESP. I can't see the Wifi in that way. Connecting ESP to the programmer again, Wifi appears without any problem. SKR 1.3 has an AUX connector with 2x4 pins and one in parallel with 5 pins, reset pin included.

I found a schematics here http://stefanfrings.de/esp8266/ with pullups and a capacitor.
Is it really needed to get it running?

has someone else same problem and a solution.

@github-actions
Copy link

Thank your for submiting, please be sure you followed template or your issue may be dismissed.

@luc-github
Copy link
Owner

What board of esp8266 are you using?
Do you see esp3d Access point is only connect GND and +5V?

@kkberg
Copy link
Author

kkberg commented Sep 19, 2019

I'm using this one https://www.az-delivery.de/products/esp8266-01s-mit-usb-adapter?_pos=15&_sid=4cd6e8f08&_ss=r&ls=de
It's an ESP8862 ESP-01S

Can't see access point when wiring GND and 3.3v. 5v isn't allowed for the ESP8266, I used a stepdown. If I put it back on the programmer, Access point ist up again.

@luc-github
Copy link
Owner

luc-github commented Sep 19, 2019

This board is esp01 check wiki, need all pins connected not just GND 3.3v RX/TX

@luc-github
Copy link
Owner

@kkberg is that ok ?

@luc-github
Copy link
Owner

Any update ?

@wilbur4321
Copy link

According to the schematics, the skr v1.3 has 3.3v available on pin2 of the ICSP (J2) connector. I suspect, but cannot say for sure, that the IO signals are all 3.3v rather than 5v.
https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/blob/master/hardware/SKR-V1.3-SCH.pdf

@sl1pkn07
Copy link

i think you can use this in the tft port (if you configure the pins correctly(?))

https://www.keyestudio.com/keyestudio-esp-01s-wifi-to-serial-shield-module-for-arduino-esp8266-wifi-p0499-p0499.html

@weed2all
Copy link

I use nodemcu v3 and an esp 8266-01s with my skr 1.1 and skr 1.3 and fully work...on my nodemcu I use the esp3d v2.1 and on my esp8266-01s I use esp3d v1.1
For stepdown the voltage from 5v to 3.3v I use this buck converter
€ 0,81 | Alta Qualidade 5 PCS 5 V a 3.3 V Para Buck Módulo DC-DC Step-Down fonte de Alimentação LDO AMS1117 800MA
https://s.click.aliexpress.com/e/3mc7zA6G

@kkberg
Copy link
Author

kkberg commented Sep 30, 2019

Any update ?

Yes, http://stefanfrings.de/esp8266/ shows how to connect the ESP8266 and it neccessary to have resistors and a capacitor to get it to work with a serial port.

Sorry for my late response, ordered a special adapter https://www.amazon.de/gp/product/B07DXPXF1Y/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1 .
This should help to connect only 4 wires to the TFT port. I'll keep you informed when having tested. But will take a while because of shipping date.

@weed2all
Copy link

I made an adapter for my esp8266-01s witch contains on 2 × Dupont 4pin shells that are glued togheter back to back, and that little buck converter witch is glued with kapton tape to the 4 pin Dupont shell...in order to apply 3.3v to esp...from skr1.3 AUX-1 header came 4 wires...red is 5v witch go to v-in on buck converter, black is grount witch go to buck converter and to esp gnd pin, green witch is TX from skr1.3 board go to RX on esp, and blue witch is RX from skr 1.3 board witch go to TX on esp, and another small red wire witch go from v-out of buck converter to the esp 3.3v pin

@kkberg
Copy link
Author

kkberg commented Sep 30, 2019

I made an adapter for my esp8266-01s witch contains on 2 × Dupont 4pin shells that are glued togheter back to back, and that little buck converter witch is glued with kapton tape to the 4 pin Dupont shell...in order to apply 3.3v to esp...from skr1.3 AUX-1 header came 4 wires...red is 5v witch go to v-in on buck converter, black is grount witch go to buck converter and to esp gnd pin, green witch is TX from skr1.3 board go to RX on esp, and blue witch is RX from skr 1.3 board witch go to TX on esp, and another small red wire witch go from v-out of buck converter to the esp 3.3v pin

Okay, that is what the adapter from Amazon is also doing for 2,10€ too. Tinkering your way mostely end in smoke when I'm doing such things. :) I also tried your way with a stepdown and connecting the 4 wires but then Wifi is not starting, because of missing something which is mentioned earlier.

@weed2all
Copy link

It is easy....only need to connect the right wire to the right pin...and I didnt was in mood to wait 4 weeks to arrive that adapter...

@weed2all
Copy link

But you made a smart decision to buy the adapter!

@kkberg
Copy link
Author

kkberg commented Sep 30, 2019

It is easy....only need to connect the right wire to the right pin...and I didnt was in mood to wait 4 weeks to arrive that adapter...

Sadely this isn't working for me, because wifi doesn't start and that is the reason of my question here. I also took care of connecting Rx and Tx the right way. Putting ESP back to programmer, wifi starts.

@weed2all
Copy link

Where do you connect the esp on skr board?did you setup the 2nd serial port on marlin?

@weed2all
Copy link

If you had not set the 2nd serial port on marlin will not work...

@kkberg
Copy link
Author

kkberg commented Sep 30, 2019

Where do you connect the esp on skr board?did you setup the 2nd serial port on marlin?

I connected it to the AUX1 TFT 5pin connector.

@kkberg
Copy link
Author

kkberg commented Sep 30, 2019

If you had not set the 2nd serial port on marlin will not work...

This is secondary, because more important is the not working wifi on ESP, when connected to serial port. But second serial is enabled in Marlin. I've 5 exactly same ESP's here and all have same behavior.
Which ESP-module did you use exactly?

@weed2all
Copy link

I use esp8266-01s, I think you have esp8266-01
Those are not working...

@kkberg
Copy link
Author

kkberg commented Sep 30, 2019

I use esp8266-01s, I think you have esp8266-01
Those are not working...

I only have esp8266-01S !!!!
esp

@weed2all
Copy link

On the image witch one do you have? The left or the right one?
1438303292-1915418449

@weed2all
Copy link

That is the same I have...and it works very well

@kkberg
Copy link
Author

kkberg commented Sep 30, 2019

On the image witch one do you have? The left or the right one?
1438303292-1915418449

I have the right one named as ESP-01s

@luc-github
Copy link
Owner

luc-github commented Sep 30, 2019

be sure when you flash you use erase all flash setting

@kkberg
Copy link
Author

kkberg commented Sep 30, 2019

be sure when you flash you use erase all flash setting

I used fresh ESP for flashing, directly out of the box. I also tried to flash blank.bin first

@kkberg
Copy link
Author

kkberg commented Sep 30, 2019

After being back home I examined my 6 ESP's. I ordered all as ESP8266 01-S, but they sent 4 different ones, which are not labeled but looking nearly the same. So I now have 2 "real" ESP8266 01-S and 4 seem to be "only" ESP8266. I was so concentrated on my project and not on the parts itself. So I apologize for making that mistake and giving some wrong information. I hope that the ordered adapter will fix the problem for the only ESP8266.

Thank you all

Klaus

@weed2all
Copy link

weed2all commented Sep 30, 2019

Esp8266 will not work...i have a bunch of them and they dont work...only esp8266-01s

@kkberg
Copy link
Author

kkberg commented Sep 30, 2019

I could not believe that I got different types, because I ordered only 01S. But important that I found it because of your help here. Thank you again. I'm now figuring out to find a sketch which only provides a serial port over wifi to connect the printer via wifi to my Repetier server.

@sl1pkn07
Copy link

the keyestudio unit works with normal 8266 (non 01S)

@luc-github
Copy link
Owner

luc-github commented Sep 30, 2019

esp8266 have only 512KB flash when 01-S have 1MB flash
you may have the 512KB working by disabling most of feature and just keep

//SERIAL_COMMAND_FEATURE: allow to send command by serial
#define SERIAL_COMMAND_FEATURE

//TCP_IP_DATA_FEATURE: allow to connect serial from TCP/IP
#define TCP_IP_DATA_FEATURE

//WS_DATA_FEATURE: allow to connect serial from Websocket
#define WS_DATA_FEATURE

⚠️ and follow this : #331 but you won't have webupdate available neither on 512KB

which on my side gave me Sketch uses 374150 bytes

for webUI : this one has only english (91KB)
index.html.gz

and this one is ultra gziped (86KB)
index.html.gz

so you should be able to use 128KB for SPIFFS on 512KB flash

Should be tight but should work

@sl1pkn07
Copy link

sl1pkn07 commented Sep 30, 2019

my 8266 ESP-01 unit with keyestudio breakout pcb

esptool.py v2.6
2.6
esptool.py v2.6
Serial port /dev/ttyACM0
Connecting........_____....._____....._
Chip is ESP8266EX
Features: WiFi
MAC: 84:0d:8e:a4:46:ae
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 1MB
Flash params set to 0x0320
Compressed 267632 bytes to 195026...
Flash real id:   0014400B
Flash real size: 1048576 bytes

Flash ide  size: 1048576 bytes
Flash ide speed: 40000000 Hz
Flash ide mode:  DOUT
Flash Chip configuration ok.

@luc-github
Copy link
Owner

@sl1pkn07 you have Chip is ESP8266EX not ESP8266 - actually I though ESP8266 with 512KB were no more sold and even available

@sl1pkn07
Copy link

sl1pkn07 commented Sep 30, 2019

my unit is sold as non S, and have the non S layout

IMG_20190930_161629

@luc-github
Copy link
Owner

wow my 512KB branch is now 4 years old!!! and the files fitted the 64KB partition ^_^
https://github.com/luc-github/ESP3D/tree/ESP-512K-64KSPIFFS

@weed2all
Copy link

weed2all commented Sep 30, 2019

Think that some chinese guys still sell those esp8266...i have aswell esp8266 non s with 1mb...they aren't work for me with esp3d...i install esp3d on my esp8266-01s and worked first time

@luc-github
Copy link
Owner

luc-github commented Sep 30, 2019

@sl1pkn07 yes ESP8266EX came after ESP8266 , they were the first with 1MB as 512KB was already really tight
ESPRESSIF did a lot of models - I do not always following all release

@weed2all
Copy link

Exactly

@sl1pkn07
Copy link

for me works. but i cant self-updating via web

my changes

└───╼  git diff HEAD^
diff --git a/esp3d/config.h b/esp3d/config.h
index 37e7fc3..34da355 100644
--- a/esp3d/config.h
+++ b/esp3d/config.h
@@ -94,7 +94,7 @@
 //Extra features /////////////////////////////////////////////////////////////////////////
 
 //Workaround for Marlin 2.X coldstart
-//#define DISABLE_CONNECTING_MSG
+#define DISABLE_CONNECTING_MSG
 
 //Serial rx buffer size is 256 but can be extended
 #define SERIAL_RX_BUFFER_SIZE 512
diff --git a/platformio.ini b/platformio.ini
index e713cba..72ed7eb 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -14,6 +14,7 @@ build_dir   = .pioenvs
 lib_dir     = libraries
 libdeps_dir = .piolibdeps
 data_dir = esp3d/data
+default_envs = esp8266
 
 [env:esp32dev]
 platform = https://github.com/platformio/platform-espressif32.git
@@ -35,7 +36,7 @@ lib_ignore =
 
 [env:esp8266]
 platform = espressif8266
-board = esp12e
+board = esp01_1m
 framework = arduino
 monitor_speed = 115200
 ; set frequency to 160MHz
@@ -45,7 +46,7 @@ board_build.f_flash = 40000000L
 board_build.flash_mode = dio
 upload_resetmethod = ck
 build_flags = 
-    -Wl,-Teagle.flash.4m2m.ld
+    -Wl,-Teagle.flash.1m512.ld
     -D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
     -DNONOSDK221=1
     -DNDEBUG

@luc-github
Copy link
Owner

yes with 1M flash it should always works but webUpdate may not be working depending of FW size

@luc-github
Copy link
Owner

luc-github commented Sep 30, 2019

also as SPIFFS is now a critical size vs webUI, so it is important to format and upload just after the webUI file
deleting webui when another file is also present (like preferences.json or any other file) will limit the size available even it says it is enough - the available size will be the one from the previous deleted file

@weed2all
Copy link

Luc...offtopic question...does esp3d work with reprap firmware?I have a radds 1.6 and arduino due and I install reprap firmware on it...

@sl1pkn07
Copy link

yep. my compiled firm has 489KB , my total space (after burned it) 471.36 KB and 124.27 KB used by preferences.ini and index.html.gz

@luc-github
Copy link
Owner

@weed2all yes if you enable Marlin compatibility when you flash reprap

@weed2all
Copy link

Sweet...I must give it a try!

@kkberg
Copy link
Author

kkberg commented Oct 4, 2019

With this adapter the "smaller" ESP8266 works fine with ESP3D.

20191004_152311
20191004_152304
20191004_152318

@ducker
Copy link

ducker commented Oct 16, 2019

Hi, I have some troubles with connecting ESP to SKR 1.3. I connected it to TFT port and I use the same adapter as mentioned above. I also tried to connect ESP directly to SKR pins without adapter. ESP3D is working fine but I don't receive any message from the board. I can send some commands like set temp but nothing appears on the gcode console or sd card management window. When I loop rx and tx on ESP I see the echo so it looks for me like board don't send the responses. Have you experienced similar behaviour?

@kkberg
Copy link
Author

kkberg commented Oct 16, 2019

Hi, you have to enable sevond serial port in Marlin. I have same config with skr 1.3 and it's working fine. I am not at home in the and back this evening.

@ducker
Copy link

ducker commented Oct 16, 2019

Thanks for the quick response, I've forgotten to mention it, but I have it enabled. I tried both configuration 0, -1 and -1, 0. I also tried changing speed but without result. As I sad it is strange because I can send commands so communication to the SKR board works fine, I just cannot receive any response from it.

@kkberg
Copy link
Author

kkberg commented Oct 16, 2019

One more idea, are Rx and Tx crossed as needed? Rx from ESP to Tx from SKR and Tx to Rx?

@ducker
Copy link

ducker commented Oct 17, 2019

Yes, it is crossed. If not it will not work at all and I can send commands successfully. Strange behaviour. I think that SKR board may be broken, but I have no idea how to easily confirm it.

@malcSA
Copy link

malcSA commented Oct 29, 2019

any body got this working with smoothie?

@hapklaar
Copy link

Yes, it is crossed. If not it will not work at all and I can send commands successfully. Strange behaviour. I think that SKR board may be broken, but I have no idea how to easily confirm it.

@ducker I think I'm having the same issue. I can send GCODE ESP>SKR, but am not getting anything in return. Also M117 output from board is not reaching anything connected through TFT/ESP.

Were you able to get this fixed?

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants