Thursday, November 20, 2014

Metronome Generator Circuit using NE555

Here is a simple circuit with NE555 IC that can be used to generate metronomes.Such circuit is very useful for those who learn music. The circuit is simply an astable multivibrator NE555 cable around. The components R1, R2 and C1 determine the frequency

Notes.

  • The circuit can be wired on a general purpose PCB or common board.
  • The circuit can be powered from a 9V PP3 battery.
  • The POT R1 can be used to adjust the rhythm of the sound.
  • The POT R2 can be used as volume control.
  • The speaker k1 can be a n 8 Ohm tweeter.
Continue reading...

Wednesday, November 19, 2014

Audio Peak Indicator Circuit

The existence of the peak indicator "Audio Peak Indicator" in an audio device is needed. Audio Peak indicator is a simple circuit to detect the peak level of audio signal. Audio Peak indicator circuit is built with duabuah transistor and LED indicator as peak level detection of audio signals.


The main function of a series of Audio Peak indicator is to determine the occurrence of the peak level of audio signal that is more than +4 dB, equivalent to 1.25 V rms. If the received audio signal Audio Peak Indicator more than +4 dB was the LEDs in series Peak Audio This indicator will light. Audio Peak indicator circuit is mounted on the output audio system.
Audio Peak Indicator Component List:
R1 = 10Kohm
R2 = 1.2Kohm
R3 = 220Kohm
R4-5 = 4.7Kohm
C1 = 47uF 25V
C2 = 2.2uF 25V
Q1-2 = BC550C
D1 = LED RED

We hope to form the reference materials in the manufacture of circuit pernagkat Audio Peak Indicators in the audio readers.
Continue reading...

Tuesday, November 18, 2014

6 Watt Audio Amplifier Schematic Circuit with TDA1519

66 Watt Audio Amplifier Schematic Circuit with TDA1519

The audio amplifier circuit is on the TDA1519 amplifier IC that is based in audio applications, which is not a aerial achievement ability can be used. The ambit TDA1519 is a ability of 2×6 watts.

The TDA1519 is an amplifier congenital Class B dual-output advance in a 9-by-line (SIL) artificial amalgamation boilerplate achievement is primarily developed for car radio applications.

Key Features of the audio amplifier IC TDA1519 are: Requires few alien components, anchored gain, acceptable bounce drive, aphasiac / standby mode, thermal protection, about-face polarity safe. Tda1519 amplifier ability rating, 14.4 volts.

Continue reading...

Monday, November 17, 2014

Wave antenna 5 8 pro VKV FM

Wave antenna 5/8 consists of a vertical radiator which is fed at the base of the antenna. A suitable device of some sort should be added between the antenna and feedline if you want to eat with coax. Adding a coil in series with the antenna on the base is one of these methods are suitable. 



So why would anyone use an antenna 5/8 wave if they have to go through all that extra work? After all, a ground plane antenna provides a good match. There are several answers. The first is GAIN. The computer shows that the antenna (mounted 1 foot above the ground) has a margin of about 1.5 dBd higher than a dipole (also installed 1 foot above the ground.)The second reason you might want to use the wave 5/8 vertical is to get a lower angle of radiation. Peak radiation angle A half-wave antenna is 20 degrees. You will find that the angle 5/8 wave antenna radiation is only 16 degrees so it is better dx antenna. 

 You may have noticed a pattern developing here. A quarter-wave ground plane antenna has a radiation pattern that produces the maximum gain at about 25 degrees and half-wave antenna drops to 20-degree angle, and wave antenna 5/8 further drops to 16 degrees angle. So why not just keep extending the antenna to one full wave? Well it would be nice if it worked, but unfortunately the wave patterns begin to create a very high angle of radiation waves exceed 5/8. So weve reached the maximum gain at this point and extend the antenna further reduce profits only where we want it (low angle). 

Of course if you are interested in a very short jump, extend the antenna will produce a nice profit on the dipole.All the length of the antenna depends on various factors. Some of these factors are: height above ground, the diameter of the wire, nearby structures, the effects of other antennas in the area and even the conductivity of the soil.This page allows you to calculate the wavelength for the antenna 5/8. It uses the standard formula, 585 / f (178.308 / f for metric) MHz to calculate the length of the element. If you have experimented with 5/8 wave antenna before and know a better formula for your QTH, feel free to change the formula accordingly. This formula is for the antenna wire. 

Of course if you build your antenna out of the tube, total length of the antenna will be shorter, for example I have found that 21.5 feet seems to provide maximum benefit to the frequency of 28.5 MHz when using a 1 "tube, and 22.5. Foot seems be the best long-wire at the same frequency. Since the formula to calculate the antenna to be about 2 feet shorter, be sure to experiment and maybe add a little for your final term.
Continue reading...

Friday, November 14, 2014

FM TRANSMITTER

This is a very interesting and simple project in the series of communication used to transmit noise free F.M. signal in the wide range up to 100 M using only one transistor. The transmitted message from F.M. transmitter circuit is received by the receiver having the facilities of F.M. channel.

Circuit Description

The entire circuit of F.M. transmitter is divided into three major stage i.e. oscillator, modulator and amplifier. The transmitting frequency of 88-108 MHz is generated by adjusting VC1. The input voice given to microphone is changed into electric signal and is given to base of transistor T1. Transistor T1 is used as oscillator which oscillates the frequency of 88-108 MHz. The oscillated frequency is depended upon the value R2, C2, L2 and L3. This transmitted signal from F.M. transmitter is received and tuned by F.M. receiver.

Circuit Diagram


Parts List

Resistors (all ¼-watt, ± 5% Carbon)
R1 = 180 KΩ
R2 = 10 KΩ
R3 = 15 KΩ
R4 = 4.7 KΩ

Capacitors
C1 = 10 KPF
C2 = 10 PF
C3 = 20 KPF
C4 = 0.001 µF
C5 = 1 µF/10V
C6 = 4.7 PF
C7 = 10 KPF
C8 = 3.3 PF
VC1 = 22 PF

Semiconductor
T1 = BF194B

Miscellaneous
MIC1 = Condenser mike
L1, L2 = 3 turns of 22 SWG wire around any thin pencil
L3 = 2 turns of 22 SWG wire around any thin pencil.
Continue reading...

Thursday, November 13, 2014

BC557 based Flashing Eyes circuit with explanation

 bc557 based flashing eyes circuit with explanationTwo-LED-eyes follow the rhythm of music or speech, 3V Battery-operated device suitable for pins or badges

This circuit was purposely designed as a funny Halloween gadget. It should be placed to the rear of a badge or pin bearing a typical Halloween character image, e.g. a pumpkin, skull, black cat, witch, ghost etc. Two LEDs are fixed in place of the eyes of the character and will shine more or less brightly following the rhythm of the music or speech picked-up from surroundings by a small microphone. Two transistors provide the necessary amplification and drive the LEDs.

Parts:
R1 = 10K
R2 = 1M
R3 = 1K
C1 = 4.7uF-25V
C2 = 47uF-25V
D1 = 2mm LED
D2 = 2mm LED
Q1 = BC547
Q2 = BC557
B1 = 3V Battery
SW1 = SPST Switch
MIC1 = Electret Mic

Notes:
* Any general purpose, small signal transistor can be used for Q1 and Q2, but please note that R3 could require adjustment, depending on the gain of Q1. For medium gain transistors, the suggested value should do the job. High gain transistors will require a lower value for R3, i.e. about 390 – 470 Ohm. You can substitute R3 with a 1K Trimmer in order to set precisely the threshold of the circuit.
* Any LED type and color can be used, but small, 2mm diameter, high efficiency LEDs will produce a better effect.
* No limiting resistors are required for D1 and D2 even if this could seem incorrect.
* Stand-by current consumption of the circuit is about 1.5mA.
* Depending on dimensions of your badge, you can choose from a wide variety of battery types:
* 2 x 1.5 V batteries type: AA, AAA, AAAA, button clock-type, photo-camera type & others.
* 2 x 1.4 V mercury batteries, button clock-type.

Continue reading...

Wednesday, November 12, 2014

Build Power Amplifier LM3876 Simply and Powerfull Power Amplifier

The chip on which the amplifier is based, a Type LM3876, is a member of the Overture family from National Semiconductor, All members of this family are pin-compatible and mutually interchangeable. They are typified by an internal protection (called SPIKE). In practice, the diftection ference between them is the power output. The series was described on the basis of the LM3886 in an earlier issue*.

The PCB has been designed so what it can accommodate the LM3876 (50W) as well as the LM3886 (150W). Because of this, pin5 of the IC on the board is connected to the positive supply line. This connection is not needed for the LM3876, since its pin5 is not (internally) connected (NC).

The IC is located at the side of the board to facilitate fitting it to a heat sink as shown in the photograph.

An important aspect for optimum performance is the decoupling of the unregulated supply lines by C 7-10. All earth connections go to a single terminal on the board.

Air-cored inductor L1 consists of 13 turns of 1mm dia. enamelled copper wire with an inner diameter of 10mm. The completed inductor is pushed over R7 and its terminals soldered to those of the resistor.

All electrolytic capacitors must be mounted upright. The amplifier can be muted with a single-pole switch connected to the MUTE input (pin8). This function is enabled when the switch is open. If muting is not required, solder a wire bridge across the mute terminals on the board.

Boucherot network R6-C6 is not normally required in this application, but provision has been made for it for use in other applications.

According to the manufacturers, both chips are optimalized for a load of 8 Ohm. The output power is lower when a 4 Ohm load is used or when the supply voltage is reduced. When a 4 Ohm load is used, the SPIKE protection becomes active when the supply voltage is about 27V, resulting a in a reduction of the power output to 10W. This means that it is not advisable to use loudspeaker with an impedance <8 ohm.

For best result you can expand power amplifier using BPA-200 Amplifier



Part listResistor:
R1, R3 = 1 k
R2, R4, R5 = 18k
R6 = see text
R7 = 10R, 5 Watt
R8, R9 = 22k

Capacitors:
C1 = 2.2 uF
C2 = 220 uF, 160 V
C3 = 22 uF, 40 V
C4 = 47 pF
C5 = 100 uF, 40 V
C6 = see text
C7, C8 = 100 nF
C9, C10 = 1000 uF, 40 V

Inductors:
L1 = 0.7 uH - see text

Integrated circuits:
IC1 = LM3876T

Miscellaneous:
Heat sink for IC1 <1.5 k w-1
Single-pole switch - see text



Schematic and PCB Layout LM3876
Continue reading...

Tuesday, November 11, 2014

A Hiqh Quality Headphone Amplifier Schematic

Some lovers of High Fidelity headphone listening prefer the use of battery powered headphone amplifiers, not only for portable units but also for home "table" applications. This design is intended to fulfill their needs. An improved output driving capability is gained by making this a push-pull Class-B arrangement. Output power can reach 100mW RMS into a 16 Ohm load at 6V supply with low standing and mean current consumption, allowing long battery duration.

Circuit diagram:
 a high quality headphone amplifier schematic circuit diagram
High Quality Headphone Amplifier Circuit Diagram


Parts:Resistors:
P1 = 22K Potentiometer
R1 = 15K Resistor
R2 = 100K Resistor
R3 = 100K Resistor
R4 = 47K Resistor
R5 = 470R Resistor
R6 = 500R Resistor
R7 = 1K Resistor
R8 = 18K Resistor
R9 = 18K Resistor
R10 = 2.2R Resistor
R11 = 2.2R Resistor
R12 = 33R Resistor
R13 = 4.7K ResistorCapacitors:
C1 = 10uF-25V Capacitors
C2 = 10uF-25V Capacitors
C3 = 100nF-63V (PF)
C4 = 220uF-25V Capacitors
C5 = 100nF-63V (PF)
C6 = 220uF-25V CapacitorsSemiconductors:
Q1 = BC560C PNP Transistor
Q2 = BC560C PNP Transistor
Q3 = BC550C NPN Transistor
Q4 = BC550C NPN Transistor
Q5 = BC560C PNP Transistor
Q6 = BC327 PNP Transistor
Q7 = BC337 NPN TransistorMiscellaneous:
J1 = RCA Audio Input Socket
J2 = 3mm Stereo Jack Socket
B1 = 6V Battery Rechargeable
SW1=SPST Slide or Toggle Switch

Notes:
  • For a Stereo version of this circuit, all parts must be doubled except P1, SW1, J2 and B1.
  • Before setting quiescent current rotate the volume control P1 to the minimum, Trimmer R6 to maximum resistance and Trimmer R3 to about the middle of its travel.
  • Connect a suitable headphone set or, better, a 33 Ohm 1/2W resistor to the amplifier output.
  • Switch on the supply and measure the battery voltage with a Multimeter set to about 10Vdc fsd.
  • Connect the Multimeter across the positive end of C4 and the negative ground.
  • Rotate R3 in order to read on the Multimeter display exactly half of the battery voltage previously measured.
  • Switch off the supply, disconnect the Multimeter and reconnect it, set to measure about 10mA fsd, in series to the positive supply of the amplifier.
  • Switch on the supply and rotate R6 slowly until a reading of about 3mA is displayed.
  • Check again the voltage at the positive end of C4 and readjust R3 if necessary.
  • Wait about 15 minutes, watch if the current is varying and readjust if necessary.
  • Those lucky enough to reach an oscilloscope and a 1 KHz sine wave generator can drive the amplifier to the maximum output power and adjust R3 in order to obtain a symmetrical clipping of the sine wave displayed.



Technical data:Output power (1 KHz sine wave):
  • 16 Ohm: 100mW RMS
  • 32 Ohm: 60mW RMS
  • 64 Ohm: 35mW RMS
  • 100 Ohm: 22.5mW RMS
  • 300 Ohm: 8.5mW RMS
Sensitivity:
  • 160mV input for 1V RMS output into 32 Ohm load (31mW)
  • 200mV input for 1.27V RMS output into 32 Ohm load (50mW)
Frequency response @ 1V RMS:
  • Flat from 45Hz to 20 KHz, -1dB @ 35Hz, -2dB @ 24Hz
Total harmonic distortion into 16 Ohm load @ 1 KHz:
  • 1V RMS (62mW) 0.015% 1.27V RMS (onset of clipping, 100mW) 0.04%
Total harmonic distortion into 16 Ohm load @ 10 KHz:
  • 1V RMS (62mW) 0.05% 1.27V RMS (onset of clipping, 100mW) 0.1%
  • Unconditionally stable on capacitive loads
Continue reading...

Saturday, November 8, 2014

Small Audio Amplifiers Using LM386 and NE5534

Many electronic projects require the use of a small audio amplifier. Be it a radio transceiver, a digital voice recorder, or an intercom, they all call for an audio amp that is small, cheap, and has enough power to provide adequate loudness to fill a room, without pretending to serve a disco! About one Watt RMS seems to be a convenient size, and this is also about the highest power that a simple amplifier fed from 12V can put into an 8 Ohm speaker. A very low saturation amplifier may go as high up as 2 Watt, but any higher power requires the use of a higher voltage power supply, lower speaker impedance, a bridge circuit, or a combination of those.

During my many years building electronic things I have needed small audio amps many times, and have pretty much standardized on a few IC solutions, first and and foremost the LM386, which is small, cheap, and very easy to use. But it does not produce high quality audio... For many applications, the advantages weigh more than the distortion and noise of this chip, so that I used it anyway. In other cases I used different chips, which perform better but need more complex circuits. Often these chips were no longer available the next time I needed a small amplifier.

When I last upgraded my computer, I replaced the old and trusty Soundblaster AWE 32 by a Soundblaster Audigy. The new card is better in many regards, but while the old one had an internal audio power amplifier, the new one doesnt! Thats bad news, because I have some pretty decent speakers for the PC, which are fully passive. So, I built a little stereo amp using two LM386 chips and installed it inside the computer, fed by the 12V available internally.

But then I wasnt satisfied. The LM386 might be suitable for "communication quality" audio, which is roughly the fidelity you get over a telephone, but for music its pretty poor! The distortion was awful. So, the day came when I decided to play a little more scientifically with small audio amps, looking for a way to get good performance with simple and inexpensive means.

I set up a test bench with a sine wave oscillator running at 1 kHz, an 8 Ohm speaker, 12V power supply, and the computer with the soundcard and Fast Fourier Transform software. One channel was connected to the oscillator together with the amplifier input, the other channel to the output and speaker. With this setup I measured the harmonic content of the audio signals. I did the tests at an output level of 0.1W, which is typical for moderately loud sound from a reasonably efficient speaker. Also, I used a music signal from a CD player to test the actual sound of each amplifier.

As already said above, the main attraction of the LM386 is the extreme simplicity of its application circuit. You can even eliminate R1 if the signal source is DC-grounded. If the speaker leads are long, you should add an RC snubber across the output to aid stability. Additionally, if you need higher gain (not necessary if the input is at line level), you can connect a 10uF capacitor between pins 1 and 8. Thats about all there is to it.

Now the bad news: This circuit produced a very high level of distortion! The second harmonic measured just -28dB from the main output. The third harmonic was at -35dB, while the noise level was at -82dB. There were assorted high harmonics at roughly -45dB. With music, the distortion was really disturbing, and also the noise level was uncomfortably high. The power supply rejection is poor, so that some hum and other supply noise gets through. In short, this was a lousy performance!

Since I had used so many LM386s in my projects, I had several different variations. In my material box I found a slightly newer LM386N-1. So I plugged it into my test amplifier. It was even worse! The second harmonic was at -24dB, the third harmonic at -31dB, while the noise was a tad better at -84dB. Folks, thats a total harmonic distortion of almost 7%! And the 0.1W output level at which this was measured is where such a circuit is about at its best...  The distortion can be plainly seen on the oscilloscope, and a visibly distorted waveform is about the most offending thing an audio designer can ever see!

Looking through my projects, I found one where I had used a GL386 chip. This is just a 386 made by another company. I unsoldered it and put it in my test amplifier. Surprise! It was dramatically better, with the second harmonic at -45dB, and the third at -57dB! The noise floor was -84dB, just like the LM386N-1. But even this level of distortion was plainly audible when listening to music. Thats roughly 0.6% THD. Some folks may consider it acceptable for music. I dont, but for communication equipment its fine. At this point, I decided to see if I could build a better amplifier, that doesnt become too complex nor expensive.


This was the first attempt. A low distortion, fast slew rate, but easy to find and rather inexpensive operational amplifier, driving a simple source follower made of two small transistors. These transistors are not biased, so they work at zero quiescent current, in full class B. The only mechanism that works against crossover distortion here is the high slew rate of the OpAmp, which is able to make the distortion bursts during crossover very short. To say the truth, I didnt expect to get usable performance from this circuit, and was really surprised when it worked much better than the 386! The second harmonic was at -77dB, the third at -79dB!

Also there were many high harmonics at roughly -84dB. That means a THD of about 0.015%.  The noise floor was down at the -120dB level! The power supply rejection was excellent, with no detectable feedtrough. Playing music, this amplifier sounded really good: No audible noise, and the distortion could be heard when paying attention to it, but I doubt that the average person would detect it! Not bad, for a bias-less design!

Just to see how important the slew rate of the OpAmp is, I pulled out the NE5534 and replaced it by a humble 741, which is many times slower. The result was dramatic: The second harmonic still good at -70dB, but the third harmonic was much worse, at -48dB. Also there were many high harmonics at the same -48dB level. Given that second harmonic distortion doesnt sound bad to most people, but third harmonic does, and high harmonics are even worse, it came as no surprise that the amplifier with the 741 sounded bad.

At low volume it sounded particularly bad! So I returned to the oscillator and measurement setup, testing at lower output power, and found that while the second and third harmonics followed the output, the high harmonics stayed mostly constant! So, at very low output, the high harmonics became very strong relative to the output. All this is the effect of the slower slew rate of the 741, which makes it less effective correcting the crossover distortion of the unbiased transistors. Interestingly, the noise floor of the 741 circuit wasnt bad: -118dB.

Just for fun, I tried this circuit with a third OpAmp: The TL071, which is good, but not as good as the 5534. The results: Second harmonic at -72dB, third and the high ones at -60dB, and the noise at -120dB. Its interesting that the second harmonic is much more suppressed than the third one. That must be a balancing effect of the symmetric output stage, and the better symmetry in the TL071 compared to other OpAmps.

Its worthwhile to note that this amplifier can be simplified a lot by using a split power supply. R1, R2, C1, C2 and C4 would be eliminated! But then you need the capacitor removed from C4 to bypass the negative supply line. The positive input of the chip goes to ground, while pin 4 and the collector of Q2 go to the negative supply. The rest stays the same. If you use a +-15V supply, the available RMS output power grows to over 10 Watt! Of course, you then need larger transistors. And since larger transistors are slower, the distortion will rise somewhat. An added benefit of a split supply is that the popping noise when switching on and off is eliminated.


As the next experiment, I decided to get rid of the crossover distortion. For this purpose, I added a traditional adjustable bias circuit with a transistor and a trimpot. Now I also had to add a current source, because with the bias circuit there is no single point into which the OpAmp could put its drive current into both bases! I adjusted the bias for the best distortion, and this was really  a good one! The second harmonic was down right where the test oscillator delivered it, about -80dB, so I couldnt really measure it!

The third harmonic was at -84dB, and the best improvement was that the higher harmonics had simply disappeared! They were all below the noise floor, which stayed at -120dB. Actually, this noise floor seems to come from the soundcard A/D converter, so that the actual noise of this and the above amplifier may even be better! With music, this amplifier sounded perfect - clean and smooth. And Im pretty confident that the THD is well below the limits of my measurement setup, which is 0.01%.

The quiescent current was around 10mA. When lowering it to about 3mA, the high harmonics started to rise out of the noise floor. If you want to adjust the bias for the exact best quiescent current, there is a simple trick: Lift R4 from the output, and connect it to pin 6. Now the output stage has been left outside the feedback loop, and all its distortion will show up at the output. Watching the signal on an oscilloscope, or even better on a real time spectrum analyzer (soundcard and software), adjust the trimpot to the lowest distortion level.

Have a current meter in the supply line and make sure that you dont exceed 30mA or so of quiescent current, in order to keep the small transistors cool. But most likely the best distortion will be at a current lower than that. Once the adjustment is complete, return R4 to its normal position. Now the full gain and slew rate of the operational amplifier is used to correct the small remaining cross-over distortion of the output stage, and the distortion will certainly disappear from the scope screen, from your ears, and possibly fall below the detection level of the spectrum analyzer!

This circuit can also be run from a split power supply, by exactly the same mods as for the previous circuit. And since the transistors are properly biased, there isnt any significant distortion increase when using larger transistors. Be sure to use some that have enough gain - you have only a few mA of driving available, and with a +-15V power supply and an 8 Ohm speaker, there can be almost 2A of output current! So, you need a gain of 300 at least. There are power transistors in the 4A class that provide such gain, and these are good candidates. The other option is using Darlington transistors, which far exceed the gain needed here. But they will again increase the distortion, not very much, but perhaps enough to make it audible again.
Continue reading...

Thursday, November 6, 2014

Power Supply Failure Alarm

Most of the power supply failure indicator circuits need a separate power-supply for them-selves. But the alarm circuit presented here needs no additional supply source. It employs an electrolytic capacitor to store adequate charge, to feed power to the alarm circuit which sounds an alarm for a reasonable duration when the mains supply fails. During the presence of mains power supply, the rectified mains voltage is stepped down to a required low level.

Power Supply Failure Alarm Circuit Diagram:

Alarm

A zener is used to limit the filtered voltage to 15-volt level. Mains presence is indicated by an LED. The low-level DC is used for charging capacitor C3 and reverse biasing switching transistor T1. Thus, transistor T1 remains cut-off as long as the mains supply is present. As soon as the mains power fails, the charge stored in the capacitor acts as a power-supply source for transistor T1. Since, in the absence of mains supply, the base of transistor is pulled ‘low’ via resistor R8, it conducts and sounds the buzzer (alarm) to give a warning of the power-failure.

With the value of C3 as shown, a good-quality buzzer would sound for about a minute. By increasing or decreasing the value of capacitor C3, this time can be altered to serve one’s need. Assembly is quite easy. The values of the components are not critical. If the alarm circuit is powered from any external DC power-supply source, the mains supply section up to points ‘P’ and ‘M’can be omitted from the circuit.

Following points may be noted:
1. At a higher  DC voltage level, transistor T1 (BC558) may pass some collector-to-emitter leakage current, causing a continuous murmuring sound from the buzzer. In that case, replace it with some low-gain transistor. 
2. Piezo buzzer must be a continuous tone version, with built-in oscillator. To save space, one may use five small-sized 1000µF capacitors (in parallel) in place of bulky high-value capacitor C3.

Continue reading...

Wednesday, November 5, 2014

Battery Saver

A small electronic switch that connects a battery to the equipment for a certain amount of time when a push-button is momentarily pressed. And we have also taken the ambient light level into account; when it is dark you won’t be able to read the display so it is only logical to turn the switch off, even if the time delay hasn’t passed yet. The circuit is quite straightforward.

For the actual switch we’re using a well-known MOSFET, the BS170. A MOSFET (T2 in the circuit) used in this configuration doesn’t need a current to make it conduct (just a voltage), which makes the circuit very efficient. When the battery is connected to the battery saver circuit for the first time, capacitor C2 provides the gate of the MOSFET with a positive voltage, which causes T2 to conduct and hence connect the load (on the 9 V output) to the battery (BT1). C2 is slowly charged up via R3 (i.e. the voltage across C2 increases).

Battery Saver Circuit Diagram:


battery

This causes the voltage at the gate to drop and eventually it becomes so low that T2 can no longer conduct, removing the supply voltage to the load. In this state the battery saver circuit draws a very small current of about 1 µA. If you now press S1, C2 will discharge and the circuit returns to its initial state, with a new turn-off delay. Resistor R5 is used to limit the discharge current through the switch to an acceptable level.

You only need to hold down the switch for a few hundredths of a second to fully discharge C2. In our prototype, connected between a 9 V battery and a load that drew about 5 mA, the output voltage started to drop after about 26 minutes. After 30 minutes the voltage had dropped to 2.4 V. You should use a good quality capacitor for C2 (one that has a very low leakage current), otherwise you could have to wait a very long time before the switch turns off!
The ambient light level is detected using an LDR (R1). An LDR is a type of light sensor that reduces in resistance when the light level increases. We recommend that you use an FW150, obtainable from e.g. Conrad as part number 183547-89. When there is too little light its resistance increases and potential divider R1/R2 causes transistor T1 to conduct. T1 then charges up C2 very quickly through R4, which limits the current to a safe level.

 This stops T2 from conducting and the load is turned off. The choice of value for R2 determines how dark it has to be before T1 starts to conduct. The battery saver circuit can be added to devices that use 6 or 9 volt batteries and which don’t draw more than 100 mA. The circuit can be built on a piece of experimenter’s board and should be made as compact as possible so that it can be built into the battery powered device.


Continue reading...

Tuesday, November 4, 2014

Car Reversing Horn with Flasher

Here is a simple circuit that starts playing the car horn whenever your car is in reverse gear. The circuit (refer Fig. 1) employs dual timer NE556 to generate the sound. One of the timers is wired as an astable multivibrator to generate the tone and the other is wired as a monostable multivibrator.

