Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Electronics : Wifi experiments on a ESP8266 , ESP01
Author | Message | ||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
Hiya I'm using a pair of ESP01 modules to make a wifi serial bridge between a rover and a PC. The ESP01 has a onboard wifi aerial, and while it seams to work ok, I wanted to see if I could improve its range. Found a few web sites that go into a antenna modification, so decided to give it a go and do some testing. First I wrote some code ( with help from ChatGPT, great to get you started but always needs debugging and modification ). This poles any available wifi network and reports on the signal strength for each one it finds. I'll put the code at the bottom of this post. I set up a rigid test stand for the ESP-01, so I could get consistent data with each test. I even made sure I sat in the same place for each test. I used the two strongest networks for my tests, my home and my shed wifi. I live rural, there are no other networks within 500m. For the standard ESP01 I was getting average readings of -74dbm and -39dbm. The first modification was cutting the factory aerial trace and soldering a length of wire 100mm long in its place. I then started cutting bits off and recorded readings with the length of the remaining wire until I had passed the peak reading and was making things worse. Then using the length I recorded for the best signal, soldered on a new wire and cut to length. Lastly I added a ground dipole to the back of the ESP01 the same length. This gave me readings of 71dbm and 31dbm, a respectable improvement. One final test was to cut the ground wire on the PCB aerial, as suggested on some sites. I wasnt to sure about this, its a tuned length, not really a short to ground at those frequencies. Cutting it gave bad results, -84 and -40. So thats that, a good improvement and I hopefully will get a open field range of over 200 meters, thats all I needed for this project. #include "ESP8266WiFi.h" void setup() { Serial.begin(115200); // Set WiFi to station mode and disconnect from an AP if it was previously connected WiFi.mode(WIFI_STA); WiFi.disconnect(); delay(100); Serial.println("Setup done"); } void loop() { Serial.println("Scan..."); // WiFi.scanNetworks will return the number of networks found int n = WiFi.scanNetworks(); if (n == 0) { Serial.println("no networks found"); } else { Serial.print(n); Serial.println(" networks found"); for (int i = 0; i < n; ++i) { // Print SSID and RSSI for each network found Serial.print(i + 1); Serial.print(": "); Serial.print(WiFi.SSID(i)); Serial.print(" "); Serial.print(WiFi.RSSI(i)); Serial.print("dbm "); Serial.println((WiFi.encryptionType(i) == ENC_TYPE_NONE)?" ":"*"); delay(10); } } Serial.println(""); // Wait a bit before scanning again delay(2000); } Edited 2024-03-06 09:56 by Gizmo The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
poida Guru Joined: 02/02/2017 Location: AustraliaPosts: 1422 |
now this is right up my alley. I've got a ESP32Wroom to play with. It has two cpus, one running wifi and other system stuff, one running your application. It seems really powerful. It has huge flash ram. programming is easy with ESP's supplied support for Arduino IDE. The tests I ran showed the wifi worked well, with not much in the way of drop-outs or disconnects from network. wronger than a phone book full of wrong phone numbers |
||||
pd-- Senior Member Joined: 11/12/2020 Location: AustraliaPosts: 122 |
Thanks Gizmo, the ESP01's re a bit dismal with there WIFI performance |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6111 |
An interesting and useful experiment. It looks like you have ended up with a 5/8th wavelength antenna with matching network. That is an arrangement that I really like but have only constructed for 145 and 440 MHz. I prefer the ESP32 over the ESP01 and they can be purchased with an external antenna socket. For your rover, the ESP01 is more than enough. Jim VK7JH MMedit MMBasic Help |
||||
Print this page |