Building a Power Factor Meter With a Raspberry Pi Pico
※本記事にはアフィリエイトリンクを含む場合があります。内容は広告の有無に影響されません。
結論
Power factor derives from the phase difference between voltage and current, so a clamp-type non-invasive sensor lets a Raspberry Pi Pico compute it without cutting into the circuit.
How it works
Power factor is, roughly speaking, determined by how far the voltage and current waveforms are out of step (the phase difference). So what you need to measure is the current waveform and its offset relative to voltage.
Getting the current — a clamp-type (non-invasive) current sensor. Clipping it around the cable reads the current waveform, so nothing has to be cut.
Computing power factor — from the phase difference between the acquired current waveform and the voltage waveform, the Pico calculates the power factor (cos φ).
The Pico is cheap, has an ADC and suits continuous measurement, which fits this kind of dedicated instrument well. Having as many as you need is the strength of building it yourself.
Display
Readings are sent over WebSocket to a server and displayed. The numbers update live, so it reads like an instrument panel.
The hard part was the communication
Honestly: the WebSocket implementation was the hardest part.
The measurement principle itself — deriving power factor from the phase difference — is simple arithmetic once you understand it. The mountain was how to send it and show it.
If you are building this, starting the communication from an official sample is the shortcut.
What this setup is like
Looking back, the hard part was the opposite of what I expected. The part needing knowledge to measure was straightforward, and the plumbing around it was heavy.
When building a homemade instrument it is easy to feel “done” the moment the sensor and the maths are in place, but it only becomes usable once the values are visible. Getting the communication and display out of the way first lands the whole thing sooner.
よくある質問
Q1How can you measure current without cutting the circuit?
With a clamp-type current sensor. It reads the current waveform by clipping around the cable, so the existing wiring is untouched. That also makes it a safe place to start.
Q2What takes the most time to build?
Not the measurement principle — the communication. Deriving power factor from the phase difference is simple once the principle is clear. Getting the readings out and displayed is the mountain. Starting from an official sample is the shortcut.
Q3Why the Pico?
It is cheap, has an ADC and suits continuous measurement. Building it yourself means you can have as many as you need without buying dedicated instruments.
この記事の根拠
- ドキュメントファイル
本文の主張は、上の記録に書かれていることだけです。運用しているリポジトリは非公開のため リンクは張れませんが、どのファイルの何行目を、どのコミット時点で見て書いたかは 記事ごとに残しています。推測で書いた箇所はありません。