Opublikowano przez Mateusz Salamon, temu

GPS positioning using the NEO-6M V2 on an STM32

Can you imagine life without navigation? I, for one, can’t. Location devices are, for me, one of the best inventions. All the more so because we have them in our pockets. We can also add a GPS receiver to our electronic projects. See how simple it is!

(more…)
Opublikowano przez Mateusz Salamon, temu

Further struggles with RTC – DS1307 and PCF8563 on STM32

Recently I focused my attention on the insanely accurate RTC DS3231. It does not require an external crystal and additionally has built-in temperature compensation. However, there are plenty of other real-time clocks on the market. They don’t necessarily boast about being accurate. Let’s take a closer look at what they offer and how to deal with them.

(more…)
Opublikowano przez Mateusz Salamon, temu

Insanely Accurate DS3231 RTC on STM32

Not everyone may know this, but real-time clocks, or RTCs, are only as accurate as their clock source. Most often, such systems are driven by a 32.768 kHz frequency. STM32 has a built-in RTC, but exactly the same rule applies to its accuracy. Generally, what STM32 offers as an internal RC oscillator for the RTC is not of the highest quality and is susceptible to temperature changes. Connecting an

(more…)
Opublikowano przez Mateusz Salamon, temu

Ridiculously Simple Hardware Encoder Handling on STM32

An encoder is a great device. You surely know some equipment where a knob would rotate endlessly while adjusting some parameter (e.g., an audio amplifier). A very nice idea to replace a classic potentiometer. Encoders are also very often used to measure the rotation angle of motors. In automation and robotics they are

(more…)
Opublikowano przez Mateusz Salamon, temu

Are an I2C Converter and an LCD a Good Match?

I often come across the statement that it’s better to connect an LCD display via an I²C expander because it “eats” only two microcontroller pins instead of a minimum of 6. It’s true that it saves pins, but as we all know—nothing comes for free. Today I’ll check for you what you need to account for when you connect an LCD over I²C using popular modules based on PCF8574 chips.

(more…)
Opublikowano przez Mateusz Salamon, temu

STM32 Has No EEPROM, But… Fortunately, There’s EEPROM Emulation (Based on F1, F4).

I remember when I wanted to use EEPROM in STM32 for the first time. Everything went great until the moment I actually wanted to use that memory. It turned out that… not all STM32s have EEPROM! Those lacking this feature are especially the F series. What to do in such a situation? You can use an external I2C/SPI chip or… emulate EEPROM in the built-in FLASH memory. Come, I’ll show you how to do it.

(more…)
Opublikowano przez Mateusz Salamon, temu Opublikowano przez Mateusz Salamon, temu

How to waggle your servo horn? ( ͡° ͜ʖ ͡°) STM32 meets a servo.

Model hobby servomechanisms, or servos for short, are a very interesting type of actuator. They move around an axis, similar to regular motors, except the rotation is not continuous. The mechanism rotates only by a “given angle.” In other words, with a servo you set the position in which it should be. Supplying voltage alone is not enough. A servo requires

(more…)
Opublikowano przez Mateusz Salamon, temu Opublikowano przez Mateusz Salamon, temu