Introduction:
The RIP (Remote Information Provider) V2.0 is a device that allows the sending of an email without the use of a computer. The purpose of this device is to allow a user to choose from a list of email messages located on a user interface circuit. After the user selects the email message, it will then be sent to a host pc via an RF transmitter. The host pc will use software that triggers an email to be sent, with the message being the message the user choose from the user interface.
This write up is broken into the following sections: Implementation of RIP V2.0, User Interface construction, C++ Software, RIP Connector, and finally Expansion and Improvement and conclusion including how to run the complete rip system. All code, parts, and schematics used to build RIP V2.0 are included.
Implementation:
The implementation of this project consists of three parts: a user interface, a connector circuit and software that is to be run on a host pc (see picture below). The host pc can be any pc that has Internet access and has an unused serial port.
To use RIP V2.0, first a system administrator (or whoever) will enter email and user information into a program (see below) on a host pc. All information written will be stored to a file for later access. The email information consists of an email address, server address, subject and message. The user information consists of a user name and a 4-digit password. The program will automatically transmit the information via a serial cable to a connector circuit. The connector circuit will then transmit the data to the user interface circuit. The user interface will then store this information. The information is now ready for a user.

User Interface:
How to Use
The user interface is very easy to use. To start the device a user first presses the start button. Next a user has to enter a correct four-digit password. If an incorrect password is entered then the message 'INVALID' is displayed. If a correct password is entered then the first message stored in the RIP is displayed. You can choose between messages by simply pressing the next message button. Because a 16x1 character LCD is used only part of the message will be displayed. To read the whole message you need to press the scroll button. After the user selects a message, they simply press the send button. RIP V2.0 then waits for the next user.
(Notes: A keypad is used to enter passwords and for buttons. The following chart displays which button on the keypad corresponds to which command.)
Keypad Control
|
A |
Start Button |
|
B |
Next Message Button |
|
C |
Scroll Message Button |
|
D |
Send Message Button |
Circuit
The user interface circuit is controlled by an 8051 microcontroller. A 16x1 LCD is used for display. A 4x4 keypad is used for entering passwords and commands. To achieve bi-directory communication a RF transmitter and receiver are used. To store email messages and password numbers a serial EEPROM is used. The rest of the circuit is made up of various resistors, capacitors, and other electric devices. A complete parts list and schematic is linked below.
A problem that occurred when developing this circuit was that when using a RF transmitter and receiver in close proximity the transmitter would overload the receiver when attempting to receive data. To solve this problem we constructed a switch that turns the power of the transmitter on and off. When the user interface needs to receive information the switch must be turned off (A LED is used to tell if the switch is on or off). This solution is not the best, but due to time constraints this was the quickest solution. More on this topic will be discussed in Future Enhancements section.
Also a quick note on the user interface circuit. The farthest the user interface circuit can be placed from the connector circuit is about 80 ft with line of site and about 40 feet through obstruction. These numbers were obtained by our testing. Feel free to test on your own.
USER INTERFACE SCHEMATICS8051 code
The 8051 microcontroller’s code is written in C. The code is broken into three different sections. One section contains all the LCD controls. It contains functions to initialize the LCD, write a character to the LCD, displays a message to the LCD and others. The second 8051 code section controls the serial EEPROM. The serial EEPROM functions include those for reading and writing to the EEPROM and checking the validity of a password. And the final section controls the entire user interface.
USER INTERFACE 8051 CODEC++ Software:
All C++ code was written and complied under Microsoft Visual C++ 6.0.
Running Programs
The two running programs for RIP V2.0 are monitor.exe for monitoring serial port activity and sending the email, and the second (interface.exe) is to enter email and user information. When running the interface.exe a menu displays a list of different options. The different options are adding new email information, adding new user information and displaying email and user information. The email information needed is an email address, server address, email subject, and email message. The longest email message that is allowed is 45 characters long. The user information needed is a user's name and a four-digit password. All the information written to program will be stored to a file.
When running rip2software.exe you simply turn on the program and leave it running. The program will monitor the serial port for any incoming activity and if it receives the correct message number from the user interface an email will then be sent.
(Note: Monitor.exe needs be running whenever the user interface attempts to send an email, however you cannot run both monitor.exe and interface.exe at the same time.)
Serial Activity
In order to achieve serial communication, a handle to the serial port is created using "CreateFile". Next the DCB structure (DCB structure defines the control setting for a serial communications device) attributes are set to match the host computer’s serial port settings. To monitor serial activity an event that causes notification to "WaitCommEvent" needs to be registered. Messages and passwords are written to the serial port by using "TransmitCommChar" which write a byte to the serial port.
Emailing
Email is sent is by using a freeware MFC (CSMTPConnection v2.04) class (Smtp.cpp) that supports the SMTP (Simple Mail Transfer Protocol) protocol. The MFC class is written by PJ Naughter. To use CSMTPConnection, simply one needs to specify a mail server address, the email address, a reply email address, subject, and the body. You will find the source code under the monitor C++ code link below.
MONITOR C++ CODERIP Connector:
The RIP Connector is the middle layer that connects the user interface and C++ code. The circuit is simply an RF transmitter and Receiver and a converter IC that converts TTL levels to RS-232 levels and visa versa. It is connected to a host computer via a serial cable.
Unfortunately because a transmitter and receiver are used in this circuit, it suffers from the same problem as mentioned in the user interface circuit section. So like the user interface circuit, a switch is used to turn the power of the transmitter on and off.
RIP CONNECTOR SCHEMATICSExpansion and Improvement:
RIP V2.0 is a good device, but is still a long way from being perfect. One improvement for RIP V2.0 is to have a better solution to achieve bi-direction communication. One solution is to continue to use a pair of RF devices at either end but, instead of a switch to turn off the power to the transmitter, you could attempt to turn off the power by using code. In the Rip Connector end you could use one of the unused pins of the serial wire to toggle the power on and off. At the user end, 8051 code could be written to toggle power. A second, but more costly solution would be to replace the transmitter and receiver pair with a transceiver.
A second improvement worth mentioning is to improve the C++ code that is used to update the user interface. A GUI window would be much more user friendly than the current dos based menu. Also due to time constraints on the project, the functionality of the C++ programs are somewhat limited, so an expanded functionality would be great.
Possible expansion areas for this project would be to increase the current maximum size of the email message from the current 45 bytes per message. One of the reasons behind limited message size is because of lack of storage and only a 16x1 character LCD. If you expand the message size, it would be nice to also use a longer character LCD and more memory.
Conclusions:
RIP V2.0 is only a prototype. Changes and improvements need to take place before this it can become a fully working product, however. The idea of providing email without the user of a computer is a very good one. This technology already exists but there is always room for new ideas.
A complete step-by-step instruction list on how to user RIP V2.0 is found here.