(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[category:ESP32 Arduino]]
 
[[category:ESP32 Arduino]]
In this tutorial we will see how to build a simple IOT Industrial Data logger to log the temperature and Current.
+
In this tutorial we will see how to build a simple IOT Industrial Data Logger(IDL) to log the device temperature and current to AWS IOT and display it on Hornbill IO. The IDL connects to Wi-Fi and then to the clould.
We will be using the '''Max6675''' for measuring the temperature and Non-invasive '''yhdc sct-013-000''' AC current sensor to measure electric energy consumed. The measure temperature and Current along with Power is logged to server using Hornbill AWS IOT library.
+
  
Please check the earlier tutorials for enabling [[Secure_IOT_with_AWS_and_Hornbill_ESP32|AWS IOT services]] to your user account and [[AWS_IOT_with_Arduino_ESP32|Hornbill AWS IOT]] library usage guide.
+
We will be using the '''MAX6675''' for measuring the temperature and Non-invasive '''YHDC SCT-013-050''' AC current sensor to measure electric energy consumed. The measured temperature and current along with power is logged to server using Hornbill AWS IOT library. This data could later be used to determine device specific events like operating duration, total power consumption etc., Combing this with the device temperature can be useful in understanding operating health of the machine.  We have attached Hornbill Industrial Data Logger to a bench top drill machine, you may add it any machine where power and temperature measurements can result in useful insights.
  
 
+
Check the earlier tutorials for enabling [[Secure_IOT_with_AWS_and_Hornbill_ESP32|AWS IOT services]] to your user account and [[AWS_IOT_with_Arduino_ESP32|Hornbill AWS IOT]] library usage guide.
=Reference Libraries=
+
We will be using the [https://github.com/adafruit/MAX6675-library AdaFruit Max6675 Library] to measure the temperature and [https://github.com/openenergymonitor/EmonLib Open Energy Monitor's Library] to measure the current. Download/Install these libraries.
+
 
   
 
   
 
=Schematic=
 
=Schematic=
 +
The IDL can be powered either through a LiPo battery or using the on-board USB connector.
 +
[[File:Hornbill_IDL_Schematic_image.PNG ‎]]
  
=Connection=
+
=Assembly=
 +
The Hornbill IDL kit comes with all the parts required.  The steps show assembling a DIY version of the kit, however the IDL Kit we will ship will come with pre-assembled single PCB with ESP32 Module, Sensors and other circuitry built-in.
 +
To build this you'll need:
 +
* Hornbill ESP32 Dev board
 +
* Hornbill ESP32 Proto board
 +
* Thermocouple
 +
* Current Sensor
 +
* Hornbill Case
 +
* USB Power Adapter or LiPo Battery
 +
[[File:hornbill_idl_kit.jpg]]
 +
 
 +
* Start with soldering all the parts on the Proto Sheild
 +
[[File:hornbill_esp32_proto.jpg]]
 +
 
 +
* Once all the parts are soldered on Proto Sheild, solder the Hornbill ESP32 Dev board
 +
[[File:hornbill_esp32_dev.jpg]]
 +
 
 +
* The board assembly looks as shown below:
 +
[[File:assembled_board.jpg]]
 +
 
 +
* Screw the board to the Hornbill Case.
 +
[[File:assembled_board_case.jpg]]
 +
 
 +
* You may then either power it up with a USB Charger or connect a LiPo battery. The sensor should be clipped to the phase wire of the equipment power and the thermocouple should be tagged to the device.
  
 
=Code=
 
=Code=
Temperature and current will be continuously monitored and logged to amazon server every 5sec.
+
Temperature and current will be continuously monitored and logged to amazon server every 5sec. To compile the code add the following libraries.
 +
* [https://github.com/adafruit/MAX6675-library Adafruit Max6675 Library] to measure the temperature
 +
* [https://github.com/openenergymonitor/EmonLib Open Energy Monitor's Library] to measure current and power.
  
 
<html>
 
<html>
 
<script src="https://gist.github.com/SaheblalBagwan/fb516db75e7bc98393ace45584cea9b3.js"></script>
 
<script src="https://gist.github.com/SaheblalBagwan/fb516db75e7bc98393ace45584cea9b3.js"></script>
 +
</html>
 +
 +
<br>
 +
 +
=Data=
 +
The data is logged to AWS, however there is no way to visualize it. So we have built a data visualization and device control tool at Hornbill IO. Hornbill IO is still work in progress and we will release a beta version soon. However, here is how the plot looks on the dashboard.
 +
[[File:graphs.png]]
 +
=Video=
 +
<html>
 +
<div class="embed-responsive embed-responsive-16by9">
 +
    <iframe class="embed-responsive-item" src="//www.youtube.com/embed/uVNCOWjm87c"></iframe>
 +
</div>
 
</html>
 
</html>
  
 
=Download=
 
=Download=
Download the AWS IOT library and examples for [https://github.com/ExploreEmbedded/Hornbill-Examples/tree/master/arduino-esp32 this link.]
+
Download the Arduino ESP32 AWS IOT lib and examples form [https://github.com/ExploreEmbedded/Hornbill-Examples/tree/master/arduino-esp32/AWS_IOT this link].
 +
<br><br>
 +
 
 +
Have an opinion, suggestion , question or feedback about the article let it out here!
 +
{{DISQUS}}

Latest revision as of 12:10, 18 April 2017

In this tutorial we will see how to build a simple IOT Industrial Data Logger(IDL) to log the device temperature and current to AWS IOT and display it on Hornbill IO. The IDL connects to Wi-Fi and then to the clould.

We will be using the MAX6675 for measuring the temperature and Non-invasive YHDC SCT-013-050 AC current sensor to measure electric energy consumed. The measured temperature and current along with power is logged to server using Hornbill AWS IOT library. This data could later be used to determine device specific events like operating duration, total power consumption etc., Combing this with the device temperature can be useful in understanding operating health of the machine. We have attached Hornbill Industrial Data Logger to a bench top drill machine, you may add it any machine where power and temperature measurements can result in useful insights.

Check the earlier tutorials for enabling AWS IOT services to your user account and Hornbill AWS IOT library usage guide.

Schematic

The IDL can be powered either through a LiPo battery or using the on-board USB connector. Hornbill IDL Schematic image.PNG

Assembly

The Hornbill IDL kit comes with all the parts required. The steps show assembling a DIY version of the kit, however the IDL Kit we will ship will come with pre-assembled single PCB with ESP32 Module, Sensors and other circuitry built-in. To build this you'll need:

  • Hornbill ESP32 Dev board
  • Hornbill ESP32 Proto board
  • Thermocouple
  • Current Sensor
  • Hornbill Case
  • USB Power Adapter or LiPo Battery

Hornbill idl kit.jpg

  • Start with soldering all the parts on the Proto Sheild

Hornbill esp32 proto.jpg

  • Once all the parts are soldered on Proto Sheild, solder the Hornbill ESP32 Dev board

Hornbill esp32 dev.jpg

  • The board assembly looks as shown below:

Assembled board.jpg

  • Screw the board to the Hornbill Case.

Assembled board case.jpg

  • You may then either power it up with a USB Charger or connect a LiPo battery. The sensor should be clipped to the phase wire of the equipment power and the thermocouple should be tagged to the device.

Code

Temperature and current will be continuously monitored and logged to amazon server every 5sec. To compile the code add the following libraries.


Data

The data is logged to AWS, however there is no way to visualize it. So we have built a data visualization and device control tool at Hornbill IO. Hornbill IO is still work in progress and we will release a beta version soon. However, here is how the plot looks on the dashboard. Graphs.png

Video

Download

Download the Arduino ESP32 AWS IOT lib and examples form this link.

Have an opinion, suggestion , question or feedback about the article let it out here!