Date
1 - 20 of 24
ESP32-SHC
nc@...
Hello all,
some time ago I wanted to look into an ESP version of the SHC. The ESP version I ordered from China still hasn't made its way to europe and the ESP32 I got from Amazon is too large to integrate with the pcb size I had going. So after much ado, I transferred my SHC work from Eagle to KiCad and started working on a version that reduces the amount of soldering and parts purchasing. I think I've come to the point, where I just have to order a batch at jlcpcb and see if I can get it to work. Speaking of new versions, are there any pin-out conventions in place for ESP32 or Teensy4.0 on the main board? I had to play around with the ESP32 pinout to be able to route it on a 2-layer board. Kind regards, Norman |
|
Hi Norman:
For the pinout, obviously check that the general-purpose pins (ie for the keypad) are not ones that have another use like SPI, UART and especially JTAG (pins 12 to 14). By the way, I strongly advise anyone who works on hardware or software debug to get a Seggers debug probe. It allows to single-step, set breakpoints etc. and makes life a lot easier. Therefore for any designs with ESP32, we should bring out these JTAG pins (and EN/RST) to some connector. Unfortunately this is not possible on Teensy4, which disables JTAG.
Best regards
François
|
|
correction: JTAG pins are:
12 - TDI
13 - TCK
14 - TMS
15 - TDO
EN/RST
By connecting these 5 pins to a debug probe (https://www.ak-modul-bus.de/stat/segger_j_link_edu.html) you get a full-featured debugger.
François
|
|
nc@...
Hello Francois,
thank you for your advice. I added pin headers for JTAG, I2C and SPI and rearranged the ports to allow for that. As I also recall that the boot button needs to be pressed to flash the ESP32-S3, it does not make sense to have an external USB port, if you can't reach the boot button. To make room for the USB port at the other side, I removed the 5V selection pin for the display power. A teensy 4.0 version could likely also power the SHC with 3.3V, making the 5V obsolete. (?) The RX and TX signals are 3.3V already. Kind regards, Norman |
|
Good work , But actually the SHC code doesn't work on the ESP32. There is a Bug that I was not avle to find maybe François will be able to fini the robot cause with the debuging interface. The Bug is related to the webserver. Wirhout the webserver the shc work correctly Charles Le lun. 3 oct. 2022, 22:35, <nc@...> a écrit : Hello Francois, |
|
ok I will try. I don't have a keyboard or LCD on my ESP32. Can I see the crash without these?
toggle quoted message
Show quoted text
Do I need to connect to a Main Unit? François
|
|
You will need an lcd Connection to main unit is not mandatory Le mar. 4 oct. 2022, 15:45, François Desvallées via groups.io <fdesvallees=mailbox.org@groups.io> a écrit :
|
|
Hi Norman, I have no idea how much work it is for you. But it would be nice to use the micromod format for the esp32. Thanks again for the hard work
|
|
nc@...
Hello Charles,
I think the micromod makes alot of sense for the mainboard, as I think the extra ports would allow you to eliminate the necessity for a second teensy. Actually I'm quite interested how the micromod version is progressing. For the hand device I opted against the modular approach, as the ESP32 boards are quite large and the micromod ESP32 even more so. The size would mean that the case size needs to increase in one of the dimensions, so I didn't really like the idea. Second was the cost. The fully assembled pcb is currently around 25 Eur for a lot size of 5. This reduces to less than 20 Eur if you get 10+. The ESP32 was released in 2016 and is sort of not recommended for new projects, so I went with the ESP32-S3 which is about 20 Eur as a breadboard, but about 4 Eur if assembled at jlcpcb. Also there are not many breadboard options I was able to find. So no, I'm currently not considering the micromod ESP32, but I'm open for a pro/con discussion and maybe I'm just not seeing the pros. Time wise it fills a Saturday and Sunday evening to update the KiCad scheme and re-route the pcb. If the footprint is different, you can't save much of the routing. Some of the routing needs to be done manually, before you can start the auto-router. After the auto-router is done, you need to clean up most wires, as the auto-router does a functional, but not aesthetically pleasing job. kind regards, Norman |
|
nc@...
Hello Charles,
I had a look at the source code, but... Where can I find the code for the webserver? I'm thinking the code in TeenAstroSHC/TeenAstroSHC,ino would somehow lead me to a webserver function. Within the TeenAstroSHC folder there is no real webserver function I could find. Now I'm thinking the wifi related code is contained in the libraries/TeenAstroWifi folder. What I don't understand is, where the code in the TeenAstroSHC takes a turn and says: "oh yes and also run the wifi code in libraries/TeenAstroWifi". If you could please point me in the right direction. Regards, Norman |
|
Hi Norman:
toggle quoted message
Show quoted text
I don't know the SHC code well, but here is how I think it works: SmartController.h includes TeenAstroPad.h, which includes TeenAstroWifi.h. This causes the executable to link these 2 libraries. Now TeenAstroWifi declares a webserver with these lines #ifdef ARDUINO_ESP8266_WEMOS_D1MINI ESP8266WebServer TeenAstroWifi::server; ESP8266WebServer httpServer(80); ESP8266HTTPUpdateServer httpUpdater; #endif This is enough for FreeRTOS (the underlying operating system provider with espressif processors) to start the web server, which runs pretty much independently from the main Arduino loop in TeenAstroSHC.ino: void loop() { HdCrtlr.update(); } I found out about FreeRTOS since I am now working to port the Main Unit code on an ESP32 for eventual future projects. Hope this helps François
|
|
Yes that it ! the webserver is member of the pad. This way the shc can be compiled with and without the webserver. There is also an teenastro arduino project where the webserver runs without the lcd and the Button. The idea is that each component can be tested and implemented independently. Le lun. 10 oct. 2022, 23:06, François Desvallées via groups.io <fdesvallees=mailbox.org@groups.io> a écrit :
|
|
nc@...
Thank you Francois and Charles for helping me understand how the webserver part is connected to the SHC.
FYI there is no turning back now for me. After some more corrections to the pcb it has now gone to manufacturing. Once it arrives I'll let you know if it can be powered up and connected to. If someone wants to play with the unproven and untested KiCad files of the SHC drop me a PM. I'm now using the manufacturing lead time to work on a 'classic' mainboard in KiCad. Making some room on the pcb for Lumberg circular connectors in the space defined by the Bopla case. And making some small changes, like giving each LED its own pinheader. Not quite sure what to do about the teensy 3.2, as I'd have to canibalize my existing boards or trying something with the micromod version of teensy 4.0. The integration of which seems like _not_ low hanging fruit. As it's a vanity project and I'd need to modify the stepper motors as well, I'm taking my time. But just in case there is a roadmap for hardware, I'd be curious as to where things are headed. Thanks again for your explainations, Norman |
|
nc@...
Hello Charles, Francois,
the TeenAstroSHC.ino compiles now for ESP32S3 Dev Module build target. The following was necessary: * the library U8g2 needs to be downgraded to version 2.24 * #ifdef ARDUINO_ESP32S3_DEV sections have to be added to TeenAstroWifi.h, TeenAstroWifi.cpp, SmartConfig.h, SmartController.cpp * the #include <Wifi.h> line in TeenAstroWifi.h has to be renamed in #include <WiFi.h> with a capital F Curious to see if it also works with real hardware attached :-) Kind regards, Norman |
|
Hi Norman,
I spent the last days a bit time to evaluate the best design for the Next SHC. First some remarks about the current design: 1. Many people have trouble with the display a. sold unsold some resistors b. right power for the display c. buy the right display d. sold cable in the right order 2. The display is not bright enough per day or too bright during the night 3. People want to have the freedom to select the buttons a. some send lot of money for them b. other prefer joystick So this sound like we need a kind of board where the display is sold to the pcb and ordered together. I made some test 2 years ago with an e-ink display and the refresh rate was good. Hence I propose that we try this hardware for the SHC based on the ESP32 https://www.tinytronics.nl/shop/en/development-boards/microcontroller-boards/with-wi-fi/lilygo-ttgo-t5-v2.3-esp32-with-2.13-inch-e-paper-e-ink for 20€ we have a display and a microcontroller The screen resolution is not too high so I do not have to redesign all the icon: I can keep them and make the Text a bit bigger The screen is 2.1 inch not too big and not too small. I prefer to keep teenastro as simple as possible with as less as possible variation for the electronic part because it is then really easier to support the community and to have a good FAQ. I will have to find a case for that board and I think it is better if only the front panel is a 3D print and not the all case. Any comments are welcome of course. Charles |
|
nc@...
Hello all,
the ESP32-S3 pcbs arrived today. The board powers up, USB connects and sketches can be uploaded. Wifi is also able to connect. So far so good. I need some different pin headers, as I want to try making the display detachable, but at the same time don't want to ruin the formfactor of the case. (and I shouldn't forget to do the R3 & R5 this time round :) Also I need a ribbon cable to try the JTAG port. kind regards, Norman |
|
nc@...
Hello Charles,
yes, having to do some SMD soldering does complicate the assembly.
Not quite convinced of the Epaper display, as it is produced by Waveshare and is only specified to operate above 0C.
If you are a visual astronomer I can understand not wanting a bright display.
The Epaper is an SPI display and not I2C, which you most likely already considered.
(If you go for SPI, the 2.42 oled would also not need to be modified, but could run SPI out of the box.)
From a software development perspective the Epaper module with ESP32 included makes things easy.
Don't exclude 3d printing for cases, as JLCPCB now also has 3d printing service, which is more affordable.
Regarding custom pcbs, I think the assembly service of JLCPCB is a game changer and can overcome some of the downsides. Kind regards, Norman
|
|
Thanks for pointing the temperatur limitation ! The esp32 with an epaper is a bit too big for many conventional box at Reichelt. I found that kit that sounds also interesting https://www.lilygo.cc › products › t-... T-Display-S3 - LILYGO Le dim. 23 oct. 2022, 22:55, <nc@...> a écrit :
|
|
nc@...
Hello Charles,
following up on the "SMD soldering is complicated idea", I was wondering if there is a way to have a solderless board. My thought for that is to make it in two parts. * The SHC pcb with 2.54mm double row pinheaders to either attach a joystick or buttons, but fully assembed as such. * Secondly the display driver board, which connects via a mezzanine connector to the SHC. * Using jumpers the configuration can be set. (I2C, SPI, OLED, ePaper) * Only manual steps required are: - set jumpers - attach 24pin ribbon cable of display - bend tabs of display frame, thereby seating display on driver - push mezzanine connection together Downside: cost. Single side assy pcb ~25Eur + Double side ~50Eur + Display ~15Eur = 90Eur And s.o. has to buy 5 sets. If I replace the mezzanine connector with pinheaders and leave one soldering operation, cost drops to about 65Eur. (remove double sided assy at jlcpbc) As a bonus, the display driver also accepts a 2.13" ePaper display from Waveshare. The concept is not quite there yet, but visualizes most ideas. - need to re-repace the 1.27mm jumpers with 2.54mm - need to replace the mezzanine connector with a pinheader 2.0mm - modify the SHC to make the pinheader idea work... Let me know what you think. Kind regards, Norman |
|
Hi Norman,
the idea to have many 2 layer PCB is indeed a really good! But I think to create our own esp32 board is too expensive take look on that solution: https://fr.aliexpress.com/item/1005003589706292.html?spm=a2g0o.store_pc_promotion.promotePruductList_2004000821477.16 It is pretty close to everything we need in only one order for some euros... what do you suggest? Charles |
|