Search Results for: feed

Real time clock of LPC2148

LPC2000 series of microcontrollers have a built-in Real Time Clock (RTC) unit, which may be used for counting time to maintain a calendar and clock. RTC is designed for low power designs that enable use in battery-powered designs. The real-time clock can count time in Seconds, Minutes, Hours, Days of Month, Months, Years, Days of the week, and Days of Year. The real-time module can be clocked using a distinct 32kHz clock oscillator or internal prescaller from the VPB clock. The real-time clock unit has additional power supply pins (3.3V) that allow the RTC clock to work when the system is off – actually power-down mode operated from the clock battery. As there are many functions in clocks like time units(seconds, minutes, etc.) and alarms, there are quite some registers to cover clock functionality. There are several groups of registers:

Continue reading

Protection circuits for operational amplifiers

In the specifications of operational amplifiers, there are maximum limits of allowed voltages on pins. Maximum currents are limited as well. So voltage and current they both limit allowed dissipated power Pmax=Umax*Imax. In well-designed circuits, Op Amps should have protection circuits from various overloads like a short circuit, high common phase voltage level in differential inputs, electrostatic charges, etc. Earlier operational amplifiers didn’t have built-in protection circuits, while modern ones have. Today popular operational amplifiers have internal protection circuits built-in, and this makes designers’ life much easier. But protection elements lowers some operational amplifiers like operation speed, dynamic range, and output signal swing level. Because of this, some operational amplifiers may not have internal protection circuits. In this case, you have to take care of it.

Continue reading

Switching step-up and step-down regulators

All regular voltage regulators (like 7805) have several disadvantages like output voltage is always lower than input, and some power is dissipated in the control element. Dissipated power is approximately equal to I(Vin-Vout). There is another way to generate a regulated voltage. The method is different from the previous one. A transistor operates as a saturated switch in a switching regulator, which periodically applies the full unregulated voltage across an inductor in short intervals. During each pulse, inductor current builds up, storing energy on its magnetic field: Inductor also smooths the output voltage. Feedback circuit with comparator compares the output voltage with reference and this way changes oscillators pulse width or frequency.

Continue reading

Clocking ARM with Crystal oscillator and PLL

ARM microcontrollers can be clocked in several different ways. One way is to use an external clock with a duty cycle of 50-50 and a frequency range from 1MHz to 50MHz (LPC21xx series) connected to the XTAL1 pin. Another way is to connect the External crystal oscillator, but its range is lower (1MHz to 30MHz for the LPC21xx series). And last but not least is the on-chip PLL oscillator, then external clock source frequency should not exceed range from 10MHz to 25MHz. Let’s analyze more deeply each clocking mechanism. In the picture above there is fosc selection diagram shown.

Continue reading

Fractal antenna constructions

Among the usual antennas used in today’s data transfer, different types of antennas are used. First publications about electrodynamic characteristics of fractal structures were published in the 1980s, but the first practical approach appeared after 10 years. Dr. Nathan Cohen, professor of Boston University, designed, engineered, and patented many practical fractal antenna solutions and founded “Fractal Antenna Systems” in 1995. Van Koch fractal antenna As Nathan states, there were forbidden to use external antennas in the city in the center of Boston. Hence, he managed to hide the antenna within the design of an amateur radio station. He took aluminum foil and made an antenna as decoration according to Van Koch figure:

Continue reading

Multiple controllers in one design

Actually, many embedded systems use multiple microcontrollers and microprocessors. This is not about multi-core processors but several distinct processors used in one design. Multiprocessor systems allow the distribution of computing power among different processors, and this way, overall speed may be increased, coding simplified, and modularity reached. Using multiprocessor embedded design has many benefits. One of them is modularity. Imagine a situation when a particular microcontroller-based subsystem needs to be installed only if a particular opinion is installed. Another, as we mentioned, is coding simplicity. Instead of writing and debugging one complex firmware, it may be broken into several distinct, easily manageable functions on different MCU’s.

Continue reading

Schmitt trigger VS simple inverter

Schmitt trigger is a special logical element adjusted to work with analog input signals. The primary purpose of Schmitt triggers was to restore the shape of digital signals. Because of the transmission line effect, digital shape transforms from square to trapezoid or triangle or more complex signal. Of course, during transmission, signals become noisy and distorted. Schmitt trigger is a comparator circuit, but positive feedback results in hysteresis and memory effect. Comparing to simple logical elements, Schmitt triggers have two threshold levels. Between these threshold values U1 and U2, the state of output doesn’t change the so-called hysteresis. Such an effect stabilizes output against rapid triggering by noise. Bellow is two characteristics compared of simple logical inverter and Schmitt trigger inverter:

Continue reading

Generate true random numbers on microcontroller

Sometimes there is really a problem of how to generate truly random numbers using your microcontroller. Usually, a computer processor or any other MCU can generate a Pseudo-Random Number (PRN). These numbers are generated by algorithms, so-called Pseudo-Random Number Generators (PRNG). Everything that a pure algorithm produces is predictable at some level. Many PRNG algorithms generate random numbers, but there is always a defined number of iterations when a random number sequence will repeat itself. Sometimes it may be acceptable. One popular way to generate pseudo-random numbers is using Timers. The universal algorithm is the concept of the Linear Feedback Shift Register (LFSR). LSFR is an n -bit register initiated with a non-zero seed value and is clocked by shifting values to the left and loading a new bit into bit0. The new bit is calculated by XORing the bits of selected taps of LSFR. This method is used in rand() functions.

Continue reading

Celsius converter to digital code from remote sensor

This circuit is originally published by Elana Lian and Chan Tran (Analog Devices). This simple single supply system enables to measure remote temperature with less than 1°C error in a range of 0 to 100°C: The circuit consists of the following parts: T1- low-cost AD590 temperature sensor; AD8541 – rail to rail amplifier; four resistors; potentiometer; and ADC AD7416. Use precision resistor RF for amplifier feedback to minimize scale factor.

Continue reading