/stm32f4-wattmeter

This repository contains source code of a wattmeter made with STM32F407VG Discovery Board.

Primary LanguageC

Wattmeter

This repository contains source code of a wattmeter made with STM32F407VG Discovery Board.

Description

Project uses two ADC channel of the board, to measure voltage and current. To voltage, and adapt stage was added to connect it to 220V. There is a transformer, and an operational amplifier circuit was used. For current, a Hall effect sensor was connected through the line of an outlet to connect any device. Obviously, another adapt circuit was incorporated. A 20x4 LCD display shows power measurement. 220V input voltage is used to feed all circuit.

About code

To control LCD Tilen Majerle HD44780 was used. Calcs where simplified using arm_math.h library.