'hacked' an external WiFi antenna onto a mains powered device. Got 120Vac on it. - Page 1
Forum section: electronics / beginners

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 01:18:36 am
content: I have a mains (240V UK) powered heating controller hub thing. It's a wifi & zigbee boiler controller.The WiFi module on it is an off the shelf Microchip one, but it only has a PCB antenna on it. Microchip do a version with a u.FL connector, but this thing doesn't have that version.I have found the WiFi performance of it to be unsuitable and the shape of our house to make it difficult to run the necessary cables. I have other options, but for now I thought I would try what a number of ESP8266 users have done - cut the tracks to the PCB antenna and solder a coax -> SMA for an external antenna.I've done it, and I'm pretty sure I've done it right, although I was a bit confused about how I was able to get ground from part of the same PCB-antenna track as the main part, if that makes any sense. The PCB antenna comes out past a resistor, then most of it zig-zags to the left, but a little bit makes an L-shape to the right. After I cut both sides, it seems the small side was connected to ground. That's not what I was expecting, but I used it anyway.Now I put it all back together, WiFi performance according to the figures on my router (a Mikrotik that gives some useful info), shows an improvement from the previous -76dBm to -79dBm, up to -69dBm to -66dBm.However I wanted to try an alternate location for it - a different wall.When I went to move it, I felt a buzz from around the bottom of the antenna socket.I put my meter, in AC, between myself and the ground of the SMA connector, and it shows 120V AC.I've opened up the unit again and I can see that my coax is not at all in the area of high voltage.Apart from telling me off for messing with things I perhaps shouldn't, could somebody shed any light?I'll post pics in a minute.

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 01:28:21 am
content: pics as promised:

author: cdev
author_rank: Super Contributor
timestamp: January 02, 2021, 01:33:59 am
content: Its certainly the power supply for the wifi device. - its got a short that's putting the mains voltage where it shouldn't be. Probably its also on the outer conductor of the DC power cord and that resulted in - what you found.You're lucky you get away with just a mild shock. Whatever they did they should know about it.That may be a dangerous product.

author: wraper
author_rank: Unknown
timestamp: January 02, 2021, 01:34:52 am
content: The same thread yet again. There is nothing unusual, nothing unsafe, you have double insulated power supply. So it's not grounded. Output floats at about half of the mains voltage due to noise suppressing capacitor(s) connected between input and output. Leakage current is small and not dangerous.Something like this:

author: wraper
author_rank: Unknown
timestamp: January 02, 2021, 01:36:09 am
content: Quote from: cdev on January 02, 2021, 01:33:59 amFrankly I would think you should know better.

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 01:37:58 am
content: Quote from: wraper on January 02, 2021, 01:34:52 amI did wonder, with it being half of the mains voltage.Normally this is a sealed unit with no metal that can be touched, and no earth connection either. Obviously I have altered it. Have I made it dangerous now? The buzz that I felt, and the 'floating half of mains voltage', could it do any harm?

author: cdev
author_rank: Super Contributor
timestamp: January 02, 2021, 01:40:35 am
content: I have a similar issue with my Feeltech siggen, but there the current isnt enough to feel. And its much lower voltage too, not 120 volts.. But it does show up when its measured.I also have line voltage of 120 volts. So half of that is 60v.I think we're both right.I don't think those capacitors are the right way to go at all.Quote from: wraper on January 02, 2021, 01:36:09 am

author: wraper
author_rank: Unknown
timestamp: January 02, 2021, 01:45:56 am
content: Quote from: carl0s on January 02, 2021, 01:37:58 amThen this is different and your mod is dangerous. Upon some further inspection this thing uses uninsulated PSU.

author: cdev
author_rank: Super Contributor
timestamp: January 02, 2021, 01:50:20 am
content: Its not the antenna thats problematic, its the exposed electrical potential on the shield. Lots of devices (many routers do this) incorporate the wifi antenna in the PCB or somewhere inside their enclosure.

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 02:01:37 am
content: Yes I'll have to have another go but with an in-box antenna of some kind. Or maybe just forget it and go about putting yet another low-power Wi-Fi AP in the utility room with the boiler. I wish everything wasn't just WiFi.. I am adding Wi-Fi APs in stupid places for little things. I had to put a small WiFi AP in the electric cupboard so that the power-monitoring thing (Iotawatt) could be used.. put a small AP turned down to 3dbm output in there.The original antenna you can see there as part of the module. It's a PCB antenn, the zigzag tracks. Microchip says it is 0.3dBi gain I think.

author: cdev
author_rank: Super Contributor
timestamp: January 02, 2021, 02:05:02 am
content: A quarter wave monopole would work, or a small patch of copper sheeting also works, quite well if its the right size. Need to go downstairs and rustle it up out of the junk box.Sometimes you can connect two bigger antennas to one another with a piece of coax...to bridge two areas. (A "passive repeater")Quote from: carl0s on January 02, 2021, 02:01:37 am

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 02:17:02 am
content: Thanks. It's a shame, because it all worked out in the end, except for the life endangering part. Lucky it was me who felt it and didn't just leave it for my girlfriend to discover!As they say, you live and learn. Although I still don't understand the principles, I will take care to look for floating grounds on mains voltage stuff and remember that it can be on what I see as the low voltage side as well.Before taking this apart and drilling a hole into the side of the case, I did check that I could pick up a replacement unit off eBay for £20!

author: S. Petrukhin
author_rank: Super Contributor
timestamp: January 02, 2021, 02:27:28 am
content: If you are confused by the weak potential on the metal part of the antenna, cover it with an insulating varnish.

author: Monkeh
author_rank: Super Contributor
timestamp: January 02, 2021, 02:47:06 am
content: Quote from: S. Petrukhin on January 02, 2021, 02:27:28 amNo. I know you're not used to modern safety standards over there, but that's not an excuse.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: January 02, 2021, 03:07:02 am
content: Quote from: Monkeh on January 02, 2021, 02:47:06 amThe insulation of the metal parts also meets your safety standards. The manufacturers of this device did so, apparently, and avoided the use of grounding. Do not like the varnish - close a separate plastic box, but be sure to get a safety certificate on the box and check for insulating properties.

author: Monkeh
author_rank: Super Contributor
timestamp: January 02, 2021, 04:04:22 am
content: Quote from: S. Petrukhin on January 02, 2021, 03:07:02 amWhat metal parts? It's a plastic enclosure. A little varnish does not make for safe insulation.

author: amyk
author_rank: Super Contributor
timestamp: January 02, 2021, 04:58:11 am
content: My guess upon seeing the title was "cap dropper", but it turns out to be a more powerful - and also non-isolated - buck regulator....you could try using a piece of mains cord with the end capped off as the antenna, that will definitely be enough insulation and should not affect the signal strength that much, especially given that your modded antenna has a plastic cover anyway.

