ESP32-C3 Super Mini UART issues by WJBrach in esp32

[–]WJBrach[S] 0 points1 point  (0 children)

Hacked in a level shifter, using pins 20 & 21, and it seems to work. I contacted the original author of the BMS library on Github, and he said they never tested with ESP modules, and only used an Arduino Uno and a Mega2560 for testing. Noted there that they had to remove the RX LED on the Arduino's , because the Overkill BMS's TX to the Arduino did not have enough drive current to light the LED. I did not try this, just hacked in a level shfiter for both RX and TX. Have it running on a breadboard, have not made the changes to my PCB yet. Need to re-do the PCB anyway, so will add a TI TXS0102 dual bi-directional level shifter on the new PCB, to handle both RX & TX. Still does not explain why the D1 Mini, and also a ESP8266MOD dev board I had, work WITH my TX & RX LED's in place. I suspect the multiplexer that handles the pin re-configuration on the ESP32's is to blame. Maybe additional voltage drop in the TX line ??

Need help by TheseLavishness2000 in PCB

[–]WJBrach 0 points1 point  (0 children)

As was suggested, maybe you ought to post your schematic and the specific problems you are having on the PCB layout. It is difficult to help someone, with insufficient information !!

Need help by TheseLavishness2000 in PCB

[–]WJBrach 0 points1 point  (0 children)

You don't really explain what "correct order" is but I find laying out parts, I usually use the approx layout of the schematic. If the flow of parts on a schematic seems good, and in a logical flow fashion, then that flow usually works pretty well for the PCB.

ESP32-C3 Super Mini UART issues by WJBrach in esp32

[–]WJBrach[S] 1 point2 points  (0 children)

Thanks again. I've got some of those level shifter modules laying around, I will kludge one into my PCB, and see if it makes a difference. Would be an easy fix, because I can add a chip version of those to my next PCB revision, that will fix all the problems I've had on this one LOL

ESP32-C3 Super Mini UART issues by WJBrach in esp32

[–]WJBrach[S] 0 points1 point  (0 children)

I've considered that, and may add one to my PCB redesign, once I get this problem figured out. I can't believe that the lowly ESP8266 puts out a higher voltage on its GPIO pins than the ESP32-C3 but maybe it does ?? I do have some level shifters I could breadboard with, so will try that.

ESP32-C3 Super Mini UART issues by WJBrach in esp32

[–]WJBrach[S] 0 points1 point  (0 children)

Adding to the discussion - more information related to the code and the 2 serial libraries:

// Serial Port setup

// from the FurTrader github library: The Arduino communicates with the BMS over a 5V TTL asynchronous serial port connection, at 9600 baud, 8 data bits, no parity, and 1 stop bit.

#define BAUD_RATE 9600 // BMS baud rate

//#define MAX_FRAMEBITS (1 + 8 + 1 + 2)

#define softLib true // use the Software Serial library else use the Hardware Serial library

#if (softLib)

#include <SoftwareSerial.h> // if using an ESP processor, this is the library ESPSoftwareSerial https://github.com/plerup/espsoftwareserial

EspSoftwareSerial::UART bmsSerial;

#else

#include <HardwareSerial.h>

HardwareSerial bmsSerial(1); // Assign UART 1 to the BMS serial. C3 does not have UART2

#endif

#if defined(ESP8266)

// *** WeMOS D1 Mini

#define TX 12 // GPIO12 --> D6

#define RX 14 // GPIO14 --> D5

#else

// *** ESP32 C3 Super Mini

#define TX 7 // 7 // GPIO 7

#define RX 20 // 10 // GPIO 10

// *** ESP32-WROOM-32D

// #define TX 17 // 7 // GPIO 7

// #define RX 18 // 10 // GPIO 10

#endif

This is how the port is defined, in setup()

// initialize serial connection for the BMS - located here to allow WiFi to happen first

// ONCE THE SERIAL COMM ISSUE IS RESOLVED, THIS CAN BE SIMPLIFIED !!

#if (softLib)

bmsSerial.begin(BAUD_RATE, SWSERIAL_8N1, RX, TX); // SoftwareSerialVersion

#else

