Friday, March 18, 2022

Home Automation: Creating a custom switch board

 A lot of home automation products are available in the market. This is one prototype which I had created along with my friend Vinod Hosamani. Although it might not be suitable for mass production, but in order to demo the concept it was good enough. It got a good reception from audience as well. 

In this post I shall cover on building the hardware prototype. Software details I shall discuss in another post. We first bought a switch board casing from market. This is from GM Modular(https://www.gmmodular.com/).

Then we started creating a touch panel using glass plate. Glass plate was cut exactly to fit the casing from GM.


The black radium was cut with circles. You'll further see it once it is placed on the glass plate.
On the back I then started placing touch sensors as shown below,

The touch sensor is TTP 223 based which has good sensitivity and shall work with both 3.3v and 5v.
It has 3 pins  VCC, GND and Output. The behavior of output can be controlled by shorting A and B given as solder option. In below image, one can see the 4 different ways in which output can be configured.

We connected all VCCs and GNDs on common rails. Then used output wires from each touch sensor separately. Next we used another glass plate in a way that touch sensors are sandwiched between two glass plates.
This now looked something like shown in above picture. We then connected the rest of circuit which had relays, power circuit and provision to connected a ESP based node MCU.


The circuit is crude and as mentioned earlier, the whole idea was to quickly develop a presentable prototype. Now we were able to put everything together, flash a small ESP software and we used blynk(https://blynk.io/) app to control the switches from cellphone. It finally looked like this,




This project was done 4 years prior to writing this here. I couldn't post a video along side(may be I lost it 😔 ). But I'll further write on how we improved this model and created our own custom PCB, APP and cloud infrastructure.
Share your comments. 😊



Thursday, April 9, 2020

Getting started with Embedded C and Microcontroller

One best way to learn Embedded programming is to catch hold on one microcontroller and then explore all its features. Let's say you start with LPC1768 from NXP. Its a ARM cortex M3 based microcontroller.
for more details, check below link.
https://os.mbed.com/platforms/mbed-LPC1768/

After we freeze the microcontroller, we can begin exploring in the following order,
1. Clock Unit
    PLL
    Configuring clock unit for different frequency
    Check the clock pulse on CRO

2. GPIO
    Usage of GPIO registers
    Reading Switch input
    Driving a LED, Buzzer, Relay

3. WDT- Need
    How it works
    WDT configuration

4. Interrupt system
    Different kinds of interrupts
    Use of ISRs
    Interrupt Latency

5. ADC introduction
    Configuration of ADC
    Use of different ADC modes
    Reading a analog input at a pin

6. Timer Basics
    Application of timers
    Input capture
    Output compare
    Timer configuration for diff modes

7. PWM introduction
    PWM registers
    PWM generation
    Control intensity of light
    Control speed of motor

8. Serial communication introduction
    UART & its registers
    Programming a UART and establishing communication with serial terminal.

9. SPI protocol
    SPI registers
    Programming SPI

10. I2C Protocol
      I2C registers
      Programming I2C

11. RTC introduction
      RTC configuration
      Programming RTC for time keeping.

Tuesday, November 12, 2019

Beginners guide to GIT Version control software

GIT is a version control software that helps us to manage the file versions.
Compared to traditional file revision management software like SVN, IBM Synergy etc( which are centralized version control management system), in GIT we've local repository as well as remote repository(Distributed version control management system).



Note: It is important to understand that GIT and GitHub are two different entities. GIT is basically a version control software. Where as GitHub is a platform or server space where we can manage our software with multiple collaborators. GIT can be used without having any GitHub account, but in order to utilize its full potential we may use both GIT with GitHub as remote repository.

To understand in detail you may browse the official documentation,
https://git-scm.com/doc

Step 1: In order to begin with GIT, we need to install GIT from official link below,
https://git-scm.com/

Step 2: Create a GitHub Account
https://github.com/

Step 3: Create a repository on the local machine. Open a folder where you want to create a repository, right click and select 'Git Bash Here',
now a command window shall open. Further operations are based on command interface discussed in step 4.

Step 4:
i. Create a Git repository
$ git init

ii. Add the files in your new local repository. Next step is to push these files onto local repository.
$ git add .
indexes all the files in the current folder.

iii. Commit the files that you've indexed in your local repository.
$ git commit -m "message for the commit. This helps identify on what changes you've committed into the repository".

Now we need to push these files from local repository to remote repository on GitHub.
For this add the URL of the repository that you can find in the GitHub

$ git remote add origin <remote repository URL>
# Sets the new remote url to label 'origin'

$ git remote -v
# Verifies the new remote URL

Push the changes in your local repository to GitHub.
$ git push origin master

Your first set of files are committed to local repository and also pushed onto the remote repository. This can be verified on GitHub as well.

Commonly used GIT commands,
https://github.github.com/training-kit/downloads/github-git-cheat-sheet.pdf





This Blog may contain copyrighted material, the use of which may not have been specifically authorized by the copyright owner. This material is available in an effort for education purpose only.

This should constitute a 'fair use' of any such copyrighted material(referenced and provided for in section 107 of the US Copyright Law).

If you wish to use any copyrighted material from this blog for purposes of your own that go beyond 'fair use', you must obtain expressed permission from the copyright owner.

Home Automation: Creating a custom switch board

 A lot of home automation products are available in the market. This is one prototype which I had created along with my friend Vinod Hosaman...