Fig. 1: Car reverse horn Circuit Diagram:
 Flasher-

Working of the circuit is simple. When the car is in reverse gear, reverse-gear switch S1 of the car gets shorted and the monostable timer triggers to give a high output. As a result, the junction of diodes D1 and D2 goes high for a few seconds depending on the time period developed through resistor R4 and capacitor C4. At this point, the astable multivibrator is enabled to start oscillating. The output of the astable multivibrator is fed to the speaker through capacitor C6. The speaker, in turn, produces sound until the output of the monostable is high.

When the junction of diodes D1 and D2 is low, the astable multivibrator is disabled to stop oscillating. The output of the astable multivibrator is fed to the speaker through capacitor C6. The speaker, in turn, does not produce sound.

Assemble the circuit on a general-purpose PCB and enclose in a suitable cabinet. Connect the circuit to the car reverse switch through two wires such that S1 shorts when the car gear is reversed and is open otherwise. To power the circuit, use the car battery.

The flasher circuit (shown in Fig. 2) is built around timer NE555, which is wired as an astable multivibrator that outputs square wave at its pin 3. A 10W auto bulb is used for flasher. The flashing rate of the bulb is decided by preset VR1.

Fig. 2: Flasher Circuit Diagram

Flasher-circuit

Assemble the circuit on a general-purpose PCB and enclose in a suitable cabinet. The flasher bulb can be mounted at the cars rear side in a reflector or a narrow painted suitable enclosure.

EFY note. A higher-wattage bulb may reduce the intensity of the headlight. You can enclose both the car-reversing horn and flasher circuits together or separately in a cabinet in your car.


Continue reading...

Monday, November 3, 2014

20 WATT FLUORO INVERTER used tip3055

20 WATT FLUORO INVERTER used tip3055
This circuit will drive a 40 watt fluoro or two 20watt tubes in series.
The transformer is wound on a ferrite rod 10mm dia and 8cm long.
The wire diameters are not critical but our prototype used 0.61mm wire for the primary and 0.28mm wire for the secondary and feedback winding.
Do not remove the tube when the circuit is operating as the spikes produced by the transformer will damage the transistor.
The circuit will take approx 1.5amp on 12v, making it more efficient than running the tubes from the mains. A normal fluoro takes 20 watts for the tube and about 15 watts for the ballast. 
Continue reading...

Sunday, November 2, 2014

AUTOMATIC AIRFLOW DETECTOR ELECTRONIC DIAGRAM


AUTOMATIC AIRFLOW DETECTOR ELECTRONIC DIAGRAM

Sensor used in this circuit is a bulb filament. If there is no airflow, the filament resistance would give low value. On the other hand, if there is airflow, the filament resistance would varies. The variation of the resistance is caused by the heat difference between filament. It also effects to the voltage variation passing through that filament. That voltage difference will be processed by LM339 op-amp and displayed by the LED.

Parts list :


  •     LED1 : LED 5mm
  •     IC1 volt regulator : LM7805
  •     Polar Capacitor C1 : 47 uF/15V
  •     Resistor R1 : 100 ohm
  •     Resistor R2 : 470 ohm
  •     Resistor R3 : 10k ohm
  •     Potensiometer R4 : 100k ohm
  •     Resistor R5 : 1k ohm
  •     IC2 op-amp : LM339
  •     Bulb filament
  •     Power supply/battery 12V


Continue reading...

Friday, October 31, 2014

230V Flasher Circuit

This circuit operates with 230v.you can use this circuit to decorate your parties.I think this will be a wonderful circuit to you all. Here DIAC ER 900 and Triac BTW 11-400.

230V

230V Flasher Circuit diagram

Note:
# Be careful when you deal with 230V
# Build this circuit on a PCB
# Use only mentioned values.
Continue reading...

Thursday, October 30, 2014

MAKING A ZENER DIODE

Sometimes a zener diode of the required voltage is not available. Here are a number of components that produce a characteristic voltage across them. Since they all have different voltages, they can be placed in series to produce the voltage you need. A reference voltage as low as 0.65v is available and you need at least 1 to 3mA through the device(s) to put them in a state of conduction (breakdown).


source : http://www.talkingelectronics.com.au/projects/200TrCcts/200TrCcts.html
Continue reading...

Wednesday, October 29, 2014

Electronic Motor Starter Diagram Circuit

This motor starter protects single-phase motors against voltage fluctuations and overloading. Its salient feature is a soft on/off electronic switch for easy operation. The transformer steps down the AC voltage from 230V to 15V. Diodes D1 and D2 rectify the AC voltage to DC. The unregulated power supply is given to the protection circuit. In the protection circuit, transistor T1 is used to protect the motor from over-voltage. The over-voltage setting is done using preset VR1 such that T1 conducts when voltages goes beyond upper limit (say, 260V). When T1 conducts, it switches off T2. Transistor T2 works as the under-voltage protector. The under-voltage setting is done with the help of preset VR2 such that T2 stops conducting when voltage is below lower limit (say, 180V). Zener diodes ZD1 and ZD2 provide base bias to transistors T1 and T2, respectively. Transistors T3 and T4 are connected back to back to form an SCR configuration, which behaves as an ‘on’/‘off’ control.

ElectronicSwitch S1 is used to turn on the pump, while switch S2 is used to turn off the pump. While making over-/under-voltage setting, disconnect C2 temporarily. Capacitor C2 prevents relay chattering due to rapid voltage fluctuations. Regulator IC 7809 gives the 9V regulated supply to soft switch as well as the relay after filtering by capacitor C4. A suitable miniature circuit breaker is used for automatic over-current protection. Green LED (LED1) indicates that the motor is ‘on’ and red LED (LED2) indicates that the power is ‘on’. The motor is connected to the normally-open contact of the relay. When the relay energizes, the motor turns on.
Continue reading...

Tuesday, October 28, 2014

LM3909 IC bassed Color organ electronic project

Using LM 3909 LED flasher IC , can be designed various electronic projects . As you can see in this circuit diagram , using the LM3909 LED flasher IC can be designed a very simple color organ .

This circuit is not complicated , it use just some common active audio filters for filtering audio signals and a part formed by a LM3909 IC .

All of three active filters drives the audio spectrum into three bands drive rectifiers and then drive IC2,3 and 4 , flashing the LEDs at 6 Hz. D4,D5 and D6 should be three different colors for best effect .
In the table bellow you can see all electronic parts required by this color organ project .
Simple
Simple

B
Continue reading...

Monday, October 27, 2014

STK4038 bassed 60 watt audio amplifier circuit project and explanation


Using the STK4038X audio amplifier IC, can be designed a very simple high power and efficiency audio power amplifier . This circuit is manufactured by Sanyo Corporation and will provide a output power of 60 watts on a 8 ohms load or 4 ohms load with 0.008% distortion .

The output power that is provided by this audio IC , can be more higher , but with more distortion.
If you will use a 8 ohms load you must power this audio amplifier project from a dual +/- 40 volts DC power supply and if you’ll use a 4 ohms load you must power this audio project form a dual +/- 33.5 volts DC power source.
To prevent over heating the STK4038X audio power IC must be heatsinked on a good heatsink .
Also you must use a very well filtered power supply ( a 10000uF capacitor will be fine for this audio project) .

Continue reading...

Saturday, October 25, 2014

Circuit Mobile Phone Battery Charger

This post share about Mobile Phone charger circuits, previously you can see other Phone Battery Charger Circuit  or Charger Circuit . This Charger ciruit use to charging phone battery using IC 7805 for plus voltage regulator or & 7905 for min voltage regulator. Below is a schematic circuit adapter, power supply, or battery charger (for gadgets, mobile phones, MP4player, smartphone) that is equipped with a 5V voltage stabilizer:

adapter

Diode Bridge
diode bridge, known as a diode bridge is used for the rectifier circuit current (rectifier) from AC to DC. to make the diode bridge properly you need to know the type of diode to be used, to suit your needs. example: to make the power supply 12 Volt 3 ​​Ampere diode type 1N5401 is needed, for more detail how to choose the right type of diode to the adapter.

Voltage stabilizers are commonly used are the 78XX or 79XX type LM, XX indicates the maximum voltage output is generated. see the example in the circuit schematic above, to output 5 V is used type LM 7805. for other voltages must be adjusted to the transformer and its stabilizer IC.
Continue reading...

Thursday, October 23, 2014

Power Supply Variable 1 3V 12 2V 1A Circuit

Power supply circuit to generate output below were variations between 1.3V DC to 12.2V DC with 1A current. In addition, the power supply circuit is also equipped with over-current protection or shield against belebih flow. Power supply circuit is very simple, but the quality is quite good, made her basiskan regulator IC LM723 is a pretty legendary.




1.3V


Description:

R2 to set the output voltage. The maximum current is determined by R3, over-current protection circuit inside the LM723 to detect the voltage on R3, if it reaches 0.65 V, the voltage output will be off her. So the current through R3 can not exceed 0.65 / R3 although output short-circuit in his.

C3 and C4 are ceramic capacitors, as much as possible directly soldered to the PCB, this is because the LM723 is prone to oscillation that is not cool.

LM723 works with 9.5V input voltage to 40 V DC and the LM723 can generate its own current of 150mA when the output voltage is not more than 6-7V under input voltage.



