A powerful, tiny power monitor shield for your Arduino Nano
Feb 20, 2019
How to Query Values and Raise Alerts With PowMeter
PowMeter in 2 steps to query current and voltage values and raise alerts within your project.
This example will show you how to monitor both USB and VIN power source, query values and raise visual and hardware alerts in less then 5 minutes.
The USB power source will power your Nano host board (5 volts) and VIN MON will power your peripherals (12 volts). For convenience we will mount it on a breadboard but this is not mandatory.
We will activate these alerts
USB minimum voltage: 4.5 V
USB maximum voltage: 5.5 V
USB maximum current: 100 mA
VIN minimum voltage : 11 V
VIN maximum voltage : 13 V
VIN minimum current : 0 mA
VIN maximum current : 1 A
USB minimum voltage and VIN maximum current will also trigger a hardware alert if breached.
And query measurements from the shield
Place PowMeter on the breadboard.
Mount the Nano board on It. Align them on the USB connector side.
Connect the special USB cable. The cable identified by a red ribbon has to be connected to the Nano host and the other to PowMeter.
In this case we will power the board from the USB. So we don’t need to connect the jumper from VIN MON to VIN.
We connect a 12 V power source to VIN MON pin.
And our peripherals to VAUX pin. Here we will use a dummy 10 Ohms load.
Program your host board
Open the Arduino IDE and select an Arduino Nano board.
Open the sketch attached
Connect the USB cable to your computer and load the program.
We defined a current limit of 1A on VIN. Now let say we connect a dummy load of 8 Ohms only. Here is the result:
The 12 V power source is connected to the VIN MON pin (red cable at the bottom right)
The dummy load is connected to the VAUX pin (red cable at the top right)
The OLED shows the alert screen VIN_I means there is a fault on the Vin current. Underneath is the value of 1117 mA.
The “VIN Alert” test point is normally at 4.2 volts. In this case the hardware error is raised and the voltage at VIN Alert TP is 0 V.
All other alerts will show quite the same screen. For example in case of a voltage of 3.00 V on the USB (the limit is set to 4.5 V), the oled will display