This project is built around an MRF24WBOMA Wi-Fi module, a PIC microcontroller and a camera module using the TCP-IP protocol. The camera captures live video from a remote location, which is transmitted wirelessly through the Internet and can be viewed on a PC or laptop.
The design uses easily-available low-cost components and a serial peripheral interface (SPI). Microchip’s recently introduced MRF24WBOMA (see Fig. 4) is an inexpensive Wi-Fi chip that uses SPI communication. Block diagram of the Wi-Fi embedded webcam is shown in Fig. 2.
Circuit and working
The circuit diagram for MRF24WBOMA-based Wi-Fi embedded webcam is shown in Fig. 3.
As shown in the block diagram (Fig. 2), the power supply for the circuit includes 9V AC, a rectifier, a 7805 fixed regulator and an LM317 adjustable regulator. This supply drives the main circuit, which includes the Wi-Fi module, the 74HCT125 buffer, the PIC microcontroller and the MAX232 driver.
Power supply. The 9V derived from transformer X1 is rectified by retifier module BR1, filtered by capacitor C1 and given to 7805 IC, which is a fixed 5V regulator. The LM317 adjustable regulator is configured to give a fixed 3.2V meant for the MRF24WBOMA Wi-Fi module. LED1 indicates the presence of power in the circuit.
MRF24WBOMA module. The MRF24WBOMA is a low-power, 2.4GHz, IEEE Std. 802.11-compliant, surface mount module with all associated RF components—crystal oscillator, by-pass and bias passives with integrated MAC, baseband, RF and power amplifier, an built-in hardware support for AES and TKIP. The MRF24WBOMA module is approved for use with the integrated PCB meander antenna. The PCB antenna is fabricated on the top copper layer and covered with solder mask.
The module interfaces to the PIC microcontroller via a serial slave SPI interface for interrupt, hibernate, reset, power and ground signals. The module normally runs on a single supply voltage of 3.3V, though here we have used a 3.2V supply. It also supports optional JTAG and serial debug for testing. The debug port operates at 3.3V and requires a level shifter for operation with RS232 devices.
The MRF24WBOMA module is designed for use with Microchip’s TCP/IP software stack. The software stack has an integrated driver that implements the API, which is used in the module for command and control, and for management data packet traffic. Other details of TCP/IP stack can be found from its data sheet.
Buffer/level shifter. 74HCT125 has quadruple bus buffer gates with 3-stage outputs. These gates feature independent line drivers with 3-state outputs. Each output is disabled when the associated output-enable (OE) input is high. To ensure the high-impedance state during power up or power down, OE should be tied to Vcc supply through a pull-up resistor; whose minimum value is determined by current-sinking capability of the driver. The 74HCT125 has been used here as a level-shift interface.
Microcontroller. PIC18F4620 microcontroller, the heart of this project, has features that significantly reduce power consumption during operation. The key features are alternate run modes and multiple idle modes. The SDO and CS pins of Wi-Fi module are connected to microcontroller through the 74HCT125 buffer.
Download PCB and component layout PDFs: click here
Microchip’s PIC18F4620 was selected because it is low-cost and has sufficient memory for coding—64k Flash memory and 4k RAM. It is available in 40-pin DIP package and has a hardware SPI bus. The code has been written using C18 compiler to fit within the memory of PIC18F4620.
LCD module. 16×2 LCD module has been used to display the IP address and for debugging the project. It is operated in 4-line mode. Port pins RE0, RE1 and RE2 of the microcontroller are connected to RS, R/W and EN control pins of the LCD, respectively. Port pins RD0, RD1, RD2 and RD3 of the microcontroller are connected to D4, D5, D6 and D7 of the LCD, respectively. Preset VR1 is used to control the contrast of the LCD.
MAX232 driver. MAX232 has four sections: dual charge-pump DC-DC voltage converters, RS232 drivers, RS232 receivers, and receiver and transmitter enable control inputs.