Sunday, July 20, 2008

Car Water Temperature

Helical Notch Filter Schematic

4 MHz Amplitude Modulated Oscillator


• The only tuned component is the crystal operating in fundamental mode.

A while back I needed an amplitude modulated signal source at 4 MHz. This circuit was literally thrown together with parts laying on the bench. I built it dead bug style on a piece of copper clad board. It should work for you with little or no modification, other than the selection of the crystal, for use at other frequencies. At lower frequencies you might have to increase the capacitor values to get it to oscillate, and at higher frequencies, you might have to reduce the capacitor values a little. Just be aware that the crystal will be operating in its fundamental mode. Overtone crystals will work, but they will oscillator at their fundamental frequency.

Output level can be raised by biasing the audio amplifier's output stage to a higher voltage. This can be accomplished by placing a resistor from the base of the grounded-emitter transistor to ground. As voltage to the oscillator is increased, the voltage swing to achieve a given level of modulation will have to be increased as well.



The gain of the audiio amplifier is determined by the ratio of the 1 K ohm input resistor to the 56 k Ohm feedback resistor, and is limited by the open loop gain of the grounded-emitter stage. The open loop gain can be estimated by looking at the voltage drop across the 1 K ohm collector resistor. The voltage gain will be (in theory) about 38 X the voltage across the 1 K collector load. Thus, a 2 volt drop would give you an open loop gain of about 76:1 at audio frequencies, so the closed loop gain will be dominated by the feedback as described above.

The low frequency roll-off of the input singal will be approximately 1/(2Pi*3.3 uf * 1,000 Ohms ), which comes out to about 50 Hz. The input impedance of the amplifier at the summing node is sufficeintly low enough to allow as assumption of zero ohms to be sufficient for a design using 5% resistors .

Be aware that the antenna has DC on it and shorting the antenna to ground might destroy some of the parts. You can use a small (.001 uf for example) capacitor in series with the oscillator output if you want. If you use an antenna with this device, make is a really short one as RF emissions are regulated in most if not all countries. Besides, the waveform is pretty rich in harmonics.

This circuit generates a low power test signal and should not be used as a transmitter. Make sure you are within the law in the locality in which you operate this.

As this was built from parts laying on the bench, it isn't optimized, but it does demonstrate that it is very tolerant of component choice. A lot of small signal transistor will work. Look up the 2N4401 -its not that special.

Friday, July 18, 2008

Simple Electronic Lock Project


There are six (or more) push switches. To 'unlock' you must press all the correct ones at the same time, but not press any of the cancel switches. Pressing just one cancel switch will prevent the circuit unlocking. When the circuit unlocks it actually just turns on an LED for about one second, but it is intended to be adapted to turn on a relay which could be used to switch on another circuit.

Please Note: This circuit just turns on an LED for about one second when the correct switches are pressed. It does not actually lock or unlock anything!

Parts Required

* resistors: 470, 100k ×2, 1M
* capacitors: 0.1µF, 1µF 16V radial
* red LED
* 555 timer IC
* 8-pin DIL socket for IC
* on/off switch
* push-switch ×6 (or more)
* battery clip for 9V PP3
* stripboard 12 rows × 25 holes

Traffic Light Project


This project operates red, amber and green LEDs in the correct sequence for a single UK traffic light. The time taken for the complete red - red & amber - green - amber sequence can be varied from about 7s to about 2½ minutes by adjusting the 1M preset. Some amber LEDs emit light that is almost red so you may prefer to use a yellow LED.

The 555 astable circuit provides clock pulses for the 4017 counter which has ten outputs (Q0 to Q9). Each output becomes high in turn as the clock pulses are received. Appropriate outputs are combined with diodes to supply the amber and green LEDs. The red LED is connected to the ÷10 output which is high for the first 5 counts (Q0-Q4 high), this saves using 5 diodes for red and simplifies the circuit.

Parts Required

* resistors: 470 ×3, 22k, 100k
* capacitors: 0.1µF, 1µF 16V radial, 10µF 16V radial
* diodes: 1N4148 ×6
* LEDs: red, amber (or yellow), green
* 1M preset, horizontal
* 555 timer IC, such as NE555
* 4017 counter IC
* DIL sockets for ICs: 8-pin, 16-pin
* on/off switch
* battery clip for 9V PP3
* stripboard: 20 rows × 21 holes