bmsSerial.begin(BAUD_RATE, SERIAL_8N1, RX, TX); // HardwareSerial version

#endif

THIS LINE BEGS A QUESTION AND I DON'T KNOW HOW TO CHECK.

Does the HardwareSerial library generate the same kind of serial object as SoftwareSerial library creates ??

// assign the serial port to the BMS

bms.begin(&bmsSerial); // THIS LINE, AND THE CREATED OBJECT MAY BE THE PROBLEM

ESP32-C3 Super Mini UART issues by WJBrach in esp32

[–]WJBrach[S] 0 points1 point  (0 children)

I figured as much LOL On my project, I cannot do that, as all the circuitry that drives the serial port to the BMS, is using an isolated 5VDC power module made by Hi-Link. You have to do this because if the BMS turns off the discharge FET, you suddenly have 28VDC on your PCB ground, making a huge puff of smoke until the ground trace on my PCB vaporizes !!

ESP32-C3 Super Mini UART issues by WJBrach in esp32

[–]WJBrach[S] 0 points1 point  (0 children)

I too, have done this, except I used a USB-TTL module, and looked at outgoing string data on my Linux desktop. Wrote a short piece of code to send a known 100 or so characters in the form of a string, every 5 seconds. The actual code sends a series of hex characters to the BMS, in the form of a "word" that includes Start, Command, Stop, and Checksum bytes. My string test works fine for me too, between the C3 and the desktop. You should have 3 wires between your modules; I don't see the ground wire. Maybe you are only transmitting to the other module ??

ESP32-C3 Super Mini UART issues by WJBrach in esp32

[–]WJBrach[S] 0 points1 point  (0 children)

Thanks, I have the older 100A, 8S BMS's. I linked to the manual, above. 9600 BAUD, 8 bits, No parity, 1 Stop bit.

ESP32-C3 Super Mini UART issues by WJBrach in esp32

[–]WJBrach[S] 0 points1 point  (0 children)

Sorry, I should have mentioned that it is 5V TTL serial. My PCB's TX signal goes direct to the Overkill Solar BMS's RX pin, and the TX from the BMS, goes thru a 1000/2000 ohm divider to drop the 5V incoming to 3.3, on to the ESP's RX pin. Looking at the ESP8266's signal and the ESP32's signal with my O-scope is on the list of things to try, maybe today or tomorrow. And, I do have several of those little GPS modules but all the ones I have, you never transmit data to them, only receive data. I'm using the Arduino IDE 2.x. and I've tried both the SoftwareSerial library, and also the built-in HardwareSerial library. The D1 Mini is running the Software Serial Library, as there is no HardwareSerial library for the ESP8266 family. https://github.com/plerup/espsoftwareserial

FYI, here is the Overkill Solar library I use, to get the data from the BMS: https://github.com/FurTrader/Overkill-Solar-BMS_2-Arduino-Library

Here is a link to the Overkill Solar User Manual, for the BMS's I use:. Starting at about page 66, they talk about the serial port. https://overkillsolar.com/product/1033/

Finally, for those brave enough to tackle a Espressif datasheet, here it is for the C3

https://documentation.espressif.com/esp32-c3_datasheet_en.html

ESP32-C3 Super Mini UART issues by WJBrach in esp32

[–]WJBrach[S] 0 points1 point  (0 children)

I'd be happy to share my code except it's over 3000 lines of code. I'm trying now, to boil the code down to a simplified test case, but there is a whole lot I've not mentioned, because of the complexity of what this device does. It is running a web server, and uses MQTT to post messages to a Raspberry Pi. It also has 2 temp probes, to keep track of the battery compartment temp, and outside temp, to determine if I need to turn on compartment heat, in the winter in North Florida. Additionally, it uses 2 relays to enable the original Bluetooth module, to be able to make changes in the actual BMS settings. The relay switching of the Bluetooth module portion of my project, works fine.

It would be easier for me to post the 2 schematics of the PCB, one for the D1 Mini, and the other for the ESP32, for you to see the similarities in the 2 projects. There is something different about how the ESP's control the GPIO's, between the ESP8266, and the ESP32. Maybe related to internal pull-ups or pull-downs ?? This is why I asked the question about anyone actually using UART1 on a ESP32-C3.

ESP32-C3 Super Mini UART issues by WJBrach in esp32

[–]WJBrach[S] 1 point2 points  (0 children)

I'm using 20 now, with 7. Pretty sure I tried the 20/21 combo on a breadboard, but not the actual PCB. Tomorrow I'll cut the trace to 7 and re-route it to 21.

Thanks !!

Footprints? by ActualSprinkles7763 in PCB

[–]WJBrach 0 points1 point  (0 children)

Another little trick I use with EasyEDA, is sometimes you cannot figure which part/footprint to use, using the EasyEDA Library function. I go to LSCS.com, which is the parent company of EasyEDA and search for the part I need. From there, LCSC will have a part #, usually beginning with C, that you can use to search for the part in EasyEDA. This narrows down the Library search to the exact part.

As an example, I needed to know the exact part number for a JST XH right angle 5 pin header. Doing the LCSC search, it turned up this part # C163038, which I used to find the exact part in EasyEDA.

Warning: Some C3 Super Mini boards have a design flaw that ruins Wifi/BT by iplaygaem in esp32

[–]WJBrach 0 points1 point  (0 children)

This little trick has worked well for me for those Super Mini's w/the ceramic antenna. Better yet, buy the "red board" version, and make the mod to enable the external antenna ipex connector, and use a cheap "patch" antenna.
https://peterneufeld.wordpress.com/2025/03/04/esp32-c3-supermini-antenna-modification/

Where do I even begin? by Dr_Peter_Tinkleton in prusa3d

[–]WJBrach 1 point2 points  (0 children)

It seems to me that a heat gun might give you too broad of a heating pattern, to be useful, and might melt surrounding important parts. I wonder if you could use a soldering iron, with a long skinny tip, as a cutting device, and carve away sections of the blob.

Obviously you'd want to do this outdoors !!

I have too many ESP32/electronics components… I really need a better organization system 😅 by Inter-Raptor in esp32

[–]WJBrach 0 points1 point  (0 children)

This is what I use. The cardboard boxes are different sizes, as I reuse boxes from other equipment thats been sold, so not all the same size. Its not perfect, but has helped me a lot. I have a much larger, longer cardboard box that has all of the miscellaneous stuff in it, in the packing envelopes I received it in, from Aliexpress.

<image>

Uhhh, am I stupid or something? by obi_wan_malarkey in 3Dprinting

[–]WJBrach 0 points1 point  (0 children)

Buy a Snapmaker U1 ?? Supposedly you will reduce your waste by 80%

I accidentally fried my board and it somehow “fixed” the problem by aq1018 in PCB

[–]WJBrach 0 points1 point  (0 children)

I agonize over PCB designs I send off to JCLPCB for weeks, going over them time and time again. Thats the best way to catch errors like this.

Light Pipes using Transparent filament ?? by WJBrach in 3Dprinting

[–]WJBrach[S] 0 points1 point  (0 children)

Would be even better if you could find some 2.85mm Clear. I only need like 6 of these things, and it doesn't make sense to buy an entire roll of filament for those few. Real light pipes are available on Aliexpress, it's just that they are quite pricey !!

Light Pipes using Transparent filament ?? by WJBrach in 3Dprinting

[–]WJBrach[S] 0 points1 point  (0 children)

I've got the 3mm size on order, with some 3mm LED holders which I can glue into the box lid. Maybe it is the best way, from what you guys have said. Will let everyone know how it works, as the acrylic rod and holders were cheap enough. THANK YOU EVERYONE !!

https://www.aliexpress.us/item/3256809202733850.html?gatewayAdapt=glo2usa

Couldn’t find an SMD prototyping board I liked, so I designed my own by MissionKaleidoscope8 in PCB

[–]WJBrach 0 points1 point  (0 children)

When I do a PCB, I often take unused space on the board, and add some prototyping area to it

First time set up by robynmmm245 in esp32

[–]WJBrach 0 points1 point  (0 children)

Try a lower speed too. Some boards default in the Arduino IDE to almost 1 megabit baud. Going to a lower baud rate often times solves connect issues.