Dick Cappels' project pages http://www.projects.cappels.org
Return to HOME (more projects)
Minimum Mass Wireless Coupler Terminal Interface
Near Field Communications (NFC)
This is a Minimum Mass Wireless Coupler that connects a terminal, or PC running terminal software, to other Minimum Masss Wireless devices by means of a 1200 baud data channel at 181.818 kHz.

The basic Minimum Mass Wireless Coupler technology is described and links to other projects on this site that use the Minimum Mass Wireless Coupler are located on the web page, Minimum Mass Wireless Coupler.

Download the AVRStudio assembly source for the program: vlfterm2313.asm
Download the AVRStudio assembly source for the include file: vlfcw2313.inc

The loop antenna goes around the perimiter of the circuit board.
The componenets inside the loop seem to have little effect on performance.

The purpose of the terminal interface is to allow my computer to communicate with Minimum Mass Wireless Coupler equipped devices using a terminal emulator program.  Consequently, the Base Unit is basically  an RS-232 interface and Minimum Mass Wireless Coupler.  The Base Unit is the larger enclosure in Photo 1. The RS-232 interface to the computer is 9600 baud, 1 stop bit, no parity, plenty fast to keep up with the 1200 baud maximum data rate from the Coupler.

The antenna is made of 12 turns of #30 enameled wire threaded through metal guide loops arranged around the perimeter of the board (See the photograph.) This antenna's area is about 160% that of the prototype 5.5 cm loop so it  has a little more range for both transmitting and receiving.

The 2N2907 and 2N2222 circuit is the RS-232 interface. The sensitivity
adjustment is made with R1, R2, and R3.

To further increase the transmitter's range, I used 220 ohm bias resistors (See the schematic, Figure 4). This sets the maximum peak current from the microcontroller’s output pin at about 23 milliamps, safely below the maximum current specified on the microcontroller’s data sheet. Since the antenna is resonant, the peak antenna current is greater than the microcontroller's drive current, about 70 milliamps peak-to-peak in this cae.

The Base Unit uses a  trick to increase the receiver's sensitivity. I added an adjustment to compensate for some of the comparator's offset.  The smaller the offset voltage, the smaller the signal needed from the antenna  to trip the comparator.  Adjusting R1 causes the voltage drop across R3 of up to ± 60 millivolts, and this effectively compensates for offset voltages across the comparator input up to the maximum shown on the controller’s data sheet.

Increasing the sensitivity can be a good thing, but too much can be a problem. When the offset is adjusted to near zero, noise from the microcontroller itself causes the receiver to repeatedly detect false signals. I've also noted that when I put the base unit too close to a backlight power supply in my notebook computer it picks up interference.  Not only does the RS-232 output send out garbage, but the noise interferes with the desired signals from being properly decoded. The solution is to back off on the sensitivity adjustment. to the point that the receiver is stable.

The firmware for the terninal interface is very compact. All it does is to check for an incoming character from the UART if one is present, send it out the Minimum Mass Wireless Coupler, and check the Miniumu Mass Wireless Coupler for an incoming character, and if one is present, send it out the UART.

If an escape character is received from the terminal, the following character is trapped and executed as a command. If the character following the escape character is a second escape character, it is sent out over the Minimum Mass Wireless Coupler. If the character following the escape character is an ASCII "e", local echo is toggled on and off, and a notation is typed to the terminal screen. The "e" command is the only command that this interpreter responds to.

The Base Unit  operates continuously for days or weeks at a time from an AC power adaptor and does not have an accessible power switch. Since resetting it manually would be inconvenient, the on-chip watchdog timer is used to catch hang-ups in the firmware.  The main routine in the firmware alternately checks the RS-232 interface to see if there is anything to send out  via the Minimum Mass Wireless Coupler, then checks the Minimum Mass Wireless Coupler to see if there is incoming data to receive and send out the RS-232 interface. After these checks are completed, the watchdog is reset. If, for any reason, the controller does not return from one of the two communications tasks, the watchdog would reset the controller.

HOME (More Projects)
Contents ©2005 Richard Cappels All Rights Reserved. http://www.projects.cappels.org/

First posted in March, 2005

You can send  email to me at projects(at)cappels.org. Replace "(at)" with "@" before mailing.

 Use of information presented on this page is for personal, nonprofit educational and noncommercial use only. This material (including object files) is copyrighted by Richard Cappels and may not be republished or used directly for commercial purposes. For commercial license, click here.

 Liability Disclaimer and intellectual property notice
(Summary: No warranties, use these pages at your own risk. You may use the information provided here for personal and educational purposes but you may not republish or use this information for any commercial purpose without explicit permission.) I neither express nor imply any warranty for the quality, fitness for any particular purpose or  user, or freedom from patents or other restrictions on the rights of use of any software, firmware, hardware, design, service,information, or advice provided, mentioned,or made reference to in these pages. By utilizing or relying on software, firmware, hardware, design, service,information, or advice provided, mentioned, or made reference to in these pages, the user takes responsibility to assume all risk and associated with said activity and hold Richard Cappels harmless in the event of any loss or expense associated with said activity. The contents of this web site, unless otherwise noted, is copyrighted by Richard Cappels. Use of information presented on this site for personal, nonprofit educational and noncommercial use is encouraged, but unless explicitly stated with respect to particular material, the material itself may not be republished or used directly for commercial purposes. For the purposes of this notice, copying binary data resulting from program files, including assembly source code and object (hex) files into semiconductor memories for personal, nonprofit educational or other noncommercial use is not considered republishing. Entities desiring to use any material published in this pages for commercial purposes should contact the respective copyright holder(s).