Select Page

Wireless Actuation based on Motion Sensor

This project is about sensing motion of a person by a PIR sensor and then actuating an electrical bulb by wireless transmission. Two STM-32L Discovery boards are used in this project, one for transmitting the sensed signal and other for receiving and actuating the electrical bulb.

Aim

The Aim of the project is to power an electric bulb remotely located after sensing the presence of a person/persons by a PIR sensor. The wireless transmission and reception is done by two independent STM-32L Discovery boards interfaced with one Xbee antenna each respectively.

List of Para-Phernalia

  • STM-32L Discovery Boards qty:02
  • Xbee Tx/Rxing Antenna Modules qty:02
  • Transistor driving circuit
  • PIR Sensor Module
  • 12V batteries qty:02

List of power supplies required for sensor circuit:

  • 5V for STM-32L Discovery Board
  • 9V for Xbee transmitting antenna module
  • 5V for the PIR sensor (can be tapped from the STM-32 board)

List of power supplies required for actuating circuit:

  • 5V for STM-32L Discovery board
  • 9V for Xbee receiving antenna module
  • 12V for activating the Relay
  • 230V power supply for the electric bulb

Note:

  • The range of a PIR sensor is about 5 meters (LOS)
  • The range of Xbee antenna is about 100 meters(LOS)

Project Implementation

The implementation of the project consists of two physically independent circuits.

  • The Sensor circuit
  • The Actuation circuit (flashing of the electric bulb)

The Sensing Circuit

The sensor circuit consists of a PIR sensor, STM-32L Discovery board interfaced with an Xbee antenna module configured as a transmitter and a 12V battery with voltage regulators for 5V and 9V.

After loading the code into the STM-32L board, the output of the PIR sensor is connected to the pin no.PA0 of the board. Further, the transmitter output at pin no PB10 of the board is connected to pin no.3 of the Xbee antenna module. The PIR sensor, the STM-32L board and the Xbee antenna module are connected to a common ground. The battery is also provided with a 5V and 9V voltage regulator circuits to supply voltage to STM-32L board and Xbee antenna module respectively. The supply to the PIR sensor is tapped from the 5V pin of the STM-32L board.

The Actuating Circuit

The actuation circuit consists of an STM-32L discovery board interfaced with Xbee antenna module configured as a receiver, a transistor driving circuit along with a relay to energize an external circuit for flashing an electric bulb and a 12V battery with voltage regulators for 5V and 9V.

After loading the receiver code into the STM-32L board, the data output pin no.2 of Xbee antenna is connected to the receiving input pin at pin no PB11 of the STM-32 board. Further, the received signal is processed and available at pin no.PB7 of the board. This signal from the pin no.PB7 of the board is then fed to the base of the transistor driving circuit.

After deploying the entire setup and powering up all the equipment, the system is ready for testing. Any movement in the view sector of the PIR sensor is sensed and is transmitted from the sensing circuit. The signal is then received by the actuator circuit and activates the relay of the transistor driving circuit and then flashes the bulb.

The USART function of the STM-32L board is used as a means of communication. The sensing is programmed in interrupt mode and the reception is done in polling mode. The serial bit pattern required for USART communication through the Xbee module is illustrated as follows:-

A 5ec delay is introduced in the sensing circuit so that no further detection occurs within that 5sec. A 15 sec delay is introduced in the actuating circuit so that no flashing is done within that 15 sec. Even if the sensing circuit senses and transmits, the actuating circuit does not responds within that delay.

The sensor circuit consists of a PIR sensor module, STM-32L Discovery board along with an Xbee antenna configured as a transmitter.

Flowchart for Sensing/Actuation

Source Code

The Source code is uploaded in the moodle

Other Applications

  • Automated Door Opening
  • Remote Burglar Alarm

The Team

  • Bipin Kumar GJ
  • Sqn Ldr P Rajesh Babu