Power Supply Rejection Ratio.

Power Supply Rejection Ratio.
Схемотехника

In one of my previous articles I wrote about the common-mode rejection ratio (CMRR), which may be unclear to a beginner. In fact, there are many parameters that aren't obvious at first glance, and in this article let's look at the power supply rejection ratio (PSRR). In theory, a change in the op-amp supply voltage should not affect the output voltage. Suppose...

A Tank for Etching Printed Circuit Boards.

A Tank for Etching Printed Circuit Boards.
Железо

Lately I've come across many articles and videos on how to make a tank for etching PCBs, so I probably can't tell you anything new; rather, I'll share my impressions. Etching in ferric chloride is not an option: first, its stains don't wash out; second, when etching in ferric chloride you can't see how the process is going because it's opaque) Conclusion: I need to use a different...

The Op-Amp CMRR Parameter, or Common-Mode Rejection Ratio.

The Op-Amp CMRR Parameter, or Common-Mode Rejection Ratio.
Схемотехника

When reading datasheets for foreign electronic components, you often come across parameters whose meaning is not quite clear to a beginner. I'm not talking about the maximum operating voltage or current consumption; those are clear, unlike the op-amp CMRR parameter, which is what this article is about. In theory, if the same voltage is applied to both inputs of an op-amp, the output...

How to Flash an STM32 Using KEIL UVISION.

How to Flash an STM32 Using KEIL UVISION.
STM32

Once a friend scolded me because I sent him a hex file instead of a project, and he couldn't manage to load it into the microcontroller. Honestly, I never understood why he was scolding me, since he was the one who couldn't do it))) This situation prompted me to write this article. So, we have firmware that we want to load into the MCU. First, we need to create an empty project, selecting the MCU...

How to Detect Stack Overflow in KEIL UVISION.

How to Detect Stack Overflow in KEIL UVISION.
STM32

There is plenty of information about the stack on the internet, so I probably can't tell you anything new. If someone still doesn't know, the stack is an area of RAM that works like a stack of plates. What kind of principle is that? The principle is that if there is a stack of identical plates in front of us and we need to take one, we take the top one, since it's the easiest to take. The same...

Push-pull VS open-drain.

Push-pull  VS open-drain.
STM32

At the end of the previous article I promised to explain how a push-pull (PP) output differs from an open-drain (OD) output. To understand this, let's look at how a push-pull output is built. Essentially, it consists of two switches: one pulls the pin up to the supply, the other pulls it down to ground. And now open-drain...

STM32F3 and STM32F4 GPIO.

STM32F3 and STM32F4 GPIO.
STM32

An article about configuring STM32 pins was published on this site earlier; it was dedicated to the F1 series microcontrollers, although the article didn't say so explicitly. This article covers the F3 and F4 series microcontrollers. Before configuring any MCU pin, you must enable the clock for the corresponding port!!! Each MCU pin can be configured in one of the states. In...

A Siren for a Car Alarm.

A Siren for a Car Alarm.
Железо

About a month ago a friend asked me to order a piezo siren for his car alarm from China, because his had stopped working for some reason. After a bit of googling I learned that such a siren works on the piezoelectric effect, found a similar one on AliExpress and ordered it. The other day the siren arrived, but when connected to the alarm it didn't work. It turned out that this siren is active, i.e...

STM32 Fast Fourier Transform.

STM32 Fast Fourier Transform.
STM32

For a long time I wanted to add a Fourier transform to the oscilloscope I described here, but for some reason I never got around to it. Quite recently, a month ago, I decided to increase the scope's sampling rate by replacing the stm32F103VE with a 1M sampling rate with an stm32F303VC with a 5M sampling rate. After replacing the chip and changing the program, I finally decided to figure out the fast Fourier transform (FFT)...

A High Output Current Buffer.

A High Output Current Buffer.
Схемотехника

In electronics, a buffer is a voltage follower capable of delivering more current. For example, suppose we want to control a five-volt fan with a microcontroller. Let's take a microcontroller from the Atmega family with a 5V supply. It turns out that the voltage the MCU can output matches the voltage needed to spin the fan. But if you feed the signal directly from the MCU pin to the fan...

How Direct Current Flows.

How Direct Current Flows.
Схемотехника

Usually, when beginners ask simple questions on forums, they are simply ridiculed and sent off to read school textbooks. Example one. In electronics it is conventional that direct current flows from plus to minus. Leaving the positive terminal, it tries to reach the negative terminal of the battery. Let's look at a simple example of how current flows through a light bulb...

What Is a Frequency-Compensated Voltage Divider, or Why Capacitors Are Placed in Parallel with the Resistors at an Oscilloscope Input.

What Is a Frequency-Compensated Voltage Divider, or Why Capacitors Are Placed in Parallel with the Resistors at an Oscilloscope Input.
Схемотехника

I think everyone who has built an oscilloscope has wondered why capacitors are placed in parallel with the resistors in the voltage divider and how their values are chosen. To answer this question, you need to take the following fact into account: the probe is connected to the oscilloscope by a cable, which in turn has a certain capacitance of 50 to 100pF. If there are no capacitors in parallel with the input resistors...

Designing a Phone Case in SolidWorks and Printing It on a 3D Printer.

Designing a Phone Case in SolidWorks and Printing It on a 3D Printer.
Железо

The idea of learning some 3D package had been on my mind for a long time, but there was no need for it. Well, I'll draw some part, and then what? On the one hand it's interesting, but on the other, a host of reasons not to spend time on it immediately appear. Everything changed when I got a 3D printer: printing parts found on the internet is not very interesting, since there is no creative process, and...

STM32 BSRR VS ODR.

STM32

I think those reading this article know that you can write a one to bit zero of port A in two ways: GPIOA->ODR |= GPIO_ODR_ODR0; or GPIOA->BSRR = GPIO_BSRR_BS0; And everyone writes that the second way is more correct, because setting the bit is then atomic. That's hard to argue with. Now let's imagine a situation: we have an eight-bit bus over which data is transmitted, connected...

Nivel System Laser Level Repair.

Nivel System Laser Level Repair.
Железо

The other day a friend brought me a laser level, saying: "It doesn't draw the horizontal line," and asked me to fix it. I've written before that I don't usually do repairs, but if someone brings something interesting, I agree. My criteria for what makes a repair interesting are purely subjective; anyway, repairing the laser level seemed interesting, so I agreed. The laser level is made by NIVEL SYSTEM, which seems to be...

Calibration and First Print on a 3D Printer, Using the WANHAO Duplicator i3 as an Example.

Calibration and First Print on a 3D Printer, Using the WANHAO Duplicator i3 as an Example.
Железо

Recently, on one of the websites, I saw an article in which a guy 3D-printed stepper motor mounts and many other parts needed for building mechanical designs. That is, instead of going to a milling operator or a lathe operator, you can simply print the parts you need; not all of them, of course, but some. It's not that I didn't know this before, but at that moment...

Measuring Temperature with a Thermocouple, Using the MAX6675 with STM32 as an Example.

Measuring Temperature with a Thermocouple, Using the MAX6675 with STM32 as an Example.
STM32

Recently I needed a reflow soldering oven. For those who don't know what it is, I'll briefly describe how it works and what it's for. I have a dozen boards that need to be assembled, and the components on them are mostly SMD. Right now the boards are assembled as follows: first I apply solder paste to the pads with a syringe, then I place the components...

STM32 Clock Configuration.

STM32 Clock Configuration.
STM32

At first, to simplify writing programs for STM32, I didn't go into the details of configuring the clock system; instead I selected the system bus frequency in the system_stm32f10x.c file by simply uncommenting the desired line. But when it came to configuring the clock frequency of individual blocks (for example the ADC), I used CUBE. The whole clock system is in front of your eyes, which is very convenient and...

Everything for Soldering.

Everything for Soldering.
Электроника

One of an electronics engineer's main tools is the soldering iron, although it would be more correct to say soldering equipment. Every beginner electronics enthusiast needs to buy a basic soldering kit. The kit I use includes: a 40 W soldering iron with a non-burning tip, a 40 W desoldering pump and a simple soldering station with a hot air gun, the Lukey702. There was no room for it on my workbench, so...

Connecting a Resistive Touch Panel with an XPT2046 Driver to STM32 and Calibrating It Using Four Points.

Connecting a Resistive Touch Panel with an XPT2046 Driver to STM32 and Calibrating It Using Four Points.
Дисплеи

There are already several articles about resistive touch panels on this site: here you can read how they work, and here how to connect one to an AVR and calibrate it. So below I'll only talk about the subtleties of working with such a panel. As you know, data exchange with the XPT2046 happens over SPI, so you just need to find a free one and connect to it. Usually, to see which pins are assigned to which SPI...