In this project I will show you how I made a Bluetooth power monitoring system. The device will measure the voltage and current and will send the measurements to your Bluetooth enabled device.
For this project you will need a HC-05 Bluetooth module this will allow the data to be sent to your device. The current will be measured using a ACS712 module that will need to be connected in series of the device you want to measure. To measure the voltage I used a AC voltage sensor module as it would mean I am able to measure AC voltages but you could adapt this design to measure DC. This will be connected in parallel of the device you want to measure.
I have included a diagram to help you to connected the modules to the Arduino.
Once all your modules are connected to the Arduino you will need to program it. I have included the code that you will need.
#include <SoftwareSerial.h>
SoftwareSerial BlueTooth(0, 1); // bluetooth pins
char BT_input;
const int Input = analogRead(A1); // Read the analog value for the votage
const int Input = analogRead(A0); // Read the analog value for current
double Value= 0;
double ACSoffset = 2500; // ofset for the ACS712
double mVAmp = 100;// mv per amp for your sensor you can find this on its data sheet
double Amps = 0;
double inputv = 0;
void setup()
{
BlueTooth.begin(9600); //start the bluetooth
}
void loop()
if (BlueTooth.available()) //if the bluetooth is connected start sequence
double Voltage = Input * (5.0 / 1024.0) * 100; //convert the value to volts. adjust the trim pot on the sensor to set the output to 100V = 1V
BlueTooth.println("Voltage:") (Voltage) ("V");// display the voltage
Value = analogRead(analogIn);
inputv = (Value / 1024) * 5000; // converts the signal in to mA
Current = ((inputv - ACSoffset) / mVAmp);
BlueTooth.println("Current:") (Current) ("C");// display the current
Power = Current * Voltage // Work out the power using the voltage & current
BlueTooth.println("Power:") (Power) ("W");// display the power
}
After you have uploaded your code to the Arduino you will want to connected it to the device you want to measure. voltage connected in parallel to the device and current connects in series. To receive the data sent you will need to have an app to receive that data and display it.
I used the 'Bluetooth terminal HC-05' app but you could use any Bluetooth terminal app or even write your own custom app to display the data.
once the app has been downloaded all you need to do is connect to the module and open the terminal and then every 10 seconds the data measured will be displayed on your device.
AcknowledgementI thank PCBWay & LCSC Electronics for the partnership.
PCBWay Is a cheap reliable service where you can get your PCBs manufactured. All the PCBs are high quality and the engineers are very helpful and will resolve any problems you may have quickly. Sign up today and get a $5 welcome bonus. Check Out PCBWay Hackster page.
LCSC Electronics Is China's leading Electronic Components Distributor. LCSC sells a wide variety of high quality electronic components at low prices. With over 150, 000 parts in stock they should have the components you need for your next project. Sign up today and get $8 off on your first order.
WebsiteCheck out more of my other projects on my website.
Comments