Digital Dice




This digital dice project is an interesting project that will display in random the number from 1 to 9 on the 7 segment display. This is an alternative device that can be used to replace the traditional dice when you are playing games such as snake ladder, monopoly etc. The generation of clock is done by using a 555 timer which is connected in the astable mode at a frequency of approximately 50 Hz. This clock signal is fed into the decade counter which outputs are connected to 4 bit binary adder which provides a binary output equavalent to binary input + 1. The outputs are then connected to a BCD to 7 Segment Decoder which is used to drive a common anode 7 segment display.

As shown in the schematic above, when push button PB is pressed, a square output will be generated from the 555 timer which gives a frequency of approximately 50 Hz to the 7490 decade counter IC. The frequency of the astable 555 timer is calculated by using the standard formula of the timer.

f = 1.44/(1K + 2*1K)(0.01uF) = 48 Hz.

The output from the 555 timer is then connected to the input of U1 7490 decade counter. When the decade counter reach the count of 9, the outputs of QA and QD will go to logic "1" and the counter is reset. The 7447 BCD to 7 segment decoder is used to drive the 7 segment common anode display.

Automotive Speed Indicator


The speed of an automobile can be indicated by detecting the pulses generated by the ignition system and causing an LED to light. The circuit utilizes a quad NOR gate IC chip. Two of the gates are configured as a one shot multivibrator which produces a fixed duration pulse each time the primary circuit of the automobile ignition system opens the circuit to the ignition coil. The other 2 gates are used as buffers which provide an accurate rectangle pulse. As the number of pulses per second increases, the voltage fed to the base of of the NPN transistor becomes high enough to cause it to conduct and turn on the LED. The speed at which the LED lights is set by R4. The input of the circuit is connected to the distributor side of the ignition coil or to the tachometer connection on those cars that are equipped with electronic ignition.

Plant Moisture Meter


Stick the metal probes into a freshly watered plant and adjust R5 for a mid-scale meter deflection. The meter will monitor the soil wetness and the meter will indicate whether it is to moist or to dry. This circuit uses a dual power supply which could be created by two 9 volt batteries.

60 LED Clock


This project is based on the 4017 chip.
As you can see see we have changed the circuit a little. For example, the 4093 NAND gate is now set to exactly 1 second clock pulses. The clock rate is determined by the resistor and capacitor combination on the 4093. If the resistor is 220k ohms and the capacitor is 4.7uf then the output will be 1 second clock pulses. To increase the clock rate you should decrease the value of the resistor or capacitor. To decrease the clock rate you should increase the value of the resistor or capacitor. Please remember to ground all unused legs of the 4093 or noise in the circuit will occur and cause the clock to malfunction. Therefore, ground pins 5,6,8,9,12, and 13. To operate the circuit simply move the switch from STOP to RUN.

Touch Switch


This circuit uses a 555 timer as the bases of the touch switch. You can learn more about 555 timers in the Learning section on my site. When the plate is touched the 555 timer is triggered and the output on pin 3 goes high turning on the LED and the buzzer for a certain period of time. The time that the LED and the buzzer is on is based on the values of the capacitor and resistor connected to pin 6 & 7. The 10M resistor on pin 2 causes the the circuit to be very sensitive to the touch.

Funk Box

Phone In Use Indicator


With this circuit mounted in or near every phone in the house, it will allow users to know if the phone is being used and not to pick up the phone. When a phone is taken off hook, the voltage across the tip and ring terminals drops to 10 volts or less. This will cause the FET (2N4360) to turn on and also turn on the transistor (2N2222). When the transistor turns on it will allow current to flow through the LED and make it light. A blinking LED could be used to make the effect better.

Intercom


It is a simple intercom that anyone can put together and get to work. It is based on the LM380 IC chip. This chip is able to put out 2 watts of power if it is heat sink properly. The following pins should be grounded and attached to a foil to dissipate the heat. Pins 3,4,5,10,11,12 should all be grounded. The circuit works as follows. Switch 1 is a double pole double throw switch. In one position is the talk position and in the other is the listen position. In the diagram shown the switch is in the talk position for the speaker on the left. Talking into the speaker inputs a signal to the IC chip through the matching transformer T1. The output from the IC chip goes to the speaker on the right. If you put the switch in the other position the speaker on the right is the talking unit and the speaker on the left listens. Volume is controlled by the 1meg ohm pot R1.

Digital Thermometer using ATMega16 and 16*2 LCD


Abstract

Thermometer is used to measure temperature. This project is used to measure temperature and display digitally so, this project is known as digital thermometer . LM35, The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature, is used. ATMEGA16 is used in this project for calculation of temperature and 16 X 2 LCD is used for displaying temperature.

Why LM35 ?

The LM35 thus has an advantage over linear temperature sensors calibrated in ° Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain convenient Centigrade scaling. The LM35 does not require any external calibration or trimming to provide typical accuracies of ±1⁄4°C at room temperature and ±3⁄4°C over a full −55 to +150°C temperature range. Low cost is assured by trimming and calibration at the wafer level. The LM35’s low output impedance, linear output, and precise inherent calibration make interfacing to readout or control circuitry especially easy. It can be used with single power supplies, or with plus and minus supplies. As it draws only 60 μA from its supply, it has very low self-heating, less than 0.1°C in still air. The LM35 is rated to operate over a −55° to +150°C temperature range, while the LM35C is rated for a −40° to +110°C range.


Features
Calibrated directly in ° Celsius (Centigrade)
Linear + 10.0 mV/°C scale factor
0.5°C accuracy guaranteeable (at +25°C)
Rated for full −55° to +150°C range
Suitable for remote applications
Low cost due to wafer-level trimming
Operates from 4 to 30 volts
Less than 60 μA current drain
Low self-heating, 0.08°C in still air
Nonlinearity only ±1⁄4°C typical
Low impedance output, 0.1 W for 1 mA load

ATMEGA16

It is a low power CMOS 8-bit microcontroller based on AVR enhanced RISC architecture. By executing powerful instructions in single clock cycle, it achieves throughputs approaching 1 MIPS per MHz allowing system designer to optimize power consumption versus processing speed. It has four 8-bit bidirectional I/Os. It has 16K bytes of in-system programmable flash program memory with read while write capabilities, 512 Bytes EEPROM, 1K byte SRAM & 32 general purpose registors.

Working

As shown from figure components are soldered on PCB. When power supply is given to circuit, IC LM35 generates voltage according to the atmospheric temperature. This voltage is in analog form so it is given to the ADC0 port of microcontroller. It is ADC port so it converts analog voltage into digital form. We have written one algorithm in which this digital voltage is given as input and we get output as temperature in °Celsius. Also we have written one code that shows this temperature on LCD and horizontal bar whose length varies according to the temperature on LCD.

Programmer: - BascomAVR

Program:-

$regfile = "M16def.dat" ' use the Mega16

$crystal = 10000000

Deflcdchar 0 , 32 , 32 , 31 , 31 , 31 , 31 , 32 , 32 ' replace ? with number (0-7)'
Deflcdchar 3 , 16 , 16 , 31 , 31 , 31 , 31 , 16 , 16 ' replace ? with number (0-7)
Deflcdchar 4 , 1 , 1 , 31 , 31 , 31 , 31 , 1 , 1 ' replace ? with number (0-7)

Config Lcd = 16 * 2

Config Lcdpin = Pin , Db4 = Portb.4 , Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7 , E = Portb.3 , Rs = Portb.2

Config Adc = Single , Prescaler = Auto , Reference = Avcc 'config ADC
Start Adc

Dim W As Word , Perc As Word , Volt As Word , Volt_d As Byte , Channel As Byte , I As Byte , Cols As Byte

Cls
Cursor On

Locate 1 , 1
Lcd "TEMP"

Do
W = Getadc(0)
Volt = W * 3
Volt_d = Volt Mod 10
Volt = Volt / 10
Locate 1 , 9
Lcd Volt ; "," ; Volt_d
Locate 1 , 13
Lcd "'C"


Cols = Volt / 2

Locate 2 , 1
For I = 1 To Cols
Select Case I
Case 1 : Lcd Chr(3)
Case 4 : Lcd Chr(4)
Case 8 : Lcd Chr(4)
Case 12 : Lcd Chr(4)
Case 16 : Lcd Chr(4)
Case Else : Lcd Chr(0)
End Select
Next I

Waitms 100

Loop
End