Project 1: W ireless Reset Switch

Introduction
WiFi (IEEE 802.11 standard) enabled devices such as personal computers, video game consoles, mobile phones, mp3 players, or PDAs (Personal Digital Assistants) are able to connect to the Internet when within proximity of a wireless network. A most ubiquitous term related to the coverage of one or more interconnected access points is a called a hotspot. By providing a small WiFi based radio, any device can easily be monitored and controlled through the Internet. To achieve this wireless connectivity a router is used to provide an access point, thereby allowing the target device to connect within the network with ease. Such a network is known as an Infrastructure. The primary advantage of an Infrastructure Network is the ease in which WiFi based devices can connect to the Internet. An adhoc network is one which allows all WiFi based devices to connect to each other without the hassle of a having a central point. The communication is achieved from device to device. This sharing of information allows a multitude of devices to gain access to a common network. To develop a WiFi enabled device is quite easy when using the Microchip TCP/IP stack and a ZeroG radio module. To illustrate the ease to which any device can be WiFi enabled, the following project shall demonstrate this concept of creating an “Internet of Things” device using the items shown listed on the BOM (Bill of Materials).

Bill of M aterials (BOM )
• • • • • • Explorer 16 Development Board (Microchip P/N: DV164037) MRF24WB0MA Wi-Fi PICtail Plus Daughter Board (Microchip P/N AC164136-4 ) Common Anode 7 Segment LED Display (MAN 72) 7447 BCD to 7 Segment LED Display Decoder Driver IC (7) 330 resistors or (1) 16Pin DIP 330 resistor pack Diligent MDE 8051 trainer

M iscellaneous
• • • Solderless Prototyping Breadboard 22 AWG Solid Wire Palm Pre Smartphone

D.Wilcher 11/2/10

WiFi

1

Project 1: W ireless Reset Switch
The Wireless Reset Switch is an electronic design hybrid consisting of 2 different microcontroller development platforms: Microchip’s Explorer 16 Development Board and Diligent’s MDE 8051 Trainer. Also, a 7 Segment LED Display with supporting a decoder driver circuit is included. The reason for this design is to explore creating a wireless Distributed Controller using “off the shelf” microcontroller development boards. Also, understanding how to connect with various embedded platforms using basic circuit interfacing techniques is the educational training benefit behind this project as well. Figure 1 shows the System Setup Diagram of the Wireless Reset Switch.

802.11g Router Desktop PC or Notebook Computer ZeroG W Pigtail iFi

Reset Signal

Explorer 16 Development Board

8051 Based Decade Counter

Palm Pre Smartphone

Figure 1. WiFi enabled Reset Switch for a Digital Decade Counter

D.Wilcher 11/2/10

WiFi

2

Project 1: W ireless Reset Switch
The System Block Diagram for the Wireless Reset Switch is shown below.

+3.3VDC VR

+5VDC VR

+5VDC VR

LCD PIC24F uC ZeroG Radio-Module

Reset Signal 8051 uC

4

7447 Decoder Driver IC

7

MAN-72 Explorer 16 Development Board

7 Segment LED Display Circuit

Figure 2. WiFi enabled Reset Switch for a Digital Decade Counter System Block Diagram

D.Wilcher 11/2/10

WiFi

3

Project 1: W ireless Reset Switch Building the WiFi Controller
Homebrew Expansion Connector With all of the components available, the Wireless Reset Switch project can commence. The first build event for the project is to add an expansion connector to the Explorer 16 Development board. The expansion connector provides easy access to the target I/O of the Explorer 16 board by using a dual –inline female connector. Insert solid wire into the connector’s sockets allows direct access to the PIC24F microcontroller’s I/O. A 60 pin ribbon cable from a desktop PC‘s hard-drive is used for this in-line expansion connector.

Figure 3. Explorer 16 Development Board with 60 Pin Flat Ribbon Cable

D.Wilcher 11/2/10

WiFi

4

Project 1: W ireless Reset Switch
The Dual- Inline female connector was disassembled from the ribbon cable as shown in Figure 4.Three 28 AWG solid wires are then “carefully soldered to the connector. See Figure 5.

Figure 4. Dual-inline connector removed from the ribbon cable.

Figure 5. Adding (3) 28 AWG solid wires to the female connector The wires are soldered to the top row - 3 pins on the left of the female connector. D.Wilcher 11/2/10 WiFi 5

