brock

Thursday, October 25, 2012

Morse Code Tutorial

Morse Code was designed by Samuel Morse and Alfred Vail. It uses short and long pulses - tones or lights - to represent letters and numbers. Probably the most well known Morse Code Message is the one made up of three short pulses, then three long pulses, then three short pulses again. Or "dot dot dot, dash dash dash, dot dot dot." This message means "S O S" (S = "..." and O is "---"), the distress signal.

Officially, the short and long pulses are called "dits" and "dahs", but we like to call them "dots" and "dashes" anyway.

Samuel Morse and Alfred Vail also developed a telegraph machine, which is what is used to send Morse Code messages. A telegraph operator sits at the machine and taps out long and short taps to represent the letters of the message he's sending. I imagine it must take a lot of concentration and a very good memory to keep track of all those dots and dashes!

The very first telegraph message ever sent was a short one, but very interesting. The message was: "What God Hath Wrought". You may want to try putting that message in the encoder to see what it looks like!


A .-         B -...       C -.-.       D -.. 
E .          F ..-.       G --.        H .... 
I ..           J .---       K -.-        L .-.. 
M --         N -.         O ---        P .--. 
Q --.-       R .-.        S ...        T - 
U ..-        V ...-       W .--        X -..- 
Y -.--       Z --..       0 -----      1 .---- 
2 ..---      3 ...--      4 ....-      5 ..... 
6 -....      7 --...      8 ---..      9 ----. 

9V Converter Using Two AA Cells

Normally, 9V PP3 batteries last less than a couple of hours if used continuously. These cannot be used if the voltage is below 7.8V. Say goodbye to these expensive 9V batteries having a short life. Two AA-size alkaline cells in conjunction with this DC-DC converter give 9V at a low current and last much longer.


The power supply is designed using a boost converter with fixed ‘on’ time and variable ‘off’ time. The variable ‘off’ time regulates power to the load. The converter consists of transistor T2, inductor L1 and capacitor C2. The conductance of transistor T1 controls ‘off’ time of the oscillator in conjunction with capacitor C2. IC TL431 (IC1) monitors the voltage across capacitor C4. When the voltage exceeds 2.5V at the reference pin (Ref) of IC1, the opto-coupler conducts more and reduces the conduction of transistor T1.

The frequency of oscillations mainly depends on the time constant (R-C) of feedback capacitor C3 and the input stage impedance (R1 plus VR1). Adjust preset VR1 to tweak the circuit for efficiency. The converter works with a single cell also. In that case, keep the output current-drain minimal.

We have measured maximum output of 8.7V at 28mA current. Above this current, the output becomes zero.

Monday, October 15, 2012

AC Switch Control with Opto-Triac

AC switches are silicon devices that control AC loads directly connected to the AC mains. This means that the driving reference terminal of the AC switch can be connected to the Line potential. This circuit explains the need of an insulation layer for the control unit and the way to implement it for an AC switch device.

It was thought in the past that connecting an MCU to the Line should be avoided as it will lead to poor appliance immunity. But it has been demonstrated over the years that such topology provides good immunity. Connecting an MCU supply to a stable non-floating reference is even better for immunity.

Safety insulation should be provided between accessible parts and high-voltage circuits to protect end users against electric shocks. It’s not required to ensure safety insulation by insulating low-voltage control circuits (like MCU) from high-voltage parts (like AC switches). In fact, the insulation could be implemented elsewhere—for example, on the keyboard to which the end user has access—leaving the MCU connected to the Line. This could be cost-effective as a non-insulated power supply and non-insulated drivers would then be sufficient.

Operational insulation is required when the control circuit reference is not the same as the AC switch reference. This is the case with new appliances using an inverter for 3-phase motor control, where the MCU is connected to the DC rail and the AC switch is referenced to Line. A level-shifter is used to allow communication between the MCU and the power switch. A usual way to implement this is to use an opto-triac but such a device will not work properly for all AC switches.

Among AC switches available today, different technologies and designs are used. The main known families are the standard triacs, the snubberless triacs and ACS devices.

To switch-on a triac or an ACS device, a gate current must be applied between the gate (G) and terminal A1 for the triac, or between gate and terminal COM for the ACS device.

For the triac, the gate current could be positive or negative, but the silicon structure of an ACS device is different from a triac. Here the gate is the emitter of an npn bipolar transistor. So there is only one p-n junction. The gate current can then only be sunk from the gate, not sourced to it.

As ACS de-vices can be triggered only by a negative current, an opto-triac will drive the ACS device only when the Line voltage is negative. This will lead to half-cycle conduction, which is inconvenient for most applications. However, there are new applications where such an operation is requested—for example, pumps used in coffee machines that feature an internal diode, and electromagnets used for door-lock function in washing machines.

As shown in Fig. 1, the circuit is built around ACS108 (Triac 1), opto-triac IC MOC3020 (IC1) and a few discrete components. Working of the circuit is simple. When you press switch S1, the load is switched on. When you release switch S1, the load turns off.

Once the switch is pressed, the opto-triac (IC1) conducts to charge capacitor C1 up to VGT (about 0.7 volt). COM-G junction forward-biases, triggering the ACS device by a negative gate current. The ACS device will remain ‘on’ up to the next zero-current crossing point. G-COM voltage is down to –0.7V due to ACS device conduction and the capacitor remains charged. As the current through the ACS device increases, VG-COM increases and there-fore a negative current is applied by C1 which triggers the AC switch for the next cycle.

In this solution, the ACS device is ‘off’ at the beginning of each time cycle required to recharge capacitor C1. The ACS device turns ‘on’ when the voltage across its terminals equals approximately 10V. This behaviour doesn’t result in high conducted noise as the Line current is still approximately sinusoidal due to the charge current flowing through capacitor C1 at zero-voltage crossing point.