Specifications:

Output (value estimated):
Vmin = (R4 + R5) / (R5 * 1.3)
Vmax = (7.15 / R5) * (R4 + R5)
Imax = 0.65/R3
Max. Power on R3: 0.42/R3
Min. DC Input Voltage (pin 12 to pin 7): Vmax + 5



Component List:
B1 40V/2.5A
C1 2200uF (3300uF even better)
C2 4.7uF
C3 100nF
C4 1NF
C5 330nF
C6 100uF
Green LED D1
D2 1N4003
F1 0.2A F
F2 2A M
IC1 LM723 (in a DIL14 plastic package)
R1 1k
R2 Pot. 5k
R3 0.56R/2W
R4 3.3k
R5 4.7k
S1 250V/1A
T1 2N3055 on a heatsink 5K / W
TR1 220V/17V/1.5
Continue reading...

Wednesday, October 22, 2014

Water Temperature Gauge Digital Network Diagram

This circuit measures the water temperature. this circuit use IC CA3161 and CA3162 for control all, The Temperature Value can’t be keep always while no power supply as It hasn’t EEPROM to save. This circiut will be display for you monitoring only that is make sense to implement in water.

The IC CA3161 is a counter and 7segment LED driver to display amount of temperature on 7segments. About a temperature sensor is a diode which number 1N4148. This is like of the Car Radiator. Connect to the 5 Vdc power supply from Car Battery that you can use a LM7805 for +5Vdc regulation with low cost voltage regulator.

Skema rangkaian pengukur suhu air

For the method of temperature measurement: first after application of at least 2 currents of a thermal sensor, including at least two output signals are generated calculating an analog signal to the temperature of the reaction at least two signals, the analog signal representative of temperature to the temperature sensors, a calibration, the calibration factor is calculated by applying the order of leastthree thermal sensor, and calibration of a gap in the temperature of the concept of analog signal, that the development gap-term is at least a series of parasite resistance to the thermal temperature sensor and the signal processing theanalog digital signal to a temperature reference value for the conversion of the reference value for the transition is consistent with the calibration.


IC LM340A Temperature Gauge

The LM340A monolithic 3-terminal positive voltage regulators employ internal current-limiting, thermal shutdown and safe-area compensation, making them essentially indestructible. If adequate heat sinking is provided, they can deliver over 1.0A output current.

IC
Parameters IC LM340A
  • Output Current: 1000 mA
  • Output Voltage: 7.5, 12, 15, 8, 5 Volt
  • Input Min Voltage: 7.5, 14.8, 10.5, 17.9 Volt
  • Input Max Voltage: 35 Volt
  • Temperature Min: 0 deg C
  • Temperature Max: 70, 125 deg C
  • RegType: Linear Regulator


IC CA3161E Description

The CA3161E is a monolithic integrated circuit that performs the BCD to seven segment decoding function and features constant current segment drivers. When used with the CA3162E A/D Converter the CA3161E provides a complete digital readout system with a minimum number of external parts.

