Posts with «iot» label

Temperature logger using arduino and thingspeak

Hello Arduino lovers,

In this tutorial, we are making a temperature logger using arduino and thingspeak.
Let's start

Things required:

  1. Arduino Uno
  2. LM35
  3. Sim900 module
  4. Internet pack 
  5. Thinkspeak account




Make connections as given in the diagram. Connect Tx of GSM module to pin number 7 of arduino board and Rx of of GSM module to pin number 8 of arduino uno and ground should be common between these two.
Output of LM35 should be connected to A0 of arduino board.
Arduino Uno GSM module LM35
Pin no. 7 Tx
Pin no. 8 Rx
Pin no. A0 Output of Lm35
Download code from link below
Now, upload the code

Video:

Hope, you guys had enjoyed the video

Thanks for visiting my blog



Quick and Easy IoT Prototyping with Involt

IoT, web apps, and connected devices are all becoming increasingly popular. But, the market still resembles a wild west apothecary, and no single IoT ecosystem or architecture seems to be the one bottle of snake oil we’ll all end up using. As such, we hackers are keen to build our own devices, instead of risking being locked into an IoT system that could become obsolete at any time. But, building an IoT device and interface takes a wide range of skills, and those who are lacking skill in the dark art of programming might have trouble creating a control app for their shiny new connected-thing.

Enter Involt, which is a framework for building hardware control interfaces using HTML and CSS. The framework is built on Node-Webkit, which means the conventions should be familiar to those with a bit of web development background. Hardware interactions (on Arduinos) are handled with simple CSS classes. For example, a button might contain a CSS class which changes an Arduino pin from high to low.

Involt can take that CSS and convert it into a function, which is then sent to the Arduino via serial or Bluetooth communication. For more advanced functionality, Javascript (or really any other language) can be used to define what functions are generated — and, in turn, sent to the Arduino. But, all that is needed for the basic functionality necessary for many IoT devices (which might only need to be turned on and off, or set to a certain value) is a bit of HTML and CSS knowledge. You’ll create both the interface and the underlying hardware interactions all within an HTML layout with CSS styling and functionality.

While Involt isn’t the only framework to simplify hardware interaction (it’s not even the only Node.js based method), the simplicity is definitely laudable. For those who are just getting started with these sorts of devices, Involt can absolutely make the process faster and less painful. And, even for those who are experienced in this arena, the speed and efficiency of prototyping with Involt is sure to be useful.


Filed under: Arduino Hacks
Hack a Day 05 Feb 03:00
arduino  arduino hacks  css  html  involt  iot  node  

How to update esp8266 firmware

In this post, we are going to upload firmware to ESP8266 (ESP-01) . The firmware can be updated by both arduino as well as usb-ttl module.
ESP-01 is wifi SoC module and it has two GPIO pins i.e. GPIO0 AND GPIO2
For using ESP8266, we can use either AT commands using any terminal software/ esplorer ide (it supports lua programmming and AT commands) or we can use arduino library.
ESP8266 is a 8-pin SoC having two GPIO pins, it requires 3.3 volt and the current consumed by wifi module can't be attained through arduino. Therefore, if we are using arduino we need external 3.3 volt power supply.
Esp8266 wifi module can act as STA as well as AP or both


Things required:

1. USB-TTL module
2. Perfboard
3. Male and female berg strip
4. Female to female jumper wires
5. ESP-01
6. Nodemcu flasher
7. Firmware to be updated
8. Little bit of patience :)

Connections:

Make connections as given below:
ESP8266 side                                               USB-TTL module
Rx                                                                  Tx
Tx                                                                  Rx
CH_PD and Vcc                                           3.3 volt provided by the usb-ttl module
GND                                                              GND
GPIO0                                                           GND (while updating the firmware only)

Updating the firmware:

We had connected switch to GPIO0, by pressing the switch it GPIO0 will be grounded
In order to update the firmware, make the connections on perfboard. In this circuit, we are using two switches
one for GND and other for GPIO0.
Download Nodemcu flasher from the link below:
Download firmware from the link below:
Make settings as given in the picture. Browse the firmware file (ends with .bin)

Note: GPIO0 should be grounded while updating the firmware.
Vcc and CH_PD should be connected to 3.3 volt only

Check out the video:


Thanks for visiting this post.

