Project tutorial
Current Tracker

Current Tracker

A system that monitors changes in power usages so that you can be alerted when a system stops, starts, or starts working funny.

  • 2 respects

Components and supplies

Apps and online services

About this project

Do you want to know if a device went haywire or is working just fine? This project is a simple AI system to prove that with current metering you can. You will be informed when something goes wrong. The following system can do it:

Create the circuit, connect shield to Arduino, and upload sketch to Arduino. Connect external power supply to Arduino (at least 9 Volts for stability).

It should look like this:


After this install Debian to the Dragonboard like they explain here:

After this you should install limdo, aws, linebyline, with npm to install folder of aipart.js.

npm install limdu
npm install linebyline
npm install aws-sdk

You must check for IP settings otherwise it will not work.

Next open AWS IoT console. In the resources click "Create a resource." Click create a thing. Give it a name and click create.

Click the name of the thing. It will open another panel. In that panel select "connect a device." In the connect a device window select NodeJS and click "Generate certificate and policy." When you click there will be three files. Download them they will be used for connecting our device to AWS. Then click "Confirm & start connecting" It will show us how to connect to AWS IoT to Node. Click "Return to thing detail".

We are connecting to our device now. But we need to make a rule. so that AWS will know what to do with our messages.


Click "Create a rule." Give it a name and description. Write * for attribute and # for topic. Condition is when this rule will fire. We send a message in JSON with this variable name and it will fire. In choose action we can store this message. Or fire it SNS etc.

To store it we have to use a dynamo table the user guide is in this link:

For sending mail we have SNS, but if it's urgent or we would like to send SMS. Outside the US we need a EC2 instance so that SNS can fire a HTTP event. That will use a third party service (in our case twilo), to send a SMS message. First create an Ubuntu EC2 instance (I like Ubuntu; Sorry to all the yum lovers). Follow guides and do an update. After that install lamp stack. Do not forget to open port 80 for http traffic. Test it with a classic phpinfo() and after that install composer. The file composer.json has the packages you need so install them. The process AWS used for request check is a little bit hard for a programmer to write so the best way is to use Amazon SDK. fill the twilo information and you are ready to go.

Now after a brief pause (!) lets continue to create our rule. In choose an action select SNS and click "Create a new resource". Topics window will open In this window select Create new topic and enter a topic name and a display name. Copy the ARN of Topic so that we will need it later. Click "Subscriptions" and "Create Subscriptions." If you select "email" a verification email will be send to that address. If you select http or HTTPS a verification request will be made to that address. If you follow the steps above it will automatically accept the request. Now enter the topic ARN. and click "Create Subscription" after it validates it will begin to make our requests automatically to all clients that subscribed to topic. To test subscription you can use Publish to topic to test.

Now that we are ready to send our messages through SNS we can click "Choose a resource" select our SNS target. then we should create a role. click Create a new role In the new window select Create a new IAM Role enter a role name then click "Allow".

In the AWS IoT window select role and finally click "Add action".  and click Create from now on whenever our IoT device send a message which returns true with our condition than a message will be send or stored.

Well If you have problems please leave a comment.

there are three folders copy each of them to devices and they should all work fine. If you find any bugs or problems. Please make a bug report.


Similar projects you might like

DIY Solar Tracker Arduino Project ITA

Project tutorial by Ingeimaks Ingeimaks

  • 1 comment
  • 27 respects

Unicorn Finder (Kid Tracker for Techie Parents)

Project tutorial by Team Hologram

  • 19 respects

Towards an Arduino-Powered Satellite Tracker

Project tutorial by Thomas Le Goff & Maxime Moury

  • 1 comment
  • 6 respects

Solar Panel Sun Tracker - Phone Charger

Project tutorial by FIELDING

  • 185 respects

WaterPi: Houseplant Remote Watering and Monitoring System

Project tutorial by Demirhan Aydin

  • 154 respects
Add projectSign up / Login