Wednesday, September 28, 2011

wget – recursively download all files from certain directory listed by apache

Case: recursively download all the files that are in the ‘ddd’ folder for the url ‘http://hostname/aaa/bbb/ccc/ddd/’

Solution:
wget -r -np -nH –cut-dirs=3 -R index.html http://hostname/aaa/bbb/ccc/ddd/

Explanation:
It will download all files and subfolders in ddd directory:
recursively (-r),
not going to upper directories, like ccc/… (-np),
not saving files to hostname folder (-nH),
but to ddd by omitting first 3 folders aaa, bbb, ccc (–cut-dirs=3),
excluding index.html files (-R index.html)

Tuesday, September 27, 2011

Digital Pulse Counter



The project uses a single common cathode 7 segment display that will display the count up to 9. The IC used for counting is IC 4026 which also comes with display driver. The IC counts the pulses and converts that to a decimal number up to 9 and supplies power to the appropriate segments of the display to show the current count. when the count reaches 9 it will be reset back to zero and continues again.555 timer to feed the pulses.

Electronic Candle


Here is a simple circuit that can produce the effect of candle light in a normal electric bulb. A candle light, as we all know, resembles a randomly flickering light. So, the objective of this project activity is to produce a randomly flickering light effect in an electric bulb.

To achieve this, the entire circuit can be divided into three parts. The first part comprises IC1 (555), IC2 (74LS164), IC3 (74LS86), IC4 (74LS00) and the associated components. These generate a randomly changing train of pulses.

The second part of the circuit consists of SCR1 (C106), an electric bulb connected
between anode of SCR1 and mains live wire, and gate trigger circuit components. It is
basically half-wave AC power being supplied to the electric bulb.

The third part is the power supply circuit to generate regulated 5V DC from 230V AC for random signal generator. It comprises a stepdown transformer (X1), full-wave rectifier (diodes D3 and D4), filter capacitor (C9), followed by a regulator (IC5).The random signal generator of the circuit is built around an 8-bit serial in/parallel out shift register (IC2). Different outputs of the shift register IC pass through a set of logic gates (N1 through N5) and final out put appearing at pin 6 of gate N5 is fed back to the inputs of pins 1 and 2 of IC2. The clock signal appears
at pin 8 of IC2, which is clocked by an astable multivibrator configured around timer (IC1). The clock frequency can be set using preset VR1 and VR2. It can be set around 100 Hzto provide better flickering effect in the bulb.

The random signal triggers the gate of SCR1. The electric bulb gets AC power only for the period for which SCR1 is fired. SCR1 is fired only during the positive half cycles. Conduction of SCR1 depends upon the gate triggering pin 3 of IC2, which is random. Thus, we see a flickering effect in the light output.