Wednesday, June 7, 2023

DIY: e-Ink-based IoT Touch Switch

Ashwini Kumar Sinha

- Advertisement -
 

ashwinie-ink displays are quite impressive as they use electrically activated ink molecules, which doesn’t lead to fading away of designs made using it – even after the power supply is turned OFF; the designs seem to be printed on paper with a normal ink pen. Unlike conventional display systems, e-ink does not use any LED or OLED light. It only needs a small amount of electricity.

In this IoT project, you will learn to make a power-efficient IoT touch switch that consumes minimum power and gives an impressive smart home switching experience. So let’s begin our project by shopping for the following components.

- Advertisement -

Bill Of Material

Coding 

Install the latest Raspbian OS on the Raspberry Pi board. Also, install the required libraries for controlling the GPIO and for interfacing the e-ink display. For these, open the Linux terminal and run the following commands:

sudo pip3 install gpiozero

wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.68.tar.gz

tar zxvf bcm2835-1.68.tar.gz 

cd bcm2835-1.68/

sudo ./configure && sudo make && sudo make check && sudo make install

sudo apt-get install wiringpi

sudo apt-get update

sudo apt-get install python3-pip

sudo apt-get install python3-pil

sudo apt-get install python3-numpy

sudo pip3 install RPi.GPIO

sudo pip3 install spidev

cd ~

git clone https://github.com/waveshare/Touch_e-Paper_HAT

Now you are ready to write the code.

First, create a UI having the image/icon of the appliance you wish to control. Save it on the e-ink display and run the code to preview it on the e-ink display. The code can be found inside the e-ink library folder.

After displaying the UI, turn off the Rpi and code. As you are aware, the display will remain unchanged with the same image even after the power is switched off unless the display is refreshed. e-ink display uses a special technology of ink molecules that get activated electrically and remain on display as printed ink on paper.

Next, create a code that will check the touch/sensing points on the touch panel of the e-ink display for turning them ON/OFF as required. Import the code to the display.

Next, create a while loop in which you should define the function for toggling the LED to control the appliance that you wish to control. If the touch/sensing point is within the range of the image/icon on display, then the LED to control that appliance will toggle.

Fig 4. Code importing module
Fig 5. Getting touchpoints.
Fig 6.Code for controlling appliance



WHERE IS THE REST OF THIS ARTICLE'S CONTENT?

This is PREMIUM content, which means that only
REGISTERED users of our website can read it, by logging in.

If you ARE a registered user, CLICK HERE to login.
Else, CLICK HERE to register for FREE!

SHARE YOUR THOUGHTS & COMMENTS

 
 

What's New @ Electronicsforu.com?

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Tech Contests