Project 1: W ireless Reset Switch
With the 3 wires attached to the female connector, the unattached ends are soldered to the designated copper pads on the Explorer 16 Development board. Figure 6 shows the final assembly of the female Dual-inline connector to the Explorer 16 Development board.

Table 1. Pinout-Designator Table

Figure 6 The Final Assembly: The Explorer 16 Development Board “Homebrew” Expansion Connector

D.Wilcher 11/2/10

WiFi

6

Project 1: W ireless Reset Switch
The Decade Counter Circuit The second subcircuit to the Wireless Reset Switch project is the Decade Counter Circuit. This digital circuit consists of 4 electronic components: an 8051 microcontroller, a 7447 Decoder Driver IC, a Common Anode 7 Segment LED Display, and a 16pin DIP Resistor pack (330 ). To allow flexibility in terms of the counting sequence of numbers either up, down or random the 8051 (Dallas Semiconductor: DS89C450) microcontroller provides the customization feature to accomplish these visual display tasks. The 4 electronic components are wired as shown in the circuit schematic diagram below.
VCC 5V

CA

1A
A B C D E FG

U2

Key = A 2B
RESET Signal From Homebrew Expansion Connector (D4_LED) P2.3 P1.0 P1.1 P1.2 P1.3
7 1 2 6 3 5 4 8 A B C D

U1
VCC OA OB OC OD OE OF OG 16 13 12 11 10 9 15 14

Key = B

4C DS89C450 Key = C 8D Key = D

~LT ~RBI ~BI/RBO GND

R1 2X8DIP 100 330

GND

74LS47D GND

Figure 7. The 8051 Microcontroller based Decade Counter.

D.Wilcher 11/2/10

WiFi

7

Project 1: W ireless Reset Switch
To rapid develop the Decade Counter a Diligent 8051 MDE Trainer was used for the WiFi Lab project build. The Explorer 16 Development board can easily be programmed to provide the necessary 4Bit binary data and reset signal used by the 7447 seven segment LED decoder driver IC as well. The reason for using the 8051 MDE trainer is to demonstrate the concept of Distributed Control whereby 2 independent computing platforms work together for the common good of the target electronic system. Also, the 8051 microcontroller is quite easy to program in Assembly or C language. The complete prototype build of the 8051 microcontroller based Decade Counter is shown in Figure 8.

Figure 8. The Prototype 8051 microcontroller based Decade Counter. Note: The 4Bit DIP Switch is used to test the Decade Counter prior to wiring it to the MDE 8051 Trainer

D.Wilcher 11/2/10

WiFi

8

Project 1: W ireless Reset Switch
The embedded software for controlling the count sequence and monitoring the Reset signal was written in Assembly Language. See Code Listing 1 below.

Listing 1. The 8051 Decade Counter Assembly Language Code

D.Wilcher 11/2/10

WiFi

9

Project 1: W ireless Reset Switch

Listing 1. The 8051 Decade Counter Assembly Language Code continued

Final Build
The Final Build of the project consists of interfacing the Explorer 16 Development Board to the 8051 microcontroller based Decade Counter circuit. The ZeroG Radio Module is inserted into the development boards Expansion slot for receiving and sending data from a wireless router. A wireless router was configured with Microchip’s TCP/IP development software to act as an access pont. The wireless device was attached to my notebook computer’s Ethernet jack. I also made a Mobile App for my Palm Pre Smartphone that allows direct access to Microchip’s Demo webpages. The webpages allow for experimentation in monitoring and controlling various embedded I/O on the Explorer 16 Development board like the discrete LEDs and pushbutton switches, temperature sensor and a trimmer potentiometer. Instead of typing the demo web pages URL displayed on the LCD using a notebook or

D.Wilcher 11/2/10

WiFi

10

Project 1: W ireless Reset Switch
Desktop PC, my Mobile App gains access by touch of button on the smartphone’s touchscreen. Figure 10 shows the complete project build along with the Palm Pre Smart Phone.

Figure 10. The Final Project Build for the WiFi enable Reset Switch With the mobile app running on the Palm Pre, I’m able to link to Microchip’s demo website’s and interact with the HTML scripted buttons using the smartphone’s touch screen, I can reset the count value to”0” on the decade counter remotely by simple touch of a button on Palm Pre’s touch screen. This WiFi application can be adapted to a variety of consumer and industrial products thereby allowing a simple “touch” to control the device’s functionality.

D.Wilcher 11/2/10

WiFi

11

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.