IC
Absolute Maximum Ratings IC CA3161E
  • DC VSUPPLY (Between Terminals 1 and 10) . . . . . . . . . . . . . .+7.0V
  • Input Voltage (Terminals 1, 2, 6, 7). . . . . . . . . . . . . . . . . . . . . .+5.5V
  • Output Voltage
  • Output “Off”. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +7V
  • Output “On” (Note 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +10V


IC CA3162E Description

The CA3162E are I2L monolithic A/D converters that provide a 3 digit multiplexed BCD output. They are used with the CA3161E BCD-to-Seven-Segment Decoder/Driver and a minimum of external parts to implement a complete 3-digit display. The CA3162AE is identical to the CA3162E except for an extended operating temperature range.
IC
Absolute Maximum Ratings IC CA3162E
  • DC Supply Voltage (Between Pins 7 and 14) . . . . . . . . . . . . . +7V
  • Input Voltage (Pin 10 or 11 to Ground). . . . . . . . . . . . . . . . . . . 15V
  • Temperature Range CA3162E. . . . . . . . . . . . . . . . . . . . . . . . . . .0 to 75oC
  • Temperature Range CA3162AE . .. . . . . . . . . . . . . . . . . . . . . . -40oC to 85oC
  • Maximum Junction Temperature . . . . . . . . . . . . . . . . . . . . . . . 150oC
  • Maximum Storage Temperature Range . . . . . .. . . . . . . . . . . . .-65oC to 150oC
  • Maximum Lead Temperature (Soldering 10s) . . . . . . . . . . . . . 300oC..
Continue reading...

Friday, October 17, 2014

Rise Nikon Camera Remote Control

 This is an IR remote control for Nikon cameras. It is compatible with the Nikon ML-L3 remote control. Supported cameras include: D40, D40X, D50, D60, D70, D70s, D80, Coolpix 8400 8800. This design is based on an idea from http://www.bigmike.it/ircontrol/.

Hardware

The circuit is extremely simple: an ATtiny13V, button, transistor, resistor, IR diode and 3V battery. You could even omit the transistor and resistor, and connect the IR diode directly to the ATtiny13V, but that will limit the LED current and therefor the range.

schematic

I chose to power the circuit permanently, and connect the button to an input, instead of controlling the power with the button. This ensures that the IR sequence is always completely sent, even when you release the button too early, and that contact bounce may be filtered. The standby power consumption is so low, about the same as the self-discharge rate of the lithium battery, that this does not really affect the battery life.

The internal oscillator of the ATtiny13V is used as a clock source, which seems to be sufficiently accurate. To get optimal results, you may want to calibrate the internal oscillator. See main.c for details.
Continue reading...

Thursday, October 16, 2014

Build a Bass Treble Tone Control Circuit Diagram

How build a Bass-Treble Tone Control Circuit Diagram . The LM1036 is a DC controlled tone (bass/treble), volume and balance circuit for stereo applications in car radio, TV and audio systems. An additional control input allows loudness compensation to be simply effected. Four control inputs provide control of the bass, treble, balance and volume functions through application of DC voltages from a remote control system or, alternatively, from four potentiometers which may be biased from a zener regulated supply provided on the circuit. Each tone response is defined by a single capacitor chosen to give the desired characteristic.

 Build a Bass-Treble Tone Control Circuit Diagram


Features:
  • Wide supply voltage range, 9V to 16V
  • Large volume control range, 75 dB typical
  • Tone control, ±15 dB typical
  • Channel separation, 75 dB typical
  • Low distortion, 0.06% typical for an input level of 0.3 Vrms
  • High signal to noise, 80 dB typical for an input level of 0.3 Vrms
  • Few external components required
Note:
Vcc can be anything between 9V to 16V and the output capacitors are
10uF/25V electrolytic.

Continue reading...

Wednesday, October 15, 2014

Alternating Flasher



This circuit uses three easily available 555 timer ICs. All three work as astable multivibrators. The first 555 has an on period and off period equal to 1 sec. This IC controls the on/ off periods of the other 2 555s which are used to flash two bulbs through the relay contacts.
The flashing occurs at a rate of 4 flashes per second.
The diodes are used to protect the 555 ICs from peaks. The relays should have an impedance greater than 50ohms i.e, they should not draw a current more than 200mA.
The flashing sequence is as follows:
The bulb(s) connected to the first relay flashes for about 1 sec at a rate of 4 flashes per second. Then the bulb(s) connected to the second relay flashes for 1 sec at a rate of 4 flashes per second. Then the cycle repeats.
The flashing rates can be varied by changing the capacitors C3 and C5. A higher value gives a lower flashing rate.
Note that the values of C3 and C5 should be equal and should be less than that of C1.
The value of C1 controls the change-over rate ( default 1sec). A higher value gives a lower change-over rate.
If you use the normally open contacts of the relay, on bulb will be OFF while other is flashing,and vice versa.
If normally closed contacts are used, one bulb will be ON while the other is flashing.
Continue reading...

Monday, October 13, 2014

Cranial Electrotherapy Stimulator Circuit diagram

Parts:
R1_____________1M5 1/4W Resistor
R2____________15K 1/4W Resistor
R3___________100K Linear Potentiometer
R4_____________2K2 1/4W Resistor

C1___________330nF 63V Polyester Capacitor
C2___________100µF 25V Electrolytic Capacitor

D1_____________3mm. Red LED

IC1___________7555 or TS555CN CMos Timer IC
IC2___________4017 Decade counter with 10 decoded outputs IC

SW1___________SPST Slider Switch

B1______________9V PP3 Battery

Clip for PP3 Battery

Two Earclips with wires (see notes)

Device purpose:

Owing to the recent launching in Europe of Cranial Electrotherapy Stimulation (CES) portable sets, we have been "Electronically Stimulated" in designing a similar circuit for the sake of Hobbyists. CES is the most popular technique for electrically boosting brain power, and has long been prescribed by doctors, mainly in the USA, for therapeutic reasons, including the treatment of anxiety, depression, insomnia, and chemical dependency. CES units generate an adjustable current (80 to 600 microAmperes) that flows through clips placed on the earlobes. The waveform of this device is a 400 milliseconds positive pulse followed by a negative one of the same duration, then a pause of 1.2 seconds. The main frequency is 0.5 Hz, i.e. a double pulse every 2 seconds. Some people report that this kind of minute specialized electrical impulses contributes to achieve a relaxed state that leaves the mind alert.
Obviously we cant claim or prove any therapeutic effectiveness for this device, but if you are interested in trying it, the circuit is so cheap and so simple to build that an attempt can be made with quite no harm.

Circuit operation:

IC1 forms a narrow pulse, 2.5Hz oscillator feeding IC2. This chip generates the various timings for the output pulses. Output is taken at pins 2 & 3 to easily obtain negative going pulses also. Current output is limited to 600µA by R2 and can be regulated from 80 to 600µA by means of R3. The LED flashes every 2 seconds signaling proper operation and can also be used for setting purposes. It can be omitted together with R4, greatly increasing battery life.

Notes:

  • In order to obtain a more precise frequency setting take R1=1M2 and add a 500K trimmer in series with it.
  • In this case use a frequency meter to read 2.5Hz at pin 3 of IC1, or an oscilloscope to read 400msec pulses at pins 2, 3 or 10, adjusting the added trimmer.
  • A simpler setting can be made adjusting the trimmer to count exactly a LED flash every 2 seconds.
  • Earclips can be made with little plastic clips and cementing the end of the wire in a position suited to make good contact with earlobes.
  • Ultra-simple earclips can be made using a thin copper foil with rounded corners 4 cm. long and 1.5 cm. wide, soldering the wire end in the center, and then folding the foil in two parts holding the earlobes.
  • To ensure a better current transfer, this kind of devices usually has felt pads moistened with a conducting solution interposed between clips and skin.
  • Commercial sets have frequently a built-in timer. Timing sessions last usually 20 minutes to 1 hour. For this purpose you can use the Timed Beeper the Bedside Lamp Timer or the Jogging Timer circuits available on this website, adjusting the timing components in order to suit your needs.
Continue reading...

Friday, October 10, 2014

Power Amplifier OCL 50W by 741 2N3055 MJ2955 with PCB

This is old circuit Power amp OCL, But easy circuit and very nice. To use for play music in your home. It low cost too. It use IC 741 or LF351(good) and Transistor x 4 (2N3055+MJ2955+BD139+BD140) and little component. Power supply volt +35V/-35V and 3A for Mono, 5A for Stereo.


Circuit Power Amp OCL by 741+2N3055+MJ2955

Continue reading...

Thursday, October 9, 2014

Autonomous Parallel Parking RC Car

Logical Structure

Our project is broken down into two major components: the control system and the move car algorithm. The move car algorithm directs the car and the control system implements the directions of the move car algorithm.

Design

Figure 1: Logical Structure of High Level Design

Control System

The control system contains all the hardware and its associated software. It allows the parking and parking detection algorithms to interface with the car. The software in this module is broken up into three major sections: the Left-Right/Front-Back (LR/FB) state machines, master state machine, and distance calculations. The LR/FB state machines determines which direction to move the car based on flags set by the detect parking space and park car algorithms. Once the LR/FB state machines decides which direction to move the car, the master state machine implements this movement by sending the correct input and enable signals to the H-Bridge. The distance calculations implemented independently every millisecond.

Move Car

Move car contains the detect parking space and parallel parking algorithms. All functions in move car interface with the control module by setting movement flags. The parking space detection and parking algorithms use information from the distance sensors to set these movement flags and guide the car.

Move car works by initializing the movement flags of the car. It sets the car on a default trajectory and then calls detect parking space. Once a parking space has been detected, the parking algorithm is called. After the car has successfully parked, it idles until it is reset.

Hardware/Software Tradeoffs:

Distance Sensors

  1. When selecting infrared distance sensors there was always a tradeoff between the sensors ability to measure close range and long range. We tried to minimize this problem by using sensors designed for varying ranges.
  2. Using accurate sensors cost significant time. Every measurement from our distance sensors is approximately 40ms delayed. This affected our ability to start and stop the motors of the car at the correct times.
  3. We used integer calculations rather than floating point to calculate distances. We decided the increased accuracy would not significantly improve our ability to park the car because we cannot control the movement of the car with that degree of accuracy.
  4. Each sensor draws a maximum of 50mA. To accommodate for this, we needed to use a 5v regulator that could source up to 1A.

Batteries

  1. We decided to power our car using batteries rather than using a steady power source. This gave us increased mobility but was very inconsistent in the current it supplied to the motors. As the batteries wore out, they supplied less and less current to the motors. This made calibrating the velocity of the car very difficult.
  2. In order to best utilize the mobile power resources we have, we power the motors using four AA batteries, which are stored in the battery compartment of the RC car. These batteries supply the Supply Voltage to the H-bridge, which in turn powers the motor. We use a 9V battery to power the PCB.

Software

  1. 1. Our code requires the motor control software, parking algorithm software, and distance sensor software to run in parallel. However, this is not possible in the Atmega644. We got around this issue by making every important task a state machine. By breaking up each function into small pieces, we can execute one piece of function one, then one piece of function two, followed by one piece of function3, and then another piece of function one, etc. This enables us to emulate a multi-tasking architecture.

Hardware

RC Car | H-Bridge | Distance Sensors

Hardware consists of three main components:

  • RC Car
  • H-Bridge
  • Distance Sensors

All hardware used the following color convention:

Color Connected To
Red Vss
Green Ground
Purple Input
Yellow Output
Orange Enable

Table 1: Wire Color Convention

RC Car

The first step of our hardware design involved fully understanding the mechanics our RC car. We took apart the car and rebuilt it multiple times to fully understand how it was built, what every part in the car is used for, and how those parts contribute to the control of the car.

After understanding the mechanics of the car, we decided the easiest way to control our car would be to directly control the inputs to the DC brush motors controlling the front and rear wheels, bypassing all of the car’s internal circuitry. To do this, we scoped the control signals of the car. We found that the control signals were very simple. There is one motor for the reverse and forward movement of the rear wheels and one motor to turn the front wheels left and right. These motors are controlled by a simple 5V DC input. A +5V turns the rear wheels forward and the front wheel to the left. A -5V input turns the rear wheels backwards and turns the front wheels to the right. To more easily control the motors we soldered wires to their plus and minus terminals. This allows us to easily apply a +/-5V without opening up the car again.

H-Bridge

We use an ST Micro L298HN H-Bridge to control the motors of the RC Car. It allows us to switch between +/-5V across the motor. It also allows us to source the power from the batteries while using the processor to control the transistors in the H-Bridge. The control algorithm turns the appropriate transistors on/off, applying the proper voltage across the brush motor. The H-Bridge is connected using the following configuration:

H-Bridge

Figure 2: H-Bridge Schematic

The first H-Bridge (to the left) is used to control the front motor of the car. This motor turns the front wheels either left or right. The second H-Bridge (the the right) is used to control the rear motor, which is used for the forward and reverse functionality of the car. The inputs and enables of the H-Bridge are connected to port B.

Front Motor (Left/Right) Rear Motor (Forward/Reverse)
Pin Connected To Pin Connected To
In 1 Port B7 In 3 Port B3
In 2 Port B6 In 4 Port B2
En A Port B5 En B Port B1
Out 1 + Motor Terminal Out 3 + Motor Terminal
Out 2 - Motor Terminal Out 4 - Motor Terminal

Table 2: H-Bridge Pin Configuration

In addition configuring the H-Bridge to control the motors, we also had to protect the H-Bridge from inductive spikes caused by turning the DC brush motors on and off. We used diodes on the output to protect from these spikes. The H-Bridge was wired as follows:

H-Bridge

Figure 3: Inductive Current Protection on H-Bridge Outputs

Distance Sensors

We used three Sharp infrared distance sensors to determine the distance between our car and nearby objects. We placed a sensor on the front, the right side, and the rear of the car. For the front and rear, we used 4-30cm sensors. For the right side, we used we used a 10-80cm sensor. We decided to use a sensor with a larger range for the side so that we could more easily detect a parking space. However, this made aligning the parking the car more difficult, so we rely more heavily on the front and rear sensors to park the car. To slightly improve the short distance range of our sensors, we placed the sensors as far back on the car as possible.

The challenge with using these sensors is that their voltage output is nonlinear (inverse function) and each sensor varies slightly. Therefore, we scoped the output of each sensor at various distance values, linearized the plot, curve fit the line, and implemented an analog to digital conversion so that we had reliable distance values.

Measurements and Linearization

Distance (cm) Front Sensor Output (V) Rear Sensor Output (V)
4 2.78 2.6
5 2.36 2.22
6 2.06 1.92
8 1.6 1.52
10 1.32 1.26
12 1.12 1.08
15 .92 .88
18 .776 .76
21 .664 .656
24 .567 .576
27 .536 .52
30 .476 .48

Table 3: Front and Rear Sensor Measurements

Front Front

Figure 4: Front Sensor Plots of Distance vs. Voltage and Distance-1 vs. Voltage

Rear Rear

Figure 5: Rear Sensor Plots of Distance vs. Voltage and Distance-1 vs. Voltage

After taking the inverse of the distance versus voltage plots, we determined it would be best to fit the curve using two linear lines rather than one. The equations of the lines are:

Table 4: Front and Rear Distance Sensor Equations

The analog to digital conversion uses a different equation depending on the value of the measure voltage. If the measured voltage is above a certain threshold, the ADC will use the equation in the top row. If it is below a certain threshold, the ADC will use the equation in the bottom row. The threshold for the front sensor is 1.5v and 1.25v for the rear sensor.

Front Sensor Rear Sensor
voltage=9.759*[1/distance]+0.381, >1.5V voltage=8.963*[1/distance]+0.395, >1.25V
voltage=12.738*[1/distance]+0.057, <1.5v voltage=11.806*[1/distance]+0.09, <1.25v
Distance (cm) Side Sensor Output (V)
10 2.28
15 1.64
20 1.28
25 1.08
30 .808
35 .728
45 .672
50 .612
55 .556
60 .516
65 .488
70 .452
75 .432
80 .42

Table 5: Side Sensor Measurements

Side Side

Figure 6: Rear Sensor Plots of Distance vs. Voltage and Distance-1 vs. Voltage

When looking at the data for the 10-80cm side sensor plot, we determined that one linear line would be sufficient to accurately capture the output voltage vs. distance characteristics of the sensor. The equation of this line is:

voltage=21.592*[distance]^(-1)+0.173

Analog to Digital Conversion

For the analog to digital conversion we used the built in ADC function of the MCU. Because we had three distance sensors, we had to rotate which sensor was connected to the ADC. This was simply done by changing the value of ADMUX. One of the three sensors is sampled every millisecond.

We take the value from the ADCH register and perform the appropriate calculation to convert this value to a distance. We decided to use only the ADCH register because the value represented by the bottom two bits of the ADC is on the same order of magnitude as noise. Therefore, these two bits are not important to our calculation. To do this, the ADC is left adjusted. By using the value in the ADCH register, we are using the upper eight bits of the ten ADC bits. We use the internal reference voltage of 2.56V for comparison, so our calculation is:

ADC ADC ADC ADC ADC

Software

Control Module | Algorithm Module

The software for this project has been partitioned into 2 files based on functionality. There are 2 files, ControlModule.c and AlgorithmModule.c.

The state machines in ControlModule control the motors, and are:

  • fbStateMachine
  • lrStateMachine
  • masterStateMachine

The state machines in the AlgorithmModule use the sensor data and various algorithms to determine what should be the next movement the car must make. They assert flags which tell the ControlModule state machines to actually move the motors. The state machines in AlgorithmModule are:

  • moveCar
  • detectParking
  • parkCar

Below we have explained the various state machines we have used in our project.

Control Module

fbStateMachine()

Function:

The fbStateMachine controls the motor for Forward-Backward operations. It is controlled by the isForward and isReverse flags. These flags serve as indicators as to whether the car should be traveling forward or reverse. In order to control the velocity of the forward-backward motion we anded the enable bit with a a PWM signal.

Working:

In State 0, the motor is at rest. The corresponding FB control bits are 00. When the algorithm requires the car to go forward or reverse, the corresponding flags (isForward and isReverse) are set, and the FB state machine switches states to 1 or 3 respectively.

In State 1, the motor rotates to drive the car forward. The state machine remains in this state while isForward is equal to 1. Once isForward is de-asserted, the state machine moves to a buffer state to stop the car from moving forward due to inertia.

After isForward is set to 0, leaving state 1 and stopping the motor isn’t enough. The wheels might continue to rotate due to inertia, and so a buffer state, State 2, is required. It makes the motor go in Reverse for 1 cycle (50ms) of the FB State Machine, before going back to the rest state, State 0.

If isReverse is asserted, the state machine jumps to State 3. The state machine remains in this state while isReverse is equal to 1. Once isReverse is de-asserted, the state machine moves to a buffer state to stop the car from moving in reverse due to inertia.

After State 3, a buffer state, State 4, is needed to stop the wheels from continuing to rotate in reverse due to inertia. This is a 1 cycle Forward motion, similar in function to State 2’s reverse functionality. Once done, the FB State Machine goes back to its rest state, State 0.

Timing:

The fbStateMachine is called upon every 50ms. This is enough time to evaluate the flags set in the AlgorithmModule, but at the same time fast enough to make the motor motion very accurate.

lrStateMachine()

The lrStateMachine() works the same way are the fbStatemachine. A forward corresponds to a left turn and a right corresponds to a reverse. The diagram for both are:

BF/LR

Figure 7: FB/LR Motor State Machine

masterStateMachine()

Function:

This uses the FB and LR control bits to call the required functions in order to send the appropriate input signals to the H-Bridge and make the motors rotate in the appropriate direction.

Working:

In this function, the 2 FB and LR control bits are combined to create 4 master control bits by left shifting the FW bits by 2 and adding it to the LR bits.

Therefore,

fbBits = fb.controlBits; // (FB FB)

lrBits = lr.controlBits; // (LR LR)

masterBits = (fbBits<<2)>

As a result, each of the 7 car movements (stop, forward, forward-left, forward-right, reverse, reverse-left, reverse-right) have a unique masterBits combination associated with them. The master control bits are then used in the function to decide which motor control function is to be called.

Timing

This state machine is invoked in each iteration of the infinite while loop in main. In other words, it can be considered to be executing continuously and not at intervals. This is essential because parking requires a great deal of accuracy when controlling the motors. Therefore, we want to update the motors as often as possible, which would require us to call masterStateMachine as often as possible.

Algorithm Module

moveCar()

Function:

This is the master state machine of the algorithm module. It decides which mode the car is in, i.e., whether the car is moving forward to detect a parking spot, aligning itself once a parking spot has been detected, or actually going through the motion of parking.

Diagram:

Move

Figure 8: Move Car Motor State Machine

Working:

This is a 5 state linear state machine, as can be seen in the diagram above.

It starts off in State 0. In this state, the car is at rest. It gives enough time for all transients in the car to stabilize. Once everything is stable, it moves to State 1.

In State 1, car moves forward till it detects a parking spot. While in this state, the car invokes the detectParking state machine each time the moveCar state machine is called in the Control Module. Details of how the detectParking state machine works are explained in the next section.

Once a parking lot has been detected, the state machine moves into State 2. It remains in State 2 until the car has parked itself. The parkCar state machine is invoked for each cycle that the moveCar state machine is in State 2. Once the car has been parked by parkCar state machine, the isParked flag is asserted, and moveCar moves onto state 3.

When we reach State 3, the car parked itself. The car will eternally remain in this state hereafter, since the car has parked itself and is at rest.

In addition to serving as a state machine as described above, moveCar also makes available 2 values – rsDist and rrsDist – to its sub-state machines, detectParking and parkCar. rsDist stores the values of the side distance in the previous clock tick of the moveCar state machine, while rrsDist stores the value 2 clock cycles earlier.

Timing:

The moveCar state machine is invoked every 100ms. The moveCar state machine also serves as a clock for the detectParking and parkCar state machines. When in State 1, each clock tick of the moveCar state machine serves as a clock tick for the detectParking machine. When in State 3, each clock tick of the moveCar state machine serves as a clock tick for the parkCar machine.

detectParking

Function:

The function of detectParking state machine is, as its name suggests, to detect a parking space to park in. It accomplishes this by continuously polling the distance values from the side distance sensor.

Diagram:

Detect

Figure 9: Detect Parking Space State Machine

Working:

detectParking is a 6 state state machine, as can be seen in the diagram above.

State 0 serves as a start-up. This is essential because the first few cycles of the detectParking take place while the side distance sensor is still calibrating itself. Once the wait state is done, the state machine enters state 1.

State 1, essentially, searches for a sudden increase in the side distance value. A sudden increase corresponds to the beginning of a parking space. It does this by checking the (sDistance – rsDist) value. If there is a sudden depression, sDistance will increase and so it’s difference from its own previous value (rsDist) will be a large number. When this does occur, the state machine goes onto State 2.

In State 2 it attempts to confirm that it indeed is detecting a valid depression, by calculating (sDistance – rrsDist). Since State 2 is invoked 1 clock tick after the depression was last detected in State 1, rrsDist will store the value of the side distance before the depression began, i.e., from 2 clock cycles earlier. If (side distance – rrsDist) is still a large number, we can confirm that a depression has been detected, and we move to State 3.

In State 3, we keep track of how long the depression is. This is done by incrementing the detect.controlBits for each state machine clock tick that we are still in the depression. When there is a sudden decrease in the value of the side distance, we move to state 4, since it signals a probable end of the parking lot.

State 4 confirms that the possible end of the parking space, as detected in State 3, is indeed the end of the space. This is done in a manner similar to the confirmation done in State 2 using the rrsDist variable.

Once a parking space has been detected by the above states, the state machine moves into State 5 wherein it checks the control Bits (which kept track of how long the parking space was by incrementing for each cock tick while in the depression) to make sure the parking space is large enough. If large enough, then the isParkingLot flag is asserted which would direct moveCar to stop and start the parking sequence.

Timing

Each tick of the detectParking state machine corresponds to a tick of the moveCar function. When moveCar is in State 1, it calls detectParking on each of its ticks. Therefore, detectParking is called every 100ms until a parking space has been located.

parkCar()

Function:

The function of the parkCar state machine is to park the car once a parking spot has been identified. The algorithm to park the car continuously interacts with its surroundings through the forward, side and rear sensors.

Diagram:

Park

Figure 10: Park Car State Machine

Parking

Figure 11: Parking Motion of Car, colors correspond to state of the Park Car State Machine

Working:

The parkCar function tries to simulate how a human would parallel park. It is, essentially, just the following 4 motions:

  1. Reverse Right until you are inside the parking lot.
  2. Go Forward and redo 1. if the car is not aligned.
  3. Reverse Left until the car is fairly straight and close to the back wall.
  4. Forward Right until the car is straight and close to the front wall.

The above routine is accomplished using a 7 state machine.

State 0 makes the car move forward by a certain amount. The idea is to give the car enough space to move and rotate into the parking space.

State 1 simply turns the front wheels to the right. We turn the wheel before reversing the car so as to not lose turning radius by turning as the car reverses. Once the wheel is turned, the state machine moves onto state 2.

State 2 commands the car to go reverse right for a specified amount of time until the car has passed the edge of the parking space. Once past the edge of the space, it moves to state 3.

In State 3, the car continues in reverse right until it is either a certain distance from inside of the parking space, or the rear distance is close to the edge. These conditions, as can be seen from the figure above, are checks to verify that the car is deep enough inside the parking lot to be able execute the reverse left maneuver. Once the conditions are met, the car stops and the state machine moves to state 4.

NOTE: If at any point in states 1, 2 or 3 the car’s AI decides it is not in a position to go through with the parking, it will go back to State 0, and redo the whole procedure.

In State 4, the car moves reverse left. It does this until the rear of the car is close to the side wall of the parking space, which can be judged by the rear distance sensor value. Once close enough to the rear value, it stops and moves to state 5.

State 5 commands the car to go forward right. This attempts to straighten out the car completely and to align it nicely inside the spot. It goes forward right until it is close to the side wall of the parking space, as judged by the forward distance sensor. Once aligned, the car is parked and it moves to state 6.

State 6 is a 1 cycle stop before progressing back to state 0. Also, here the isParked variable is set so that the moveCar state machine can move out of parking mode to rest mode.

Timing:

Each tick of the parkCar state machine corresponds to a tick of the moveCar function. When moveCar is in State 3, it calls parkCar on each of its ticks. Therefore, parkCar is called very 100ms while the car is being parked.

Misalignment Detection

Our parking algorithm is equipped with a Misalignment Detector. Its role is to judge whether the car can park itself in the given space, and if it judges that parking is impossible, to correct the car’s position to make it possible.

Our algorithm has a provision to keep track of the values of distance from the side sensor (sDIstance) from the earlier clock (rDist) and earlier 2 clock ticks (rrDist) of the state machine. Having these 2 values is extremely important to the successful working of the misalignment detector.

The detector works by checking how much sDIstance has changed over the last 2 clock cycles. If the change in sDistance is large, it means the car is not ideally positioned and it will set the park car state machine to the forward state. It will also define how long the car should remain in this state. This can be seen in the figure below:

Misalignment

Figure 12: Example of Misalignment Detection

What is beautiful about this whole setup is that this exactly how a human would park the car! If the driver realizes that he is not aligned well enough, he will go forward and try again.

Putting it All Together

If you have taken a look at the high level design described earlier in the code, and read the description of the state machines in the earlier section, you have all the information you need to understand how the software of the car works.

Essentially, the AlgorithmModule state machines are what set the flags to control the movement of the car. These flags are interpreted by the ControlModule state machines, and translate it into actual motor control.

Results of Design

Speed of Execution | Accuracy | Safety and Interference | Usability

Speed of Execution

Speed wasn’t a big issue for us. All components of the software were done as state machines.

The Motor Control state machines update at ticks every 50ms. This was ample time for the state machines to compute the necessary controlBits and assert the required inputs to the H-bridge. As a result, we were able to obtain highly accurate and sensitive responses from the motors to the control code.

The Algorithm Control state machines update at ticks every 100ms. This was enough time for the state machines to compute the necessary parameters, and to assert the necessary flags for the Control Module to interpret them and translate it into motor motion.

The response of the car to its surroundings is also very fast. The sensors have a response time of 20ms, which is quick enough for them to be processed in real time.

Accuracy

Distance Sensors

The sensors were very accurate within their specified range. Even with integer calculations, we were able to calculate distances with a +/- 1cm accuracy. Because we could not control the movement of the car with this degree of accuracy, the accuracy of our distance sensors are sufficient.

Parking Space Detection

The sequence to detect a parking space works very accurately. In the many trials that we performed, it always detected the parking space and stopped on detection.

Parking Algorithm

The parking algorithm we have written works very well when the car is close to a set distance from the side of the parking lot. It, however, becomes less accurate when the car is placed at larger distances from the parking space.

The parking algorithm we have written works very well when the car is close to a set distance from the side of the parking lot. It, however, becomes less accurate when the car is placed at larger distances from the parking space.

Safety and Interference

There were not many safety concerns with our project. In order to minimize disturbance to other project groups, and avoid the car colliding into students, we made a separate test area in the hallway. We used this test area for all testing purposes.

Also, since the car is completely autonomous, there was no human contact required (except for turning on the car). Therefore, there wasn’t an issue of interference with the systems in the car.

Usability

In our opinion, this project has tremendous potential. With some more work on the parking algorithm, we feel that we can develop a system for the RC car to park irrespective of its orientation and distance from the parking lot. With enough research, this can be developed for real cars!

It can also be used as a learning tool for people who want to learn driving. By observing the motion of this car, students can learn how to parallel park better.

Lastly, this project could serve as a useful reference point for future projects dealing with R/C cars. The Control Module we have implemented to control the R/C car can be used universally for any 2-wheel drive R/C car.

Conclusion

Standards, IP, and Legal | Ethical Considerations

Overall, we feel the project met most of our expectations, as we were able to build an autonomous car which could detect a parking space, and park in it. When we started out, we intended the car to be able to locate a parking spot, and park irrespective of its distance from the parking space and its orientation. We were, however, unable to make it robust enough to accommodate parking from different orientations and distances. However, we feel the basic algorithm would remain the same, and this algorithm can be built upon to accommodate these features.

This was also a tremendous learning experience for us, especially with the hardware. We learn a tremendous amount about motor control systems, efficient circuit design, and hardware debugging. We also learned a lot about software. Through this project, we got valuable experience in developing efficient software using memory and run-time optimizations, something that cannot be gained through routine assignments.

If we had an opportunity to start this project over, there are a few things we would do differently.

  1. Use a regulator to ensure a steady current is being supplied to the batteries despite the fluctuation in voltage across the batteries, particularly as they lose power
  2. Consider implementing an optical sensor to track the velocity of the car
  3. Build a feedback PWM loop to control the velocity of the car
  4. Consider adding a fourth sensor on the side to calculate the orientation of the car
  5. Consider building the car ourselves

Standards, Intellectual Property, and Legal Concerns

There were no standards or regulations that concerned our project because we decided not to control the car using radio signals. There are also no concerns with intellectual property because we purchased the RC car and are only using it for personal use. All the software and other hardware was designed by us.

Ethical Considerations

We adhered to the IEEE Code of Ethics throughout this project. We were very careful to consider the effects of our decisions on us, those around us, and the outcome of our project. We took significant time to plan our project before implementing it. We wanted to ensure our car was designed in the best way possible, in terms of performance, reliability, and safety. We worked cooperatively with other people, seeking and providing feedback and constructive criticism from the professor, TAs, and other groups to build the best possible design.

We also set up a safe testing environment. In an area with high traffic, people could have easily stepped on the car and been hurt. We tested our car in a highly controlled environment to ensure everyone’s safety. We did not make any decisions that would cause harm to others or the environment.

In no circumstances did we give or accept bribes. All of our parts were either bought or sampled in the appropriate manner. We have been honest regarding the results and limitations of our design. We have worked hard to create the best design possible in the given time frame, and it is safe to operate. All people involved with this project were treated fairly.

Appendix

Commented Code | High Level Schematic | Parts List and Cost | Tasks | References

Appendix A: Commented Code

This link contains the source code for our project: Source Code

This link contain supplementary functions we wrote during the development of our project: Supplementary Code

Appendix B: High Level Schematic

High

Appendix C: Parts List and Cost

Part Number Cost
RC Car 1 $20
10cm-80cm Sharp IR Sensor (GP2Y0A21YK) 1 Free (Sampled From Sharp)
4cm-30cm Sharp IR Sensor (GP2D120XJ00F) 2 Free (Sampled From Sharp)
ST Micro H-Bridge (L298HN) 1 Free (Sampled from ST Microelectronics)
ATMEGA 644 1 Free (Sampled from Empire Technologies)
Custom PC Board 1 $4
Small Solder Board 1 $2
9V Battery 1 $2
AA Battery 4 $2
Headers 65 $3.25
Regulator (LM340T5) 1 Free (In Lab)
Screws and Spacers

Free (In Lab)






Total

$33.25

Appendix D: Tasks

Both of us contributed to all parts of the project, however we spent more time working on certain things.

  • Design of Hardware: Nagappan
  • Design of Control Algorithm: Both
  • Design of Parking Algorithm: Prakash
  • Testing of Hardware: Both
  • Testing of Software: Both
  • Compiling Report and Web Site: Both
Continue reading...