Sunday, 29 March 2015

Automatic Room KeyCard Power Switch

Hotel rooms are often furnished with an interior key-holder near the main door which enables the ac power supply to everything in the room only when the key/keycard is hanged/inserted. The circuit given here to flip electric lights (and other appliances) is along the same lines, but the solution is amazingly simple and inexpensive!
A bump switch (S1) is attached to the circuit, and its long lever arm is extended to the outside such that when the key card is hanged on it the bump switch is closed. Now, the electromagnetic relay (RL1) will pull in and complete the circuit for all the ac-powered appliances in the room. As soon as the card is removed,the bump switch will open, and this in turn releases the relay contacts. Various connected appliances will automatically (and inevitably) be switched off after a short delay when the room key is picked up from the key-hanger.
Schematic of the KeyCard Power Switch Circuit
The circuit described here does not require an AC power transformer. Instead, the voltage is reduced by series capacitor (C1) connected directly to the mains voltage via an inrush current limiting resistor (R1). The AC230V voltage is rectified,and limited by the peculiar diode bridge configuration (D2-D3 + ZD1-ZD2) and the resulting steady dc voltage of 12 volt is smoothed by the electrolytic capacitor (C2). The “always-illumed” visual indicator (LED1) works as the key-holder location finder. Finally, toggle switch (S2) can be used to bypass the automatic switching function, in case of an emergency.

The entire circuit should be fitted in an insulated enclosure, since it is connected directly to the ac powerlines. Note that the coil of relay RL1 must be have a low operating current (no more than a few dozen milliamperes). The author used a type HRSS 4H-S-12V DC (from 3NIX) in the prototype. The 3NIX sugar cube relay draws near 26mA at 12V DC.
At first glance, many readers (and evaluators) might think this circuit is superfluous because only one heavy-duty bump switch can play the game well. Yes, but it is highly-flexible and leaves enough room for expansion. An interested hobbyist can make numerous modifications like key-card based activation, remote switching control, etc (ofcouse using galvanic-isolators) without too much difficulty. I will keep those as surprises for future designs!




Friday, 6 March 2015

Automatic Air Humidifier

The humidifier circuit is based on a special humidity sensor Type NH-3 from Figaro. Depending on the sensor output, the circuit drives a ventilator that is part of an air humidifying installation. The ventilator is switched on an off by a triac. So as to keep the circuit as simple as possible, the supply voltage and the test voltage are drawn directly from the mains supply. The 240 V mains voltage is converted into an 8.9 V pulsating direct potential by capacitor C1, resistor R1 and zener diode D1. The pulsating voltage is used to drive the sensor.
 
It is also transformed to a 7.5 V supply voltage by D2 and C2. The sensor needs an alternating drive voltage at a level not higher than 1.5 V. This potential is obtained from the pulsating direct voltage by network R2-R3-C3-C4, which removes the direct voltage component and lowers the level to 1.4 V. At the same time, the network functions as a 50 Hz bandpass filter. To ensure that the drive voltage for the sensor does not fall outside the common-mode range of op amp IC2, an offset potential of 3.9 V is applied to the sensor as well as to the voltage reference source of the op amp.
This potential is provided by zener diode D3. The reference level is set with P1.The op amp is given some hysteresis by R5. When the humidity of the ambient air rises above that corresponding to the level with P1, the output voltage of IC2 is about 6 V. This results in T1 being cut off by D4, whereupon the triac is also disabled. When the humidity drops below that corresponding to the level set with P1, a pulsating potential appears at the output of IC2. This voltage is used to charge capacitor C6.

 
The charged capacitor thereupon provides a steady current to the triac. When T1 is cut off for some time, capacitor C6 is discharged via resistor R7. Capacitors C1 and C7 are discharged via R9, so that after the mains has been switched off, no dangerous potential remains at the pins of the mains connector (K1). The humidifier is best built on the PCB shown in Figure 2, which is available ready made (see Readers services pages towards the end of this issue). Bear in mind that parts of the board will carry mains voltage, which makes careful working and the enclosing of the board in a plastic case imperative. The humidifier may be converted into a dehumidifier by interchanging connections 1 and 3 to sensor IC1.
 
Parts list

Resistors:

R1 = 470 Ω, 1 W
R2, R3 = 10 kΩ
R4 = 1 kΩ
R5 = 56 kΩ
R6 = 6.8 kΩ
R7 = 4.7 kΩ
R8 = 470 Ω
R9 = 2.2 MΩ
R10 = 39 Ω, 1 W
P1 = 1 kΩ preset
Capacitors:
C1 = 0.47 µF, 250 V a.c.
C2 = 470 µF, 16 V, radial
C3, C4 = 0.33 µF, metallized polyester, 5%
C5 = 0.1 µF, high stability
C6 = 47 µF, 16 V, radial
C7 = 0.047 µF, 250 V a.c.
Semiconductors:
D1 = zener diode, 8.2 V, 1.3 W
D2 = 1N4001
D3 = zener diode, 3.9 V, 500 mW
D4 = zener diode, 2.4 V, 500 mW
T1 = BC557B
Integrated circuits:
IC1 = NH-3 (Figaro)
IC2 = TLC271CP Tri
1 = TLC336T (SGS)
Miscellaneous:
K1, K2 = 2-way terminal block for board mounting, pitch 7.5 mm
F1 = fuse-holder with 630 mA slow fuse.

Fan Controller Using Just Two Components

The Maxim MAX 6665 (www.maxim-ic.com) provides a complete temperature-dependent fan controller. It can switch fans operating at voltages of up to 24 V and currents of up to 250 mA. The IC is available from the manufacturer in versions with preset threshold temperatures between +40 °C (MAX6665 ASA40) and +70 °C (MAX6665 ASA 70). The device’s hysteresis can be set by the user via the HYST input, which can be connected to +3.3 V, connected to ground, or left open. The following table shows the hysteresis values available:

HYST = Hysteresis
open = 1 °C
ground = 4 °C
+3.3V = 8 °C


The other pins of the SO8 package are the FORCEON input and the status outputs WARN, OT and FANON. The test input FORCEON allows the fan to be run even below the threshold temperature. The open-drain output WARN goes low when the temperature rises more than 15 °C above the threshold temperature, while the open-drain output OT indicates when the temperature is more than 30 °C above the threshold. The push-pull output FANON can be used to indicate to a connected microcontroller that the fan is turned on.

Automotive LED Timing Light

A useful timing strobe can be constructed using high-brightness LEDs and a few common components. Ignition pulses from the number 1 cylinder high-tension lead are used to trigger the circuit via a home-made inductive pickup. Transistors Q1 & Q2 buffer and amplify the pulses from the pickup, which then drive the inputs of three Schmitt-trigger inverters (IC1a, IC1c & IC1f). Each positive pulse at the inverter inputs causes a low pulse at their outputs, forward-biasing D2 and immediately discharging the 6.8nF capacitor. When the capacitor is discharged, the inputs of the second bank of three inverters (IC1b, IC1d & IC1e) see a logic low level, so their outputs go high, driving Q3 into conduction and powering the LED array. After the pulse ends, the IC1a, IC1c & IC1f inverter outputs return high, reverse biasing D2
However, it takes some time for the 6.8nF capacitor to charge to the logic high threshold voltage of the inverters’ inputs, effectively stretching the initial pulse width and lighting the LEDs for the required amount of time. The pickup can be salvaged from an old Xenon timing light or made up from a "C" type ferrite or powered iron core large enough to fit around a HT lead. Some experimentation will be required to determine the number of turns required to achieve reliable triggering. About 100 turns of light-gauge wire proved sufficient on the prototype. A cleat is used to close the magnetic path around the lead and is held in place with a large battery clip. Miniature screened microphone cable can be used to connect the pickup to the circuit, to prevent interference from other sources.

Thursday, 5 March 2015

LED Torch Uses Blocking Oscillator

This simple LED torch is driven by a 2-transistor blocking oscillator which steps up the voltage from a 1.5V cell. It relies on the inherent current limiting of the 150µH choke to protect the white LED from over-drive. With a 9V zener diode in place of the white LED, it could also provide a 9V supply provided the current drain is modest.
 Circuit diagram:
LED torch uses blocking oscillator circuit schematic

How To Connect Two Computers Using Modems

Have you ever connected two PCs together via modems using a twisted pair cable and nothing happened? That’s because the modems are expecting a phone line with all the signals and voltages supplied by the local telephone exchange. This circuit simulates the DC power and signal isolation but not the "dial tone" or the "ring signal". It suffices to connect two PCs together to communicate and exchange files using HyperTerminal. The circuit is self-explanatory and needs only one power supply for both modem lines. Although 50V DC is the usual exchange line voltage, this circuit should operate down to 20V. A 600O line transformer (eg. Jaycar cat. MM-1900) provides signal isolation, while the resistors provide current limiting and keep the lines as balanced as possible.
When using this set-up with HyperTerminal, you should not select a Windows modem driver in the "Connect To" dialog. Instead, connect directly to the relevant COM port. Next, verify that the modems are working by sending information commands such as "ATI1" or "ATI3". If you don’t get a response using these commands, try resetting the modem(s) using the "AT&Z" command. Assuming you do get a response, set one in originate mode using the "ATD" command and the other in answer mode with the "ATA" command. If all is well, you should now be able to type in one terminal window and see the results echoed in the second PC’s terminal window. To return to control mode, type "+++". The advantage of using modems instead of a serial cable between COM ports is that the two PCs can be kilometres apart instead of a few metres. For example, you could connect the house PC to the workshop PC on the other side of the farm.

Dual Power Amplifier Using TDA7293 MOSFET IC

As readers will know, there are already several power amplifier projects, two using IC power amps (aka power opamps). Both have been popular, and this project is not designed to replace either of them. However, it is significantly smaller than the others, so it makes building a multiple amp unit somewhat easier because the space demand is much lower. It's quite simple to include 4 amps (two boards) into a small space, but be aware that good heatsinking is essential if you expect to run these amps at significant power levels.
The TDA7293 IC uses a MOSFET power stage, where the others featured use bipolar transistors. The main benefit of the MOSFET stage is that it doesn't need such radical protection circuitry as a bipolar stage, so unpleasant protection circuit artefacts are eliminated. There are no apparent downsides to the TDA7293, although it was found that one batch required a much higher voltage on the Standby and Mute pins than specified, or the amps would not work. This is not a limitation, since both are tied to the positive supply rail and are therefore disabled.

This particular project has been planned for a long time, but for some reason I never got around to completing the board or the project description. This is now rectified, and it's ready to "rock and roll". The board is very small - only 77 x 31mm, so getting it into tight spaces is easy ... provided adequate heatsinking is available of course.

Description

The TDA7293 has a bewildering number of options, even allowing you to add a second power stage (in another IC) in parallel with the main one. This improves power into low impedance loads, but is a rather expensive way to get a relatively small power increase. It also features muting and standby functions, although I've elected not to use these.

The schematic is shown in Figure 1, and is based on the PCB version. All unnecessary functions have been disabled, so it functions as a perfectly normal power amplifier. While the board is designed to take two TDA7293 ICs, it can naturally be operated with only one, and the PCB is small enough so that this is not an inconvenience. A LED is included to indicate that power is available, and because of the low current this will typically be a high brightness type.

The IC has been shown in the same format that's shown in the data sheet, but has been cleaned up for publication here. Since there are two amps on the board, there are two of most of the things shown, other than the power supply bypass caps and LED "Power Good" indicator. These ICs are extremely reliable (as are most power amp ICs), and to reduce the PCB size as much as possible, fuse clips and fuses have not been included. Instead, there are fusible tracks on the board that will fail if there is a catastrophic fault. While this is not an extremely reliable fuse, the purpose is to prevent power transformer failure, not to protect the amplifiers or PCB.

I normally use a gain of 23 (27dB) for all amplifiers, and the TDA7293 is specified for a minimum gain of 26dB, below which it may oscillate. Although this is only a small margin, tests so far indicate that the amp is completely stable. If you wish, you may increase the gain to 28 (29dB) to give a bit more safety margin. To do this, just change the input and feedback resistors (R3A/B and R4A/B) from 22k to 27k.

The circuit is conventional, and is very simple because all additional internal functions are unused. The LED is optional, and if you don't think you'll need it, it may be omitted, along with series resistor R3. All connections can be made with plugs and sockets, or hard wired. In most cases, I expect that hard wiring will be the most common, as the connectors are a pain to wire, and add unnecessary cost as well as reduce reliability.

The TDA7293 specifications might lead you to believe that it can use supply voltages of up to ±50V. With zero input signal (and therefore no output) it might, but I don't recommend anything greater than ±35V if 4 ohm loads are expected, although ±42V will be fine if you can provide good heatsinking. In general, the lower supply voltage is more than acceptable for 99% of all applications, and higher voltages should not be used unless there is no choice. Naturally, if you can afford to lose a few ICs to experiments, then go for the 42V supplies (obtained from a 30+30V transformer).

Construction

Because of the pin spacings, these ICs are extremely awkward to use without a PCB. Consequently, I recommend that you use the ESP board because it makes building the amplifier very simple. The PCBs are double sided with plated-through holes, so are very unforgiving of mistakes unless you have a good solder sucker. The best way to remove parts from a double sided board is to cut the pins off the component, then remove each pin fragment individually. This is obviously not something you'd wish to do if a power amp IC were installed incorrectly, since it will be unusable afterwards.

The diagram above shows the pinouts for the TDA7293V (the "V" means vertical mounting). Soldering the ICs must be left until last. Mount the ICs on your heatsink temporarily, and slide the PCB over the pins. Make sure that all pins go through their holes, and that there is no strain on the ICs that may try to left the edge off the heatsink. When ICs and PCB are straight and aligned, carefully solder at least 4 pins on each IC to hold them in place. The remaining pins can then be soldered. Remember, if you mess up the alignment at this point in construction, it can be extremely difficult to fix, so take your time to ensure there are no mistakes.

This amplifier must not be connected to a preamp that does not have an output coupling capacitor. Even though there is a cap in the feedback circuit, it can still pass DC because there is no input cap on the PCB. I normally include an input cap, but the goal of this board was to allow it to fit into the smallest space possible, and the available board space is not enough to include another capacitor. A volume control (typically 10k log/ audio taper) may be connected in the input circuit if desired.

Note that the metal tab of the TDA7293 is connected to the -Ve supply, so must be insulated from the heatsink. The more care you take with the mounting arrangement, the better. While you can use a screw through an insulating bush and a piece of mica to insulate the tab, a better alternative is to use a clamping bar of some kind. How you go about this depends a lot on your home workshop tools and abilities, but one arrangement I've found highly satisfactory is a suitable length of 6.25mm square solid steel bar. This is very strong, and allows good pressure on the mica (or Kapton) for maximum heat transfer. Naturally, heatsink compound is absolutely essential.

Do not be tempted to use silicone insulation washers unless you are using the amp at very low supply voltages (no more than ±25V). Its thermal transfer characteristics are not good enough to allow the amp to produce more than about 10 - 20W of music, and even that can be taxing for silicone washers. The amp will shut down if it overheats, but that curtails one's listening enjoyment until it cools down again.

Power Supply

A suitable power supply is shown below, and is completely unremarkable in all respects. The transformer may be a conventional (E-I) laminated type or a toroid. The latter has the advantage of lower leakage flux, so will tend to inject less noise into the chassis and wiring. Conventional transformers are usually perfectly alright though, provided you take care with the mounting location.

The bridge rectifier should be a 35A 400V type, as they are cheap, readily available and extremely rugged. Electrolytic capacitors should be rated at 50V. The cap connected across the transformer secondary (C4) should be rated at 275V AC (X Class), although a 630V DC cap will also work. This capacitor reduces "conducted emissions", namely the switching transients created by the diodes that are coupled through the transformer onto the mains supply. The power supply will work without this cap, and will most likely pass CE and C-Tick tests as well, but for the small added cost you have a bit of extra peace of mind as regards mains noise.

The supply shown includes a "loop breaker", which is intended to prevent earth/ ground loops to prevent hum when systems are interconnected. Please be aware that it may not be legal to install this circuit in some countries. The diodes must be high current types - preferably rated at no less than 3A (1N5401 or similar). The loop breaker works by allowing you to have the chassis earthed as required in most countries, but lets the internal electronics "float", isolated from the mains earth by the 10 ohm resistor. RF noise is bypassed by the 100nF cap, and if a primary to secondary fault develops in the transformer, the fault current will be bypassed to earth via the diodes. If the fault persists and the internal fuse (or main power circuit breaker) hasn't opened, one or both diodes will fail. Semiconductor devices fail short-circuit, so fault current is connected directly to safety earth.

Be very careful when first applying mains power to the supply. Check all wiring thoroughly, verify that all mains connections are protected from accidental contact. If available, use a Variac, otherwise use a standard 100W incandescent lamp in series with the mains. This will limit the current to a safe value if there is a major fault.

When the loop breaker is used, all input and output connectors must be insulated from the chassis, or the loop breaker is bypassed and will do nothing useful. The body of a level pot (if used) can be connected to chassis, because the pot internals are insulated from the body, mounting thread and shaft.

Note that the DC ground for the amplifiers must come from the physical centre tap between the two filter caps. This should be a very solid connection (heavy gauge wire or a copper plate), with the transformer centre tap connected to one side, and the amplifier earth connections from the other. DC must be taken from the capacitors - never from the bridge rectifier.

The order of the fuse and power switch is arbitrary - they can be in any order, and in many cases the order is determined by the physical wiring of the IEC connector if a fused type is used. With a fused IEC connector, the fuse is before the switch and it cannot be removed while the mains lead is inserted.

I have shown a 2A slow-blow fuse, but this depends on the size and type of transformer and your mains supply voltage. Some manufacturers give a recommended fuse rating, others don't. The fuse shown is suitable for a 150VA transformer at 230V AC, and is deliberately oversized to ensure that it will not be subject to nuisance blowing due to transformer inrush current. A 2A fuse will fail almost instantly if there is a major fault.

Make sure that the mains earth (ground) is securely connected to guarantee a low resistance connection that cannot loosen or come free under any circumstances. The accepted method varies from one country to the next, and the earth connection must be made to the standards that apply in your country.


Testing 
Never attempt to operate the amplifier without the TDA7293 ICs attached to a heatsink!

Connect to a suitable power supply - remember that the supply earth (ground) must be connected! When powering up for the first time, use 100 ohm 5W "safety" resistors in series with each supply to limit the current if you have made a mistake in the wiring. If available, use a variable bench supply - you don't need much current to test operation, and around 500mA is more than enough. If using a current limited bench supply, the safety resistors can be omitted. Do not connect a speaker to the amplifier at this stage!

If using a normal power supply for the amp tests, apply power (±35V via the safety resistors) and verify that the current is no more than 60mA or so - about 6V across each 100 ohm resistor. No load current can vary, so don't panic if you measure a little more or less. Verify that the DC voltage at both outputs is less than 100mV. Using another 100 ohm resistor in series with a small speaker, or an oscilloscope, apply a sinewave signal at about 400Hz to the input and watch (or listen) for signal. The signal level needs to be adjusted to ensure the amp isn't clipping, and the waveform should be clean, with no evidence of parasitic oscillation or audible distortion.

If everything tests out as described, wire the amplifier directly to the power supply and finish off any internal wiring in the amp. Once complete, it's ready to use.