Arduino is a micro-power AM broadcasting transmitter

    image

    Many still have radio receivers with CB and LW bands, and radio amateur interest in receiving in these bands is also still preserved. On medium waves in the absence of interference (outside the city, in the park, on the balcony, with an external antenna, or, in extreme cases, by the apartment window), many remote radio stations are received in the evening, but during the day only noises are heard on the air. In the DV range, there are no radio stations at all.

    To correct the situation, you can use a simple low-power radio transmitter operating within a radius of several meters. In the process of assembling one of these structures, the author had the idea to try to make such a transmitter based on the Arduino.

    The main requirements for the device are: the available Arduino UNO or Arduino Leonardo board, the maximum simplicity of the electric circuit (no more complicated than the simplest transmitters on one transistor) and the sound quality satisfactory for the AM-range.

    As a carrier for our purposes, you can use a rectangular signal, which is not difficult to obtain, and the reception can be carried out on one of the harmonics. Given the low power of the transmitter, the signals of the "extra" harmonics will not spread beyond the limits of the room and will not cause interference to others.

    Difficulties arise with amplitude control: the signal at the outputs can take only two values, and the use of even the simplest DAC will add tens of resistors to the design.

    Moving forward with analogWrite
    Заметим, что использовать ШИМ и analogWrite в их классическом варианте не удастся из-за высокой частоты несущей, не менее 150 кГц для нижней границы диапазона ДВ. Хотя именно ШИМ, но использованная в ином качестве, поможет получить решение.

    On the other hand, the control of the pulse duration is simply implemented. Find out how this parameter will affect the amplitudes of the harmonics included in the signal.

    Denotef ( t ) function of a square wave with a periodT , pulse durationL and amplitude A:
    image

    In decomposition f ( t ) in Fourier series

    f ( t ) = a 02 + n=1[ancos( 2 π n tT )+bnsin(2πntT )]

    coefficients b n due to parityare zero. Therefore, the amplitudeth harmonic coincides with the coefficient


    But at and good approaching , if a few. So with small amplitude dependence th harmonic from close to linear, and instead of the carrier amplitude, you can change the pulse duration, taking care that it does not exceed a sufficiently small value!

    It is easy to write a sketch to form such a signal, but this is not necessary: ​​the finished signal of the desired shape can be obtained at the output with pulse-width modulation. With a PWM frequency of 62.5 kHz, the third harmonic frequency is 187.5 kHz, and it falls into the broadcasting range of long waves. It is enough to apply a low-frequency signal to the corresponding output of the Arduino and connect an antenna to it, the rest will be done by PWM. It is only important that the value of the value parameter of the analogWrite function does not exceed the limit determined by the amount of permissible distortion. We estimate this boundary.

    Let bewhere - pulse duration in fractions of a period. Then

    .
    Relative deviation from linear function


    at . With increasingdeviation is growing. For and it is about 10%, which is quite a lot. When choosing a higher order harmonic, the deviation becomes even greater. Since at 8 bit PWM pulse duration corresponds to value = 255, then for it is necessary that the value does not exceed . The obtained estimate allows us to get an idea of ​​the order of permissible values ​​and further select the appropriate values ​​experimentally.

    The result of a bulky theory block is a simple scheme:
    image

    and a very simple sketch:

    voidsetup() {
    // Параметры ШИМ
    TCCR1A = TCCR1A & 0xe0 | 1;
    TCCR1B = TCCR1B & 0xe0 | 0x09;
    }
    intconst SHIFT = 8;
    intconst SCALE = 8;
    voidloop() {
      analogWrite(9, (analogRead(A0) - 512) / SCALE + SHIFT);
    }
    

    As the antenna used a segment of the installation wire with a length of 1 meter.

    SHIFT sets the value at the PWM output when there is no input signal. In the process of modulation, it varies from 1 to 15, while the pulse duration is from 1/255 to 15/255 of the period.

    The SCALE constant is chosen experimentally so that the signal from the output of the phone is within the allowable limits of the values ​​at the PWM output.

    When applying to the device input a sine wave of 1 kHz from the GSS, the output of the receiver tuned to a frequency of 187.5 kHz results in a loud signal of undistorted form:

    image

    The reception range of a pocket superheterodyne is about one and a half meters.

    The second time in the DV range the signal is received at a frequency of 250 kHz. Loss of quality by ear when switching to the fourth harmonic is not noticeable. As the harmonic number increases, the distortion increases, but with the selected parameters and at the ninth harmonic of 562.5 kHz, falling into the lower part of the middle-wave range, the quality remains acceptable.

    By increasing (within reasonable limits) the value of SHIFT, you can try to improve the sound quality by searching for a compromise between increasing the number of discretization levels and increasing distortion. SCALE in this case must be reduced to maintain the modulation factor. However, the possibility of receiving at higher harmonics is lost. For example, the experiment with SHIFT = 16 and SCALE = 4 showed a good result at a frequency of 187.5 kHz, but in the CB range the distortions were very large.

    The result was a simple device that does not contain self-made inductors. Its advantages include the stability of the carrier frequency and the absence of spurious frequency modulation, which is usually a problem for the simplest structures.

    In conclusion of the article a video demonstrating the operation of the microtransmitter.


    Also popular now: