2017

From Scratch to Smart: Creating a Custom Lock with EaseLock

Create a custom smart lock device for your existing door that integrates an Atmega328 microcontroller, HC-05 Bluetooth module, and relay module, enabling remote operation from any paired Android device.

In this project, We will show you how to build a comprehensive prototype of smart lock step by step with minimal cost.

The initial intent with this tutorial was to show you that you can make build this project even if you have little experience with all of the various parts (AVR chips, Bluetooth, Android). We still believe you can if you follow the steps in this tutorial.

Getting Started

Hardware Tutorial

Create a custom smart lock device for your existing door that integrates an Atmega328 microcontroller, HC-05 Bluetooth module, and relay module, enabling remote operation from any paired Android device.

In this project, I will show you how to build a comprehensive prototype of smart lock step by step with minimal cost.

Introduction

Developing a product that goes beyond software requires mastering multiple technologies, which can be a daunting task. However, this diversity can also be the most fascinating aspect of the project.

Below is a rough diagram that provides a comprehensive…

AVRDUDE Studio – A Microcontroller Programming Tool Based on AVRDUDE

AVRDUDESS is a graphical interface for AVRDUDE, designed to simplify the programming process of Atmel microcontrollers. It provides a user-friendly interface that allows users to easily upload code, read and write to the microcontroller’s flash, EEPROM, and other configurations.

Some key features:

  • Supports all programmers and MCUs that AVRDUDE supports
  • Supports presets, allowing you to change between devices and configurations quickly and easily
  • Drag and drop files for easy uploading
  • Automatically lists available COM ports
  • Cross-platform with the use of Mono for Linux & macOS

DOWNLOAD HERE

High-Precision Timing Library for AVR

This lightweight library is specifically designed for millisecond-level time tracking. It supports the “unsigned long long” data type, allowing it to accurately track up to 584.9 million years! Additionally, it can adapt to clock frequencies of up to 20MHz, with most common frequencies having no timing errors.

Compared to Arduino’s built-in millis() timer, this library is especially useful when running at clock frequencies of 8MHz or below or when tracking time for more than 50 days.

Download from GitHub

Brief comparison against the Arduino millis()

Arduino millis()

  • Microsecond support
  • Doesn’t loose or gain time at any clock frequency
  • Loss of resolution at lower frequencies

This library

  • Faster execution
  • Less RAM used
  • Always updates millisecond count every millisecond
  • Support for ‘unsigned long long’ data type, 64 bit integer allows tracking time for up to 584.9 million years, Arduino millis() uses ‘unsigned long’ which goes up to 49.71 days
  • Uses CTC mode for the timer, which might make it a little bit more difficult to use the timer for multiple things

Accuracy at commonly used clock frequencies

ClockThis library (TIMER0)This library (TIMER1)

EaseWatcher: Smart Surveillance Made Easy

EaseWatcher is a comprehensive DIY smart surveillance system that empowers users to create a robust and customizable security solution for their homes or businesses. This innovative system combines cutting-edge technology with ease of use, allowing individuals to monitor and protect their properties with confidence.

With EaseWatcher, users can effortlessly connect multiple cameras, triggers, and alarm channels to create a seamless surveillance experience. The system’s modular design enables users to add or remove components as needed, making it an ideal solution for a wide range of applications.

EaseWatcher’s advanced features include:

  • Real-time video streaming and recording
  • Motion detection and alert notifications
  • Customizable alarm channels for instant notifications
  • Support for multiple camera types and protocols
  • Cloud-based storage for secure and convenient access

By leveraging the power of EaseWatcher, users can enjoy peace of mind knowing that their properties are protected and monitored around the clock. Whether you’re a homeowner looking to safeguard your family and assets or a business owner seeking to enhance security…

Monitoring Network Traffic: Bluetooth Network Monitor

You can read about the newer version of the Bluetooth network monitor here, but I suggest you continue reading this article.

I often encounter slow download speeds or online gaming lag, and every time I have to log in to my router’s web page or via SSH to check if it’s because of others in my household downloading/uploading, unstable network connections, or simply a server issue. It’s really frustrating. So, I decided to create a device that displays network statistics in real-time, making it more convenient to monitor network traffic.

The monitor consists of an ATmega328P @ 20MHz, a 160×128 1.8-inch color LCD, and a Bluetooth module, powered by 5V USB. It has a button that long-presses to adjust the LCD brightness and short-presses to switch display modes. Since it’s powered by USB, I added support for V-USB.

Enclosure Design:

  • Uses an A8 paper display holder
  • Removes the back clip part
  • Adds rubber feet

Monitor Modes:

  • Display Mode 1:
    • Downlink sync
    • Uplink sync
    • Download rate
    • Upload rate
    • 25-second historical chart
    • Flat
    • Packet loss
    • WAN IP
    • Time
    • Email notification
  • Display Mode 2:
    • Download rate
    • Upload rate
    • 40-second large historical chart

Future Plans:

  • Add more

Bluetooth Module Communication: Configuration and Testing

A Simple Way to Make Your Project Wireless with Serial Bluetooth Modules

Using serial Bluetooth modules is a straightforward way to make your project wireless, as they can transparently transmit standard serial data to another connected Bluetooth module, without requiring additional code.

Adding Bluetooth to Your Project for Mobile Control

To add Bluetooth to your project for mobile control, simply insert a slave module and connect to it via your phone. However, getting two modules to communicate with each other requires understanding some basic concepts.

How Bluetooth Modules Work

Bluetooth modules work in slave and master modes. Slave modules cannot initiate connections with other Bluetooth devices, but can accept connections. Master devices can be set to master or slave mode, and in master mode, they can initiate connections with other devices. Be sure not to make the mistake of buying two slave devices! You need two master devices or one master and one slave device.

What to Note When Buying Bluetooth Modules

Sometimes, eBay sellers may not provide much information about their modules. To determine whether a module is a slave or master device, be sure to check the following:…

Introduction to nRF905 Wireless Transceiver IC Library

The nRF905 is a wireless transceiver IC similar to the nRF24L01, but with a working frequency of 433/898/915MHz, offering a longer range and more IO pins. Although the data rate of nRF905 is only 50Kbps, lower than the 2Mbps of nRF24L01, this library provides considerable flexibility.

The library supports the use of interrupts and allows for the option of connecting two modules, as their status can also be accessed through the IC’s status registers. Additionally, the library supports basic collision avoidance mechanisms.

NOTE: v3.0.0 of the library was released on 12th September 2017, the default CD pin has changed and the AM pin is now used by the library.

Download

Arduino: [HERE] and [Documentation] (or use the Arduino library manager and search for “nrf905”)

AVR (non-Arduino): [HERE] and [Documentation]

nRF905ATmega48/88/168/328Arduino UnoDescription
VCC3.3V3.3VPower (3.3V)
CED7 (13)7Standby – High = TX/RX mode, Low = standby
TXEB1 (15)9TX or RX mode – High = TX, Low = RX
PWRB0 (14)8Power-up – High = on, Low = off
CDD4 (6)4Carrier detect – High when a signal is detected, for collision

About LCD Image Viewer

This is a rapid project I’ve worked on, using a 1.8-inch color LCD display from Ebay. The microcontroller code is very simple, initializing the display and then waiting for serial data to be sent directly to the screen. The host program handles image processing, opening the image and resizing it, displaying it in a preview window, and converting it to 12, 16, or 18-bit color during upload.

Additionally, I’ve added various interactive features to the preview window, including image rotation, scaling, and movement, making the project more practical and interesting.

Setup is wired as follows –

LCD pinArduino Uno pin
VCC5V
BKLGND
RESET**RESET
RS9
MISO*12
MOSI11
SCLK13
LCD CS10
SD_CS*4
GNDGND

* These are only needed if you’re using the SD slot on the back of the LCD
** Connect RESET to make the LCD reset along with the controller, if you don’t need that then leave disconnected or connected to 5V

Downloads

LATESTLCDImageViewer_20121026.zip (2.07 MB)
Host program and source (C# .NET), Arduino sketch code, Arduino LCD library and normal AVR C code (you can probably get it working on an ATtiny25)
MD5: DD6AC95ABD72318BFEA2B04F30F058BC

This article discusses three development…