Posts

Showing posts from March, 2017

C++ Programming Tutorial 2 - New Line Escape Character

Image
In this tutorial you will learn everything about using and printing on new lines. There are many methods to use new lines, the most fundermental method is to use  the endl operator at the end of the cout statement. The endl operator make sure that the next cout statement will be printedc on a new line. The endl can be replaced by the use of the new line character \n. the \ is an escape character.Sometimes is essential that we need to escape many lines before the next text is printed on to the screeen  for this in C++ the new line character can be used as required.  \n\n will escape two lines before the next text get printed on the screen. where the use of \n\n\n\n\n would print 5 blank lines before the next text is printed. C++ provides us futher options to simplify the code for printing text on to the screen. In C++ it is possible to print new lines as required inside a single cout ,  this is done by inserting the newline escape character where requ...

Variable Resistors In Sinhala

Image
Variable Resistor එකක අගය සරලව ගණනය කර ගන්නා ආකාරය සිංහල බසින්!   These are a special type of resistors that provide us the ability to change their resistance as required by the user. Basically there are two versions available at traditional electronic shops as; -Volume control (Big Size) -Preset (Small Size) Volume control type can be very easy to manipulate due to the large size. These resistors cannot handle much power (~0.25W). These devices usually comes with three terminals and could be used in two major ways: 1. As a variable resistor. 2. As a potential divider. The smaller version (preset) are to be tuned to the required resistance with the help of a screw driver but the volume control type can be easily tuned as required with the help of our hand. Variable resistors have a variety of applications such as controlling your radio's volume, changing the speed of your fan... To use the device as a variable resistor we only use two pins out the three simple ...

Dark Sensitive Circuit With C828 Transistor In Sinhala

Image
අදුරට සංවේදී පරිපටයක් සකස් කර ගන්නා ආකාරය සරල සිංහලෙන්. Dark sensitive circuits have a range of applications such as turning on lights when the light level falls below a certain threshold.In our circuit this threshold is changed by using a variable resistor which can be turned to fine tune the circuit. The circuit consists of the following components: C828 transistor x1 7805 voltage regulator x1 1 kilo ohms resistor x1 LDR x1 LED x1 100 kilo ohms variable resistor.  The base current of the transistor is controlled by the potentiometer.In very low light conditions the ldr will have a very high resistance and in high light conditions the ldr will have a low resistance.In the dark condition less current will flow through the ldr so more current passes through the base of the transistor causing a high current flow through the led via the collector pin of the transistor causing the led to light up but in high light condtions the ldr will have a low resistance there for most...

Simple Water Level Sensor Using D400 Transistor In Sinhala

Image
සරල Water Level Sensor එකක් D400 transistor එකක් භාවිතා කර සාදා ගැනීම!  Water level sensors can be used for many interesting projects. Examples : -To switch a water pump on and off to fill the water tank automatically. -To gather rainfall data. Part List: D400 transistor x 1 1 kO resistor x 1 150-330O resistor x 1 LED x 1 Ic 7805 Voltage regulator  Transistors consists of three pins as : *Emitter *Collector *Base 7805 regulation is used to add an extra layer of protection for the circuit. The user can directly omit the 7805 regulation part if the user can apply suitable voltage. The first circuit is a case where the presence of water will cause the led to light up  1 kilo ohms resistor is placed in series with the base pin to prevent too large base current. The 330 ohms resistor places in series with the led is to prevent too large current from flowing through the  led, the probes must be selected according to the application sometimes you may need corrosion resistan...

Fixed 5V regulator Using 7805 In Sinhala

Image
5V Regulator එකක් භාවිතා කර Phone Charger එකක් නිර්මාණය කරමු! The 78xx is a series of fixed-voltage integrated-circuit voltage  regulators designed for a wide range of applications. The Ic can handle upto about 1.5A of current. Working temperature 0 – 125 º Celsius Examples : -7805 (5v regulator Ic)  -7812 (12v regulator Ic) Properties : -Thermal shutdown features. -Overload current limiting features. -High power dissipation capability. -Bias current (~1–10mA). Part List: 7805 IC 0.33 μF 0.1 μF When the circuit is set you can successfully obtain 5v output from a varying dc voltage source (7-25V). The capacitors helps to stabilize and filter noise of the input.  Applications: Powering a micro controller Making a mobile phone charger 7805 regulators are cheap and efficient. Visit our web site : www.vikilab.com References : LM7805 Data Sheet @  https://www.sparkfun.com/datasheets/C...

12V DC Power Supply Using a Step Down Transformer

Image
12V DC Power Supply එකක් Step Down Transformer එක භාවිතයෙන් ලබා ගැනීම සරල සිංහල බසින්! We cannot use 230V directly from the mains supply for most of our day to day projects so a dc power source is really essential as we cannot relay of batteries due to the daily cost. The problem can be solved by using building our own power supply. Here we constructs a 12V dc power supply. Part List: -12V X 2 step down center tapped 300mA transformer. -230v plug socket. -Flexible wire (1m). -Heat sleeve (5cm).  -Insulation tape. -2200 µF capacitor.  -330 O resistor -Led.  -IN4001 or IN4007 diodes X 2. Working principle: * The 12Vx2 center tapped transformer convert the 230V AC to 12 V AC * The pair of diodes then rectifies the 12V AC wave form to 12V DC This output is continuously varying between 0-12V which is not suitable for most of our work what we need is a stable dc power supply of 12 V *The capacitor charges and discharges according when required to give us a stable 12V DC output ...

Center Tapped Step Down Transformer In Sinhala

Image
Step down transfomer එකක් යොදාගෙන 12V DC ජව සැපයුමක් සාදා ගැනීම. Transformers are of two types : -Step up -Step down In this we are dealing with step down transformers,basically step down transformers convert a high voltage to a low voltage Here we are using a 12V X 2 center tapped transformer (300mA) the input voltage of the transformer is 230V the input wires are denoted by red color in this case the output side wires are easy to be recognized as there are 3 wires (2 black wires & 1 yellow wire) The voltage between the yellow wire and any black wire is 12V & the voltage betweeen the two black wires is 24V. These transformers can be used for many applications such as construction of power supplies in the upcomming videos we are going to use this transformer to construct a 0 - 12V variable power supply. The input is connect to the mains via a plug top and 2 wires  the soldering of the wires are insulated by using heat sleeve and insulation tape. PDF Download -  https:/...