jdesbonnet / RCWL-0516

Information about RCWL-0516 microwave proximity switch module (ICStation.com SKU 10630)
731 stars 106 forks source link

Question: Minimum range by R-GN adjustment? #11

Open iSuslov opened 7 years ago

iSuslov commented 7 years ago

Hello, thank you very much for your research. How do you think, is it possible to reduce its range to 30cm or even less, by adding high resistance to R-GN?

barewires commented 7 years ago

R-GN, Resistor Gain, is a feedback resistor added in parallel with installed 1 M ohm which will reduce the feedback of the 1st stage Op-amp. The circuit for the BISS0001 chip is almost identical with exceptions of the added 3V3 3.3volt regulator output and the removal of the non-retriggerable feature. Reducing the gain is the goal by adding a lower resistor. R = 1/((1/1000000)+(1/R-GN)) I will install a 1 M ohm 10-turn potentiometer, set initially to 100% and experiment with the function. I have two in my open side window, to detect my neighbours cat, and one with a 1 M in parallel is still too sensitive as they see me typing and mousing 2 m away to the side.

dibs commented 6 years ago

@barewires Did you manage to get some results? I am trying to limit range to maybe 2m if possible. Any tips woould be appreciated.

iSuslov commented 6 years ago

@dibs https://www.youtube.com/watch?v=YLMlRhxgTWQ watch this video from 4min. It is on russian language but briefly this is what happens: Guy said that he tried to adjust range with R-GN and failed to get desired results - range was limited but effective range was from 0.5m - 3m, so he did not want to exclude first 0.5m. So he started to experiment with antenna resistor on the other side of this board, and got accurate and desired results replacing 220 ohm resistor with.. see the video(first use adjustable resistance, find your desired range and replace with static resistance).

Finally: now he claims he can adjust from 5cm to max range, playing with antenna resistor. And since he also needed 2m range, his choice for antenna resistance appeared to be 165ohm

dibs commented 6 years ago

@iSuslov Wow, this is good news. I will attempt this tuning and let you all know how I get on. Sadly I can't understand much Russian though..

iSuslov commented 6 years ago

@dibs it is not necessary to understand what he is saying. Just look what he points to. I briefly explained the context. Basically this is the main point, replacing "antenna <--> ground" resistor with your own:

screen shot 2018-05-29 at 20 13 39
bachoo786 commented 5 years ago

Hello @iSuslov

I want to achieve a 30cm distance of detection range. What would be the suitable resistor to connect? Many thanks.

iSuslov commented 5 years ago

@bachoo786 I don't know man. Take a variable resistor, solder it instead of antenna resistor and find the right for you. I did not experiment on that yet.

bachoo786 commented 5 years ago

@iSuslov thanks.

Do I solder it with the R-GN?

iSuslov commented 5 years ago

@bachoo786 no, see my https://github.com/jdesbonnet/RCWL-0516/issues/11#issuecomment-392249631 why you should not use R-GN spot. You should solder it instead of antenna resistor like on the picture here https://github.com/jdesbonnet/RCWL-0516/issues/11#issuecomment-392770103 and empirically find the right resistance for your range.

To be clear, instead of this resistor:

screenshot 2019-01-09 at 23 34 03 copy

So, this antenna resistor (R9) looks like this

screenshot 2019-01-09 at 23 49 52

that means its resistance 220 Ohm, You should use trimmer resistor with variable resistance from 0 to 200 Ohm for your experiments. There is a relation between this resistance and sensor range. Less the resistance less sensitive is the sensor. So my guess will be that resistance should be something about 80 Ohm according to this guy experiments https://github.com/jdesbonnet/RCWL-0516/issues/22#issuecomment-395128341

Please tell me if it worked

bachoo786 commented 5 years ago

@isuslov so I remove the 221 ohm resistor and solder the variable resistor is that correct?

iSuslov commented 5 years ago

@bachoo786 yes. And than experiment by adjusting resistance. If you don't want to use variable resistor (trimmer resistor) you can try 80 Ohm resistor, it seems to change the range to 30-40 cm according to https://github.com/jdesbonnet/RCWL-0516/issues/22#issuecomment-395128341

bachoo786 commented 5 years ago

@isuslov thanks. I have a variable resistor and I can experiment it. However my variable resistor has 3 pins can you please show me where do I solder them on the sensor? I know the pins are vcc, gnd and data.

bachoo786 commented 5 years ago