In the meantime, do check my youtube channel:

Fun with electronics


Garage Door Monitor with Cayenne


 

Description

Using the HMC5883L magnetometer sensor of the GY-80 module from ICStation to monitor a garage door and notify when it has been opened or closed. The Cayenne service provides much of the monitoring and notifying functionality. A major feature of this project. Cayenne takes care of all of the complicated work behind the scenes, making it easy to connect your Arduino to the cloud and allow you to monitor your garage from virtually anywhere.
 
This project was created specifically to monitor a garage, but you will soon discover that this project could be used to monitor a whole host of other things. Monitor your front door, your back door, your bag, your chair, your cookie jar.
 
Monitor for peace of mind, or catch someone in the act of stealing your stuff. This project has got you covered. Let's see how:


 

 
 

HMC5883L DataSheet:

You can find the datasheet for the HMC5883L pretty easily by searching on the internet.
HMC5883L datasheet - Sparkfun


 

Arduino Libraries and IDE

Here is a link to the Arduino IDE download. The IDE is required to upload code to the Seeeduino Cloud.

You need the Cayenne Library installed in your Arduino IDE.
You can find the Cayenne library here:
Cayenne Libarary
 
There are libraries on the internet for the GY-80 module, however, it is relatively easy to use the magnetometer on this module. And therefore no libraries are required for the sensor. If you would like some more information about using the magnetometer sensor, and how to get the most out of it, then please have a look at my previous tutorial which goes into much more detail.


 

ARDUINO CODE:


 

You need to make sure to insert your OWN Cayenne token into the sketch above. You will get this token when connecting your Arduino to the Cayenne service. Watch the video for further explanation.


 

Fritzing diagram

Cayenne Widgets

Please make sure to watch the video to see how to connect the Seeeduino Cloud to Cayenne and how to create the Cayenne widgets. Cayenne widgets are necessary to create the dashboard on your phone or browser. They will also interact with the Arduino sketch, and will also be involved in creating the notification system. The following links will take you to the relevant part of the video:

The Master switch button is used to switch monitoring from OFF to ON (and vice versa). Therefore you can choose when to monitor the garage and when to stop monitoring. When first installing the project onto your garage door, and turning the Seeeduino Cloud on, it will automatically calibrate each sensor to a value of 1000.
 
If you experience any drift away from 1000 for whatever reason, simply press the Request calibration button, and each sensor will be recalibrated back to 1000. The x,y and z axis widgets are there so that you can see the readings coming from the magnetometer sensor. And when any of the axis variables breach the threshold away from 1000, it will trigger the Door Status widget. This is how we can tell if the door is open or closed.
 
We also use the Door Status widget to help with the notification system. When the Door status changes from "Closed" to "Open", a notification trigger will be activated, and a message will be sent via email or SMS. This notification is useful for monitoring when the door was opened. If you happen to recalibrate when the door is open. You will get a notification when the garage door closes.


 

Concluding comments

This project is relatively simple, and quite easy to set up. What I liked about this project was the versatility and alternate uses. You can use the same setup to monitor many different things. It is not just limited to monitoring a garage door. But being able to tell whether my garage door is opened or closed, especially after I have driven away from my house , is really cool. Now I don't have to drive all the way back home to check. Let me know if you have replicated this project, and also what kinds of things you decided to monitor with this project.

Garage Door Monitor with Cayenne


 

Description

Using the HMC5883L magnetometer sensor of the GY-80 module from ICStation to monitor a garage door and notify when it has been opened or closed. The Cayenne service provides much of the monitoring and notifying functionality. A major feature of this project. Cayenne takes care of all of the complicated work behind the scenes, making it easy to connect your Arduino to the cloud and allow you to monitor your garage from virtually anywhere.
 
This project was created specifically to monitor a garage, but you will soon discover that this project could be used to monitor a whole host of other things. Monitor your front door, your back door, your bag, your chair, your cookie jar.
 
Monitor for peace of mind, or catch someone in the act of stealing your stuff. This project has got you covered. Let's see how:


 

 
 

HMC5883L DataSheet:

You can find the datasheet for the HMC5883L pretty easily by searching on the internet.
HMC5883L datasheet - Sparkfun


 

Arduino Libraries and IDE

