Consider PWM signal

When using microcontroller and want to drive motor control or control led intensity you can use DAC to generate analog output voltage. But there is an easier way of doing this. You can use digital output to reach same results. This technique is known as PWM -Pulse Width Modulation. In this picture you can see 50% duty cycle square wave form. The width of ‘0’ is equal to ‘1’ level, this means if signal amplitude is 5V, then average voltage over one cycle is 2.5V. It is as though  of hawing constant 2.5V voltage.

Continue reading

K-Type Thermocouples reviewed

A thermocouple is a sensor that generates an electrical potential related to the temperature. The operating principle of the sensor is base on the fact that any electrical junction between two different metals generates an electrical potential that depends on the temperature and the metals that are used. The principle applies equally well if three metals are used. In that case, there are two junctions in series, and the net potential results from the series addition of the two individual potentials. For example, if a copper iron junction is in series with an iron-tin junction, the net potential is the same as for a copper-tin junction. However, that is only true if both junctions are at the same temperature. The K-Type thermocouple is usually made of Chromel (+) and Alumel(-). The voltage generated from this sensor is 4mV/100°C. The max temperature can thermocouple withstand is 1000°C without any damage. How ever thermocouples have a drawback. It is because connecting thermocouple to circuit creates addition junctions between different metals who generate additional potentials. Generally speaking measuring thermocouple potential output is measuring not direct function of absolute temperature, but a difference between temperature at measurement point and temperature at the connection point.…

Continue reading

Impulse signal distortion in transmission line

Today most electronic equipment consists of signal generators and processing units. These units are connected with transmission lines. These lines have big influence in signal distortions. On these lines depends transmition lines stability. Let’s see how transmition lines affect transmitted signals. (G- signal generator; Za– output impedance; I- signal receiver Zb– input impedance; L- transmission line length; Z0– Line impedance. When line is tuned and without losses then input voltage: Ub(t) = ZbE(t-t)/(Za + Zb) E(t)- generators signal amplitude; t– signal delay in line. t =l/v ; l- line lenght; v- signal speed. If line is not tuned up, then there are distortions in line because of reflections in line: If signal E(t) is step function: Then signal in line exit in discrete time moments will be: U(0) = p; U(t) = p*(1+pb) U(2t) = p*(1+pb+pa*pb) U(3t) = p*(1+pb+pa*pb+pa*pb^2); U(4t) = p*(1+pb+pa*pb+pa*pb^2+pa^2*pb^2); U(5t) = p*(1+pb+pa*pb+pa*pb^2+pa^2*pb^2+pa^2*pb^3) … where Depending on reflectance coefficients and their signs distortions can differentiate or integrate: Real model using MathCAD was implemented to see how signal looks like on exit depending on parameters. Below you see used algorithm structure used in modeling: Algorithm Part 1 Algorithm Part 2 One of results using trapezoid signal: In exit we…

Continue reading

Flash vs. EEPROM

There are many questions about Flash and EEPTOM differences. Well these are two different technologies converging together. Flash technology was created to replace mass storage media. Requirements for Flash were minimum power consumption and high number of write cycles. Information written in flash memory is usually in blocks at a time. EEPROM was originally designed to store configuration information or store programs to be boot loaded by microcontrollers or other devices. EEPROMS usually are smaller capacities and can be programmed in smaller information quantities like bytes or bits (serially). Read time is shorter than from Flash but EEPROM has less write cycles. But recently these differences are disappearing as technologies are catching up. So this should explain why in microcontrollers like Atmega128 is more convenient to write data to EEPROM than to Flash. If you would like to store data in flash you would have to rewrite whole sector of 128 bytes in order to store one byte. But if you consider to store bigger information chunks Flash can be good choice too. For more information you might consider reading https://www.embedded.com/98/9801spec.htm

Continue reading

Filter output dependency on tolerance of elements

Sometimes we need to project simple filter with particular characteristics. We usually take calculations with ideal parameters and don’t look on tolerances of them. Let us see how simple filter output depends on its elements tolerances. For this let’s choose simple filter circuit: We are going to calculate filter response characteristics. The band pass frequency is taken on 0.707 level of response. We will see how this frequency depends on electronic elements tolerances. I will model elements with tolerances ±10%.

Continue reading

Z axis accelerometer MMA1220D from Freescale

MMA1220D is Z axis MEMS accelerometer -8g – +8g. This sensor has capacitive sensor. The output signal is passed through 4 pole low pass filter. It also has internal self test capability. The main features: Integral signal conditioning; Linear output; Ratio metric performance; 4th order Bessel Filter to preserve pulse shape integrity; Calibrated self test; Detection of low voltage also clock monitor and EPROM Parity check status; Can survive high shocks. Where it can be used? It can be perfect tool for Vibration monitoring, control, bearing monitor, PC HDD protection, mouse and joystick, virtual reality, sport diagnostics. The datasheet can be found here: https://www.freescale.com I decided to run sample test of this sensor. For this I just made simple board where I soldered this sensor with SOIC16 package. According to datasheet I put RC filter on sensor output to minimize clock noise. There is schematic: And traced PCB: I used SMD parts as it will be easer to glue other side of board to any surface in future. First test drive on oscilloscope: Later I will do some tests by connecting this sensor to MCU. Bellow I attached Protel library of MMA1220D sensor and my project files. Might be you…

Continue reading

Emergency supply source for your electronic device

Sometimes you are needed to maintain power supply for your device for some time when the main source fails. It can be alarm system or some light source or digital clock. Of course if source interrupts are very short, there can be capacitor with big capacity connected, but it is not reliable. Better use backup battery and diode. This solution is very simple and cheap. The diode protects the back current float to battery. This doesn’t take much space to implement as the main bigger part is battery. As there just backup source it is not necessary to use rechargeable battery.

Continue reading