ESP32-C3 SuperMini ANTENNA MODIFICATION

Place your projects here
User avatar
PeterN
Posts: 719
Joined: Mon Feb 08, 2021 7:56 pm
Location: Krefeld, Germany
Has thanked: 322 times
Been thanked: 399 times
Contact:

Re: ESP32-C3 SuperMini ANTENNA MODIFICATION

Post by PeterN »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Sat Apr 05, 2025 10:42 pm Hmmm. I did not make any links. I just soldered the silver wire to both sides of the ceramic antenna just as with the C3s which did not have the antenna socket.
Thats absolutely OK!!

Only if the socket is needed - so maybe in your experiment with the external antenna - the socket will have no signal at all by default because of the missing link. And if bridged then the C3 antenna has to be removed.
User avatar
PeterN
Posts: 719
Joined: Mon Feb 08, 2021 7:56 pm
Location: Krefeld, Germany
Has thanked: 322 times
Been thanked: 399 times
Contact:

Re: ESP32-C3 SuperMini ANTENNA MODIFICATION

Post by PeterN »

I followed lyizb’s hints and found several differently designed ESP32-C3 SuperMini boards on the web.
Most of them still lack a good antenna design and do not adhere to the antenna’s datasheet guidelines.
Boards with an IPEX socket for an external antenna require soldering a jumper to activate the socket—and even then, the SMD antenna must be removed. A greater distance between the antenna, the ESP chip, and other components could be an indicator of a better design, but it is not necessarily a guarantee.

All of these boards still exhibit very modest WiFi range,
and my 31mm wire antenna continues to make a significant improvement.


Here are some of the boards arranged for comparison.
IMG_8803.jpeg
You do not have the required permissions to view the files attached to this post.
lyizb
Posts: 271
Joined: Fri Feb 12, 2021 8:23 pm
Has thanked: 137 times
Been thanked: 102 times

Re: ESP32-C3 SuperMini ANTENNA MODIFICATION

Post by lyizb »

Wow. Peter's antenna hack is featured on Hackaday, and he is even given credit for it: Simple Antenna Makes For Better ESP32-C3 WiFi
https://hackaday.com/2025/04/07/simple- ... 2-c3-wifi/

Congrats, Peter. (Maybe this could also drive some attention in the direction of Annex.)
User avatar
PeterN
Posts: 719
Joined: Mon Feb 08, 2021 7:56 pm
Location: Krefeld, Germany
Has thanked: 322 times
Been thanked: 399 times
Contact:

Re: ESP32-C3 SuperMini ANTENNA MODIFICATION

Post by PeterN »

Hi Lance, and thank you

I stumbled about this when I googled a youtube video about my mod yesterday. Now that video is a part of a post at HAD and my blog post gets some traffic.
But HAD and the youtuber did change the antenna dimensions (!) and inserted some own silly ideas .
Now more of such ideas get collected in the comments.

My resignative comment there was:
It’s fascinating to observe what happens when a chain of people passes a piece of reasonable technical information from one mouth to the next ear, and so on. By the time the message reaches the last person, the technical output often has almost nothing to do with the original input.
My original blog post traveled via a YouTube video to Hackaday (HAD), and then to other valued eyes and fingers…
Oh OH OH!!
Did anyone read the original blog post at all?



BUT: An article about this will be in Elektor magazine’s Summer-edition ( a brief version already is in Elektor-LABs) including some ANNEX links and prog to download :-)
happytm
Posts: 3
Joined: Wed Apr 09, 2025 7:16 pm

Re: ESP32-C3 SuperMini ANTENNA MODIFICATION

Post by happytm »

Peter,

Can you please share xy.min.js file ?
User avatar
PeterN
Posts: 719
Joined: Mon Feb 08, 2021 7:56 pm
Location: Krefeld, Germany
Has thanked: 322 times
Been thanked: 399 times
Contact:

