

There are six PWM channels in UNO. However we cannot use PWM pins established over the PINS 0-7, as the PINS are preferred for buttons interface. The PWM of Arduino Uno can achieved at any of pins symbolized as “ ~ ” on the PCB board. To filter out the noise from supply voltage capacitors are placed across terminals as shown in the diagram.
ICIRCUIT CODE GENERATOR
The circuit for tone generator is shown in below diagram. Software: AURDINO nightly or Atmel studio 6.2 Hardware: Arduino Uno, Power supply (5v), 1000 uF capacitor, 100 nF capacitor, Buzzer, buttons (8 pieces). So we have a tone generator at hand which generates a different tone with each button press. We are going to program the UNO to provide a PWM signal of different duty ratio for each of buttons.

With this change in duty ratio we have a change in Vrms (Root Mean Square value of Voltage), when this voltage is given to the buzzer it makes a different noise whenever there is a change in duty ratio. In the third graph, the TURN ON time is 50% and TURN OFF time is 50% of complete duration. So in first case we have a duty ratio of 80% and in second case we have a duty ratio of 20%. Only the ratio of TURN ON and TURN OFF time changes. For example in the second graph in above figure, the TURN ON time is 80% and TURN OFF time is 20% of complete duration. In PWM, the frequency of signal or the time period of signal (Ton + Toff) is always constant. This gives the best tone variation and much smoother changes. The intensity of the tone is changed by PWM (Pulse Width Modulation). An example of PWM is shown in below graph. This is the one of the easiest way to make a piano with Arduino Uno. It’s the intensity of the sound which changes with each press. However to mount the supply upto 7.5V, five such batteries are recommended.In this project we will develop a tone generator using Arduino Uno. We will have buttons interfaced with the UNO and each one of them generates different intensity of tone. The frequency of tone generated by the UNO is same at every internal. Here the 6V battery is corresponding to four double batteries each of 1.5V. You may widen the range but going above 40 LEDs per 2N2222 is not recommended.Ī schematic circuit diagram is shown below in which the circles represent LEDs while the rectangular boxes represent resistors.

A single 2A2222 transistor can withstand with 40 LEDs but for test here we put just 5 LEDs. Here the 2N2222 transistor is used which can endure upto 800mA current and 40V voltage. For this purpose one may use a transistor as a switch while controlled with arduino. This value of current is enough to light a single LED but you may need to light several LEDs using a single pin. For example 2N3904 exhibits gain peak at 10mA while 2N2222 at 150mA.įor the time being, arduino is the Nano-technology with almost 40mA input or output current. 2N3904 is more useful in amplifier applications with fewer collectors current. As compared with 2N2222 it shows forward gain at lower current. It can control only one third of the current of 2N2222. The 2N3904 is also an NPN transistor with same characteristics like 2N2222 but with one difference.

Actually the collector and emitter pins are interchanged.ĢN2907 is also a complementary general purpose PNP transistor with equal popularity. However the pins order for P2N2222 is different from 2N2222. P2N2222 which has alike specifications excluding lower max collector current Ic. 2N2222 Transistor Equivalent:Īlternatives for the 2N2222 are now commonly available in TO-92 packaging e.g. The resistor R1 confirms to keep the transistor OFF when positive supply rail and base are not in contact with eachother. Here power supply section consists of transformer T1, capacitor C1, and bridge D1. The switches are arranged on the panel in a shuffle manner and so the relay works only when the switches are ON or OFF in the pre-described manner. The only case when the transistor Q1 becomes ON and the relay is activated when all the first five switches S0 to S4 are ON and the last five i.e. Other five parallel arranged switches (S5 to S9) are connected between transistor’s base and ground. A current limiting resistor R 2 is connected across the positive supply rail and base of the transistor along with five switches (S0 to S4) in series. The circuit has only one transistor with a relay as load at its collector. The circuit is simple but really efficient and works the best. It consists of a relay, a transistor and some passive devices like resistors, capacitors and switches.
ICIRCUIT CODE CODE
One 2N2222 transistor code lock system is a simplest electronic code lock system. 2N2222 Transistor Circuit One 2N2222 Transistor Code Lock System: Description:
