Updates from jalves61 Toggle Comment Threads | Keyboard Shortcuts

  • jalves61 8:19 pm on April 2, 2020 Permalink | Reply
    Tags:   

    Thermoelectric Effect, Thermoelectric current and the Seebeck Effect 

    There are three types of current flow in a semiconductor: Drift, diffusion, and thermoelectric. Drift current is very familiar as the study of conductors leads us to know that when a potential gradient (voltage) is established, electrons will flow in a conductor to balance this out. The same effect happens in semiconductors. However, there are two types of charge carriers in semiconductors: electrons AND holes. This leads to diffusion current, which is caused by a concentration gradient rather than a potential gradient.

    The third kind of current within a semiconductor is called thermoelectric current. which involves the conversion of a temperature gradient to a voltage. A thermocouple is a device which measures the difference in potential across two dissimilar materials where one end is heated and the other is cold. It was found that the temperature difference was proportional to the potential difference. Although Alessandro Voltage first discovered this effect, it was later rediscovered by Thomas Seebeck. The combination of potential differences leads to the full definition of current density.

    j1

    eemf

    S is called as the “thermopower” or “Seebeck coefficient” which is units of Volts/Kelvin. The two equations of Ohm’s law (point form) and E_emf look remarkably similar.

    thermo

    The Seebeck coefficient is negative for negative charge carriers and positive for positive charge carriers, leading to a difference in the Seebeck Coeffecient between the P and N side of the PN junction above. This leads to the above circuit being used as a thermoelectric generator. If a voltage source replaces the resistor, the circuit becomes a thermal sensor. These (thermoelectric generators) are often employed by power plants to convert wasted heat energy into additional electric power. They are also used in car engine engines for the same reason (fuel efficiency). Solid state devices have a huge advantage in the sense that they require no moving parts or fluids which eliminates much of the need for maintenance. They also reduce environmental impact by converting waste heat into electrical energy.

     
  • jalves61 4:53 pm on April 1, 2020 Permalink | Reply
    Tags:   

    Object Oriented Programming and C#: Simple Program to add three numbers 

    The following is a simple program that takes a user input of three numbers and adds them but does not crash when an exception is thrown (eg. if a user inputs a non integer value). The “int?” variable is used to include the “null” value used to signify that a bad input was received. The user is notified instantly when an incorrect input is received by the program with a “Bad input” command prompt message.

    c1

    The code above shows that the GetNumber() method is called (shown below) three times, and as long as these are integers, they are summed and printed to the console after being converted to a string.

    c2

    The code shows that as long as the sum of the three integers is not equal to null (anything plus null is equal to null, so if at least one input is a non-integer this will be triggered) the Console will print the sum of the three numbers. The GetNumber() method uses the “TryParse” method to convert each string input to an integer. This will handle exceptions that are triggered by passing a non-integer to the command line. It also gives a convenient return of “null” which is used above.

    The following shows the effect of both a summation and an incorrect input summation failure.

    correct

    incorrect

     
  • jalves61 11:23 pm on March 31, 2020 Permalink | Reply
    Tags:   

    Object Oriented Programming and C#: Shallow vs Deep Copying 

    The following will be a brief but important post illustrating the difference between reference and value types. In C#, value types are things like integers, floats, enumerations and doubles. A value type holds the data assigned to it in its own memory allocation whereas a reference type only holds an address which points to the actual data. A reference type is anything that is not an int, float or double, etc such as a dynamic array (list), static array, class objects, or strings. It is important to know the difference because when code such as the code below is executed, it can have some confusing effects.

    shallow copy

    The image above illustrates what is known as a “shallow copy”. Because instances of classes are not storing actual data but are used as pointers, when the object is copied to the second object, the memory address is copied instead of the data contained within “obj”. Therefore, any changes made to “obj2” will also affect “obj” because they point to the same data. The following image shows the difference between deep and shallow copies.

    diff

    To do a deep copy of an array, for instance, every element of that array must be copied to the new array. You can do that using the “Array.Copy(source array, copy array)” method. As shown in the image, this will create two references and two data instead of 2 references pointing to the same data. Shallow copying only copies a memory pointer.

     
  • jalves61 8:28 pm on March 30, 2020 Permalink | Reply  

    Power Factor and the Power Triangle 

    Power factor is very important concept for commercial and industrial applications which require higher current draw to operate than domestic buildings. For a passive load (only containing resistance, inductance or capacitance and no active components), the power factor range from 0 to 1. Power factor is only negative with active loads. Before delving into power factor, it is important to discuss different types of power. The type of power most are familiar with is in Watts. This is called active or useful power, as it represents actual energy or time dissipated or “used” by the load in question. Another type of power is reactive power, which is caused by inductance or capacitance, which leads to a phase shift between voltage and current. To demonstrate how a lagging power factor causes “wasted” power, it would be helpful to look at some waveforms. For a purely resistive load, the voltage and current are in phase, so no power is wasted (P=VI is never zero at any point).

    eli

    The above image captures the concept of leading and lagging power factor (leading and lagging is always in reference to the current waveform). For a purely inductive load, the current will lag because the inductor will create a “back EMF” or inertial voltage to oppose changes in current. This EMF leads to a current within the inductor, but only comes from the initial voltage. It can also be seen that this EMF is proportional to the rate of change of the current, so when the current is zero the voltage is maximum. For a capacitive load, the power factor is leading. A capacitor must charge up with current before establishing a voltage across the plates. This explains the PF “leading” or “lagging”. Most of the time, when power factor is decreased it is because the PF is lagging due to induction motors. To account for this, capacitors are used as part of power factor correction.

    The third type of power is apparent power, which is the complex combination of real and reactive power.

    triangle

    The power factor is the cosine of the angle made in this triangle. Therefore, as the PF angle is increased the power factor decreases. The power factor is maximum when the reactive power is zero. Ideally, the PF would be between 0.95 and 1, but for many industrial buildings this can fall to even 0.7. This leads to higher electric bills for this buildings because having a lower power factor leads to increases current in the power lines leading to the building which causes higher losses in the lines. It also leads to voltage drops and wastage of energy. To conserve energy, power factor correction must be employed. Often capacitors are used in conjunction with contactors that are controlled by regulators that measure power factor. When necessary, the contactors will be switched on and allow the capacitors to improve the power factor.

    For linear loads, power factor is called as displacement power factor, as it only accounts for the phase difference between the voltage and current. For nonlinear loads, harmonics are added to the output. This is because nonlinear loads cause distortion, which changes the shape of the output sinusoids. Nonlinear loads and power factor will be explored in a subsequent post.

     
  • jalves61 8:00 pm on March 29, 2020 Permalink | Reply
    Tags: , ,   

    Photovoltaic Effect and Theory of Solar Cells 

    Just as plants receive energy from the sun and use it to produce glucose, a photovoltaic cell receive energy from the sun and generates an electrical current. The working principle is based on the PN junction, which will be revisited here.

    Silicon can be subdivided into several discrete energy levels called “bands”. The major bands of concern are the valence and conduction bands. The bottom bands are fully occupied and don’t change.

    siliconenergy

    For silicon, the bandgap energy is 1.1eV. For an intrinsic semiconductor, the Fermi level is directly between the conduction and valence band. This is because there is an equal number of holes in the valence band as electrons in the conduction band. This means the probability of occupation of energy levels in both bands are equal. The Fermi level rises in the case of an n-type semiconuctor (doped with Phosphorous) and declines towards the valence band in a p-type (doped with Boron).

    The following illustrates an energy band diagram for a semiconductor with no bias across it. Photodiodes (light sensors) operate in this manner.

    intrinsicenergy

    The Fermi energy is shown to be constant. On the far right hand side away from the depletion region, the PN junction appears to be only P-type (hence the low Fermi level with respect to the conduction band). Likewise, on the left the Fermi level is high with respect to the conduction band. The slope of the junction is proportional to the electric field. A strong electric field in the depletion region makes it harder for holes and electrons to move away from the region. When a forward bias is applied, the barrier decreases and current begins to flow (assuming the applied voltage is higher than the turn on voltage of 0.7V). Current flows whenever recombination occurs. This is because every time an electron recombines on the P side, an electron is pushed out of the N side and beings to flow in an external circuit. The device wants to stay in equilibrium and balance out. This is why solar cells (as opposed to photodiodes) are designed to operate in a forward bias mode.

    The sunlight produces solar energy in the frequency bands of Ultraviolet, infrared and visible light. In order to harness this energy, silicon is employed (made from sand and carbon). Silicon wafers are employed in solar cells. The top layer of the silicon is a very thin layer doped with phosphorous (n-type). The bottom is doped with P-type (doped with Boron). This forms the familiar PN junction. The top layer has thin metal strips and the bottom is conductive as well (usually aluminum). Only frequencies around the visible light spectrum are absorbed into the middle region of the solar cell. The photon energy from the sun knocks electrons loose in the depletion region which causes a current to flow. The output power of a single solar cell is only a few watts. To increase power, solar cells are wired in series and parallel to increase the voltage and current. Because the output of the solar cells is DC, the output is run through an inverter, a high power oscillator that converts the DC current to an 240V AC current compatible with household appliances.

    solar_16x9_2

     
  • jalves61 9:23 pm on March 26, 2020 Permalink | Reply
    Tags: ,   

    RFID – Radio Frequency Identification 

    RFID is an important concept in the modern era. The basic principle of operation is simple: radio waves are sent out from an RF reader to an RFID tag in order to track or identify the object, whether it is a supermarket item, a car, or an Alzheimer patient.

    RFID tags are subdivided into three main categories: Active, passive and semipassive. Active RFID tags employ a battery to power them whereas passive tags utilize the incoming radio wave as a power source. The semipassive tag also employs a battery source, but relies on the RFID reader signal as a return signal. For this reason, the active and semi passive tags have a greater range than the passive type. The passive types are more compact and also cheaper and for this reason are more common than the other two types. The RFID picks up the incoming radio waves with an antenna which then directs the electrical signal to a transponder. Transponders receive RF/Microwaves and transmit a signal of a different frequency. After the transponder is the rectifier circuit, which uses a DC current to charge a capacitor which (for the passive tag) is used to power the device.

    The RFID reader consists of a microcontroller, an RF signal generator and a receiver. Both the transmitter and receiver have an antennas which convert radio waves to electrical currents and vice versa.

    The following table shows frequencies and ranges for the various bands used in RFID

    RFIDtable

    As expected, lower frequencies travel further distances. The lower frequencies tend to be used for the passive type of RFID tags.

    For LF and HF tags, the working principle is inductive coupling whereas with the UHF and Microwave, the principle is electromagnetic coupling. The following image shows inductive coupling.

    inductive coupling

    A transformer is formed between the two coils of the reader and tag. The transformer links the two circuits together through electromagnetic induction. This is also known as near field coupling.

    Far field coupling/radiative coupling uses backscatter by reradiating from the tag to the reader. This depends on the load matching, so changing the load impedance will change the intensity of the return wave. The load condition can be changed according to the data in order for the data to be sent back to the reader. This is known as backscatter modulation.

     
  • jalves61 8:14 pm on March 25, 2020 Permalink | Reply  

    Automotive Electrical System 

    In the early days of automobiles, electricity was not utilized within these machines. Car lights were powered by gas and engines were started by crank rather than a chemical battery.

    The three major components within a car’s electrical system are the battery (12Vdc), the alternator and the starter. The battery is the backbone of the car’s electrical system, which is the main source of electrical current. The electrical system can be split into two main parts. The main feed goes from the battery’s positive terminal to the starter motor. This cable is attached to the battery are capable of carrying up to 400 Amperes of current. This is the high current part of the circuit. The other part of the electrical system is from the ignition switch and carries a lower current. When the ignition switch is turned all the way to the “engine start” position, the starter motor is powered which begins the engine process. What actually happens is the starter solenoid is engaged is that when a small current is received from the ignition switch, the solenoid closes a pair of contacts and sends a large current to the starter. The starter needs a huge amount of current to spin the engine, which most humans cannot physically do.

    The starter motor rotates the flywheel, which turns the crankshaft on the engine. This allows the engine’s pistons to move and begin the process of internal combustion. Fuel is injected into the pistons and combined with air and spark, creates explosions which drive the engine.

    The alternator uses the principle of electromagnetic induction to supply energy to the battery and other electrical components. It is important to note that although the alternator produces AC (this is always the case for inductions), this is rectified much like a Dynamo so the output is DC. The alternator is driven by a serpentine belt which causes the rotor to rotate and in the presence of a stator, induces a current. The stator is made of tightly wound copper and the rotor is made of a collection of magnets, which produces the familiar Faraday induction effect. Diodes are used to rectify the output and also to direct current from the alternator to the battery to charge it.

    alternator

     
  • jalves61 8:45 pm on March 24, 2020 Permalink | Reply  

    Using GIT – Introduction 

    Git is essentially a version control system for tracking changes in computer files. This can be used in conjunction with Visual Studio to program in C#, for example. Git can be accessed through commands through the command window in windows. Git is generally to coordinate changes to code between multiple developers and is also used to work in a local repository which is then “pushed” to a remote depository such as Github.com

    Git tracks changes to files by taking snapshots. This is done by the user by typing “git commit ….” in the command prompt. The files should be added to the staging area first by using the command “git add <filename>”. “Git push” and “git pull” are used to interact with the remote repository. “Git clone” will copy and download a repository to your local machine. Git saves every version that gets committed, so a previous version can always be accessed if necessary. The following image illustrates the concept of committing.

    gitcommit

    You can essentially “branch” your commits which can later be merged together by using “git commit” command with multiple parents. The master branch is the main/linear list of saves. This can be done in the remote repository or the local. A “pull request” essential means taking changes that were made in a certain branch and pulling them into another branch. This means multiple people can be editing multiple branches which can then be merged together.

    Git is extremely useful for collaboration (as with websites such as google docs) where multiple authors can work on something at the same time. It also is excellent for keeping track of the history of projects.

     
  • jalves61 7:27 pm on March 23, 2020 Permalink | Reply
    Tags: ,   

    Mobility and Saturation Velocity in Semiconductors 

    In solid state physics, mobility describes how quickly a charge carrier can move within a semiconductor device when in the presence of a force (electric field). When an electric field is applied, the particles begin to move at a certain drift velocity, given by the mobility of the carrier (electron or hole) and electric field. The equation can be written as: density

    This is also related to Ohm’s law in point form, which is the conductivity multiplied by the Electric field. This shows that the conductivity of a material is related to the number of charge carriers as well as their mobility within the material. Mobility is heavily dependent on doping, which introduces defects to the material. This means that intrinsic semiconductor material (Si or Ge) has higher mobility, but this is a paradox due to the fact that intrinsic semiconductor has no charge carriers. In addition, mobility is inversely proportional to mass, so a heavier particles will move at a slower rate.

    Phonons also contribute to a loss of mobility due to an effect known as “Lattice Scattering”. When the temperature of semiconductor material is raised above absolute zero, the atoms vibrate and create phonons. The higher the temperature, the more phonon particles which means greater collisions and lower mobility.

    Saturation velocity refers to the maximum velocity a charge carrier can travel within a semiconductor in the presence of a strong electric field. As previously stated, the velocity is proportional to mobility, but with increasing electric field there reaches a point where the velocity saturates. From this point, increasing the field only leads to more collisions with the lattice structure and phonons, which does not help the drift speed. Different semiconductor materials have different saturation velocities and are strong functions of impurities.

     
  • jalves61 10:58 am on March 22, 2020 Permalink | Reply
    Tags: ,   

    Transistor IV curves and Modes of Operation/Biasing 

    In the field of electronics, the most important active device is without a doubt the transistor. A transistor acts as a ON/OFF switch or as an amplifier. It is important to understand the modes of operation for these devices, both voltage controlled (FET) and current controlled (BJT).

    For the MOSFET, the cutoff region is where no current flows through the inversion channel and functions as an open switch. The “Ohmic” or linear region, the drain-source current increases linearly with the drain-source voltage. In this region, the FET is acting as a closed switch or “ON” state. The “Saturation” region is where the drain-source current stays roughly constant despite the drain source voltage increasing. This region has the FET functioning as an amplifier.

    ivcurve

    The image above illustrates that for an enhancement mode FET, the gate-source voltage must be higher than a certain threshold voltage for the device to conduct. Before that happens, there is no channel for charge to flow. From there, the device enters the linear region until the drain-source voltage is high enough to be in saturation.

    DC biasing is an extremely important topic in electronics. For example, if a designer wishes for the transistor to operate as an amplifier, the FET must stay within the saturation region. To achieve this, a biasing circuit is implemented. Another condition which effects the operating point of the transistor is temperature, but this can be mitigated with a DC bias circuit as well (this is known as stabilization). “Stability factor” is a measure of how well the biasing circuit achieves this effect. Biasing a MOSFET changes its DC operating point or Q point and is usually implemented with a simple voltage divider circuit. This can be done with a single DC voltage supply.  The following voltage transfer curve shows that the MOSFET amplifies best in the saturation region with less distortion than the triode/ohmic region.

    output

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel