Investigating a RCWL 9196 / RCWL-0516 “Radar” motion detector module

posted in: Android 161

A new type of “Radar” motion sensor has been getting a lot of attention in the last couple of months, but no one seemed to know how they worked, so I decided to buy a few of these very cheap devices (sub $1) and investigate possible methods of operation.

The boards I bought use the RCWL 9196, but appear to have identical functionality to those with the RWCL-0516 chip on them

This github site contains loads of useful information on these boards, and there is also an excellent video by Andreas Spiess on YouTube

Where the properties of these devices was explored.

I hope to have taken this at least one step forward with my tests.

The main difference in my approach is that I have connected a wire from the analogue signal output on the only IC on the board, into an analogue input on a STM32F103C8 (aka Blue Pill) board.

The pin I connected to is Pin 12 on U1, (RCWL 9196 and is the output of the 2nd OpAmp in that chip).

(Schematic from Joe Desonnet’s github account)



My RCWL 9196 board is not exactly the same as this, but the pinout of the IC is the same.

Also the RCWL 9196 is almost identical to the BIS0001

Where pin 12 is labelled as 2Out



I then wrote a very simple sketch in the Arduino IDE to print both the analogue signal from 2Out and also the normal digital output from the board


void setup() {
void loop() {

BTW. The reason I’m writing values of 0 at the beginning of the line of output and 4500 is because the Arduino IDE “Plotter” feature is auto ranging, and if I don’t include a lower an upper bound, the vertical scale constantly changes

Looking at the output when nothing is moving I see this plot

Green is the digital output (in this case its LOW / OFF), and the Red trace is the analog signal, which is close to half the 3.3V Vdd voltage supplied to the board.

Note. The STM32F103C8 has an anlogue input range of 0 to 4096 (12 bit)


If I start to wave my hand, starting with a small movement and then increasing, I see this plot.


As you can see the hand movement causes an immediate effect on the output of the second OpAmp, but the value has to go above (or below) a threshold before the digital output triggers


In this next plot. I was walking towards the sensor, and then stopped.


As you can see the digital output holds for around 2 seconds after the end of the input fluctuations.


The more interesting thing about this plot are the peaks and troughs at the start where I was walking towards the sensor.

I thought this could be because its sensing the movement of my legs, so I devised a better test where I stood on a chair and dropped an object from the ceiling, and observed the results.


I tried a variety of objects, and the best performing object that mimicked the properties of a person moving, turned out to be a damp sponge.

I tried a dry sponge, but it had no effect on the sensor whatsoever, but as soon as I got it wet, it was immediately detected.



In this plot the sponge is falling about 1m horizontally from the sensor, which is resting on a table about 1m from the ground.

As you can see, there are still multiple peaks and troughs in the output signal.

I know that there was some speculation that these devices work by using the Doppler effect,but this does not appear to be validated my the tests I have done.

So my theory is that the peaks and troughs are caused by reflected signals from objects, interfering with the oscillator / transmitter.
When I say interfering, I mean of wave propagation, where the reflected wave can be in phase with the oscillator or out of phase, resulting in the oscillator drawing more or less current.

From Joe Desbonnet’s github repo,he observed that the oscillation frequency is around 3.1GHz with his module. So assuming my module is similar, then the wavelength of 3.1GHz is around 10cm.

However in my tests, I am not sure the peaks and troughs match exactly with that frequency, and the effect I see if more consistent with perhaps twice that frequency.


Doing some tests moving a piece of aluminium foil up and down, approximately 30cm, to 5 cm above the sensor observe these results when moving slowly



And moving quickly



What is fairly clear is that the interference is not from a single path, but rather that the aluminium foil (or the damp sponge), is reflecting signals directly from the device, but is also going to be reflecting, some reflections back to the device.

So its a complex pattern of primary and secondary signals, with the strongest effect most likely to be the primary signal straight from the device (transmitter)

Also just to complicate matters, the OpAmp IC is configured so that the output is always trying to return to a steady state.

This can be seen when the device first turns on, and the analogue output initially is at its maximum, and takes around 10 seconds to stabilise to Vdd /2


Looking at the schematic and also measuring the voltage from the RF oscillator / transmitter, using an oscilloscope. The oscillator output voltage, rises to around 0.4V very quickly.

However OpAmp 1, in the RCWL9196 is configured as a high gain amplifier (and filter), whose non-inverting input will be initially 0V.

The inverting input is fed from the output of the OpAmp via a resistor and capacitor network, and charges C7 via R6, and the RC network of R4 in parallel with C4

I don’t know if the resistor values on my board are identical to the schematic, but a rough calculation on the RC charge time of the inverting input would be 22uF * 1M = 22 seconds.

But thats the time to get to Vdd not to 0.4V, so I think its highly likely that the 11 seconds startup time, is the time taken to charge C7 to 0.4V.

I observed the fluctuations of the input voltage from the oscillator using my scope, but the change was minimal; at around 4mV, and I was only able to measure this using capacitive coupling on the scope.

So if C7 can charge from 0V to 0.4V in around 10 seconds, then it would compensate for a change in input from the osc (of 0.004V) in 1/100th of 10 seconds, i.e 1/10th Sec (100mS)

This effect is also observable in practice, by moving an object towards the sensor and then holding it. As you normally see a peak or a tough, but very quickly the signal is pulled back to its steady state.


I did attempt to increase the value of C7 from 22uF (226) a higher value, in the hope that I could make a much larger time constant, but I damaged the board somehow, whilst trying to do this, so I do not have any results for that test.

BTW. I have 2 boards, but I don’t want to modify the second one in case I damage that one as well.


So to sum up…

My hypotheses, is that these devices are a oscillator / transmitter, and that the detection method is by wave propagation interference.

This is consistent with many of the results I observed.

  1. Objects moving towards (or away) from the sensor, produce peaks and toughs rather than a steady state offset; which would be caused by the Doppler effect
  2. The peaks and troughs are complex, as the interference is generated by reflections of reflections.
  3. Waving a length of wire, (which would act as an inductor), near the sensor, produces little or no variation in the output
  4. As the unit has a range of around 4 or 5m, and detection does not seem to diminish strongly with increasing distance, it seems unlikely that the effect is being caused by capacitive coupling between the observed object and the oscillator (and its surroundings_


And where does this leave us…

Well, at the moment, I don’t see a use for these devices apart from their intended application of motion sensing.

I think that using the analogue output from pin 12, is beneficial, as it can be used to get some indication of the scale of the detection, and would allow the trigger level, and hold time etc, to be controlled in the application (e.g. Arduino sketch).


I think if a method was devised to be able to observe the output from the oscillator, without the current system that always returns the output to a mid point steady state, even if the oscillator is not in that state; that perhaps the device could be used more easily to perhaps determine the speed of an object. By determining the time difference between each peak.

However even with the necessary hardware modifications to facilitate this, there would still be the problem of reflections of reflections; which would cause the data to be difficult if not impossible to analyse



161 Responses

  1. Gato

    As far as I can tell, the waveform you see in the plots is consistent with a radar using doppler. You see, when a signal of frequency f bounces back from a moving object, the bounced signal has a frequency f+δ, and then when that is mixed (added) with the original signal what you get is equivalent to a product of two signals: one, a high frequency signal at f+δ/2 and another at δ/2 [*]. That δ/2 signal is a low frequency “beat” that depends on the speed of the moving object. The first one gets filtered out and the second one is what the circuit detects, and what it seems you’re plotting.

    The doppler frequency shift is given by:

    δ = 2 f v / c

    Where f would be ~3GHz, v the speed of the moving object being detected and c the speed of light.

    So, for example with a f=3GHz, if the object moves at 1m/s, you get a δ of ~10Hz and a detected beat of ~5Hz

    [*] 2 cos(f + δ/2) cos(δ/2) = cos(f + δ) + cos(f)

  2. Henk

    There is a lot to support Rogers conclusion. Basically the circuit is set up as a free running oscillator/mixer, and the measured signal is the current through the emittor resistor of the oscillator. A directional test at showed that the rf-signal from the oscillator is very broad, over 200 MHz, and the radiation pattern is indeed a sphere.
    The current through R-emittor will be influenced by the sum of all reflections getting back to the oscillator. The detecting circuit is self-adjusting, and therefore will not be able to see a difference in what causes the change in current.

    Some practical observations:
    – there is no difference in sensitivity between moving towards or away from the sensor and moving in parallel.
    – the sensor functions best in a confined space with a lot of reflections
    – the sensor functions poorly in open space where there are no reflections other than from a moving object
    – if doppler is the main detection method and the ciruit is self-adjusting, objects with a constant speed moving towards or away from the sensor would only be detected at the start of the movement. Constant speed equals constant doppler-shift, and the self-adjusting detection would cancel out the constant signal.

    A practical test:
    I enclosed the sensor in an all metal, grounded case. Off course the connecting wires and breadboard setup where still visible.
    The sensor kept working although slightly less sensitive. This to me indicates that the wires are transmitting and receiving as well.

    All in all the circuit behaves like any unstable oscillator that is influenced by nearby objects / reflections. No doubt moving objects also introduce a doppler effect, but that is not what is beeing measured.

  3. Harrison

    I think you are exactly correct that the method of detection depends upon interference from reflections, but I believe the actual mechanism of detecting the reflections is by monitoring the current consumed by the oscillator (R9 is effectively a current shunt). When reflections are out of phase (destructive) the current should increase. When reflections are in phase (constructive) the current should decrease. The oscillator frequency likely shifts solely because its bias conditions change, i.e. the shift is just a dependent artifact that has nothing to do with detection.

  4. Dick

    I tried to make it more directional. Best so far is to solder a 5x5cm (or larger) piece of PCB as a shield on the back side, It is grounded from all 4 of the holes around the antenna. And you must leave some 4mm gap between the PCBs, otherwise the oscillator will not oscillate.

    Adding thin aluminium or cupper-foil did not help. Instead it acted as an antenna and increased sensitivity from all directions.

    In my house, I put one sensor behind a radiator (big metal thingy). Now I can detect if someone sneaks outside my window, but I can use the room without detection.

  5. Roger Clark

    If you look at the other comments, the general conclusion is that the method of operation of this device makes it very hard to make it direction.

    Strangely, I found it doesnt seem to propagate very well though glass, perhaps thats the lead content in the old glass in my house.

  6. Rudy

    Roger, this is it, what is inside the rcwl-0516

  7. Roger Clark


    I think the schematic has been available for some time, but perhaps not also the pcb layout

  8. Russ

    Placing one or modules in the vicinity (~10′-15′) of the intended motion detection module seems to increase its sensitivity, merely as extra radiators without using their conditioned outputs.
    I put one one the top and another on the bottom of our staircase which does a 180 in
    the middle where the intended motion detector is placed.
    Now, the detector module turns on the stair lights if the stairs are approached either from the top or bottom.
    May sound crackpot but sure seems to work.
    Haven’t ‘scoped pin 12 to evaluate the differences yet though….

  9. Roger Clark

    The effect you describe does have some scientific basis.

    These modules emit RF which bounces around and causes resonance with the device its self, and the triggering is caused by changes to the RF that the device senses via its own self resonance.

    So as long as the other motion detectors are on the same, or similar frequency, then the detector will pick up changes to those signals as well, and this would cause it to trigger.

    IMO this is a very interesting discovery. Thanks for sharing

  10. Anonymous

    hello everything is fine? I’m a physics teacher in Brazil and I want to apply these prototypes in my classes. I have very basic knowledge of arduino. Would it be possible for you to share the complete code. To better understand how you are plotting the outputs.

    Thanks. Congratulations on your stuff

  11. Roger Clark

    This was something I investiaged 6 years ago.

    I no longer have my original test code.

    I’m sure there will be other code you can find on the web to read the ADC input of an Arduino

Leave a Reply