Motion detector with led
This is the next post on this blog testing the
RCWL-0516 sensor. This sensor uses a “microwave Doppler radar” technique to detect
moving objects and has a sensitivity range of ~7 meters.
The sensor does NOT detect if someone is near , it can only detect movements!
This cheap and interesting module has the following connections :
- 3V3 - Output 3V3 Regulated DC (100 mA) This is 3V3 Output NOT input !
- GND - Ground 0 V
- OUT - Microwave Radar sensor output ( HIGH (3.3 V) motion detected/LOW (0 V) idle)
- VIN - 4 to 28 volt input to power this module
- CDS - This pin can be used to disable detection. You need not to connect it. (Low= Disabled)
A 9 Volt battery was used to power the module. Be aware that after powering the module there is a delay (10 seconds) before the sensor is active.
Besides the CDS pin it is also possible to solder a light detecting resistor (
LDR ) in to the two holes below the RCWL-0516 text/logo. (On the other side of the PCB it is in the top-left square). When there is light on the LDR the Microwave Radar Sensor will not give a signal on the OUT pin.
In this post i describe recent tests using this proximity sensor without a micro controller. The photo's with the Dupont wires on the sensor connectors where from the previous post. This time i soldered pins to a sensor.
\\
.
1) In the first test i connected a "standard led" between the OUT and GND with a 220 ohm resistor. This is a simple configuration to test the sensor
2) As i also wanted to check if the circuit is on i also added a (red) led between GND and 3V3
3) The next idea was using a laser led. The advantage of using a the laser is the very far distance of the laser beam can travel before projecting a dot. The laser light can travel further than standard WiFi, Bluetooth or 433MHz radio signal. On a distance of more than 40 meter you should be able to see if there was movement near the sensor.
The disadvantage is that you need a line of sight and you can not check if the sensor is functioning as the laser is default off. I tested drivign a cheap laser led directly on the output. However it seemed not possible to drive directly a laser (at least not the small lasers i have) with this module. So direct driving a laser led was a failure. The laser led does light when connected between ground and 3V3 an option could be driving the laser indirect e.g. using a transistor, opto-coupler or relay.
4) I also wanted to do some tests to know if it is better leaving the CDS 'floting' or connect the CDS pin to a logic level.
A prototype perf board was used to create a development/test board for a real test environment. Using wires only would reduce space however it also would lose some flexibility. I did not want to order a PCB or use a breadboard.
Bottom right is the power connection. The switch is used to turn the battery power on/of. Jumpers where used to enable or disable parts of the circuit. I did not want to use a (more expensive) breadboard.
Different colors for the jumpers are used.
The red jumper is used to enable the 'power on' led
The yellow jumper is used to enable the yellow 'signal out' led (using a resistor)
The white jumper can be used to connect CDS to GND.
Also additional pins an connectors where added to play and do (lateron) more experiments with this sensor.
The sensor pins from left to right (extended over the full lenght of the perfboard) are
01 - CDS
02 - VIN
03 - OUT
04 - GND
05 - 3V3
Results:
It is possible to direct derive a led with a small resistor) between the output pin and ground without a micro controller.
A battery powered board with a circuit to test the RCWL-0516 was created and could be used to test the sensor.
Direct driving a small laser led was not possible. Perhaps indirect using a relay, transistor opto-coupler this is possible.
First test showed that motion at about 3.5 meter could be detected using this circuit.
Currently i can not yet decide if it is better to leave the CDS pin floating or connecting it to a logic signal. Both options seem to work. More tests need to be done to decide what is better.
Some links about the RCWL-0516 sensor: