Reverse Polarity Protection.

Reverse Polarity Protection.
Схемотехника

To power my devices during debugging, I use ordinary phone chargers with a pin header connector soldered to their output. To tell plus from minus, I file a notch in one of the pins, but through carelessness I still sometimes make a mistake and connect the wires the wrong way round. I won't talk about the consequences of reverse polarity; instead I'll tell you how to avoid it. But first, a couple of words about what reverse polarity is...

How to Test an Op-Amp.

How to Test an Op-Amp.
Схемотехника

The other day I bought an operational amplifier (op-amp) in a shop for $1.5, came home, soldered it in, and silence. I had no doubt that the op-amp was to blame for the circuit not working, so I desoldered it and decided to test it. I connected the inverting input to the output, applied power and a voltage to the inverting input (1V); a working op-amp should output what I applied to its input, and that is essentially what testing...

Analyzing Op-Amp Circuits.

Analyzing Op-Amp Circuits.
Схемотехника

In the article about measuring negative voltage with an ADC, most of the circuits described were built on op-amps, and to a reader unfamiliar with op-amps the material might have seemed complicated, so I'll try to explain in simple terms the rules I use when analyzing op-amp circuits. In short, op-amp circuits aren't difficult; they're very easy. There are 3 ways to use an op-amp: without feedback, with positive...

Inside the SMD4.2

Inside the SMD4.2
Схемотехника

In one of my previous articles I described how I came to the conclusion that my project needed a stepper motor. After a suitable one was chosen based on its parameters, the question of buying a driver came up, but I didn't want to buy one: it cost about $70... I decided to look for a driver circuit on the internet. Everything I found at the time was based on a microcontroller, and the cost of the circuits I found was also...

How to Measure Negative Voltage with an ADC, Part 2...

How to Measure Negative Voltage with an ADC, Part 2...
Схемотехника

There are several more methods of measuring negative voltage with an ADC that deserve attention. One of them can be seen in the currently popular DSO138 kit. As you can see, this circuit doesn't use a summing amplifier, but the principle is the same as described in the previous article. Let's recall it: we need to set an offset equal to half the ADC's dynamic range (in this...

How to Measure Negative Voltage with an ADC.

How to Measure Negative Voltage with an ADC.
Схемотехника

As you know, many modern microcontrollers have a built-in multi-channel ADC; as a rule, there is physically only one ADC, and the multiple channels are provided by multiplexing. The voltage range the ADC can work with is determined by the reference voltage levels (+VREF and -VREF), which must not go beyond the microcontroller's supply range. The range of voltages powering...

How to Choose a MOSFET.

How to Choose a MOSFET.
Схемотехника

In this article we'll look at which parameters to pay attention to when choosing a MOSFET operating in switching mode. A transistor operating in this mode can switch a relay, a light bulb, a motor and other loads that draw a large current. 1. First, you need to know the voltage of the circuit the transistor will work in; this voltage will be applied to the Drain and Source pins...

Using Resistors in Electronics.

Using Resistors in Electronics.
Схемотехника

A resistor can be characterized by three parameters: resistance, tolerance, power. To understand what resistance is, let's imagine a pipe with water flowing through it. Since nothing hinders the movement of water in the pipe, the pressure at the outlet of the pipe will equal the pressure at the inlet. Now let's mentally cut the pipe into two parts and place a mesh between them, like the one in the sieve...

Main Types of Capacitors.

Main Types of Capacitors.
Схемотехника

Today there are many types of capacitors, and each has its own advantages and disadvantages. Some can work at high voltages, others have large capacitance, others low leakage, others low inductance; these factors determine the field of application of each capacitor type. This article covers the main, but far from all, types...

Using Capacitors in Electronics.

Using Capacitors in Electronics.
Схемотехника

Electronics uses three main properties of a capacitor: the ability to store charge; the ability to pass alternating current and block direct current; and the fact that the rate at which a capacitor charges can be calculated. Depending on the circuit, one of these properties may be more pronounced than the others. Probably the best-known property of a capacitor is energy storage. And indeed, in...

Controlling a Stepper Motor with a Microcontroller.

Controlling a Stepper Motor with a Microcontroller.
Схемотехника

It all started when one of my devices needed to rotate a motor shaft a certain number of turns; high precision wasn't required, plus or minus a quarter turn, so I decided to do it with a DC motor. An Atmega16 microcontroller was chosen as the control element, but since the output voltage of the Atmega16 pins...

How to Run a Crystal on Its Third Overtone.

How to Run a Crystal on Its Third Overtone.
Схемотехника

The other day I came across an interesting way to run a crystal on its third overtone. It works like this: in a crystal oscillator built as a Colpitts (capacitive three-point) circuit, a trap filter tuned to the crystal's fundamental frequency is connected in the emitter; it blocks the oscillator from starting on the fundamental, and the crystal, and with it the oscillator, start on the third overtone...

How a Zener Diode Works.

How a Zener Diode Works.
Схемотехника

A Zener diode is named after Clarence Zener, the discoverer of tunnel breakdown, and is shown on schematics as follows. But unlike a rectifier diode, current can flow through it in both directions. To better understand how it works, you can think of it as two diodes connected in anti-parallel, but with different voltage drops. For any Zener diode, the drop...

A Microcontroller-Based Scale: Connecting the HX711 to an Atmega16.

A Microcontroller-Based Scale: Connecting the HX711 to an Atmega16.
Схемотехника

This scale has been sitting unused for a long time. One day it simply stopped turning on, and my attempt to repair it failed, so I decided to restore it and at the same time figure out how it works. For this I ordered an HX711 board from AliExpress. This chip contains a programmable gain amplifier and a sigma-delta ADC; it was specifically designed for...

How to Test a Quartz Crystal Resonator.

How to Test a Quartz Crystal Resonator.
Схемотехника

One of the main reasons quartz crystal resonators fail is simply being dropped, so if a TV remote, a car alarm key fob or any other device containing a crystal stops working, the first thing to do is check it. Checking the oscillation on the board isn't always possible, because the oscilloscope probe has some capacitance, which is usually...

How an Operational Amplifier (Op-Amp) Comparator Works.

How an Operational Amplifier (Op-Amp) Comparator Works.
Схемотехника

Before we start dealing with the comparator, let's recall what an operational amplifier (op-amp) is. An operational amplifier has five pins and is shown on schematics as a triangle, as in the figure below. Let's take a closer look at the pins: two pins for connecting power, the positive and negative supply voltage; two inputs, one non-inverting, labeled V+, and one...

How to Measure Output Impedance.

How to Measure Output Impedance.
Схемотехника

I think many people know that if you turn on the high beams, the heater and the rear window defroster in a running car, the voltage produced by the alternator drops; people also say the voltage sags. How does this relate to electronics? In electronics everything follows the same scenario: if you connect a low-resistance load to a signal generator, the voltage at its terminals...

How to Get DC from AC Voltage, or How a Diode Works.

How to Get DC from AC Voltage, or How a Diode Works.
Схемотехника

To understand how to get DC voltage from AC, we need to figure out how alternating current differs from direct current and how a diode works. Alternating current (AC) is an electric current that changes in magnitude and direction over time or, in a special case, changes in magnitude while keeping its direction in the electrical circuit...

How to Light an LED by Clapping Your Hands, or How a Peak Detector Works.

How to Light an LED by Clapping Your Hands, or How a Peak Detector Works.
Схемотехника

First of all, a peak detector is designed to register the maximum or minimum amplitude of a signal. The simplest peak detector can be built from two parts, a diode and a capacitor. When a signal of arbitrary shape is applied to the input of a peak detector, the capacitor charges as shown in the picture below, so the voltage across the plates...