Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

Communication system for two computers on laser pointers. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Computers

Comments on the article Comments on the article

The digital part of the transceiver. After a lot of experimentation, I came to the conclusion that a simple and reliable receiver for RS232 is difficult to make. For RS232, you need to make something like a binding circuit to the black (or white?) level "- like in television. I could not do this using simple means. Therefore, it was decided to switch to the pulse-code representation of RS232 signals and transmit information by pulses. Such the system has long been developed and is called IRDA.However, according to the condition of the problem, communication should be through a com port.Somewhere on the Internet I saw microcircuits (bourgeois, of course) that are connected directly to the comport, and at the output they have a pulse sequence or even just optical signal.And the receiver is built in the same chip.

I didn't like this thing for two reasons: relative high cost and hard binding to a fixed com port speed. Those. if you (or some smart program) decide to reconfigure the port to a different speed, you need to change the clock frequency at the input of the microcircuit. For all these reasons, I decided to make something similar to IRDA, but simpler and independent of the speed of the port.

Here's what happened. FIRDA standard. Each edge in the RS232 signal is encoded with a short unipolar pulse, which is transmitted over an optical channel. At the receiver, these pulses are fed to the input of a trigger operating in the counting mode. At the output of the trigger, we get (ideally) an RS232 signal. Basically, that's all. This algorithm, wonderful in its simplicity, has only one significant drawback, which is that when at least one pulse is skipped, an inversion of the RS232 signal begins to appear at the trigger output. Of course, we can say that if the starting edge in RS232 (or the first pulse in the IRDA burst) is lost, synchronization will also fail, which, with a dense information flow, may not be eliminated soon.

However, in the proposed system, the loss of any (not just the first) impulse leads to trouble. Roughly speaking, FIRDA noise immunity is 8-10 times worse than IRDA or RS232. In principle, it would not be so scary (we believe that errors appear quite rarely) if, over time, FIRDA went into a normal mode of operation, as happens with its eminent prototypes. However, if special measures are not provided, FIRDA will continue to drive the inverted flow until another failure occurs ;)) almost solved all problems.

The addition is very simple: if for some time (well, for example, 0.1 sec) there is 1 "at the output of the trigger, then you should forcefully transfer it to the zero state (we assume that during transmission pauses at the RS232 output it is zero). Now, for complete happiness, you need to pull the readiness the transmitter com port once every 10 seconds, interrupting the transmission for 0.1 seconds so that the receiver's trigger resets.Obviously, in this example, the loss in transmission speed is 1 percent.

Now, that's really all. As practice has shown, it is not necessary to pull the readiness of the transmitter's com port. Numerous experiments have shown that in real work through whom there are many natural pauses of various durations. (several network toys were tested, a network between two Win98, terminals with different protocols. Only terminals working via a Z-modem turned out to have a really dense stream). In my version of the link, the time to force the trigger is set to about 5 milliseconds. Such pauses are very common. True, this limits the transfer rates used from below (in my case, at least 2400). But I had no problems with any software in the entire speed range of 2400..115200.

Communication system for two computers on laser pointers

Circuit diagram description

The Tx signal from the output of the com port through the limiting resistor R1 is fed to the edge selection circuit assembled on the elements DD1.1, DD1.2. At pin 4 of the DD1.2 element, there are pulses with a duration of about 1 microsecond. The time parameters of these pulses are not stable enough, therefore, the circuit includes a generator of pulses normalized in duration, assembled on the T2 trigger. It generates pulses with a duration of about 3-4 microseconds. If necessary, the duration is adjusted by the resistor R3.

For those who care about the stability / reliability / range of the link and the maximum speed of 57600 is acceptable, I would advise you to double the value of C2 and thereby increase the duration of the normalized pulse to 8 milliseconds. You can use a special switch for maximum speeds 115200-57600. connecting additional capacitance C2. (the length of the conductors to the switch should be minimal.) The circuit of the digital part of the receiver contains a trigger T1 with elements R4, R5, C3, V2 that set the maximum duration of one at the output of the trigger.

