Wire antenna for Lolin/Wemos D1 Mini - Page 1
Forum section: electronics / rf-microwave

author: Peabody
author_rank: Super Contributor
timestamp: October 26, 2019, 10:00:26 pm
content: I volunteered to help a friend build a mailbox notifier, but have now found that his mailbox is entirely enclosed in a brick column except for about one inch sticking out at the front. Similar to the one in the second pic.I assume that the trace antenna on a D1 Mini is not going to get the RF signal through the brick. Does that sound right? If so, what about connecting a very long 22-gauge solid wire as an antenna, and routing that from the back of the mailbox interior where the Mini will be, up to the front, through a hole in the exposed shell, along the facing brick, and turning the corner to run along the side brick for a bit so it san "see" the house. Hopefully from that position the signal would reach his Wifi router inside the house. So the total length of the wire would be maybe two feet. Longer than your typical 2.4GHz antenna.The Mini's trace antenna is shown in the first picture. There is no ground plane under the antenna part, but it looks like the wide trace on the left connects to ground. (I don't understand why that doesn't ground the antenna.) Anyway, where would I solder on the wire?It should be obvious that I know nothing about antennas, so I don't know if this is ridiculous or not, but I have a vague memory about antennas being 1/4 wavelength, but they could be 5/4, 9/4, etc., so I thought maybe the added length wouldn't necessarily be a deal breaker. On the other hand, impedance might be an issue.I guess I should have a D1 Mini Pro for this, but what I have is D1 Minis.Well, any comments or suggestions would be appreciated.

author: E Kafeman
author_rank: Regular Contributor
timestamp: October 27, 2019, 05:04:37 am
content: >what about connecting a very long 22-gauge solid wire as an antenna,It is a bad idea. Most energy will be emitted at first inch of cable length and making signal weaker for each inch.When cable will be leaving mailbox is it an almost non radiating antenna. No idea to route a dead cable around all bricks.For antenna signals are coaxial cable used to avoid problem with losses before signal reaches antenna.Routing a coaxial cable outside of all bricks will look like a poor performed job? There must be better alternative?What about DC power cabling for your ESP circuit? Guess you not want to replace battery each week so there must anyway be a DC adapter somewhere, with cables routed to PCB?If there not yet is done any installation, a possible idea is to drill a 4 mm hole in concrete between two bricks from the back of post box and route cables for DC and antenna that way. All cabling can be routed in concrete making them more or less invisible and then also more protected from weather and vandals.At PCB must coaxial cable be connected properly. Both center wire and ground. Make a cut in PCB to disconnect current antenna.A picture of a direct soldered coaxial cable:https://electronics.stackexchange.com/questions/213433/can-i-solder-a-rg316-coax-directly-to-a-pcb-instead-of-using-the-intended-sma-coWhen coaxial cable reaches outside of the bricks, if needed antenna coverage not is very long, can it be enough to remove braid for 30 mm and weather-protect cable and braid with some shrink tubing and fasten it with silicone directly at concrete.Coaxial cable and antenna of this type can maybe be taken from an old router:https://www.globalsources.com/gsol/I/RF-cable/p/sm/1006923991.htm#1006923991To make it more simple to install can a ufl connector be soldered at PCB instead of coaxial cable.If soldering at PCB seems too complicated, place whole PCB in a box at backside of the bricks, just having cables for sensor in the drilled hole.Existing PCB antenna can then maybe give enough coverage.

author: Peabody
author_rank: Super Contributor
timestamp: October 27, 2019, 06:14:00 pm
content: Quote from: E Kafeman on October 27, 2019, 05:04:37 amThanks very much for the reply.QuoteI think I understand about the coax. But would it be possible to add plain wire to extend the antenna length from the existing 1/4 wavelength to 1/2 or even full wavelength? It would all be inside the mailbox, but it seems that should make it more likely to work if there's any chance at all that it will transmit through the metal box and the brick.Power will be provided by an 18650 battery. Battery power will be switched on by opening the mailbox door. The attached schematic shows the power circuit, except that I will be using a better mosfet than the one shown there. The entire circuit, including the battery, would be inside the mailbox, so there is no need to route power. Since power will be completely turned off except for the 10-20 seconds needed to send the notification once a day, I hope the battery will last a lot longer than a week.QuoteYes, I think that may be a better option than trying to add a real antenna to the board. And I guess there is some chance the trace antenna will work well enough as is to get through the metal mailbox and the brick. We will certainly try that first.