Here is a link to the Arduino IDE download. The IDE is required to upload code to the Seeeduino Cloud.

You need the Cayenne Library installed in your Arduino IDE.
You can find the Cayenne library here:
Cayenne Libarary
 
There are libraries on the internet for the GY-80 module, however, it is relatively easy to use the magnetometer on this module. And therefore no libraries are required for the sensor. If you would like some more information about using the magnetometer sensor, and how to get the most out of it, then please have a look at my previous tutorial which goes into much more detail.


 

ARDUINO CODE:


 

You need to make sure to insert your OWN Cayenne token into the sketch above. You will get this token when connecting your Arduino to the Cayenne service. Watch the video for further explanation.


 

Fritzing diagram

Cayenne Widgets

Please make sure to watch the video to see how to connect the Seeeduino Cloud to Cayenne and how to create the Cayenne widgets. Cayenne widgets are necessary to create the dashboard on your phone or browser. They will also interact with the Arduino sketch, and will also be involved in creating the notification system. The following links will take you to the relevant part of the video:

The Master switch button is used to switch monitoring from OFF to ON (and vice versa). Therefore you can choose when to monitor the garage and when to stop monitoring. When first installing the project onto your garage door, and turning the Seeeduino Cloud on, it will automatically calibrate each sensor to a value of 1000.
 
If you experience any drift away from 1000 for whatever reason, simply press the Request calibration button, and each sensor will be recalibrated back to 1000. The x,y and z axis widgets are there so that you can see the readings coming from the magnetometer sensor. And when any of the axis variables breach the threshold away from 1000, it will trigger the Door Status widget. This is how we can tell if the door is open or closed.
 
We also use the Door Status widget to help with the notification system. When the Door status changes from "Closed" to "Open", a notification trigger will be activated, and a message will be sent via email or SMS. This notification is useful for monitoring when the door was opened. If you happen to recalibrate when the door is open. You will get a notification when the garage door closes.


 

Concluding comments

This project is relatively simple, and quite easy to set up. What I liked about this project was the versatility and alternate uses. You can use the same setup to monitor many different things. It is not just limited to monitoring a garage door. But being able to tell whether my garage door is opened or closed, especially after I have driven away from my house , is really cool. Now I don't have to drive all the way back home to check. Let me know if you have replicated this project, and also what kinds of things you decided to monitor with this project.

ArduWorm: A Malware for Your Arduino Yun

We’ve been waiting for this one. A worm was written for the Internet-connected Arduino Yun that gets in through a memory corruption exploit in the ATmega32u4 that’s used as the serial bridge. The paper (as PDF) is a bit technical, but if you’re interested, it’s a great read.

The crux of the hack is getting the AVR to run out of RAM, which more than a few of us have done accidentally from time to time. Here, the hackers write more and more data into memory until they end up writing into the heap, where data that’s used to control the program lives. Writing a worm for the AVR isn’t as easy as it was in the 1990’s on PCs, because a lot of the code that you’d like to run is in flash, and thus immutable. However, if you know where enough functions are located in flash, you can just use what’s there. These kind of return-oriented programming (ROP) tricks were enough for the researchers to write a worm.

In the end, the worm is persistent, can spread from Yun to Yun, and can do most everything that you’d love/hate a worm to do. In security, we all know that a chain is only as strong as its weakest link, and here the attack isn’t against the OpenWRT Linux system running on the big chip, but rather against the small AVR chip playing a support role. Because the AVR is completely trusted by the Linux system, once you’ve got that, you’ve won.

Will this amount to anything in practice? Probably not. There are tons of systems out there with much more easily accessed vulnerabilities: hard-coded passwords and poor encryption protocols. Attacking all the Yuns in the world wouldn’t be worth one’s time. It’s a very cool proof of concept, and in our opinion, that’s even better.

Thanks [Dave] for the great tip!


Filed under: Arduino Hacks, security hacks
Hack a Day 11 Nov 16:30

Temperature updation on thingspeak using sim900

Hello friends,

In this post we are going to discuss how to upload temperature on thingspeak channel using sim 900 and arduino uno. As I had already uploaded the data on thingspeak channel using sim 900 and terminal software.

Introduction:

This project is a wireless temperature logger on thingspeak channel using gsm module and arduino.
For temperature sensor, we are using lm35, that gives output in millivolt which can be easily calibrated in  terms of  °C. We have to use adc module, since it's an analog sensor. Once the raw data is converted into temperature, we can upload the data.

Now, we are ready to upload the data on thingspeak channel. Thingspeak provides api for uploading of data. Before this, we have to use activate GPRS on sim900. We also to provide APN for accessing the internet. After activating the GPRS, we have to use GET like this:

GET http://api.thingspeak.com/update?api_key=QZFXXXXXXXXXXX&field1=data

Replace this api with yours, and data is the data you want to be upload. You can upload a number of field like temperature, pressure, humidity, etc.
 

Stuff you need:

  1. SIM900A
  2. Arduino uno
  3. LM35 (it's output is in degree celsius)
  4. 12 volt adapter (for GSM module)
  5. Jumper wires
  6. Account on thingspeak


Connections:

Arduino                              GSM module
Pin no. 7     ======>         Tx
Pin no. 8     ======>         Rx
Gnd            ======>          Gnd

Output of LM35 is connected to A0 of arduino uno.


Download the code from here:




  

An interactive ball for your dog’s remote entertainment

Recently presented at Disrupt SF Hackathon 2016, this modified hamster ball rolls and dispenses treats while you’re away!

Creators Anthony Alayo, James Xu, and Lawrence Chang don’t like the idea of leaving doggies alone all day to fend for themselves. Although these companions will generally wait for their owners to get home, this surely gets boring. To help solve this problem, they created the DogeBall–a hamster ball equipped with advanced electronics including what looks to be an Arduino MKR1000. This allows it to roll around under remote control via an accompanying app, and can even give your pooch a treat, perhaps as a reward for not chewing up your shoes!

Say you’re at work and your dog has been alone for a while. If you have a nest cam or other home cameras setup, playing with him/her is easy. The app we created acts as a remote controller, connecting to the ball over the internet. Shoot your dog a treat, hit the speak button to talk with him, or control the ball as if you were right there beside him/her.

Sound like something you might want for your pup? You can check out the team’s Devpost article or TechCrunch’s writeup on this excellent project!

(Photos: Devpost)

Hackaday Prize Entry: Smart USB Hub And IoT Power Meter

[Aleksejs Mirnijs] needed a tool to accurately measure the power consumption of his Raspberry Pi and Arduino projects, which is an important parameter for dimensioning adequate power supplies and battery packs. Since most SBC projects require a USB hub anyway, he designed a smart, WiFi-enabled 4-port USB hub that is also a power meter – his entry for this year’s Hackaday Prize.

[Aleksejs’s] design is based on the FE1.1s 4-port USB 2.0 hub controller, with two additional ports for charging. Each port features an LT6106 current sensor and a power MOSFET to individually switch devices on and off as required. An Atmega32L monitors the bus voltage and current draw, switches the ports and talks to an ESP8266 module for WiFi connectivity. The supercharged hub also features a display, which lets you read the measured current and power consumption at a glance.

Unlike most cheap hubs out there, [Aleksejs’s] hub has a properly designed power path. If an external power supply is present, an onboard buck converter actively regulates the bus voltage while a power path controller safely disconnects the host’s power line. Although the first prototype is are already up and running, this project is still under heavy development. We’re curious to see the announced updates, which include a 2.2″ touchscreen and a 3D-printable enclosure.


Filed under: The Hackaday Prize

Prototyping a smart bulb with JavaScript, Arduino + PubNub

In this video, our friends at PubNub are going to create a smart home network that builds upon their previous Johnny Five tutorial. They again hack an Arduino Uno using JavaScript, but this time to create the simplest smart bulb. Because by “smart bulb,” we really just mean an LED.

The tutorial was developed by Tomomi Imura from PubNub and also uses Johnny-Five. No, not the robot from the movie Short Circuit. It is an open-source JavaScript robotics framework that lets you program an Arduino with Node.js. The bulb itself is remotely controlled via a web portal.

To establish the realtime communication between the Arduino and a web browser, the PubNub Data Stream Network (DSN) is used. PubNub provides global infrastructure and allows you to build and scale real-time apps and IoT devices quite easily.

The remote controller (web app) is written in JavaScript. This is a simple user interface that includes only one button. While a completed code sample is available on CodePen, this tutorial employs a simplified version so that it’s easier to follow along.