With the ratings indicated on the diagram, it is approximately 5 milliseconds. If one is going to work only at high speeds, it makes sense to reduce this time by decreasing C3. An output amplifier is assembled on elements DD1.3, DD1.4, the signal from which is fed to the Rx input of the com port. This is just in case. Everything worked fine for me on a tangled coil of wires 20 meters long, when I took an unamplified signal (through a 1K resistor) directly from pin 1 of the T1 trigger. Now a few words about setting up the schema. Fortunately, the digital part of the transceiver is a completely independent and self-sufficient circuit, allowing full tuning and debugging without any lasers and analog parts.

Setup order

Create a 300 kilobyte file containing one character (I liked Y). Create a batch file that sends this file to the com port, and then calls itself ;-) Run it. Check the duration and shape of the pulses in the transmitter. (It is better to do this at maximum speed, since the pulses are short). Close the batch file. Connect the output of the transmitter to the input of the receiver, and connect the output of the receiver to the Rx input of the same com port. Enter any terminal program (I used DN terminal) Try to press keys. You should see the characters being pressed on the screen. If this does not happen, try simply shorting Rx and Tx and achieve the described effect by setting up the terminal program, then try again to do the same through the transceiver.

And finally, the last the most important test. This will require two computers. Connect their com ports with three wires according to the classic scheme. Run any software that uses this link. Make sure everything works. Now try to insert a digital transceiver into the gap of one signal wire. Try to work with the same software through this piece of hardware and make sure that FIRDA suits you perfectly ;-))), simulate interference in the transmission using the methods available to you. After that, you can proceed to the construction of the analog part of the link.

Communication system for two computers on laser pointers

Transmitter

I don't think it needs any special explanation. The laser diode is the collector load of the first transistor. The resistor in its emitter circuit limits the current through this transistor and creates conditions for the operation of the second transistor, which is actually (together with R1) a controlled input voltage divider. The second transistor is controlled by the photocurrent of a diode built into the laser to organize a circuit for limiting the temperature drift of its parameters. As the light flux increases, the base current of the second transistor increases, and it shunts the input signal at a level that is safe for the laser. Trimmer resistor R3 is designed to adjust the allowable level of laser radiation.

The ratings of the circuit are chosen so that at room temperature its resistance can be reduced to zero and this does not lead to fatal consequences for the laser diode (at least I had no problems). Setting up the transmitter comes down to measuring the signal amplitude across the resistor R2 (with the digital part connected and working) and setting the trimming resistor to the pulse amplitude corresponding to a pulsed current of 30-35 mA (at room temperature). (We are talking about 5 milliwatt pointers).

For reliability, you can refine these figures for a specific pointer by measuring the current through it with freshly charged batteries (before disassembly). This value can be further taken as the rated pulse current through the pointer. If R4 is used in the circuit (I don’t have it), and part of the current always flows through this resistor, the set current through R2 must be reduced by an appropriate amount, so that the total pulse current would be within the above limits. When the temperature changes, the radiation parameters will, of course, float, but the spread of values ​​will be significantly reduced due to negative feedback on the light flux through the photodiode and the second transistor. Resistor R4 can set the initial level of current through the laser in the absence of a signal. It is believed that this increases the survivability of the laser diode. C1 for the same purpose smooths out transients when the laser is turned on / off.

К nutrition there are no special requirements, you can take + 5V from the computer. In conclusion, a few words about the disassembly of the pointer and its pinout. I can only talk about my pair of pointers. How typical this is, I don't know. First, I filed the body with a file along the perimeter of the pointer at the level of the pointer's power button. The battery part is broken. A small printed circuit board on which the button is attached becomes visible. The scarf is soldered directly to the leads of the laser diode. With a needle, I measured the depth to the sleeve, into which the laser itself is pressed. I made a second incision, trying to get to the level of the sleeve, as a result of which I received a stump of a pointer with a completely preserved optical part, and on the other (chopped off) side, there were three leads with a handkerchief, which I unsoldered. So, there are three conclusions sticking out of the cut off part of the pointer. They are arranged in a triangle. One of them is connected to the body of the laser diode. This is the common pin of laser diode and photodiode. Let's assume that this conclusion corresponds to the upper corner of the triangle. Then the output of the photodiode will be located at the bottom right, and the output of the laser diode will be located at the bottom left.