author: E Kafeman
author_rank: Regular Contributor
timestamp: October 28, 2019, 03:18:35 am
content: It was a nice way to turn on/off the circuit.I did mentioned it because many forgets that ESP8266 is rather power hungry and will not last long if continuously active and powered by a few small battery cells.QuoteYes it is possible but with bad result if not PCB tuning circuit is redesigned to match the new wire length. Current circuit is tuned for around 50 Ohm load, same as the load created by at PCB embedded antenna.It is a optimized impedance match (Radio 50 Ohm <-> Antenna 50 Ohm), any else antenna load will result in less radiation. As most other wire lengths will give loads long away from 50 Ohm will result be a much less effective antenna function.There is a problems related to trying to transmit inside a small metallic chamber as chamber then is affecting antenna impedance.Box do maybe leak somewhat around door opening but signal reaching the house that way will be very weakened.

author: Peabody
author_rank: Super Contributor
timestamp: November 04, 2019, 03:53:10 pm
content: I tested the device, and wifi works fine when it's sitting on the top of the brick pedestal, but neither the D1 Mini nor my phone get any wifi inside the box. I should say, however, that the Mini does work from inside a metal mailbox (with no brick). So it's the brick, not the metal box, that blocks RF. That's surprising to me.One option is to drill through the back of the mailbox and brick and mount a wifi antenna on the back of the pedestal. But I wanted to ask about this option:> When coaxial cable reaches outside of the bricks, if needed> antenna coverage not is very long, can it be enough to> remove braid for 30 mm and weather-protect cable and braid> with some shrink tubing and fasten it with silicone> directly at concrete.So instead of mounting an official wifi antenna on the back, would it work to just have the exposed center conductor of the coax hanging down? In terms of gain, how much would I give up as compared to using a 5dBi wifi antenna?The idea would be to use a D1 Mini Pro, which has the u.fl connector built in, and a u.fl pigtail, but cut off the other end to make a bare wire 2.4GHz antenna. The coax used for these pigtails is 1.37mm OD, which seems quite small.Then I also thought about getting a longer pigtail, bringing it up to the front, out through a small hole in the exposed metal lip of the mailbox, and around just to the side of the brick pedestal. My guess is even the bare wire antenna would work on the side brick well enough, probably mounted vertically to the brick.What do you think about these alternatives?

author: GeorgeOfTheJungle
author_rank: Super Contributor
timestamp: November 04, 2019, 04:33:06 pm
content: I'd try this first:QuoteMaybe... who knows?Also check that you've got a good enough LDO in the wemos:https://www.reddit.com/r/esp8266/comments/9iizx4/warning_clone_wemos_d1_minis_with_only_150ma_33v/

author: E Kafeman
author_rank: Regular Contributor
timestamp: November 04, 2019, 04:35:52 pm
content: >So it's the brick, not the metal box, that blocks RF-Wrong. Metal reflects RF, zero signal will leak even for thinnest metal shield.Bricks in nearfield does mainly attenuate RF.Compare sunlight. It reflects in a mirror but absorbs by a tree.If you detect a RF from inside a metal postbox is it because it is leaking. Guess leakage mainly is around opening.> In terms of gain, how much would I give up as compared to using a 5dBi wifi antenna?If both antenna alternatives are mounted in similar way? If both antennas are mounted at top of pedestal, pointing upwards, will difference be a few dB.If both antennas are mounted real close and along concrete will it reduce performance in similar amount for both antennas as concrete is loading/absorbing RF signals.Use same D1 unit as you tested at top of pedestal and place it at other locations along pedestal to see difference. Value in dB can be read at the indoor router.>The coax used for these pigtails is 1.37mm ODYes but it is way better and less losses then trying to route signal along a unshielded electrical wire.

author: Peabody
author_rank: Super Contributor
timestamp: November 04, 2019, 05:08:55 pm
content: Quote from: GeorgeOfTheJungle on November 04, 2019, 04:33:06 pmIt doesn't appear that would also increase receive sensitivity. But I'll give it a try.With respect to the LDO, for that very reason I took the precaution of ordering the Mini directly from Lolin. My understanding is the LDOs used on genuine Lolins are the right kind. The marking on this one is S2RK.

author: Peabody
author_rank: Super Contributor
timestamp: November 04, 2019, 05:20:54 pm
content: Quote from: E Kafeman on November 04, 2019, 04:35:52 pmThat makes sense. So if the existing Mini works with the trace antenna pressed against the brick, then the 31mm bare wire antenna mounted vertically against the brick is also likely to work. Well, except for losses in the coax. That could make a difference.

author: ogden
author_rank: Super Contributor
timestamp: November 04, 2019, 05:30:15 pm
content: It is highly unlikely to get 2.4Ghz signal out of that thing. I would drill small hole in the back right below overhang to route coax cable out, install small rubber antenna horizontally. Hardly anybody will notice it in the shadow of overhang.Quote from: Peabody on November 04, 2019, 05:20:54 pmPCB antennas are quite good - if tuned properly. Most likely you will no see any gain from using "bare wire antenna" compared to built-in PCB.http://www.ti.com/lit/an/swra117d/swra117d.pdf