Re: ESP32-C3 SuperMini ANTENNA MODIFICATION

Post by PeterN »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Tue Apr 15, 2025 3:41 am Peter,

Can you please share xy.min.js file ?
Sorry happytm,

Yes! That has been a part of the examples archive in the old times of the Annex-Windows-Toolkit.

I attache it here as xy.min.js.gz . The interpreter will even unzip this .gz at runtime

And to make it complete for all testers here again the current version of the WIFI_LOGGER.BAS

Please don‘t hesitate to upload a screenshot of your test results.
Meanwhile I received several reports . Some boards under test equipped with twisted „rainsun“ ceramic antennas even not at all connected to the ESP32s antenna pin.



Code: [Local Link Removed for Guests]


'######## WIFI-GRAPH-LOGGER ####################################
' This program compares the WiFi signal strengths (RSSI) of two ESP32 modules.
' It aims to graphically display the impact of different antennas on signal quality.
'
' - Module 1 (local): Displays its own signal strength to the Access Point (AP).
' - Module 2 (remote): Sends its signal strength to Module 1.
' Operation modes:
' RX = 1: This module (local) regularly sends HTTP requests to the remote module.
' TX = 1: This module (remote) responds to HTTP requests with its signal strength.
' Author: Peter Neufeld (peter.neufeld@gmx.de, 03/2025)

' Configuration for the local module (ESP32 Module 1):
RX        = 1   ' This module sends requests to the remote module.
TX        = 0   ' This module does not respond to requests.
' Configuration for the remote module (ESP32 Module 2):
'RX       = 0   ' This module does not send requests.
'TX       = 1   ' This module responds to requests.

REMOTE_IP$ = "192.168.0.134" ' IP address of the remote module (Module 2)

X_Num      = 100 ' Number of measurements to display in the graph.
WIFI_REMOTE$  = "" ' Stores the received RSSI values from the remote module.

'onhtmlreload: Triggered when the webpage is reloaded.
onhtmlreload  WEBPAGE
gosub         WEBPAGE

' Enables URL handler for TX mode:
IF TX = 1 onurlmessage RETURN_WIFI_STRING

' Enables asynchronous HTTP requests in RX mode:
IF RX = 1 onwgetasync RECEIVE_REMOTE_STRING

' Timer to regularly measure local signal strength:
timer0 500, LOG_MY_WIFI_CONNECTION

' Timer to regularly query remote signal strength:
IF RX = 1 timer1 1000, GET_REMOTE_WIFI_LOG_STRING

WAIT

'###############################################################
LOG_MY_WIFI_CONNECTION:
' Measures local WiFi signal strength and stores it in WIFI_LOCAL$.

w=0
for i = 1 to 50
w = wifi.rssi + w ' Accumulates RSSI values for averaging.
next i
w = W / (i-1)   ' Calculates the average RSSI value.

WIFI_LOCAL$ = trim$(WIFI_LOCAL$ + " " + str$(wifi.rssi,"%2.1f"))
c = word.count(WIFI_LOCAL$, " ") ' Counts stored values.
p = instr(1, WIFI_LOCAL$, " ")   ' Finds the first value in the string.
p = len(WIFI_LOCAL$) - p         ' Calculates the length of remaining values.

If c > X_Num then WIFI_LOCAL$ = right$(WIFI_LOCAL$, p) ' Limits the number of values.

' Updates the graph with local values:
jscall |traceme(0,"| + WIFI_LOCAL$ + |");|
' Updates the graph with remote values if available:
if WIFI_REMOTE$ <> "" jscall |traceme(1,"| + WIFI_REMOTE$ + |");|

return

'###############################################################
RETURN_WIFI_STRING:
' Returns local RSSI values as a response to an HTTP request.
URLMSGRETURN WIFI_LOCAL$
R=PING(" ") 'workaround for memory leak issue in 1.70.3 to .5
return