Before disassembly, it is useful to study the divergence of the laser beam without an optical system. You will need this when evaluating the sensitivity of your receiver and the range of your link. To do this, you need to carefully unscrew the optical system from the front of the pointer and measure the spot diameter, which is obtained at a distance from the pointer in the range of 5-25 cm. Now you can proceed to building the most important part of the link - the analog part of the receiver.

Communication system for two computers on laser pointers

Receiver

analog part. This block requires the greatest accuracy and, I would say, circuitry culture during construction and commissioning. It is better to take power not from a computer, but from a separate stabilized power supply. The length of the conductors must be kept to a minimum. Power-filtering capacitors C1, C2.C4, C5 d.b. located as close as possible to the outputs of the operational amplifier. Especially important is the proximity to the OS of the elements of the input circuit C3, VD1, R4. A compact arrangement and shielding of the entire structure is desirable. With proper circuit design, you should not have any problems with tuning. None of the requirements listed above were met on my desktop, and yet everything works successfully. So there is hope that if you do everything right, then it will work for you too ;-))) A few words about the scheme itself. She is extremely simple.

Observe the polarity of the photodiode!

Resistor R4 affects the amplitude of the signal from the diode and its shape / frequency characteristics. The smaller the resistor value, the smaller the signal from the photodiode and the better its shape. I got quite decent results when increasing the resistor to 4.7 K. However, I would not advise rushing to increase it. And in general, the first thing you should achieve is the operation of the receiver at some moderate speed, for example 57600. It is better to do this in the following order.

So, after the tenth check of the installation, we bring the resistance of the trimmer R1 to zero and turn on the power. We connect the assembled transmitter (digital and analog parts) to the com port, launch the batch file (after setting the port speed to 57600), which allows us to observe a continuous picture of the transmission of one byte (it was discussed in the first part of the trilogy), place the laser with the optical system removed in two or three centimeters from the photodiode, we connect the logograph to the output of the receiver and begin to slowly increase the resistance R1. After some time, the transistor T1 will begin to open slightly, and a comb of pulses will appear at the output of the receiver.

The optimal value of the resistance R1 is determined visually in the course of experiments by the shape and amplitude of the pulses at the output of the receiver. When the transmitter is turned off, the noise amplitude at the receiver output should not exceed 1-2 volts. Transistor T1 should only be slightly open. The typical value of the voltage on its collector load is 1-2 volts. After achieving success at this first stage, you can move on - gradually push the receiver and transmitter apart, find their best mutual position and, by adjusting R1, get a comb of pulses with an amplitude almost equal to the amplitude of the + 12V supply. Their shape may not be quite rectangular, but the amplitude should be good.

With the maximum possible separation of the transmitter and receiver, it is necessary to determine the diameter of the defocused laser spot. This diameter will give you an idea of ​​the maximum range your link will operate at. For me, this diameter was about 20 cm, which roughly corresponds to a dynamic range of 33 dB. It seems to me that this should be enough for reliable communication at a distance of 100 meters without the use of input lenses or at a distance of 200 meters, if you use a FD320 type LED in the form of a red plastic lens with a diameter of about a centimeter on a rectangular base. And in the presence of input optics ... However, at long ranges there are already other problems ...

Let's go back to setting up the receiver. Now it is useful to try the setting for different com port speeds. And finally, you can connect the digital part of the receiver and repeat the experiments described in the first part of this trilogy. I specifically did not say anything about the design of the receiver. Yes, it's probably useful to have some kind of hoods on the input LEDs. In fact, the receiver is very resistant to all kinds of flare. The usual illumination of a 60-watt bulb from a distance of 70 cm at an angle of 30 degrees did not affect the operation of the circuit in any way. Capacitor C3 "cuts" all low-frequency interference very well.

