RCWL-0516
RCWL-0516 copied to clipboard
False triggers
I used this sensor with a esp8266 and i have a lot of false triggers. Seems to be strongly affect by the wireless network , in general , by strong electromagnetic fields . I tried to place him at a considerable distance from esp8266 and I used a lot of decoupling capacitors. Sure that the false switching operations were far fewer . I would like to know if anyone met this problem and how to solve it . If I mount a metalic shield on the back of the sensor, may this affect its detection properties ? Thanks .
I've been struggling for WEEKS with a miniature DIY motion detector device built with RCWL-0516 + ESP8266 + mini 5V P/S. It sometimes works flawlessly for hours then starts giving false triggers repetitively ... I even tried to get the radar sensor out of the casing in case it would work better when distant from the ESP, but to no avail :-( I think this sensor is definitely prone to interferences and not reliable enough to be used in a motion detector device in the long run. The only thing I haven't tried yet is to use a strong capacitor across the VCC input of the radar sensor, but I doubt it will help ...
Maby an isolated DC-DC converter can help to remove the interferences that come from the ESP to the RCWL over the supply voltage. I suggest some ferrites on the data and power cables to!
Good point. The P/S I am using right now is this one : http://www.ebay.fr/itm/401301418281 I'll try to power it thru my lab P/S for testing purposes and will come back here to comment the results. Thanks.
I think I found a solution. I just use the electrical source from the above link but without mounting a filter it does not work properly. I used a pi filter (1000 microfarad +10 ohm + 1000 microfarad) mounted on the sensor supply (Vin). Of course, if there are "parasite generators" around the sensor, such as mechanical relays or mechanical switches, false flashes may occur. I use it with a ESP 8266, and a SSR G3MB-202 that has its own snubbering circuit and at its command sometimes false flashes occur . I have solved these problems in the software by temporarily disabling the pin to which the sensor is bound.
Mine is undertest since yesterday with a single 1000uF capacitor directly soldered on the Vin input.
The false flashes have considerably reduced but not totally disappeared.
I don't currently have any relay nor switching devices in my circuitry.
Is this the way you wired your Pi-filter ?
https://www.dropbox.com/s/9bth6k8vvs6nznv/RCWL-0516.jpg?raw=1
Yes this is the configuration I've used .
A bit of update :: I tried to power my device with my lab P/S. No significative improvement, still having (random) false triggers. Then, yesterday, I reconnected my 1USD-Chinese power supply ( http://www.ebay.fr/itm/401301418281 ) but I used mariusb57's pi-filter (see above) between Vin and Vcc .... so far, so good ! I'll carry on with the testing for another 48hrs and will keep you all posted.
So far, soooooooooooooo good !!!!
The pi-filter (thanks to Mariusb57) works like a charm : I never had any more false triggers since I installed it between Vcc (+5V) and the Vin input of RCWL-0516 sensor !
I wish I could now understand the exact way this 'resistor-only' pi-filter works as (normally) a pi-filter is made up of an inductor instead of a resistor ... any clue ?
The pi filter is not my merit, I have read this : http://tech.scargill.net/microwave-for-the-weekend/...... and I have made experiences for several days....
I was a bit mistaken as it does not work THAT good.
Actually, as soon as I REcase the whole thing together (ESP + RCWL + P/S), it starts giving me again false triggers, particularly when the sensor stands very close to the ESP32E ... it's just disappointing for I wanted to make the whole device dense and compact.
If I can't get rid of those interferences between the ESP and the sensor, I will definitely have to rethink my layout and keep the RCWL-0516 outside of the casing as I confirm that it works flawlessly whith the pi-filter and some room (5cm) between the ESP and the sensor ...
Not only this I have other microwave sensors which works at different frequencies and all have problems if kept close to ESP chip. Even keeping little far from ESP once in a while I have false alarm, so I used 10uf + 0.1uf capacitors close to RCWL and this helped and I used software to determine whether its a false/real trigger.
I have played with a HB100 (similar idea to RCWL-0516 but at 10 GHz). The HB100 has just a low-level analog output ("IF signal") so amplifying and detecting circuit must be added. Listening to that output (through a preamp, with headphones) you can clearly hear the pulsing 2.4 GHz packets coming from my wifi hub even from 10 feet away. So it's clear these devices will be sensitive to wifi signals and if it's in a case right next to a wifi transmitter like the ESP device, I'm sure that can interfere. I have played around with HB100 in a microwave horn (cardboard and aluminum foil) and with the RCWL-0516 in a cookie tin as a "cup antenna" like http://www.microwave.gr/content/view/175/1/ and this does give me somewhat more directivity and range. If the wifi module was on the other side of the metal reflector, that could help reduce interference, but obviously using an antenna structure also increases the size of the device a lot.
By the way, Pin 12 of the IC on the RCWL-0516 device (it is an opamp output) gives you an analog signal somewhere between 0 and 3V that wiggles when you move your hand. So if you wanted to take that into an ADC input in a Arduino etc., you might be able to do some signal processing to detect or reject specific kinds of signals.
Hi, Does two RCWL 0516 on the same circuit, or on different circuits, affects each other?
I tested three boards in proximity placed XYZ 1 cm minimum apart and they all appear to work independently with no interaction or interference. Two on the same circuit RaspberryPi 3 (or Zero W), powered from 5v and connected to GPIO Pin7 and Pin11 work just fine.
https://pinout.xyz/ for reference. Latest raspbian has pinout from the command line.
Thanks for the note. I want to use two RCWL radars in the same enclosure. Can they be placed one BEHIND the other ? Two modules kept side by side appear to work without problems. But my application has a support structure right through the device, so I need to keep the two radars one behind the other. The sensitivity seems to have reduced drastically after this. Is that normal ?
The devices are omni-directional and it is only necessary to have one at each location maybe 2-3 m apart. This minute I placed a second device on top of the first, separated only by a piece of postit note as insulation and they respond almost at the same time. As the circuits are analog (op-amps, caps, resistors) the on/off timing is variable with each one being affected by local placement that changes the sensitivity. Both devices are connected by jumper wires approx 10 cm long. It is very important to keep all metal at least a cm apart. Stacked devices will have mutual interaction due to metal makeup of the boards. Once again, plugging directly into a breadboard with the mass of hidden metal contacts will seriously affect behaviour.
Has anybody found a way to make real use of this sensor? I would like to put it in a comercial unit, but I also get some false triggers with it. I am using the ESP12F. Does anyone know any other sensors with s similar form factor than are more reliable?
Have had the same problems. Resolved them by doing the following:
- Have the DC power feed to the ESP as close as possible to the ESP.
- Put a 2000uF capacitor as close as possible to the power input of the RCWL. The pi filter mentioned above is not necessary but the single capacitors to smooth out ripples to RCWL is.
- Put a 10k resistor between output of the RCWL and ground.
I also tried the following at the suggestion of others for the ESP: WiFi.setPhyMode(WIFI_PHY_MODE_11G); // puts ESP in G mode only WiFi.setOutputPower(8) ; // limits output power to 8/4=2 dbM WiFi.mode(WIFI_STA); // not quite sure what this does I do not know whether these have an effect or not. The second line where you limit the power certainly does. This may be due to the fact that when the ESP goes into transmit mode it draws power which causes a slight ripple in the power line which is sufficient to trigger the RCWL. The capacitor accross the power line near the RCWL mitigate this effect. Hope this helps someone .....
@syedamerali Happy you solved the problem by using the three steps you mentioned (plus the software tweaking). Will definitely give it a try. One question though : you mentioned that the DC power should be placed as close as possible to the ESP, but what about the RCWL ? Where did you actually place it in regards to the P/S and the ESP to be able to eliminate the false triggers ?
Actually the software tweaking does not make the slightest difference. Last night I ran it without the software tweaks but the capacitor in place - no false triggers. Therefore I would assume that there is very little significance to the statement that the 2.4 GHz of the WiFi interferes with the RCWL microwave frequency. I monitor the triggers through Homeseer HS3 with a Device History plugin which records each trigger with a date and time stamp and can display it graphically also - HS3 is control software that I use for controlling my home mostly z-wave. I have my ESP8266 mounted on a small custom board (which I designed and made myself) which has an onboard 3.3V regulator and I/O level shifters. This is fed by a 5V DC supply which is also feeding the RCWL - hence the statement 'closest to the ESP'. The ESP and the RCWL are about 50mm apart. I will try and post some pictures of my setup later today - like they say a picture is worth a thousand words. ..... regards
@syedamerali Any pictures of the working assembly ?
images are attached. (I think) I have also ordered a PCB with a ground plane let us see how that goes.
Thanks ! How is the +5VDC P/S supplied ? Via a battery or directly from the 220V AC via an AC/DC step down converter ? What's the role of the 3.300uF that can be seen in the background ? I'll try to stick as much as possible to such a layout and will post my results !
Some more pictures:
Graph of triggers for the last 24 hours - it is consistent with the activity in my living room.
The board I have designed and ordered - should be with me in a week or so.
To answer your questions:
- Power is supplied from a 2A 5V plugin adapter which is plugged into the wall and is away from the box which houses the motion detector. Initially, I had it inside the same box as the RCWL and ESP8266 - there were a lot of false triggers. I am not quite sure whether it was the lack of capacitance near the RCWL or whether the power supply itself was generating noise. It was one of these cheap switching power supplies which I got for a dollar off ebay.
- The capacitor in the background has been put across the 5V input. It seemed like the right thing to do - but this capacitor did not prevent false triggers. The one near the RCWL board did.
- The 10k resistor between the output of the RCWL and ground does make a difference.
- The 1k resistor is in series with a blue LED which flashes when there is motion. It is driven by the software in the ESP8266 through GPIO 0. hope this helps. regards
syedamerali wrote : Power is supplied from a 2A 5V plugin adapter which is plugged into the wall and is away from the box which houses the motion detector. Initially, I had it inside the same box as the RCWL and ESP8266 - there were a lot of false triggers. I am not quite sure whether it was the lack of capacitance near the RCWL or whether the power supply itself was generating noise. It was one of these cheap switching power supplies which I got for a dollar off ebay.
Here we go ... indeed, that's certainly what I should start with ... that is to get the P/S OUT OF the assembly !
As you say...1000 words, it certainly helps! The 'active' portion is pointing up, which is good. I am concerned about the mass of metal below the cat detector, power supply, cap and transformer; how about rotating the PS, cut off the central plastic web and get the PS well away. As the OUT is digital 3.3 v high, I wonder why you need the pull-down resistor?
I found that the OUT is current limited and you can hang ANY LED without a dropping resistor, which may be useful. I would scope the DC supply and see if there is much ripple. A low value cap may be needed on the RCWL power in. Also the mass of metal on the big cap is so close to the circular capacitor trace, may be best to put it outside the active area, if at all. Great photos! The concentric circles form the C and the serpentine trace on the top is the inductor L, forming an LC tank circuit oscillator. This is the primary oscillator and all metal should be kept well away. https://en.wikipedia.org/wiki/LC_circuit
I assume that the ESP is 3.3 volt compatible so I question the need for the logic level converter? It may be best to twist all power wires together, even though they are short.
The RCWL has the 3V3 voltage regulator output so it might be tried to power it with 5 v and use the 3V3 OUTPUT to power other circuitry under 100 mA.
Another thought is to power the whole thing with a mini or micro USB power supply and get rid of the cheap AC PS, remember you get what you pay for. :D
Sorry if I TL;DR, I often (always) view the images and comment and now see others have concerns over the metal mass of the PS.
This is my Cat Detector, a Raspberry Pi Zero W (for WiFI) sitting in a box near my front door, sees my neighbour and even me in my kitchen 2 rooms away grr! Any activity outside my door, cleaners, post (mail), visitors, neighbours cat; gets logged to a time and date file and it also tweets me and emails. Node-RED comes with the latest Rasbian.
pi@pi0-whitebox:~ $ ls -l -t * -rw-r--r-- 1 pi pi 25458 Nov 10 21:40 whiteboxNov10 -rw-r--r-- 1 pi pi 11600 Nov 10 21:40 whiteboxdelayNov10
pi@pi0-whitebox:~ $ cat whiteboxNov10 Fri Nov 10 2017 21:38:35 GMT+0000 (GMT) Fri Nov 10 2017 21:38:53 GMT+0000 (GMT) Fri Nov 10 2017 21:39:50 GMT+0000 (GMT)
This is CAT5 chewing my wiring from the Cat Detector. The detector is powered by a 5v USB plug (red) and the RCWL is green. The 3.3 v Blue LED is directly wired to OUT and GND with no dropping resistor (current limited) and the output goes into the Raspberry Pi 3 GPIO. Notice only one wire attached as power and ground comes from the USB plug.