EasyTalk: Easy Communication and a Calendar Next to You

by Marchal Kobe in Circuits > Raspberry Pi

164 Views, 2 Favorites, 0 Comments

EasyTalk: Easy Communication and a Calendar Next to You

IMG_1769.jpeg
EasyTalk Poster.png

My name is Kobe Marchal, I study at Howest, Belgium and I’m a student Multimedia and Communication Technology (MCT). For my final assignment of my first year, I had to make an IoT-device.

At home we have this problem that my brother is always gaming and when my mother needs to tell him something from downstairs, she needs to shout because he wears headphones and can’t hear a thing. I wanted to solve this problem for her so I build a device where you can send messages to from a website. It’s also used as a calendar where you can store your own events in or import an external calendar over a URL. This device also stores temperature and air quality values so you can see how healthy it is when you are gaming or working because you often don’t notice.

This device is called EasyTalk and solves this problem. It is a small device that uses an OLED screen so you can see your events, the time or temperature and air quality right now. When a message is send, it notices you with a notification sound and shows the message on the screen where you can answer with yes or no.

If you want to build this thing or you want to see how it is made, I strongly suggest to read on. If you want to know more about me, you can go to my portfolio.

Materials

1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
6.jpg
7.jpg
8.jpg
9.jpg
10.jpg
11.jpg
12.jpg
13.jpg
14.jpg
15.jpg
16.jpg
17.jpg
18.jpg
19.jpg
20.jpg
21.jpg
22.jpg
23.jpg

The first step is to gather all the materials to use in this project. I'm going to be honest with you. This is not a cheap device, the overall cost is €271. Below is a list of them and some photos to clarify.

  • Raspberry Pi 4 Model B - 4GB
  • Pibow Coupé 4 – Ninja
  • 12 x Premium Jumperwires op strip - 40 stuks - M/M - 20cm
  • 6 x Premium Jumperwires op strip - 40 stuks - M/F - 20cm
  • 2 x 36-pin Stacking header
  • 40-pin male box header
  • 40 pins Regenboog GPIO kabel
  • Monochrome 2.42" 128x64 OLED Graphic Display Module Kit
  • Kleine Metalen Speaker met Draadjes - 8 ohm 0.5W
  • Adafruit Mono 2.5W Class D Audio Versterker
  • 3.5mm Aux Jack cable
  • 7mm thread Momentary Push Button
  • Tuimelschakelaar
  • PIR Bewegingssensor
  • DS18B20 Digitale temperatuur sensor
  • Grove - Lucht kwaliteit sensor v1.3
  • Grove - I2C ADC
  • Raspberry Pi 4 USB-C Voeding
  • Flexibel mini-statief
  • 470 Ohm resistors
  • 4,7K Ohm resistor
  • Heat shrink tubing
  • 6 x Screws M2 x 6mm
  • 6 x Screws M2 x 8mm
  • 3 x Screws M2 x 16mm
  • Aluminiumbuis 3 mm

I also made a Bill Of Materials (BOM) so you can see how much I paid for all of the materials and where I got them.

Raspberry Pi

For this project, we use a Raspberry Pi because it is easy to set up and it can be used for a lot of things. It is perfect for what we want to do.

Download the Raspberry Pi Desktop OS and install it on your Raspberry Pi. You need to enable SPI, I2C and One Wire in the raspi-config. I suggest to disable some things in the Boot Options as well to make it boot faster. Other than that I use some libraries that you have to install with pip to make this work.

pip3 install:

  • adafruit-circuitpython-ssd1305
  • ics
  • Flask
  • Flask-Cors
  • Flask-JWT-Extended
  • mysql-connector-python

You also need apache2 to set up a website, here we use apt:

  • sudo apt install apache2 -y

You need to set up wireless connection because you can’t get a UTP cable in the Raspberry Pi when it is in the case.

You will need to set up MariaDB as well so you can access the database.

Wiring

breadboard.png
elektronica.png

The next step is to wire everything together and test if all components work. I created a PCB to remove the breadboard and make the wiring lesser so the device can be smaller. This is necessary because it will stand next to your monitor and can’t take a lot of space so it doesn’t distract you from your work.

Database

Schermafbeelding 2020-06-12 om 18.47.12.png

This device makes use of a normalised MySQL database to store all its information in and show this on the website and the device itself. I created it in MySQL Workbench.

There are 5 tables in this database.

Table Activiteiten (= activities, events) is used to store all events of the calendar. This also includes all of the events imported from another calendar.

Table Apparaten (= devices) is used to store the different types of devices that are used in table Historiek (= history). There are two sensors used in this project, a temperature sensor and an air quality sensor but I also have a third “device”, the website itself to store the messages send from the website to the device.

Table Gebruikers (= users) stores the users. They can log in with their password and specify a nickname that shows up with a message when send to the device.

Table Historiek (= history) is used to store the sensor values and messages send to the device.

And finally table Links (= URL’s) stores all the external calendar URL’s.

Downloads

Code

Desktop - Home@2x.png
Desktop - Agenda - Kalender@2x.png
Desktop - Sensoren - Luchtkwaliteit@2x.png

I recommend to make a new user as it is best practice but it is not necessary, you can also use the default pi user.

The frontend code is put in the default html folder from apache2. You can find this folder in /var/www/html.

For the backend, you need to make a folder in your home folder and put all of the code in there.

We need to change some values in this code as well. First go to app.py. On line 23 set the name of the one wire temperature sensor. This will probably be something different for you. To find the right name, open a terminal and type in:

ls /sys/bus/w1/devices

and look for a string that consists of multiple different numbers and replace the one on line 23.

The other thing we need to change is in the config.py file, change the password of the database.

If you want this to run on boot, you have to change the EasyTalk.service file as well. Just change the WorkingDirectory and User. You have to copy this file with the next command:

sudo cp EasyTalk.service /etc/systemd/system/ EasyTalk.service

Then run it:

sudo systemctl start EasyTalk.service

And then enable it so it will start on boot

sudo systemctl enable EasyTalk.service

Downloads

Case

Box.png
Lid.png
Speaker holder.png
Artboard – 1@2x.png
70EEEBB3-4B3C-4607-979D-181237956E48.jpg
IMG_1553.JPEG
IMG_1631.JPEG
IMG_1632.JPEG
IMG_1633.JPEG
IMG_1639.JPEG
IMG_1640.JPEG
IMG_1643.JPG
IMG_1718.JPEG

I decided to 3D print the case so it can be as small as possible. The print consists of 3 parts, the box itself, a lid and a speaker holder because this doesn’t have holes to screw bolts in.

You will need some bolds as well to screw everything together.

  • 6 x Screws M2 x 6mm
  • 6 x Screws M2 x 8mm
  • 3 x Screws M2 x 16mm

I will be honest though. It took me 4-5 hours to build this thing. Because it is so small, everything just fits and it is hard to screw the bolds in sometimes but it works if you do it carefully.

I also designed a PCB to replace the breadboard, you first need to solder the headers and 5 resistors (4 x 470 Ohm, 1 x 4.7K Ohm).

When you have the PCB, I suggest to start with soldering cables to everything that is supposed to connect to the PCB.

When this is done, you are going to screw the OLED display in to place and connect the PCB to it. The display holds the PCB. You use 6mm screws for this.

Then you screw the air quality sensor where it is supposed to go but this is a little bit tricky because the ADC connects to it. To do this properly so the two components don’t touch each other, you use 16mm screws with 3 x 5mm aluminium tubes that you have to saw. I did this with two screws because I couldn’t reach the third one. You connect the 4 wires where they are supposed to go on the PCB.

Then you connect the audio amplifier to the PCB and put the speaker in to place with the 3D printed holder.

After these steps, the hardest parts are over and you can connect everything else to the PCB and screw it in to place. Note that in the photos you see I use a different temperature sensor, for the final product, I used the temperature sensor with a long cable the runs out of the box because it was measuring the heat from inside the box.

When all of these are in place, you have to screw the Raspberry Pi in. I use the case for this because I don’t trust the heat it produces, this case is there for protection so the 3D print doesn’t melt. Before you screw it in to place, you have to connect the power cable and the aux cable (that you have to open up and solder one wire to and then connect from Raspberry Pi to PCB) because you can’t reach it after.

Then just connect the GPIO header cable from the PCB to the Raspberry Pi and test if everything works before closing the lid.

On the bottom there is a hole where you can connect a tripod but this is optional.

That’s it! I hope you enjoyed reading this article! -Kobe