@isuslov as per your photo you have not used pin 1 which is the ccw. I thought you should be using pin 1 ccw and pin 3 cw to measure the values but you are not doing that as per your photo?

iSuslov commented 5 years ago

@bachoo786 It is ok to solder it like this. It is easier to solder pins which are next to each other.

screenshot 2019-01-10 at 14 08 11

Since only two pins are soldered it is still in a variable resistance configuration not a voltage divider. Just go ahead, solder and take multimeter to measure desired resistance between soldered pins.

PS: And NOT, pins on variable resistor are NOT vcc, gnd and data. https://components101.com/resistors/3296-trimmer-potentiometer-pinout-datasheet

bachoo786 commented 5 years ago

@iSuslov sorry I have been away and back now.

I tried to solder the variable resistor and set it to 80ohms but the results are very flaky i.e. sometimes the sensor detects motion and sometimes it doesnt.

I am thinking of connecting the variable resistor across the data pin and ground in the main terminals near 3v3 and VIN. do you think that would work?

iSuslov commented 5 years ago

@bachoo786 Hi, actually I also tried this way and got similar results. It detects only fast motion and I don't like that. I would go with combination of soldered variable resistor PLUS variable resistor on R-GN soldering spot. Maybe experimenting with that will give some better results. I don't think manipulations with data pin is a good idea.

mtahle commented 5 years ago

@dibs https://www.youtube.com/watch?v=YLMlRhxgTWQ watch this video from 4min. It is on russian language but briefly this is what happens: Guy said that he tried to adjust range with R-GN and failed to get desired results - range was limited but effective range was from 0.5m - 3m, so he did not want to exclude first 0.5m. So he started to experiment with antenna resistor on the other side of this board, and got accurate and desired results replacing 220 ohm resistor with.. see the video(first use adjustable resistance, find your desired range and replace with static resistance).

Finally: now he claims he can adjust from 5cm to max range, playing with antenna resistor. And since he also needed 2m range, his choice for antenna resistance appeared to be 165ohm

Update: the defects was for another reason not related to the sensor itself, I am sorry. But I still doing my tests, I will submit any updates.

Hi, I tested this solution with about 10 Sensors but to of them was defected after a while I think this workaround solution could introduce issues by affecting Impedance matching between the antenna and the entire circuit which may bring unwanted signals and powers to the circuit. I still doing my experiments, and I need confirmation from others if any body else had the same issue. I want you to know that I am working in real environment where the sensor installed with other component to automate the lights switching in our company, reducing the range of detection and keeping high sensitivity is very important for our application. so I will keep doing tests to find best solution. Good luck everybody

ismailtan commented 5 years ago

I just received 8 of these sensors and I'm trying to reduce the sensing distance as well. I want to use these sensors to make 6 installations using 1 sensor on each installation. I need a distance of 2 meters (or smaller) between the installations.

Sensing distance out-of-the-box for me is around 3 meters. Ideally I would love to reduce the sensing distance up to 2 meters (or less). By adding a 1M ohm resistor on R-GN I'm able to reduce the distance with approx 40cm.

Adding smaller resistors are resulting in no triggers on pin-out and adding a couple of 1M ohm resistors in series (because of not having bigger resistors then 1M ohm) seems not to help reducing the sensing distance. The sensing distance is the same as just adding 1x 1M ohm resitor on R-GN.

Anyone figured out how to reduce the distance? Or has any other suggestions? I did not experiment with the combination of replacing R9 with a trimmer pot and adding a trimmer pot on R-GN. I'll report back when I tried this .

djay07 commented 5 years ago

Can anyone recommend a resistor to limit the distance to max 2 meters? I am not sure what to buy. I am new to this and trying to make it work. My sensor freaks completely out, since it even seems to "see" movement of my neighbors.

turbouk2312 commented 4 years ago

Sorry to bump this old thread, but did anyone get anywhere with limiting the range? I've tried a few resistors but I cant get anything sensible from the sensor after soldering them to R-GN pads. Ideally I'm after about 50cm-1m range.

edit: Anyway, I tried a 3.3m and a 10m resistor and neither made a difference. I've tried a 560k and it seems to have reduced the range to about 2m. So it seems the lower the value the shorter the range.

ismailtan commented 4 years ago

Just wanted to give it another try today and I figured out something promising.

Placing a 220k ohm resistor on the R-GN pads gave me a max range of around 10 cm or so and a 270k ohm resistor around 2 meters.

I tried to cut the max range in half by placing a resistor value of 245k ohm (1M ohm in parallel with 330k ohm in lack of having a 245k ohm resistor), but this also resulted in a max range around 2 meters. I'm guessing I have to ramp up from 220k ohm in smaller steps.

Will post more when I get the chance to thinker around more.

JohaGit commented 3 years ago

image

R-GN on backside: 943FDEFC-8CBF-4279-98AA-234BDAB9DFA3

R9 on frontside:

64CBB995-4F54-43B5-9492-A42129A3C586

Version of the RCWL-0516 board is the one with HT7133 chip for LDO (on the backside close to R-GN label) Circuit diagram with references:

Circuit diagram with references: 7A8360DF-D548-46C3-B0EE-DA8AD8A760FF

dlin4668 commented 3 years ago

@JohaGit I would like to learn how to understand this chart better.

1) Are these 5 points on the chart from your experimental results? 2) By putting different R-GN values parallel with R4 = 1M, the sensing distance will work from 0 (0.10Mohm) to 7 m (about 5Mohm)? 3) You are not suggesting to change R9 (220hm) at all?

Thank you!

JohaGit commented 3 years ago

@JohaGit I would like to learn how to understand this chart better.

  1. Are these 5 points on the chart from your experimental results?
  2. By putting different R-GN values parallel with R4 = 1M, the sensing distance will work from 0 (0.10Mohm) to 7 m (about 5Mohm)?
  3. You are not suggesting to change R9 (220hm) at all?

Thank you!

  1. Yes. Note that this is a radial “free” field. Any object in the vicinity like walls, carpets, metal cups, porcelain or red paint with iron oxide / metals , % water ( inherent in paper + wood) etc. will have various degrees of reflection, interference or attenuation. (quick-test : if it gets warm in your microwave it affects the detection). That means you have to bring a linear tuning pot (fine tuning) in series with a log pot (rough tuning) to adapt to you real world-environment and remember that you own body also absorts/reflects during setup. All in all I took about 40 readings with different scenarios but used this basic one since it matched reality with less modifications on the circuitboard. I have 5 boards, and the results were consistent between these instances. Of course, different factory batches might have slight deviations.

Note: I inserted two pics in my original post to ensure that everyone are aligned in the resistors we are referring to. Because there are unclarity in some other posts: Adressing your other questions:

  1. Yes. It is R-GN aka R3 in the circuit. You will see that the y axis is on the logarithmic scale. That means that there is extreme nonlinearity at small distances and quasi linearity at the furthest distance. Also, the red area (in my original post graph) is indicative of “ripples” in polar coordinate sensitivity around the receiver at distances 0-30cm.

2C6D8C29-31E7-4E01-A963-1938237DD45A

These fluctuations is caused by the dimensions of the metallic on circuit board itself starting to have a role on the radial sensitivity==> within that red area it makes a difference whether you are directly (in a plane) in front / behind the face of the (0 ° radians) circuitboard, or you movement is skewed with relation the plane of the circuitboard. For distances near the limit 7 , as said earlier, the response is quasi linear (from the graph perspective)- and since air has a resistivity of 2×1016Ω⋅m, a humid day near the beach (higher percentage salts) will cause nearly negligent differences.

  1. I tried it with both. But found it sufficient for my purposes not to change R9 at 220 Ω. Since this is a high frequency colpitts oscillator circuit, changing R9 affects the relative logarithmic sensitivity linearity within the reception range. Thats why playing with R9 values “bulge” sensitivity to the left or right within the frequency window. Changing R9 , thus may cause unintended “blind spots/flares” within the reception range, by saturating the transistor quiescent point faster (or “intended” detection windows if you do it emperically) . Like the Dirty Harry movies, if you feel you are having a lucky punk day - R9 tuning can hence be quick accidental luck tuning with some major side effects. Whereas R-GN tuning gets more sensitive but continuously predictable the smaller the distances are.
dlin4668 commented 3 years ago

@JohaGit

Thank you for your profound answers with the professional lab results.

I am asking my hardware colleague to modify the modules with either R3/R-GN or R9 solution before shipping, so I would like to be sure R3/R-GN installation is adequate.

Sorry for another questions:

  1. Could you comment about the first 0.5m problem raised by iSuslov regarding the video "he tried to adjust range with R-GN and failed to get desired results - range was limited but effective range was from 0.5m - 3m, so he did not want to exclude first 0.5m". May I assume they are related to "the red area" you have pointed out?
  2. On your schematic, I cannot be sure your R4 value (low resolution) is also 1MΩ and cannot find the 3.3V LDO. Is your R4, that is untouched, 1MΩ, the same as this link: https://raw.githubusercontent.com/jdesbonnet/RCWL-0516/master/doc/john_taylor_rcwl-0516-0.png
  3. Do you foresee any negative effect if I choose to use a trimmer resistor rather than a fixed-value resistor for R3/R-GN? I am curious whether you soldered with 5 different values each time. If you used a trimmer, could you let me know its part number.

Many thanks for your sharing!

JohaGit commented 3 years ago

Hi, I typed a 2 page response, submitted multiple versions -then there was a glitch - maybe you can ask the admin (jdesbonnet) of this thread to undelete my last comment(s) for you (I dont know how to undelete a comment in Github)

dlin4668 commented 3 years ago

@JohaGit

Acknowledged. I will install the R-GN with a suitable trimmer resistor and keep the original R4. Thank you!

(I have received some contents in my email account but the contents are not shown here.)

dlin4668 commented 3 years ago

@jdesbonnet I can receive some contents from JohaGit in email but cannot see those contents (and 2-page response) on this page. My email address is daniel.lin0913@gmail.com, if this helps.

JohaGit commented 3 years ago

@jdesbonnet I can receive some contents from JohaGit in email but cannot see those contents (and 2-page response) on this page. My email address is daniel.lin0913@gmail.com, if this helps.

Hi daniel, for the sake of efficiency, just capture my post in your email as quote and include it in an additional post of yours, so that it can then be reused by other members also interested on the answer...

dlin4668 commented 3 years ago

I am copying answers from JohaGit:

For Q1: "iSuslov Referred to the russian youtube video where the guy went and modified that 220 ohm R9 “dirty Harry” trick. And that is how electronics rewards him: by creating „blind“ spots in his case. No, the red area that I am referring to is that you can anyway not assume uniform radial sensitivity ina sphere around the board. Imagine that radial map as a 3D blob around the circuit for small distances."

For Q2: "Yes my R4 is also 1M ohm. If you cannot see that chip next to R-GN it means you likely have the older board so your 3.3V regulation is not that good. That can cause some further quality issues but not a show stopper."

For Q3: "No. A trimmer is ideal for calibration.a) Decide first what range you are interested in. b) Then lookup from the natural logarithm graph what the theoretical resistor should be say X ohm. c) choose a log potentiometer double that: ie 2X and a linear potentiometer in series which is ca. 10% of X (0,1 * X) for fine tuning. Connect them in series before soldering and calibrate them to X. Then solder them on without touching the knobs d) place the receiver in the environment where it should be. If indoors, the sensitivity is higher due to many reflections and interference patterns e) if you change the resistor values by turning the knob, start with the fine tuning first to calculate the range. Detecting a human is different than a dog or a moving metal part like a factory line with metal parts on it. remember to move your body away because your body is one big fat aerial with all that water content. If the calibration is done and you are happy and you intend to make it for multiple boards then replace it with 1% resistors. You can even fine tune it further to millimeters by scraping of carbon of a fixed resistor but that is a overkill for such a cheap chip. For a part number just type „log pot 1M“ in ebay and you can select all the variants there, for your closest match."

JohaGit commented 3 years ago

Thx dlin4668, it help a lot that I dont have to retype everything.

Some additional tips were lost, so I will summarize them : I) try to use a clean (small ripple as possible) powersupply. If cost is an issue , consider using a Pi (π) filter to substantially reduce the ripple. Since we established that you have an older circuit which have inherent stability issues , try adressing this. A pi filter works hand in hand with a voltage regulator. This pair will improve consistency in your circuit. Most electronic circuit quality is 90% good power and 10% function. If hardware is not your strength ask a guru to suggest a solution. II) if you want reception only in one direction, use simple aluminum foil to shield the unwanted areas ca 4cm away from the board. You have to recalibrate though, because the alufoil improves reception in the opposite (unshielded) direction.

III) You can also use aluminum foil strips to uniquely filter horizontal, diagonal, vertical movement by using the 3,101GHz frequency characteristics and make parallel foil strips 6,0625mm apart.

IV) for point c) above also use quick connectors because you might have to disconnect both resistors to return to a default ohm value once you start touching the log pot.