'###############################################################
GET_REMOTE_WIFI_LOG_STRING:
' Sends an HTTP request to the remote module to query its RSSI values.
wgetasync ("http://" + REMOTE_IP$ + "/msg?x=1")
return

'###############################################################
RECEIVE_REMOTE_STRING:
' Receives and stores the RSSI values from the remote module.
WIFI_REMOTE$ = WGETRESULT$
R=PING(" ") 'workaround for memory leak issue in 1.70.3 to .5
return

'###############################################################
WEBPAGE:
' Creates and loads the HTML page with the graph to display RSSI values.
cls
jsexternal "/xy.min.js" ' Loads external JavaScript library for graphs.
cnt = 0
a$ = ""
a$ = a$ + |WiFi Graph for two ESP32 modules:|
a$ = a$ + |GREEN: With additional antenna|
a$ = a$ + |RED: With standard antenna|
a$ = a$ + | |
html a$
pause 500
A$ = ""
A$ = A$ + |var datasets = [|
A$ = A$ + |  {|
A$ = A$ + |    lineColor : 'rgba(20,100,100,1)',|
A$ = A$ + |    pointColor : 'rgba(20,20,20,1)',|
A$ = A$ + |    pointStrokeColor : '#fff',|
A$ = A$ + |    data : []|
A$ = A$ + |  },|
A$ = A$ + |  {|
A$ = A$ + |    lineColor : 'rgba(151,30,0,1)',|
A$ = A$ + |    pointColor : 'rgba(151,80,0,1)',|
A$ = A$ + |    pointStrokeColor : '#fff',|
A$ = A$ + |    data : []|
A$ = A$ + |  }|
A$ = A$ + |];|
A$ = A$ + |var ctx2 = document.getElementById('canvas1').getContext('2d');|
A$ = A$ + ||
A$ = A$ + |var xy = new Xy(ctx2, {rangeX:[0,|+ STR$(X_Num)+ |], rangeY:[-80,-35]|
A$ = A$ + |, smooth:0.05, pointCircleRadius:2, pointStrokeWidth:1 });|
A$ = A$ + ||
A$ = A$ + |function traceme(set, data){|
A$ = A$ + |  var s = data.split(" ");|
A$ = A$ + |  for (var i=0; i<s.length; i++) {|
A$ = A$ + |    datasets[set].data[i] = [i, s[i]];|
A$ = A$ + |  }|
A$ = A$ + |  xy.draw(datasets);|
A$ = A$ + |}|
jscript A$
A$ = "" ' Frees memory.
return

[
You do not have the required permissions to view the files attached to this post.
happytm
Posts: 3
Joined: Wed Apr 09, 2025 7:16 pm

Re: ESP32-C3 SuperMini ANTENNA MODIFICATION

Post by happytm »

Thank you Peter for providing the graph library.
happytm
Posts: 3
Joined: Wed Apr 09, 2025 7:16 pm

Re: ESP32-C3 SuperMini ANTENNA MODIFICATION

Post by happytm »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Thu Apr 24, 2025 6:31 am Thank you Peter for providing the graph library.
Do you think code attached can be used with Annex32?
User avatar
PeterN
Posts: 719
Joined: Mon Feb 08, 2021 7:56 pm
Location: Krefeld, Germany
Has thanked: 322 times
Been thanked: 399 times
Contact:

Re: ESP32-C3 SuperMini ANTENNA MODIFICATION

Post by PeterN »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Thu Apr 24, 2025 6:46 am
[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Thu Apr 24, 2025 6:31 am Thank you Peter for providing the graph library.
Do you think code attached can be used with Annex32?
Which attached code are you referring to?

My WIFI_LOGGER.bas and the xy.min.js.gz should be stored in the / directories of both ESP32 boards.

EDIT: Perhaps you were irritated because of the js code, But keep in mind: The Annex-Prgm creates HTML-code including references to the JS code. But this code is transfered to the Browser and then is executed only there.
Post Reply