Author: skov@gaap.spb.ru; Publication: cxem.net

See other articles Section Computers.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Artificial leather for touch emulation 15.04.2024

In a modern technology world where distance is becoming increasingly commonplace, maintaining connection and a sense of closeness is important. Recent developments in artificial skin by German scientists from Saarland University represent a new era in virtual interactions. German researchers from Saarland University have developed ultra-thin films that can transmit the sensation of touch over a distance. This cutting-edge technology provides new opportunities for virtual communication, especially for those who find themselves far from their loved ones. The ultra-thin films developed by the researchers, just 50 micrometers thick, can be integrated into textiles and worn like a second skin. These films act as sensors that recognize tactile signals from mom or dad, and as actuators that transmit these movements to the baby. Parents' touch to the fabric activates sensors that react to pressure and deform the ultra-thin film. This ... >>

Petgugu Global cat litter 15.04.2024

Taking care of pets can often be a challenge, especially when it comes to keeping your home clean. A new interesting solution from the Petgugu Global startup has been presented, which will make life easier for cat owners and help them keep their home perfectly clean and tidy. Startup Petgugu Global has unveiled a unique cat toilet that can automatically flush feces, keeping your home clean and fresh. This innovative device is equipped with various smart sensors that monitor your pet's toilet activity and activate to automatically clean after use. The device connects to the sewer system and ensures efficient waste removal without the need for intervention from the owner. Additionally, the toilet has a large flushable storage capacity, making it ideal for multi-cat households. The Petgugu cat litter bowl is designed for use with water-soluble litters and offers a range of additional ... >>

The attractiveness of caring men 14.04.2024

The stereotype that women prefer "bad boys" has long been widespread. However, recent research conducted by British scientists from Monash University offers a new perspective on this issue. They looked at how women responded to men's emotional responsibility and willingness to help others. The study's findings could change our understanding of what makes men attractive to women. A study conducted by scientists from Monash University leads to new findings about men's attractiveness to women. In the experiment, women were shown photographs of men with brief stories about their behavior in various situations, including their reaction to an encounter with a homeless person. Some of the men ignored the homeless man, while others helped him, such as buying him food. A study found that men who showed empathy and kindness were more attractive to women compared to men who showed empathy and kindness. ... >>

Random news from the Archive

Wavecom CM52 - new automotive range wireless processor 30.04.2007

Wavecom has announced the commercial availability of a new "wireless processor" (Wireless CPU), designated Wavecom CM52. Designed specifically for automotive applications, the device is designed to operate in an extended temperature range and has a reinforced housing that is resistant to severe vibration.

In addition, the CM52 has multiple RF connectors, making it easy to connect to on-board systems. The processor supports CDMA and is the second CDMA product of its kind in the Wavecom range.

Unlike the CM52, the Q2438 model is made in a form factor typical of the rest of the Wavecom Q24 series - due to this, as the manufacturer believes, it provides an easy way to switch between CDMA and other technologies without requiring changes to the mechanical part of the design. Both products provide voice, packet data (1xRTT), SMS and circuit switched data.

Other interesting news:

▪ A sensor that tracks minor facial expressions

▪ Depression reduces the effectiveness of chemotherapy

▪ Samsung 4GB DDR64 RDIMMs

▪ Mobile Airbag

▪ A new color 3D printing method

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the website Experiments in Physics. Selection of articles

▪ article Wedding General. Popular expression

▪ article What major battle that took place on the territory of modern Russia in 1391 is not mentioned in most textbooks? Detailed answer

▪ article Adjuster of cold stamping presses. Standard instruction on labor protection

▪ article People counter in a room that controls lighting. Encyclopedia of radio electronics and electrical engineering

▪ article Radio Super-Test. Encyclopedia of radio electronics and electrical engineering

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024