Uploaded February 2019 | Updated September 2026, 16 hours ago
Probe端子につないだ電圧(0~12V)が設定した電圧(0~5V)を下回ったらLEDが点灯するシンプルなインジケーターです。
ここでは2.3Vに設定しているので、それ以下になったら緑のLEDが消えて赤のLEDが点灯し、黄色のLEDが点滅します。
2.3V以上ではマイコンのPB2ピンからのLEDは点灯、PB3ピンからのLEDは消灯します。
設定電圧を変更するにはプログラムの10行目のvoltの値を変更します。11行目のadjustは微調整のための変数です。
マイコンのVCC端子には5Vより高い電圧をかけないでください。
消費電力を抑えるためにマイコンは常にパワーダウンにしておいて、ウォッチドッグタイマで2秒毎に電圧をチェックします。
消費電流は0.3mA以下です(LEDの電流を除く)。
This is a simple indicator that the LED turns on when the voltage(0-12V) connected to the Probe terminal falls below the set voltage(0-5V).
Since it is set to 2.3V here, when it becomes less than 2.3V, the green LED turns off, the red LED turns on and the yellow LED flashes.
At 2.3V or more, the LED from the PB2 pin of the microcontroller turns on, and the LED from the PB3 pin turns off.
To change the setting voltage, change the value of "volt" on line 10 of the program. "adjust" on line 11 is a variable for fine adjustment.
Do not apply voltage exceeding 5V to VCC pin of microcontroller.
In order to reduce power consumption, the microcontroller is always powered down and the voltage is checked every 2 seconds with the watchdog timer.
Current consumption is 0.3mA or less (excluding LED current).
【Circuit Diagram】
drive.google.com/file/d/1_BLXxu8j568YP9rjcXhvu97q2URE1NPX/view?usp=sharing
【Program】
drive.google.com/file/d/1EAnxGp6f49N4izSediM7nZk-YEmS-dM8/view?usp=sharing
.
Probe端子につないだ電圧(0~12V)が設定した電圧(0~5V)を下回ったらLEDが点灯するシンプルなインジケーターです。
ここでは2.3Vに設定しているので、それ以下になったら緑のLEDが消えて赤のLEDが点灯し、黄色のLEDが点滅します。
2.3V以上ではマイコンのPB2ピンからのLEDは点灯、PB3ピンからのLEDは消灯します。
設定電圧を変更するにはプログラムの10行目のvoltの値を変更します。11行目のadjustは微調整のための変数です。
マイコンのVCC端子には5Vより高い電圧をかけないでください。
消費電力を抑えるためにマイコンは常にパワーダウンにしておいて、ウォッチドッグタイマで2秒毎に電圧をチェックします。
消費電流は0.3mA以下です(LEDの電流を除く)。
This is a simple indicator that the LED turns on when the voltage(0-12V) connected to the Probe terminal falls below the set voltage(0-5V).
Since it is set to 2.3V here, when it becomes less than 2.3V, the green LED turns off, the red LED turns on and the yellow LED flashes.
At 2.3V or more, the LED from the PB2 pin of the microcontroller turns on, and the LED from the PB3 pin turns off.
To change the setting voltage, change the value of "volt" on line 10 of the program. "adjust" on line 11 is a variable for fine adjustment.
Do not apply voltage exceeding 5V to VCC pin of microcontroller.
In order to reduce power consumption, the microcontroller is always powered down and the voltage is checked every 2 seconds with the watchdog timer.
Current consumption is 0.3mA or less (excluding LED current).
【Circuit Diagram】
drive.google.com/file/d/1_BLXxu8j568YP9rjcXhvu97q2URE1NPX/view?usp=sharing
【Program】
drive.google.com/file/d/1EAnxGp6f49N4izSediM7nZk-YEmS-dM8/view?usp=sharing
.




