Smart Desktop Assistant
by Tibo Deneire in Circuits > Raspberry Pi
275 Views, 4 Favorites, 0 Comments
Smart Desktop Assistant
Hello,
I'm Tibo, I'm an 19 years old MCT (Multimedia and communication technology) student at Howest.
What did I make?
A smart robot that you can place on your desk. The robot is mainly for people who spend a lot of time behind their desk/computer and need to move more.
What does it do?
- Measuring the time you spend at your desk
- Measuring temperature, air pressure, air quality, humidity
- Eyes that can change
What makes this robot so special?
This robot also does speech recognition and can also talk back. The robot will also hold a screen with the web interface so that he can also display notifications when something is wrong.
Skills for this project?
You don't need a lot of programming skills for this project. Make sure that you have some basic prototype skills to test your circuit.
In this instructable i'm gonna lead you through all the steps to make your own Smart Desktop Assistent. Clone my github repository for all files. https://github.com/howest-mct/2022-2023-projectone-TiboDeneireHowest
Total costs?
The total cost of this project is €580
Let's start making!
Downloads
Supplies
Hardware:
- ESP 32
- 3x TFT screen
- button
- MQ-135 air quality module
- PIR Sensor
- BME 280
- MCP 3008
- Raspberry Pi model 4B
- Jumper cables
- power supply
- buzzer
- 7inch screen
- microphone
- breadboards
- Raspberry screw header
Tools:
- screwdriver
- screws
Software:
- Arduino IDE
- Visual Studio Code
- MySQL Workbench
3D Printing
print these files, all necessary supports are already placed. so no extra supports needed
Hardware
These are the necessary schematics for making the hardware
Database
All the data collected by my project will be saved in a SQL database with some relational tables.
You will need to import the database into your MariaDB installation on the Raspberry Pi, in order to do this, you can download the database dump to your computer. After that, you can open MySQLWorkbench and create a remote connection to the database server on the Raspberry Pi. Finally, you can open this connection and click 'Data Import/Restore' under 'Administration' in the left column to import the provided .SQL file.
Setting Up the Raspberry
Installation
Download the image
- Download the zipped image to your local computer.
Restore the image
- ⚠ Unzip the file ⚠
- Place the file on an SD card of at least 8GB (16GB) with Win32 Imager or Balena Etcher.
- After the image has been written, you can remove the SD card and insert it into your Pi.
Link Pi
- Boot your Pi.
- Connect the Pi to your computer using a network cable and make an SSH connection in Putty to 192.168.168.169 for the user pi with the password W8w00rd
ATTENTION: The image is made in AZERTY (as opposed to Sensors & Interfacing!)
If logging in fails, try qwerty Z!zààrd
Prepare Pi for further use
- After logging in, type sudo Pi-config.
- In the menu, choose (6) Advanced > (1) Expand Filesystem
- ⚠ REBOOT the Pi
⚠️ ATTENTION: all buses are still deactivated. Don't forget to activate it via Pi-config
SSH and VNC are already activated
Configuration
Provide Wi-Fi access:
- sudo -i to get administrator privileges
- wpa_passphrase <your_SSID@Home> <your_wifi-password> >> /etc/wpa_supplicant/wpa_supplicant.conf
- Replace <your_SSID@Home> with the name of your home network and <your_wifi-password> with the corresponding password.
- wpa_cli -i wlan0 reconfigure to reload your wireless network card in the Pi.
- wget www.google.com to see if the wireless internet is working.
Configure MySQLWorkbench
- Launch MySQLWorkBench on your laptop
- Create a new connection.
- For Connection Method, choose Standard TCP/IP over SSH
- SSH Hostname: 192.168.168.169
- SSH Username: pi
- SSH Password: W8w00rd
- Save this if possible.
- MySQL Hostname: 127.0.0.1
- MySQL Server Port: 3306
- Username: student
- Password: W8w00rd Save this if possible.
Configure Visual Studio:
- Open VisualStudio
- Install the Remote-SSH extension
- Press F1 and type SSH.
- Choose the option Remote-SSH: Add New SSH Host
- Type ssh pi@192.168.168.169 -A
- Choose an option to save the file.
- Press F1 and type SSH.
- Choose the option Remote-SSH: Connect To Host
- Choose the option 192.168.168.169
- A new window will open and the password for the Pi will be requested.
- Type W8w00rd
- After this, Visual Studio Code will open the connection and install a number of things on the Pi.
Be patient. This will take a little longer the first time.
For Windows : py -m venv venv
For Mac : python3 -m venv venv
Then in VS Code close the terminal and open a new one and check if you are working in your venv.
Installing the necessary packages via pip
- First we will now install the necessary packages on our newly created venv. For your convenience, we have stored all the necessary packages in the requirements.txt file. (is already in repo, of course additional packages may always be needed)
- Installing the necessary packages can be done with the following command:
- For Windows logo : pip install -r ./requirements.txt
- For Mac logo : pip install -r requirements.txt
Flash secret
- Change the secret of the Flask server in app.py to a random string
Building the Robot
To assemble the robot take all the pieces and follow the instruction video. where you put the robot together step by step
Downloads
Building the Bell
Make:
To make the bell follow the steps in the video
Code:
- Open Arduino IDE
- choose your microcontroller for me the nodemcu 32
- paste the code.
- upload the code
Coding the Project
now that everything is ready we can finally start coding the robot.
all code can be found on my github account. follow all further steps in the docs folder to make this robot work fully automatically.