The best tools to make your project dreams come true

Login or Signup
USD


Door Alarm using DK IoT Studio

By KELSIE

This project demonstrates how to create a simple door alarm using Digi-Key's IoT studio and components from Digi-Key.  

Required Hardware:
F8075-ND Littelfuse Reed Sensor
57145-000-ND Littelfuse Magnet
AC164160-ND Microchip AVR-IoT
1125-1193-ND LED
1.0KQBK-ND Resistor
BKGS-830-ND Breadboard
377-2093-ND Jumper wires 

Hardware Setup
Connect the PWM pin on the AVR-IoT to one wire of the Littelfuse reed sensor.
Connect the other wire from the Littelfuse reed sensor to one leg of the resistor. 
Connect the other leg of the resistor to the negative leg of the LED. 
Connect the positive leg of the LED to the 3.3V pin on the AVR-IoT. 

 

schematic

DK IoT Studio Software

DK Iot Studio is a cloud based programming software that allows the user to develop a prototype in minutes. No code needs to be written as this is a drag and drop system.  If this is your first time using DK IoT studio, see we have an intro to DK IoT Studio blog available.  

The first step is to add interval and GPIO blocks.

Code

Next, click on the interval element.  Make sure the GPIO ability is set to toggle. 

interval

Choose the GPIOPin element. Make sure the variables look the same as the picture below.  GPIO

Compile the program.

 Compile

Make sure your board is plugged into your computers USB port and the AVR-IoT micro USB port. 

Click program firmware. 

Program firmware

It will download as a .hex file. 

hex file

Drag and drop this to your board, which will show up as curiosity.  

Curiosity

Wait for the program to finish downloading. 

Download

Your project should now be operable.  When you put the magnet next to the Littelfuse sensor, the LED should blink (this is the door closed).  When you remove the magnet the light will stop blinking. A sound device could be used instead of, or with the light, but being in an office building I elected to stick with just the light.  

Key Parts and Components

Add all Digi-Key Parts to Cart
  • F8075-ND
  • 57145-000-ND
  • AC164160-ND
  • 1125-1193-ND
  • 1.0KQBK-ND
  • BKGS-830-ND
  • 377-2093-ND