January 29, 2019

Raspberry Pi Alarm Clock Update #3 - Troubleshooting and Returning to School

I am writing this update as I am returning to school and won't be as focused on this project Future updates will be posted, but here is a summary of everything that has occurred since the last update.

All of the parts have arrived except for the screen which has allowed me to setup and test the "final" hardware, including the microphone, speakers with amp, and all of the code.
The amplifier makes the speaker REALLY loud, and the microphone is adequate, but I hope to upgrade to a MEMS microphone.
The (almost) complete hardware, including Amp (top), Microphone (right), USB DAC (Left), Raspberry Pi (Far Left) and Stereo Speakers (Bottom)
The first problem I encountered was the microphone being used by another unknown process that took me a few hours to find and stop, which has not started again even after reboots. Once this was fixed, I was able to successfully start the Assistant script.
After that, the speakers gave out a persistent buzzing sound that was very annoying. I first looked into how to stop it, but couldn't figure it out. The next method I discovered to combat this was to use a standby pin built into the Amp which when grounded mutes it, and when not it plays audio. Using this idea, I found a file in the OS (thanks to stack exchange) that states whether or not audio is being sent to the speakers, which I then used in a script which constantly reads this file and mutes the amp unless there is audio being sent. Success! The buzzing still occurs in the background when audio is playing, but this will do until I figure out to fix it.
The standby pin used to prevent buzzing (Labelled SD)
A final note is that I clogged my 3D printer while printing a part for someone else which prevented the extruder motor from rotating which in the end killed it. This means I can not print the top of the casing until I can replace the whole extruder. This will delay the final product.

The list of future software additions to this project include playing a sound when the Assistant is listening and thinking, and eventually getting the Assistant's response as a visual text output on the clock face. Also, I hope to be able to adjust the screen brightness according to time of day and if the assistant is interacting with the user or not. This is all for another update.

If you have any feedback, questions or answers to my problems, please leave a comment.

Check out all the posts for this project here.

January 18, 2019

Raspberry Pi Alarm Clock Update #2 - Modelling the Casing

This is a quick update about the progress I made today on the casing.

I have finished modelling the casing to the best accuracy I can get without having all of the components to measure. It took many hours to model the top portion that will house the speakers, microphone and screen as well as cover the Raspberry Pi. It wasn't made easier by the many weird changes and "glitches" (aka occurrences I didn't understand or want) that occurred when I changed some dimensions, including sections of the models disappearing.
The current state of the entire casing, represented as a wire frame. (Above)
The top (above) and base (below) of the casing
This is all I was able to do today, as the rest of the components haven't arrived as of posting. I will release more updates as more parts arrive and changes are made to the model.

Check out all the posts for this project here.

January 17, 2019

Raspberry Pi Alarm Clock Update #1 - Starting Software

This post is the first in a series over the next few weeks (maybe months) where I will document my current project of building a Raspberry Pi powered Alarm Clock with PiClock and the Google Assistant.

Because I have had the Raspberry Pi for a while, I started by connecting it to my computer and setting up the software. I started by setting up PiClock, which was a breeze as it had clear instructions on installation and setup. The Google Assistant was the hard part.
PiClock running on my Computer (Screen 1 & 2)
Both PiClock and the Google Assistant run in Python, so it will be easy to (later on) add the transcript from the Assistant to the alarm clock screen, as well as raise screen brightness when listening/ responding, etc.

Over the past few weeks I have been ordering and experimenting with the different components I will need to finish this project. In the beginning, I thought all I would need is a Raspberry Pi, a screen, a set of DIY speakers, and a DIY microphone. The first 2 parts have been as simple as they sound, but the speaker and the microphone have taken lots of time, as I have learned more than I could have imagined about them. Mainly, that speakers and microphones need amplifiers.
DIY Microphone (Left) and DIY Speakers (Right)
They both worked, it's just that the microphone was so quiet i would not hear it at even the highest volume, and I could hear the speakers at full volume, but they were still not the advertised 79db.

While I'm waiting for the screen, speaker amplifier board and microphone to arrive, I have begun modelling the case I am going to print in my wood filament to make it look like an alarm clock. This will save me time when the parts arrive as I'll only have to change dimensions, not create the entire object model.
Unfinished base of casing
I will post updates whenever I work on aspects of this project, but it will take time to complete. The thig with DIY electronics though, is that when it works in the end, you have gained 3 things. Knowledge, experience and a useful device. 😉

Check out all the posts for this project here.

Ad