Author: Anthonie Botha
This system was designed to eradicate the anarchy that reigned on a school’s computers. Conventional
password protection could not be utilized and the old key lock was too easily tampered with and bypassed. Highly objectionable information was being downloaded from the Internet and files being deleted all the time. To no avail, the guilty party was always conveniently dead or in hyperspace! A failsafe physical lock was urgently needed with total control and hence the Flash PC Lock was born!
The PC Flash Lock device should have a lot of applications. For example, the author implemented this lock at a friend’s Internet café. Also, a small software company employs this versatile lock together with an OCX incorporated into their software to prevent pirating and multiple software installations. The author himself employs it on his PC’s to prevent his children from giving him heart failure when they “accidentally” destroy valuable source code. The software controlling the Flash Lock is a resident utility, hiding in the root of the operating system and waking up on startup. It also interfaces with the Flash Lock hardware via the serial port, exchanging data every second. For the person that is fanatical about security of his or her files, this is a cost effective solution. After an error, the system will shutdown (if that option was selected) allowing you 60 seconds to attempt to solve the problem. Instead of shutting your PC down, you can merely remove the Flash Lock. The device works on Windows XP machines only!
How does it work?
By using your computer, an open serial port and the Flash Lock software, written with Visual Basic 6 there are various options at your disposal. The circuit is very basic and will fit into a standard 9-pin serial port plastic housing. A hole can be made in the plastic housing and the Flash Lock fitted to a key ring. As you may have guessed at this point, the power behind the circuit is the software.
Hardly hardware
The circuit diagram of the PC Flash Lock, Figure 1, is down to a microprocessor, some passive parts and diodes. The supply voltage to the microprocessor is limited to about 5.6 V by zener diode D2. As the RS232 port is specified to supply an internally limited maximum 20 mA of line current, no series resistor is required to keep the zener diode and the (PIC) from harm. The other diode in the circuit, D1, prevents the PIC supply voltage from becoming negative. The PIC I/O pins being used by the software are protected by 1-kΩ resistors. Admittedly that’s close to what a PIC can take for abuse but then the circuit has toe remain as simple and cheap as possible. Knowing from the PIC datasheets that the pins can sink or source up to 20 mA each, we get 12 V/1,000 Ω = 12 mA under worst case conditions so it’s cheeky but still within spec. This excess current will flow from the VDD or the GND pin, the zener diode acting as a sink. The oscillator inside the PIC16F628ASO chip operates at the frequency governed by an external 4-MHz ceramic resonator, X1.
Construction — wick it!
The tiny printed circuit board designed for the Flash Lock is shown in Figure 2. With some force and possibly some strong words it can be pushed between the pins of a 9-way sub-D socket (yes that’s the female version). Check if the case fits around the tiny board and if necessary trim the sides by filing. If you hate SMDs, you should know that the PIC chip also exists in a DIP case, hence the circuit may also be built on a piece of veroboard. You will, however, have a hard time fitting the lot in a 9-way sub-D connector shell. A lot has been said and written on the subject of soldering SMD parts and some advice is repeated here for the benefit of beginners. Absolute requirements for success in the SMD department include good quality tools, a clean desk and a steady hand. We’ll shortlist some more aspects below.
* Use a low-power solder iron with a tip diameter of 1 mm maximum. Alternatively, use a larger tip and wind 1-mm solid copper wire around it.
* The same applies to the solder tin — use the thinnest you can get —0.6 mm or 0.5 mm is recommended.
* Precision tweezers from specialised pharmacists — much smaller and accurate than the ‘pair of tongues’ you normally get at Woolworth’s.
* Desoldering braid (a.k.a. wick), if necessary with it its suction power boosted by a bit of colophonium.
* Fit the 0805-ca se components by first generously tinning one PCB pad. Using the tweezers and the solder iron, position the part and secure one end by pushing it into the solder. No extra tin is required at this point. Next, solder the other end. If necessary, reflow the solder at the first end.
* The IC is first aligned on its footprint, then secured by soldering one corner pin. Check the alignment of the other pins. If ok, solder the pin at the other side of the chip, and so on. Do not panic if adjacent pins get interconnected by excess solder — remove the solder by applying a length of fresh wick.
Finally, inspect your work using a magnifying glass. Tell your friends about it.
COMPONENTS LIST
Resistors: Semiconductors: | Miscellaneous: |
PIC bit options
The PIC16F628A-SO to be used in this project needs to have its configuration bits programmed as shown below.
0 F OSC0: 1 xt oscillator | 7 LVP 1 low voltage program enabled |
The software
Figure 3. The first option in the PC software (device manager) allows you to read or change your username and password. This password is written to the EEPROM using “write to device”. | |
Figure 5. After software installation, the Elektor Toolbar will be installed in the top of the screen. Left or right clicking on the icon will display the Accounts menu. | Figure 4. The fourth option (application manager) allows you to manage individual rights. The fourth option (application manager) allows you to manage individual rights. |
The simplicity of the PC Flash Lock hardware belies the sheer power and complexity of the associated software developed by the author.
The complete Software Guide available for this project comes as a free download (no. 050107-12.zip). It is 21 pages in all, and comprehensive by any standard, covering not only everyday use but also advanced items like URL history storage and File Encryption. The Software Guide comes as a page indexed Word document. What’s conveniently called ‘software’ here actually consists of two components: (1) PIC-resident software and (2) PC-resident software.
The PIC software is available as an .asm or .hex file. Provided you have a programmer for SOIC PICs you can burn your own device at home or at school. If not, you will have to rely on
our Readers Services by ordering a ready-programmed PIC (order code 050107-41. The PIC configuration bits, so often a source of confusion to our readers, are given in the inset. This software allows the PC to check, at 1- second intervals, for the presence of the Flash Lock dongle, or, more accurately, for the right code in the PIC’s EEPROM memory.
The PC software is a massive 20 MB of tools and an installation program supplied on a CD-ROM, order code 050107-81. Alternatively, if you’re on broadband Internet, the PC software
may also be downloaded from our website. An impression of the PC Flash Lock software in action is given by Figures 3, 4 and 5. As you can see, there are lots of options to enable you to adapt this project to your specific needs. Once installed on the PC, the resident Flash Lock utility will display a small, semi-transparent toolbar at the top of the screen. This will give access to all functions including accounts management and passwords. The software has a 10-digit ASCII password, 10-digit user name, 10-digit guest password and a 20-digit password hint. The dongle may be plugged into the COM1 or COM2 RS232 serial port on your PC and is automatically found by the software. In some cases, however, you will need to use the ‘scan ports’ option to locate the RS232 port with the dongle on it. The program provides a one-time offer to create a rescue disk and produce hard copy of essential data.
Famous last words
Finally, a word of caution: we sincerely recommend installing and using the Flash Lock device and control software on a ‘scrap’ Windows XP PC that’s not essential to serious work. By no means install the device on a PC that’s required for daily use, as even a small mistake in the PC Lock configuration will permanently bar you from access to all your files and programs! Yes, it happened to us while engineering this project towards publication. Forewarned is forearmed!
(Elektor Electronics - 10/2005)
Download this article #e05a068.pdf >>or SkyDrive link #050107-11.zip >>or SkyDrive link #050107-12.zip >>or SkyDrive link |
Labels
- * Elektor 2005 (9)
- * Elektor 2006 (72)
- Adapters (1)
- ADC / DAC (1)
- AM / FM (2)
- Amplifiers (3)
- Antennae (2)
- Articles List (1)
- Audio (1)
- Automatic (2)
- Batteries (3)
- Bluetooth (1)
- Breakers / Contacts (1)
- Buzzers / Sirens (1)
- Clocks / Timers (2)
- Computer (2)
- Converters (2)
- Coolers / Fans (1)
- Counters (1)
- Datasheets (7)
- E-blocks (1)
- Energy (2)
- Flash / Light (8)
- Frequency (1)
- Fuse (1)
- Generators (2)
- High-voltage (1)
- Indicators (2)
- Infrared (IR) (4)
- LCDs (1)
- LEDs (7)
- Magazines (1)
- Meters (5)
- Microcontroller (9)
- Mobile Phone (1)
- Motors (1)
- OPAMP (3)
- PCB (1)
- Photosensors (1)
- Power Supply (2)
- Preamplifiers (1)
- Programming (3)
- Radio (1)
- Rectifiers (1)
- Regulators (1)
- Relays / Switches (10)
- Remote Control (7)
- RS232 (3)
- Security (4)
- Sensors (2)
- Servo (2)
- Simulators (1)
- Small Circuits (46)
- Telephones (2)
- TENS (1)
- Testers (3)
- Timebase (1)
- Tools (1)
- Transmitters (1)
- Trigger (1)
- USB (2)
0 comments: