Our last few projects posted on instructables have been viewed over 100K times and been liked by thousands of people. You can find them at ReRouter - Make an Extensible IoT Router and Smart router with WiFi Connection Visualization. In fact, they are all about smart controls.
The popularity of these kind of projects has inspired us to move forward and contribute more on it. We decided to make a serial of smart IoT devices that can be used to build a smart house for ANYONE.
Now we are starting from this one - the DIY Personal Voice Assistant based on Raspberry Pi.
Step 1: Prepare the Parts - Electronic
Step 2: Prepare the Parts - DIY the Enclosure
DIY Enclosure For the Device
We've designed and laser cut a neat enclosure for this device which you can download it at here (Enclosure laser cut design)
You would need to the following parts for the assembly:
- 6x M3 female-female Aluminum standoff (30 mm)
- 4x M3 brass male-female standoff (7 mm+6 mm)
- 4x M2 brass threaded standoff (10 mm)
- 10x R3 Rivets (9 mm)
- 16x M3 stainless steel screws
- 4x M3 stainless steel nuts
- 8x M2 stainless steel screws
- 4x M2 stainless steel nuts
- 1x Screwdriver
Step 3: Wiring the Electronics
Connects all the electronic parts as instructed in the image of this section.
Step 4: What Would It Do
This Personal Voice Assistant can do the following jobs:
- Make the Raspberry Pi speak
- Connect the device to my Evernote
- Get the time status over the internet
- Acquire weather information onopenweathermap.com
- Update all the data and info on the Grove - OLED
Now the following steps will show how to achieve those functions one by one.
Step 5: Make the Raspberry Pi Speak
We use espeak to do the TTS work.
- Install Espeak
Open your favourite terminate and excute the following commands
<p>sudo apt-get install python-dev<br>sudo agt-get install espeak sudo apt-get install python-espeak</p>
- Test it
espeak "hello world"
- Install Talkey
Talkey is a simple Text-To-Speech (TTS) interface library with multi-language and multi-engine support.
<p>pip install talkey</p>
- Test it in python
<p>import talkey<br>tts = talkey.Talkey() tts.say('Old McDonald had a farm')</p>
pip install talkeyTest it in python import talkeytts = talkey.Talkey()tts.say('Old McDonald had a farm')
Step 6: Connect the Device to My Evernote
In order to hack the Evernote, you need to be registered as developers or Evernote, Click here to get started.
The Quick-start guides will show you how to install and configure the Evernote SDK for your chosen language or platform. Here we select Python as our develop language.
pip install evernote
The topical Articles describe individual concepts or functions used when interacting with the Evernote API. You’ll probably spend the majority of your time reading these, as they make up the majority of the documentation. They are organized into sections by general topic.
Finally, the API Reference contains a comprehensive listing of all types, functions and enumerations exposed by the API.
Step 7: Download the Code
After you install the required environment, you can download the code from the GitHub.
git clone <a href="https://github.com/Lee-Kevin/VoiceAssistant"> https://github.com/Lee-Kevin/VoiceAssistant </a>
Then open the VoiceAssistant.py and change the dev_token and noteGuid to your own.
<p>dev_token = "your own token"<br>noteGuid = "your note book Guid"</p>
And the run the code to have a test
Step 8: Setup the Startup Script
Copy the startup script file 'assistant' to '/etc/init.d'
sudo cp assisant /etc/init.d<br>
And then set the file to execute
sudo chmod +x /etc/init.d/assistant<br>
Start the app
sudo /etc/init.d/assisant start
Stop the app
sudo /etc/init.d/assisant stop
At last, you shoud set this app auto run when the system is boot up
sudo update-rc.d assisant defaults
And then reboot your Raspberry Pi
Step 9: Assemble the Enclosure
Now we've done all the software part and it's time to make it looking good.
Firstly, laser cut the boards and prepare all the hardware as instructed in the Preparation Section.
Here we've cut a 3 mm thick wood, you can download the drawings by click here.
Then we need to cut the the board using laser cutting. I guess you don’t have a laser cutting at home, you can find some in the hacker space near from you easily. If there's no hacker space nearby, you can try the Laser Cutting Servicesupply from Seeed.
- Fixed the hardware on backplane with Screws and rivets(Image 1)
- Attention to through the welding wire to the hole(Image 2)
- Fixed the side panels with standoffs(Image 3)
- Then, fixed the top plane(Image 4)
- Finally, riveted outermost wood(Image 5, 6)
Step 10: See the Final Results
Now, Every time when I touch the door handle, the Raspberry Pi 3 will tell me what the weather like outdoor, and what I should do before I go out. The only thing that I need to do is add items on my ToDo List just as below shows.
Step 11: A Few Words to Share
Working at Seeed we are encouraged to use open hardware to build projects we love at our free time, and share it to the community.This project is made as an Open Source Project and it's actually just a starting point.
Every one of us are born with unlimited creativity and we want you to let it go wild. Starting from your first project. Make it work, and make it look nice. No matter what what you create, share it with others.
Let us share our experience to the community and make progress together.