"Develop Your Creations"

get a lot of electronic circuits

"Develop Your Creations"

get a lot of electronic circuits

"Develop Your Creations"

get a lot of electronic circuits

SDR Soundcard Tester

The key to using a soundcard successfully in digital signal processing or digital radio applications lies principally in the characteristics of the soundcard itself. This applies in particular to SDR (software defi ned radio) programs that turn your PC into a top-class AM/SSB/CW receiver, assuming your soundcard cooperates. If you want to experiment with SDR and avoid a lot of frustration, it is worth checking fi rst whether the PC soundcard you plan to use is suitable. There are three essential elements to success:
  • the soundcard must have a stereo line-level input;
  • the card must be equipped with an input anti-aliasing filter; and
  • the sample rate must be at least 48 kHz and the card must be able to cope with signals up to 24 kHz.
Many laptops have only a mono microphone input, sometimes also rather limited in bandwidth. In this case it may be possible to use an external USB soundcard. Most desktop PCs these days have an internal integrated soundcard, although some of these do not feature an anti-aliasing fi lter. Attempts to disable the integrated soundcard and replace it with a better one often meet with failure; again, an external USB soundcard is a possible solution.

Circuit diagram:

SDR Soundcard Tester circuit diagram
SDR Soundcard Tester Circuit Diagram

To avoid guesswork, the best way to proceed is to test the soundcard using this very small circuit. This will help to diagnose any problems and will help determine whether the card is suitable for use with an SDR program. Figure 1 shows a simple square-wave generator built around an NE555 timer IC. At the output is a 15 kHz signal rich in higher harmonics. Using this we can determine whether or not the soundcard can process the harmonics at 30 kHz, 45 kHz and so on. An anti-aliasing filter at the soundcard input should attenuate all signals above 24 kHz. The frequency of the test generator is, within limits, dependent on its supply voltage.

SDR Soundcard TesterUsing an adjustable power supply, a frequency range from 10 kHz to 20 kHz can therefore be covered. There are two RC networks at the output of the test circuit, a high-pass filter and a low-pass filter, acting as simple phase shifters. At the basic frequency of 15 kHz these provide a total phase difference of 90 degrees, corresponding exactly to the typical situation at the output of an SDR receiver circuit using an I-Q mixer: signals at the same frequency but differing in phase. To test the soundcard we need an SDR program running on the PC as well as the circuit of Figure 1. Suitable software includes SDradio (available for download from http://digilander.libero.it/i2phd/sdradio/).

When things are running correctly, the screen should display just two signals: the wanted signal at 15 kHz and a weaker image at –15 kHz (Figure 2). Suppression of the image may not be particularly good as the test circuit does not have very high phase and amplitude accuracy. If, however, the signals have the same level, there is a problem in the processing of the two channels: it is probable that the soundcard only has a monophonic input. If there is no anti-aliasing filter at the input of the soundcard the spectrum will show a large number of extra lines (Figure 3): it is easy to work out which harmonic corresponds to which alias frequency.

SDR Soundcard TesterThe results obtained using an I-Q receiver were grim: frequencies all the way out to 100 kHz were wrapped into the audible range, resulting in bubbling, hissing and whistling. In theory it would be possible to add an anti-aliasing filter to the output of the receiver to allow use with soundcards that are not equipped with such a filter. In practice, however, it is not easy to achieve the required sharp cutoff and symmetry between the two channels. A typical soundcard has a low pass filter set at 24 kHz which by 27 kHz is already attenuating the signal by some 60 dB. This is only practical using digital fi lters; an adjustable analogue circuit to achieve this performance would be so complex that the simplicity benefits of SDR receiver technology would entirely evaporate.

DIY Electronics Projects and Circuit Diagrams, Schematics only at www.extremecircuits.net

Ultrasonic Distant Obstacle Detector

The first sensor a robot usually gets fitted with is an obstacle detector. It may take three different forms, depending on the type of obstacle you want to detect and also — indeed, above all — on the distance at which you want detection to take place. For close or very close obstacles, reflective IR sensors are most often used, an example of such a project appears elsewhere in this blog. These sensors are however limited to distances of a few mm to ten or so mm at most. Another simple and frequently-encountered solution consists of using antennae-like contact detectors or ‘whiskers’, which are nothing more than longer or shorter pieces of piano wire or something similar operating microswitches.

Circuit diagram:

Ultrasonic Distant Obstacle Detector circuit diagram
Ultrasonic Distant Obstacle Detector Circuit Diagram

Detection takes place at a slightly greater distance than with IR sensors, but is still limited to a few cm, as otherwise the whiskers become too long and hinder the robot’s normal movement, as they run the risk of getting caught up in things around it. For obstacles more than a couple of cm away, there is another effective solution, which is to use ultrasound. It’s often tricky to use, as designers think as if they needed to produce a telemeter, when in fact here we’re just looking at detecting the presence or absence of obstacles, not measuring how far away they are. So here we’re suggesting an original approach that makes it possible to reduce the circuit required to a handful of cheap, ordinary components.

 Ultrasonic Distant Obstacle Detector Our solution is based on the howlround or feedback effect all too familiar to sound engineers. This effect, which appears as a more or less violent squealing, occurs when a microphone picks up sound from speakers that are connected to it via an amplifier. Feeding back the output signal from the speaker into the input (the microphone) in this way creates an acoustic oscillator. Our detector works on the same principle, except that the microphone is an ultrasound receiver while the speaker is an ultrasonic emitter. They are linked just by a very easily-built ordinary amplifier. Feedback from the output to the input occurs only when the ultrasonic beam is reflected off the obstacle we are trying to detect.

As Figure 1 shows, the receiver RXUS is connected to the input of a high-gain amplifier using transistors T1 and T2. As the gain of this stage is very high, it can be reduced if necessary by pot P1 to avoid its going into oscillation all on its own, even in the absence of an obstacle. The output of this amplifier is connected to the ultrasonic emitter TXUS, therby forming the loop that is liable to oscillate due to the effect of feedback. When this takes place, i.e. when an obstacle is close enough to the ultrasonic transducers, a pseudo-sine wave signal at their resonant frequency of 40 kHz appears at the amplifier output, i.e. at the terminals of the transmitting transducer.

This signal is rectified by D1 and D2 and filtered by C3 and, if its amplitude is high enough, it produces a current in R6 capable of turning transistor T3 on to a greater or lesser extent. Depending on the nature and distance of the obstacle, this process does not necessarily happen in a completely on/off manner, and so the level available at T3 collector may be quite poorly-defined. The Schmitt CMOS invertors are there to convert it into a logic signal worthy of the name. So in the presence of an obstacle, S1 goes high and S2 goes low. Powering can be from any voltage between 5 and 12 V.

The gain, and hence the circuit’s detection sensitivity, does vary a bit with the supply voltage, but in all cases P1 makes it possible to achieve a satisfactory setting. Although it is very simple, under good conditions this circuit is capable of detecting a normally-ultrasound-reflective obstacle up to around 5 or 6 cm away. If a smaller distance is needed, you simply have to reduce the gain by adjusting P1. Building the circuit is straightforward. Both transducers are 40 kHz types that can be found in any retailers, and the other components couldn’t be more ordinary.

However, one precaution is needed when wiring up the transducers. Even though they aren’t strictly speaking polarized as such, one of their terminals is common with the metal case, and this is the one that must be connected to the circuit earth, on both emitter and receiver. The circuit should work at once, and all you have to do is adjust P1 to set the detection distance you want — but this is also dependent on the positioning of the transducers. For optimum operation, we recommend you angle them as shown in Figure 2.

DIY Electronics Projects and Circuit Diagrams, Schematics only at www.extremecircuits.net

Optical Mixer

Mixing signals at different frequencies is common practice in many areas of electronics. Audio systems, communications systems and radio systems are typical application areas. With conventional frequency mixers, feedback capacitance can cause the signal sources to be affected by the output signal, thus making supplementary filter circuits necessary. The signals from the individual signal sources can also affect each other. In an optical mixer, LEDs or laser diodes are used to first convert the signals to be mixed into optical signals. The light beams are then aimed at a shared photo-sensor (a light-sensitive resistor, photo-diode, photo-transistor, or photovoltaic cell). The current in the output circuit is thus controlled by the mixed input signals, so signal from the photo-sensor is the sum of the input signals.

Optical Mixer

The amount of feedback capacitance can be made quite small, depending on the construction. Another benefit is that the input and output circuits have separate grounds, which can be electrically connected if necessary. This operating principle directly encourages experimentation. Additional input stages can be added to act on the shared photo-sensor. If the receiver signal is applied to a component with a curved characteristic, such as a diode, this produces amplitude modulation, which can be used in a hetero-dyne receiver. If the difference between the frequencies of the two input signals is small, a beat effect occurs. The components must be selected according to the frequency range that is used.

DIY Electronics Projects and Circuit Diagrams, Schematics only at www.extremecircuits.net

Simple Oscillator / Pipe Locator

Sometimes the need arises to construct a really simple oscillator. This could hardly be simpler than the circuit shown here, which uses just three components, and offers five separate octaves, beginning around Middle C (Stage 14). Octave # 5 is missing, due to the famous (or infamous) missing Stage 11 of the 4060B IC. We might call this a Colpitts ‘L’ oscillator, without the ‘C’. Due to the reactance of the 100-µH inductor and the propagation delay of the internal oscillator, oscillation is set up around 5 MHz. When this is divided down, Stage 14 approaches the frequency of Middle C (Middle C = 261.626 Hz).

Simple Oscillator / Pipe Locator circuit diagram
Stages 13, 12, 10, and 9 provide higher octaves, with Stages 8 to 4 being in the region of ultrasound. If the oscillator’s output is taken to the aerial of a Medium Wave Radio, L1 may serve as the search coil of a Pipe Locator, with a range of about 50 mm. This is tuned by finding a suitable heterodyne (beat note) on the medium wave band. In that case, piezo sounder Bz1 is omitted. The Simple Oscillator / Pipe Locator draws around 7mA from a 9-12 V DC source.

DIY Electronics Projects and Circuit Diagrams, Schematics only at www.extremecircuits.net

Proximity Switch

This circuit is for an unusually sensitive and stable proximity alarm which may be built at very low cost. If the negative terminal is grounded, it will detect the presence of a hand at more than 200mm. If it is not grounded, this range is reduced to about one-third. The Proximity Switch emits a loud, falling siren when a body is detected within its range. A wide range of metal objects may be used for the sensor, including a metal plate, a doorknob, tin foil, a set of burglar bars — even a complete bicycle. Not only this, but any metal object which comes within range of the sensor, itself becomes a sensor.

Proximity Switch
For example, if a tin foil sensor is mounted underneath a table, metal items on top of the table, such as cutlery, or a dinner service, become sensors themselves. The touch plate connected to the free end of R1 detects the electric field surrounding the human body, and this is of a relatively constant value and can therefore be reliably picked up. R1 is not strictly necessary, but serves as some measure of protection against static charge on the body if the sensor should be touched directly. As a body approaches the sensor, the value of C1 effectively increases, causing the frequency of oscillator IC1.A to drop.

Consequently capacitor C2 has more time to discharge through P2, with the result that the inputs at IC1.B go Low, and the output goes High. As the output goes High, so C3 is charged through LED D2. D2 serves a dual purpose —namely as a visual indication of detection, and to lower the maximum charge on C3, thus facilitating a sharper distinction between High and Low states of capacitor C3. The value of R4 is chosen to enable C3 to discharge relatively quickly as pulses through D2 are no longer sufficient to maintain its charge. The value of C3 may be increased for a longer sounding of the siren, with a slight reduction in responsiveness at the sensor.

Proximity Switch circuit diagram
When C3 goes High, this triggers siren IC1.C and IC1.D. The two NAND gates drive piezo sounder X1 in push-pull fashion, thereby greatly increasing its volume. If a piezo tweeter is used here, the volume will be sufficient to make one’s ears sing. The current consumption of the circuit is so low a small 9-V alkaline PP3 battery would last for about one month. As battery voltage falls, so sensitivity drops off slightly, with the result that P1 may require occasional readjustment to maintain maximum sensitivity. On the down side of low cost, the hysteresis properties of the 4093 used in the circuit are critical to operation, adjustment and stability of the detector.

In some cases, particularly with extremely high sensitivity settings, it will be found that the circuit is best powered from a regulated voltage source. The PCB has an extra ground terminal to enable it to be easily connected to a large earthing system. Current consumption was measured at 3.5 mA stand-by or 7 mA with the buzzer activated. Usually, only P1 will require adjustment. P2 is used in place of a standard resistor in order to match temperature coefficients, and thus to enhance stability. P2 should be adjusted to around 50 k, and left that that setting.

Proximity Switch PCB
The circuit is ideally adjusted so that D2 ceases to light when no body is near the sensor. Multiturn presets must be used for P1 and P2. Since the piezo sounder is the part of the circuit which is least affected by body presence, a switch may be inserted in one of its leads to switch the alarm on and off after D2 has been used to check adjustment. Make sure that there is a secure connection between the circuit and any metal sensor which is used.


Resistors:
  • R1 = 10kΩ
  • R2 = 4kΩ7
  • R3 = 1kΩ
  • R4 = 47kΩ
  • R5 = 47kΩ
  • P1,P2 = 100kΩ multiturn cermet, horizontal
Capacitors:
  • C1,C2 = 22pF
  • C3 = 22µF 40V radial
  • C4 = 10nF
  • C5 = 100µF 25V radial
Semiconductors:
  • D1 = 1N4148
  • D2 = LED, red
  • IC1 = 4093
Miscellaneous:
  • BZ1 = AC buzzer

DIY Electronics Projects and Circuit Diagrams, Schematics only at www.extremecircuits.net

    Phantom Supply From Batteries

    Professional (directional) microphones often require a phantom supply of 48 V. This is fed via the signal lines to the microphone and has to be of a high quality. A portable supply can be made with 32 AA-cells in series, but that isn’t very user friendly. This circuit requires just four AA-cells (or five rechargeable1.2 V cells). We decided to use a standard push-pull converter, which is easy to drive and which has a predictable output voltage. Another advantage is that no complex feedback mechanism is required. For the design of the circuit we start with the assumption that we have a fresh set of batteries.

    Phantom Supply From BatteriesWe then induce a voltage in the secondary winding that is a bit higher than we need, so that we’ll still have a high enough voltage to drive the linear voltage regulator when the battery voltage starts to drop (refer to the circuit in Figure 1). T1 are T2 are turned on and off by an astable multivibrator. We’ve used a 4047 low-power multivibrator for this, which has been configured to run in an astable free-running mode. The complementary Q outputs have a guaranteed duty-cycle of 50%, thereby preventing a DC current from flowing through the transformer. The core could otherwise become saturated, which results in a short-circuit between 6V and ground.

    This could be fatal for the FETs. The oscillator is set by R1/C1 to run at a frequency of about 80 kHz. R2/R3 and D1/D2 make T1 and T2 conduct a little later and turn off a little faster, guaranteeing a dead-time and avoiding a short-circuit situation. We measured the on-resistance of the BS170 and found it was only 0.5 Ω, which isn’t bad for this type of FET. You can of course use other FETs, as long as they have a low on-resistance. For the transformer we used a somewhat larger toroidal core with a high AL factor. This not only reduces the leakage inductance, but it also keeps the number of windings small. Our final choice was a TX25/15/10-3E5 made by Ferroxcube, which has dimensions of about 25x10 mm.

    Phantom Supply From Batteries circuit diagramThis makes the construction of the transformer a lot easier. The secondary winding is wound first: 77 turns of a 0.5 mm dia. enamelled copper wire (ECW). If you wind this carefully you’ll find that it fits on one layer and that 3 meters is more than enough. The best way to keep the two primary windings identical is to wind them at the same time. You should take two 30 cm lengths of 0.8 mm dia. ECW and wind these seven times round the core, on the opposite side to the secondary connections. The centre tap is made by connecting the inner two wires together. In this way we get two primary windings of seven turns each.

    The output voltage of TR1 is rectified by a full-wave rectifier, which is made with fast diodes due to the high frequency involved. C4 suppresses the worst of the RF noise and this is followed by an extra filter (L1/C5/C6) that reduces the remaining ripple. The output provides a clean voltage to regulator IC2. It is best to use an LM317HV for the regulator, since it has been designed to cope with a higher voltage between the input and output. The LM317 that we used in our prototype worked all right, but it wouldn’t have been happy with a short at the output since the voltage drop would then be greater than the permitted 40 V.

    If you ensure that a short cannot occur, through the use of the usual 6k81 resistors in the signal lines, then the current drawn per microphone will never exceed 14 mA and you can still use an ordinary LM317. D7 and D8 protect the LM317 from a short at the input. There is virtually no ripple to speak of. Any remaining noise lies above 160 kHz, and this won’t be a problem in most applications. The circuit can provide enough current to power three microphones at the same time (although that may depend on the types used). When the input voltage dropped to 5.1 V the current consumption was about 270 mA.

    The reference voltage sometimes deviates a little from its correct value. In that case you should adjust R4 to make the output voltage equal to 48 V. The equation for this is: R4 = (48–Vref ) / (Vref / R5+50µA). To minimise interference (remember that we’re dealing with a switched-mode supply) this circuit should be housed in an earthed metal enclosure.

    DIY Electronics Projects and Circuit Diagrams, Schematics only at www.extremecircuits.net

    Simple Relay Step-Up Circuits

    Have you ever needed to power a 12-volt relay in a circuit but only had 6 or 9 volts available? This simple circuit will solve that problem. It allows 12-volt relays to be operated from 6 or 9 volts, or 24-volt relays from 12 volts. While most normal relays require the manufacturer-specified coil voltage to reliably pull the contacts together, once the contacts are together you only need about half that rated voltage to hold them in. This circuit works by using that principle to provide a short burst of twice the supply voltage to move the contacts and then applies the available 6 or 9 volts to the relay to lock the contacts in place.

    Simple Relay Step-Up Circuits
    With reference to Figure A., when the main supply is applied to the circuit the 220-µF capacitor, C1, charges quickly to +6 volts through resistor R3. The circuit is now awaiting voltage on the control input. When a control voltage (can be as little as 3 volts) is applied to the control input, transistor T1 switches on. The other transistor, a BC558, is also switched on. This allows connection of the relay coil to the main supply rail while T1 shorts the positive terminal of the 220-µF capacitor to ground. Now the negative terminal of the capacitor is at a potential of –6 volts. This is applied to the other side of the relay coil. The relay coil potential is then briefly 12 volts — enough to actuate the contact(s).

    Simple Relay Step-Up Circuits
    However, the coil voltage drops to the supply voltage fairly quickly. The period is determined by the R-C time constant of the relay coil resistance and the 220-µF capacitor. While this circuit is simple and works well in many situations, it has a few weaknesses in its current form. The relay may remain energized for as long as one second after the control input has fallen. Also, if the control input goes high before the capacitor has fully recharged, it may not have enough energy to control the relay reliably. Also, the voltage drop across the diode limits the voltage to about 10.8 volts.

    The more complex version of the circuit shown in Figure B fixes these problems by using an extra transistor and diode. In this arrangement, the BC558 is now isolated from the recharge current of the capacitor. The new transistor provides fast charging for the capacitor. Charging is completed within the mechanical response time of the relay. When using these circuits it should be noted that the contact pressure of the relay contacts may be al little lower than with the nominal coil voltage. It is therefore advisable to keep contact currents well below the maximum specified value.

    DIY Electronics Projects and Circuit Diagrams, Schematics only at www.extremecircuits.net

    AM Modulator and 50W RF Output Stage

    The circuit presented here makes amplitude modulation possible, and it also has the significant advantage that it replaces the somewhat exotic and quite expensive OP603AP output opamp with a standard type. Of course, this amplitude modulator can also be used with other models of function generator or for other purposes. As you know, the gain of an NE592 video opamp can be set to 400, 100 or 10 by means of an external jumper. Intermediate settings can be achieved by using a suitable resistance in place of the jumper. This adjustment takes place in the emitter leads of the differential amplifier, directly at the input to the opamp, where the signal amplitude is low.

    AM Modulator and 50W RF Output Stage
    A BF245B FET is used here as a controllable resistance. With suitably low signal levels, it provides at least 50% of clean amplitude modulation for modulating signals (LF) up to 10 kHz and modulated signals (HF) up to 20 MHz. The FET can also be driven with a DC voltage to control the amplitude of the output signal over a 10:1 range with low distortion. Any slight asymmetry of the modulated signal can be corrected by applying a small correction voltage via P1. P2 is used to bias the FET at around –2.5 V. The output stage is built using discrete transistors and guarantees a 50 Ω output impedance with low DC offset.

    The complete circuit can deliver a constant amplitude output signal of up to 2.5 Vpp (unmodulated) for frequencies ranging to over 20 MHz. If the signal is not modulated, the maximum amplitude can be increased somewhat. Output level controls (a potentiometer and/or range switches), if used, should be placed between the NE592 output and the input of the output stage. In such cases, an emitter-follower stage with a high input impedance might be a good idea, since the opamp should operated with a load of at least 1kΩ. Conceivably, the gate of the FET could be driven via an additional opamp, together with the demodulated signal from the output of the NE592 applied as negative feedback, to achieve higher modulation levels.

    DIY Electronics Projects and Circuit Diagrams, Schematics only at www.extremecircuits.net

    13V/2A PSU For Handheld Rigs

    This compact 13-V/2-A power supply for ham radio rigs and other VHF/UHF portable PMRs is based on the STR2012/13 voltage regulator IC from Sanken Electric Co. Many power supplies for handheld amateur radio rigs are based on the LM317, LM350 or even the good old LM723. Unfortunately, these regulators are invariably associated with a fair number of external components, while we should also consider design factors like total power dissipation and input voltage range. The STR is a hybrid power IC containing a switch-mode power supply. It supplies a fixed output voltage and accepts relatively high input voltages.

    Another advantage is its relatively high power dissipation rating. The 5-pin STR is available for 5.1 V, 12 V, 13 V, 15 V and 24 V at an output current rating of 2 A. Here, the STR2012 and STR2013 are suggested for output voltages of 12 V or 13 V respectively. The normal operating voltage of most handhelds being between 12.6 V and 13.8 V, the STR1303 will be the preferred device in most cases. A high-speed crowbar circuit is added to the regulator output. Thyristor Th1 (a TIC106 or 2N4442) is triggered when the output voltage rises above the zener voltage of D2, that is, 15 volts (approximately). When this happens, the thyristor short-circuits the supply output, protecting the radio against over voltage and blowing fuse F1.

    13V/2A PSU For Handheld Rigs
    Diode D1 acts as a reverse polarity protection, also in combination with fuse F1. To allow for its dissipated heat, the STR regulator should be mounted on a heatsink. Efficiency will be around 80%, with ripple rejection at a comfortable 45 dB. The raw input voltage to the regulator should be in the range 18 to 35 V. The coil, L1, may be selected from the range produced by New-port. The type 1430430 is suggested. If difficult to obtain, then an ordinary triac suppressor type may be used instead.

    Note, however, that the inductance of these coils is usually just 100µH, so you have to count the number of turns and add another 0.7 times that number to arrive at about 300 µH. Finally, keep the wire between pin 3 of the STR and ground as short as possible, and connect at least the negative terminals of C1 and C3 to this point to give a ‘star’ type ground connection.

    DIY Electronics Projects and Circuit Diagrams, Schematics only at www.extremecircuits.net