author: CJay
author_rank: Super Contributor
timestamp: January 02, 2021, 10:09:44 am
content: If you strip the rubber ducky plastic off it you end up with something similar to this:https://martybugs.net/wireless/rubberducky.cgiNot hugely useful in itself but there are antenna which are made more cheaply and instead of the RP-SMA plug/socket, come with a length of coax that's terminated with a U-FL, Hirose like the one in the attached pic or even soldered.I reckon if you tear one down you could glue it to the inside of the enclosure on the side where you fitted the RP-SMA plug and get good performance.Would probably recommend covering it with heatshrink so it can't contact anything inside if it moved.If you like, drop me a PM and I can chuck it in the post for you?

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 10:33:19 am
content: Quote from: amyk on January 02, 2021, 04:58:11 amThat's an interesting idea, however I think it would be far too large to solder. The coax pigtail that I used there is 1.13mm O/D. I had to do all the work under the microscope.I was thinking about it some more (while trying to get to sleep at 3am ;-) ). I think I'm going to rip apart the antenna that I've used, and solder it directly, so no pigtail or anything. Then fixup the hole that I've put into the side of the unit of course!

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 10:53:08 am
content: Quote from: CJay on January 02, 2021, 10:09:44 amI think we were writing posts at the same time. Thank you for the offer of posting me that antenna! I do have a few here already though and also various ancient Netgear thingies that I've taken off site that I can pull apart.I am going to do as you've said though - dismantle, solder direct, and glue to the inside.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: January 02, 2021, 11:26:54 am
content: Quote from: Monkeh on January 02, 2021, 04:04:22 amConnector has naked metal.Will the shrink tube suit you?

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 11:34:54 am
content: Quote from: S. Petrukhin on January 02, 2021, 11:26:54 amYou know that I added the connector, yes? From the factory, it is a PCB-antenna only.

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 12:58:54 pm
content: I've just moved the box to a different wall in the same utility/boiler room - which is technically outside - that's the problem, a third of the house, the left edge (kitchen, utility room, other bit), is a single storey extension and so has thick walls between itself and the main area where the ceiling WiFi AP is. Also being single story, I'm a bit stuck for throwing CAT5 or other cables over the ceiling - there's no rooms above with floorboards that I could lift, and of course plastic trunking isn't wanted in a house. I'm going to have to pull apart a plasterboard ceiling and make good afterwards if I want to run cables. Going around the outside of the house doesn't seem straightforward either. If I could fit it where the existing electro-mechanical thermostat is fitted, that would be a dream, but alas they have run 4-core cable and I need 5 cores.Anyway I've moved it to another wall in the utility room for testing. This is a location I tried previously too, and I now see -57dBm overall signal strength reported on my access point, and a signal to noise of 50 to 52dB. This is a drastic improvement on -76dBm ~ -79dBm with an snr of 30dB that I started out with!The true test however, with this Drayton Wiser Hub R, is to send an HTTP request to it. Pings are usually fine, but if you send an HTTP request (just put the IP into a web browser, which should return a HTTP 401 Error Unauthorized', and keep clicking refresh, how many times you can click refresh without it hanging and resetting the connection seems to be the true test of whether it's going to work properly or not, i.e. whether the App on your phone is going to sit there and hang for 5 minutes saying that it's "Searching for your Hub..."I am still having this problem though, so while the WiFi numbers reported on my AP are better, it's still not reliable enough. It is much better, and I suspect I will be able to find a reliable location inside the utility room now with the improved antenna. I am going to do as I said above and fit the antenna internally, then find the best location in this room. If, even with the improved WiFi, it's still not good enough, then I'll put another small AP in the utility room, probably running off a HomePlug Powerline adapter for now, until I feel ready to rip the ceilings apart.Incidentally, I have had it sat in the livingroom (same room as WiFi AP) for a few days and don't have the problem there.I think there is some sort of design flaw in this hub overall though, perhaps in its HTTP server. For it to respond to pings just fine, but then the HTTP request hangs, and one hang causes the whole HTTP side to die for a minute or more at a time, all the while it's responding to pings just fine, makes me think that the HTTP server can only handle one connection at a time or something, and has a long timeout. It seems to be very unresilient anyway.

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 02:26:37 pm
content: This antenna has an interesting construction.I'm almost certain it's 2.4GHz. I think it's one of a few that I ordered from Farnell to try with the HackRF. It's SMA instead of RP-SMA, or something. Other way round to usual WiFi antennas anyway.I never realised the knurled barrel at the bottom was all-metal. I always thought it just had a conductive sleeve inside and was plastic. That might explain why I so easily felt that 120V.

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 03:11:29 pm
content: I don't get it.I've now done what I thought to be a thoroughly lovely job, but the performance is terrible!It's mounted inside, no pigtail, connections all good, although cable strain a possible concern (bending around the board), and it's pretty much in-line with the keep-out zone of the board, i.e. no ground plane, yet now the performance is abysmal. Same antenna as before, minus the pigtail etc.I wonder if this antenna doesn't like having that 120v AC on its ground?

author: bdunham7
author_rank: Super Contributor
timestamp: January 02, 2021, 03:21:13 pm
content: If your original modification worked well, you could try isolating the antenna ground with a capacitor. Just strip the outer shield off of a small section of the coax and then bridge it with a small, say 47pF Y-rated, capacitor. You may still measure some voltage at the metal connector, but the current should be miniscule.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: January 02, 2021, 03:34:03 pm
content: Your antenna inside may receive interference from the PCB. In addition, any transmitting antenna requires matching. I don't know much about this theory, but a mismatched antenna can reflect the signal back to the transmitter, rather than sending it over the air.In addition, there are many reflected waves in the room. It may happen that two waves fly up to the antenna, and one of them is reflected in such a way that it is in the opposite phase of the first and, accordingly, will weaken the total signal. It is enough to move the antenna a few cm (12.5 cm wavelength) so that the direct and reflected waves are combined - this can significantly improve communication. My notebook has 100% signal on one edge of the table when it sees the router's transmitting antenna, but almost loses signal on the other edge of the table when it has to receive the reflected signal.

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 03:41:07 pm
content: Hmm. Thanks for the thoughts and ideas.I think should have just gone for this style of antenna to begin with.. going to try it now. Shame I already made a hole that's too large for this.

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 03:45:58 pm
content: Just before I change the antenna again, I am going to remove the heatshrink to see what difference that makes, although I'm not comfortable leaving it off permanently. It's quite thick (was a little on the large side to before heating).I have already popped the antenna out through the hole, it helped a bit but not enough.update: ok, no, removing the heatshrink made no difference. Time to change the antenna.

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 03:55:26 pm
content: Even when sticking outside the box, the performance isn't good now. Weird.Either I damaged the RF module with static, or the antenna tuning includes the coax length or something, and I've made it shorter?Anyway, time to try that other small white all-plastic external antenna!

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 05:13:54 pm
content: She's all good now, and looks better for it too. Sorry about the blurry final photo. It's now sat opened up so that the glue-goo can be left to set.I needed a spacer, and a washer due to the size of hole I had made, and so it all kind of worked out well in the end with two of the SMA nuts. One as a spacer&washer, and the other threaded into the end of the plastic antenna.Results from my access point suggest a good connection. I still see some packet loss and other stuff though, but I'll persevere with that, maybe look at the adaptive noise immunity settings and stuff - some tinkering.

author: cdev
author_rank: Super Contributor
timestamp: January 02, 2021, 05:17:54 pm
content: At 2400 Mhz, impedance mismatches are really easy to create. I have not been able to make a u.fl plug (also called ipex mhf it seems) so I just buy them premade with pigtail. I haven't used them much, just twice, they only can be unplugged and replugged a few times, also I am afraid for my hand-soldered sockets staying on too.But I have been able to use the sockets without major lossiness.

author: carl0s
author_rank: Unknown
timestamp: January 02, 2021, 05:48:25 pm
content: Quote from: cdev on January 02, 2021, 05:17:54 pmYeah I'm not sure what the deal is with the labelling of 'IPEX' on the board. There's two versions of this module, one has a uFL connector (ipex), the other (this one) doesn't. So why the silkscreen says IPEX, and on the antenna part too, is beyond me. Datasheet here:https://ww1.microchip.com/downloads/en/DeviceDoc/ATWILC1000-IEEE-802.11-bgn-Link-Controller-Module-Data-Sheet-DS70005326C.pdfand yeah, I gather Hirose test plug/unplug up to 30 times. I have also been caught before with a plug coming off the end of a laptop's WiFi antenna while dismantling due to a not too strong crimp. That one that I have used above, taken from a Netgear plug-style WiFI repeater (receive 1 wifi signal, send out another with -EXT added to the network name), was very well attached! It was both soldered and tightly crimped from what I could tell. Mind you the coax itself was pretty horrible. The shielding was weak, dull and flaky.

author: amyk
author_rank: Super Contributor
timestamp: February 28, 2021, 01:37:37 am
content: Chinese manufacturer makes similar mistake: