VIDISONIC

Hardware & Software Design Resources

Loudspeaker Fuse Placement for Audio Amplifier to Preserve A Good Bass Response

To protect the loud speaker from destructive signal, the most simple way is by placing a fast blown fuse between speaker and the amplifier output. This common solution is depicted in the figure 1 (a).

speaker fuse Loudspeaker Fuse Placement for Audio Amplifier to Preserve A Good Bass Response

Figure 1. Fuse Placement to Preserve Good Bass Response

The fuse in the circuit has a significant resistance to generate heat, because without this the fuse couldn’t melt. The resistance affect the amplifier response in reacting to the speaker inductive load, but the worst is that this resistance varies with the temperature caused by the dynamic signal current. This resistance variation affect the linearity of the amplifier’s bass response. This situation can be solved by placing the fuse inside the amplifier’s feedback loop. Using this method, any nonlinear effect introduced by the fuse will be compensated by the amplifier via feedback mechanism. The resistor R3 is chosen to be much smaller compared to R2 but much higher compared speaker’s impedance. A value of 220? is suitable for most cases.

Anti Burglar Alarm, A Half Lie is Much More Dangerous Than 100% Lie

The idea that a half lie is much more dangerous than 100% lie is implemented in this design. Rather than showing off that our car is 100% protected by a sophisticated alarm and protection system, this anti burglar protection circuit prefer to lie that the car is not protected by any electronic alarm or any protection system. The circuit presented here is based on unusual method to protect car theft. Need not a long time to wait after the machine is started, some troubles will arise. Restarting the machine will produce a same trouble, even worst.

anti burglar Anti Burglar Alarm, A Half Lie is Much More Dangerous Than 100% Lie

The circuit is very simple. A 555 timer provide a time delay about five seconds. A normally-closed relay is connected between ignition switch and the ignition coil. S1 switch that is used to activate this protection system should be placed in a hidden area. When the ignition switch is turned on to start the machine, the current will flow normally to the ignition system via the relay and the machine will start to work. After a time delay set by the 555 timer ( the time delay can be varied by selecting different value for R1 and C1) , the relay will be open, and the ignition coil will be disconnected, the machine will show something wrong by stop working. You’ll guess that the burglar will try for two or three more try before giving up.

Avoid Access Violation Error from OpenDialog (TOpenDialog) / SaveDialog (TSaveDialog)

Whe I use OpenDialog (TOpenDialog), SaveDialog (TSaveDialog), OpenPictureDialog (TOpenPictureDialog), or SavePictureDialog (TSavePictureDialog), on Delphi 7 or Turbo Delphi Explorer running on Windows Xp Sp2, I always get access violation error (run time error) after I open the dialog box for second time. At first time the application run, it’s OK to open and browse the file using the dialog but when I try to browse a file for second time, I always get this error: “First chance exception at 0x77E538B2 . Exception class EAccessViolation with message ‘Access violation at address 00408F02 in module ‘myapp.exe’. Read of address 00000000′. Process myapp.exe (0xDD8)” or simply “access violation of 0×77461340: read of address 0×00000014 process stopped”.

After hours of searching the internet, I finally find the solution: Add ActiveX in the uses part of implementation section of the main form (the form that run first). And add edit the end of that unit to include initialization and finalization. The original code of the main form will look like below:

uses Unit1, Unit2,…..;
{$R *.dfm}
…. {your codes}

…. {your codes}

…. {your codes}

end.

Add the ActiveX in uses and Initialization-finalization before the end. as shown below:

uses ActiveX, Unit1, Unit2,…..;
{$R *.dfm}
…. {your codes}

…. {your codes}

…. {your codes}

initialization
OleInitialize(nil);
finalization
OleUninitialize
end.

This trick can also be applied to Delphi 4,5,6 (TOpenPictDialog/TSavePictDialog), I hope this helps. Happy coding for everyone!

Current Limiting Circuit

Introduction

Current limiting circuit often misinterpreted with current/circuit breaker. Unlike a fuse that break a circuit connection, a current limiter only limit the current at a predetermined level. Current limiting circuit can be as simple as a single resistor, but here I present an active current limiting circuit. With a resistor (a passive current limiter) the voltage drop is varied depending on the consumed current by the load. The higher the current is drawn by the load, the higher the voltage drop on that resistor. In many cases, this is not preferable.

In this active circuit, the current limiting circuit try not to drop the voltage if the current drawn by the load is below the allowable range. With this mechanism, in normal condition, the limiter circuit try not to dissipate the power, so almost all power is delivered to the load. If the load try to draw more than allowed, the current limiting circuit will now act as resistor, controlling it’s resistant value to limit the current to a predetermined level.

current limiting using bjt1 Current Limiting Circuit

Figure 1. Current Limiting Circuit

Without the current limiter, the voltage source in Figure 1 should be directly connected to R load. R load here usually something that draw variable current (equivalent to a variable resistor), can be a battery to be charged or an amplifier circuit for examples.

How Current Limiter Works

Look at the Figure 1, output voltage at Q1 emitter act as a voltage follower, means that the voltage will follow its base voltage. Because the R sense value is chosen to be a low resistance, the voltage will be appear at load as a full voltage delivered from voltage source. Actually there is a little voltage drop caused by Q1 Vbe (base-emitter voltage) and the resistor R sense, but this voltage drop can be neglected. If the load now draw more current, at some level, the voltage drop across R sense will reach the level at a point where the transistor Q2 begin to conduct, and the current will flow from its collector to its emitter, decreasing the base voltage of Q2. Because now the Q1 base voltage decrease, the voltage output of the Q2 emitter will also decrease as it works as a voltage follower circuit. When this output voltage decrease, the current to the load will also decrease. After this point of allowed maximum current, the more the load try to draw more current (by lowering its internal resistance equivalence), the lower the output will be delivered to maintain a constant current.

How to Design, How to Choose the Component Values for This Current Limiting Circuit

  1. Specify the maximum current to be limited Imax (for example 2 Amps)
  2. Specify the voltage source needed by the load Vs (for example 12 volts)
  3. Choose a transistor that can handle the Imax and Vs (for example X-type transistor with Vce max=40V, Ic max=4A, Hfe at Imax 2A =30).
  4. Compute the Q1 base current Ib at maximum load current, approximate with Imax/QHfe (for example 2A/30=66.67 mA.
  5. Compute the R bias value. If the voltage drop across R bias is assigned as Vb, the Rbias=Vb/Ib. Here we find something that isn’t clear yet. The voltage drop Vb is something we have to choose. Vb is the voltage drop across R bias at the maximum allowed current Imax. Vb will determine the total voltage drop caused by the current limiter circuit at the limiting point. At the limiting point (just before the limiting is triggered), the total voltage drop caused by the current limiter will approximate the Vbe+Vb +Vsense. The limiter gives almost only Vbe drop if the current drawn by the load is very small. Ideally, the Vbe is chosen as low as possible, but it means that the Q2 could possibly need to handle a very high current in case a short circuit happens (R load = 0). Lets try to choose 1 Volt for the example of Vb, then Rbias = Vb/Ib = 15 ohm.
  6. Find the lowest possible of load resistance (when the current limiting circuit works to limit the current as the hardest effort). It is actually a complicated task, but we can simplify the problem by assuming a sort circuit might be happen, so our design is really safe and the calculation will be simple. For the safety of Q2, choose Q2 that can handle current of Vs/Rbias Ampere (12/15=0.8 A in our example).
  7. Choose R sense, as (Q2 Vbe)/Imax , Q2 Vbe is the minimum voltage drop of base-emitter Q2, a voltage level that needed by Q2 collector-emitter to begin conducting. (For example 0.65V/2A = 0.325ohm).
  8. The voltage drop caused by this current limiting circuit will be Q1 Vbe at very low load current consumption, and approximate Vbe+Vb+Q2Vbe just before the current reach the limiting point.

Thats what I can write about current limiter circuit, and I use many approximations and assumptions in presenting design guide. If you find something wrong with my design method then please let me know.