author: GeorgeOfTheJungle
author_rank: Super Contributor
timestamp: November 04, 2019, 05:58:53 pm
content: Quote from: Peabody on November 04, 2019, 05:08:55 pmIt won't. But the router's radio is almost sure more powerful than the esp's, so (if receive sensitivities are equal) it will be the first to lose the signal, before the esp loses the router's. If by chance you happen to be in that range, this might fix it..

author: Peabody
author_rank: Super Contributor
timestamp: November 17, 2019, 04:06:25 pm
content: I've received a clone D1 Mini Pro, and will be switching the jumper over to use the external antenna connector. My friend really doesn't want to drill through the back of the mailbox and the brick, but instead wants to bring the pigtail up to the front, through a small hole in the exposed lip, then around the side of the brick to where the antenna can see the house. The antenna would just be 31mm of braid-stripped center conductor at the end of the coax cable. I have a 100cm pigtail with a u.fl connector that I hope will work. But it's like 1mm diameter coax, so the center conductor may not make a very good antenna.I found a Youtube video that says the calculated length of a 1/4 wavelength wifi antenna (31.25mm) is too long because signal speed in copper is 5% slower than the speed of light in a vacuum, and because the insulation on the exposed conductor further slows things down another 5%. He claims this is why most wifi antennas are closer to 27mm. I don't really have any way to measure what works best in this situation. It either works or it doesn't. So I think I would start at 31mm, and only cut it down if it doesn't work. Does that sound reasonable, or is he right that it really ought to be 27mm in the first place?I don't have high hopes for this. But, you know, it doesn't have to be a very good or fast wifi connection to work. So maybe this kind of antenna will work well enough.One change we made was to power the device from three lithium iron disulfide AA cells. These are not rechargeable, and expensive, but are nominal 1.5V, have stable internal resistance throughout their life, and do very well in cold weather. And they are sold in the battery rack of my supermarket - about $2 each.

author: E Kafeman
author_rank: Regular Contributor
timestamp: November 17, 2019, 04:47:01 pm
content: It is correct that a more ideal length is 5-10% shorter then 31 mm due to inner isolation dielectric properties, but as you not have any controlled ground plane or quarter wave ground length will ground impedance be a much bigger problem.Do not care to much about antenna mm lengths, you have so much bigger problem before caring about that.1 meter pigtail will cause losses more then what a few mm antenna length will affect coverage range for example.Simplest way to know is to do a practical test.Do a quick test with the long cable routed around the pole. Read RSSI at router and you know actual margins and if something must be improved (shorter pigtail, better antenna).My guess is that coverage distance will be good enough, with a RSSI value in range -80 dBm or better.

author: Peabody
author_rank: Super Contributor
timestamp: November 17, 2019, 11:54:16 pm
content: I can't find it now, but I've seen a Youtube video in which instead of cutting off the 30mm of braid, the braid is folded back on top of the coax, extending for 30mm. Would this act as a ground plane? Would it make the antenna perform better?We will make the pigtail as short as possible. The only alternative we had was 50cm, which would not be long enough. The mailbox is about 46cm deep.I don't know what kind of router my friend has, or whether it provides RSSI information.

author: E Kafeman
author_rank: Regular Contributor
timestamp: November 18, 2019, 01:09:37 am
content: A complete dipole antenna is as its name suggest, two poles. One pole is the length of exposed inner wire. The other length starts from where exposing begins. This other length can be same as center wire length [~30mm] of much bigger. If much bigger is it a ground plane (and single antenna-pin is named monopole) but if length is similar to center wire is it the other pole of a dipole antenna.Depending on selected design, can correct impedance be set by adjusting lengths and angels of all involved parameters.Placing antenna close to concrete surface will also be a complicating impedance factor and will probably also affect radiation pattern.If you have an old router antenna, a black plastic tube of about 80 mm length, can it often be opened. Inside will you find a stripped coaxial cable and metallic sleeve connected to braid as a second pole.Copy or remove sleeve and place it on your cable in similar way.Or can you leave it as it is now as you in any case not intend to measure and adjust impedance. It is good enough to do a initial test if by router received signal level is usable or how much it is away from needed signal level.Each youtube video about this matter, how to best make an coaxial cable antenna, will have its own way to do do it, and none of them will include your postbox pole, which probably is one of your most critical antenna problem.Most routers that have a WiFi interface, do also have a row for each wireless connected unit, where you can read received signal strength, connection type, IP-address and more.