Adding radio streams to the cooler with a Raspberry Pi

Using a Raspberry Pi and the program MPD to enhance my audio cooler

Introduction

In my previous blog post I finished my audio cooler. It’s a small cooler with a tiny audio system that nevertheless sounds good. The only way to control the audio is through a wired connection. It would be a nice addition to have some kind of remote control either by WiFi or Bluetooth. While testing the cooler I’ve got the idea to connect a Raspberry Pi A+, that was still unused, to the cooler and stream audio over WiFi to the Pi.  This could be useful for a garden party or BBQ where WiFi is available and I don’t want to attach the smartphone to the cooler. In this blog post I’ll share my experience with installation and operating the software needed for this project on the Pi.

P1020957
Raspberry Pi A+ (in it’s Pimoroni Pibow case) connected with the headphone jack to the cooler. The Pi has a small Edimax Wifi adapter.

Installing music software on the Raspberry Pi

Since I run the Raspberry Pi headless I use SSH login to the Pi. SSH is available for most operating systems with the notable exception of Windows. I already had Raspbian installed on the Pi so first I updated the OS. Continue reading “Adding radio streams to the cooler with a Raspberry Pi”

Audio system for cooler almost finished

A made a 3d printed enclosure for the audio components that fits in the coolers lid together with a simple console to operate the audio

Introduction

A couple of weeks ago I started to make a tiny audio system for our cooler. In my previous blogpost I described all the audio components that I chose for this project. I wanted the components to be small since I didn’t want to waste too much space in the cooler. With the audio components in hand I could design other parts for the audio system. I needed an enclosure for most of the audio components and a simple console to operate the audio. The parts were 3d printed with my Hephestos 2.

The complete audio system in the lid of the cooler. Most components are placed in the 3d printed enclosure.
The complete audio system in the lid of the cooler. Most components are placed in the 3d printed enclosure.

Continue reading “Audio system for cooler almost finished”

Making a tiny audio system for our cooler (part 1)

I’m selecting components for the audio cooler that I’m going to build. The components need to be tiny to fit in the coolers lid

Introduction

For picknicks we use a small cooler and with the upcoming spring and summer it seems like a great idea to add an audio system to it. Most DIY coolers with audio that I found on the internet are huge. Not only do they have large speakers and amplifiers but they also have a huge lead battery hardly leaving any space for the picknick gear. I want a tiny, one speaker system that sounds nice but is lightweight and leaves plenty of room for the other stuff. I also wanted it nicely integrated in the cooler without too many wires. I therefore started to design and build one.

Choosing the audio components

I started this project by choosing a suitable battery. As stated above lead batteries are relatively large due to their low energy density. Lithium polymer batteries on the other hand have large energy density, four to five times higher than lead according to this source. Prices of polymer batteries are also very reasonable nowadays.

P1020813
Lead-acid battery (left) and polymer battery (right) side by side on the small cooler. The much bigger and heavier lead-acid battery has a capacity of 5000mAh (6V) while the lithium polymer battery has 1200mAh (3,7V). The lithium polymer with it’s four to five times larger energy density is therefore perfect for my small audio system.

Continue reading “Making a tiny audio system for our cooler (part 1)”

Darth Vader chest box finished

Most impressive. Obi Wan has taught you well.

The main features of the Darth Vader chest box are:

  • enclosure laser cut plywood (6mm)
  • easy control with four push buttons
  • DIY voice changer circuit with Holtek HT8950A
  • LM386 amplifier
  • build-in speaker
  • audio-in (3.5mm)

When I started the Darth Vader chest box early december 2015 I didn’t expect it would take me almost two months. Finally this week I finished it and I’m happy to say that it works great. For a couple of weeks it was almost finished but there always seemed to be some work to be done. A major problem was that I couldn’t get the 3D printed container for the audio-jack right. I tried it several times at my local fablab but it just didn’t fit. Finally I ordered the container from 3D Hubs and it had a perfect fit. Continue reading “Darth Vader chest box finished”

The Darth Vader chest box is almost finished

Introduction

The last month I’ve been working on my Darth Vader chest box. I’ve designed and built my own circuit with the Holtek HT8950A voice modulator, I create a laser cut case and designed 3D printed parts for the chest box. Since I had to learn a lot of new techniques, e.g laser cutting and 3D printing, this is by no means an easy project for me. With the project in it’s final stages now some design problems turn up that need fixing.

Soldering the board.

This week I soldered the components to the board. First I soldered the voice changer components and made sure this part of the circuit is working. Next I soldered the amplifier. I tested the total circuit and it worked the first time which is always a joyful moment. I find the Adafruit perma-protoboard very easy to work with since I’m able to copy the layout from the breadboard. Next I grouped all the buttons that operate the HT8950A on a board and soldered them to a piece perfboard. The buttons on the perfboard fit nicely into the laser cut side panel that I already made. Operating the chest box is easy with this (a major issue with my previous chest box).

Soldered perma-protoboard and breadboard side-by-side.
Close-up of the soldered board with the HT8950A voice changer chip on the right and the LM386 amplifier on the left.
Operating the voice changer with this panel should be easy.

Design issues

Last week I made 3D printed parts for the front of the chest box. Unfortunately I found that these parts didn’t look good with the laser cut box. The plastic parts just didn’t do justice to the laser cut plywood. I therefore decided to laser cut all the parts that sit on the from of the box with I think is aesthetically more pleasing.

Another problem arose with the female audio jack connector that I need to plug in the microphone. The thread of this 3.5mm connector just isn’t long enough to be fitted onto the 6mm thick plywood. I designed a container to solve this. The audio connector fits into this container and the container is screwed to the case. Hopefully this container solves the problem.

Container for the audio jack connector created with Openscad. The container, screwed to the chest box, will keep the audio connector tightly to it’s place.

Yet unsolved problems

  • I need to attach a nylon belt to the chest box. I’m thinking about popper snap fasteners attached to the belt to open or close the belt.
  • The HT8950A works fine with a proper audio signal as input but the microphone that I have, a small electret microphone, doesn’t give any audible output (except for noise). I assume that the signal is to weak and therefore needs amplification.

Homemade Darth Vader Voice Changer 2.0 (work in progress)

Introduction

The last couple of weeks I worked on a homemade voice modulator that is easy and cheap to built. First I’d like to mimic the Darth Vader Voice Changer, but with the press of a button it can be changed to robot or helium kind of voice effects. Last week I’ve steadily continued my work. The project has two main parts, the electronics and the case.

Electronic circuit

For the project I choose the HT8950A voice modulator from Holtek as the heart of the circuit. It is cheap, versatile and easy to work with. I previously had the voice modulator working. I only had to amplify the signal which seemed simple enough. Well, that turned out to be a bit more troublesome than expected. After connecting the LM386 to the circuit and powering it up an annoying hiss was introduced. After some experimenting I figured that the breadboard was to blame and decided to copy the circuit to another breadboard. Although on the new breadboard the hiss appeared somewhat reduced but it was still at an unacceptable level. Even when I removed the input signal from the LM386 the hiss continued. I connected the HT8950A with a audio-jack to an external amp. I wanted to make sure that the hiss was coming from the LM386. With the external amp the hiss was gone. The fact that I had hiss without an input signal indicated that the supplied voltage wasn’t clean.  To clean it up I placed a small capacitor (10nF) from pin 6 (V+) to ground and voila the hiss was gone (see schematics below). It took me some time but I’m almost ready to finish this circuit and solder it to perfboard.

Two (almost identical circuits) with the Holtek HT8950A voice modulator and the LM386 amplifier. Both circuits gave a hiss which was unacceptable. Eventually a simple 10uF capacitor from pin 6 to ground did the trick for me. 
Schematics of the Darth Vader voice changer. I was able to eliminate all the hiss and noise from the LM386.

Printing the case.

I decided previously to make a T-slot plywood case for the Voice Changer but I’m not satisfied with the result. First I made a beginners mistake with the tab width. It was chosen poorly resulting in fragile edges of the case. Also I discovered that a T-slot case is not the best choice for this project. The case needs to be sturdy and the T-slot isn’t. I’m afraid it will fall apart when in use. Therefore I’ll made a regular finger joint that will be glued together. This new case was much better. Gone are the fragile edges and I’m confident that glued together it will be very sturdy.

Laser cut case made out of plywood. I first used a T-slot type of case but made a beginners mistake with the tab width and positioning. As a consequence the edges become very fragile. The front of the case has engravings for the positioning of large controls of the voice changer. These controls on the front will we dummies just to mimic the look of a Darth Vader voice changer. The actual controls will be on the side of the box.
Laser cut case with regular finger joint. This attempt is much better.

Making a Darth Vader voice changer, part 3

I finally finished the Darth Vader voice changer this weekend. I took a belt with two snap hooks from an old bag. Next I fitted the box with the voice changer with two black screw eyes that were large enough for the snap hooks. The enclosure is now comfortable around the neck of a child. In a local electronics shop I bought a case for a 9V battery that fitted nicely in the box. Finally I taped the mic into the Darth Vader mask and the fun could begin.

My two boys both volunteered and got dressed as Darth Vader.  We still have a dark cloak that goes well with the mask. Unfortunately we sold the lightsabers a couple of years ago. The Darth Vader voice is surprisingly convincing but only if you play around with the settings. Even funnier, you can make Darth Vader sound like a robot or as someone that has just inhaled helium (a very high pitched voice). I can imagine children having a lot of fun with the voice changer at a party or at Halloween.

Is there something left to be desired? Yes, the voice changer has four buttons for robot voice, vibrato, higher or lower pitch. As mentioned before I somehow couldn’t get the external red push buttons functioning that were placed on the enclosure. So I used the pushbuttons on the MK171 board instead. To access the four pushbuttons on the MK171 board I need to open the enclosure. This is far from ideal and something that needs to be fixed in my next version of the voice changer.

Darth Vader complete with mask and cloak. Unfortunately the lightsaber is missing.

A Belt with two snap hooks, screw eyes and battery holder for a 9V battery complete the Darth Vader voice changer.

Enclosure, now with screw eyes.

Inside of the enclosure with battery holder.

Making a Darth Vader voice changer, part 2

About a week ago I wrote about a Darth Vader voice changer that I am making. I finally have finished a prototype but not without problem. I soldered all the external components to the Velleman MK171 kit. When I tested the circuit I discovered that three red pushbuttons (see images below) weren’t functioning. I disconnected all four red pushbuttons and tested them on a breadboard with an LED. They all worked fine. I reconnected the buttons to the kit and again three of them didn’t work. Running out of ideas and time I decided to use the regular mini pushbuttons instead that came with the kit. The voice changer works excellent and the sound is loud (due to the 2 inch speaker and the box) and resembles Darth Vaders however changing the voice requires opening the enclosure which is far from ideal.

There is still a little work left. I have to attach the mic to the inside of the Darth Vader mask and I need something to easily lock and unlock the back of the enclosure.

Image of the Darth Vader voice changer with the mic lying on top. The red pushbuttons are not attached to the pcb.
Back of the voice changer with the microphone wire.
Inside the enclosure of the voice changer. The pcb is mounted on the back of the enclosure.

Making a Darth Vader voice changer, part 1

To be able to mimic Darth Vader during a party or any other occasion is a lot of fun. Unfortunately commercial solutions are costly. The Hasbro Star Wars Darth Vader Voice Changer costs $145 on Amazon. So why not make one myself. My voice changer will consist of the following parts: a cheap Velleman kit (MK171), a wooden enclosure for this kit and a simple plastic Darth Vader mask that we already have.

The MK171 kit consist of a PCB and all necessary electronic components. The most important component in the kit is the HT8950 chip. This 16 pin chip (from Holtek) is designed for voice modulation. The frequency of the input audio signal can be shifted up or down by the chip. Changing the output can be accomplished by four push buttons for: shifting frequency up, shifting frequency down, vibrato effect and robotic effect. For my purpose I’m interested in the frequency down function since this invokes a lower pitch to the listener, exactly what is needed for this Darth Vader type of voice. This way even a kids voice can be changed to Darth Vader’s.

A small microphone is included in the kit to supply the input signal. I intend to integrate the microphone into the simple Darth Vader mask (possibly with velcro), close to the mouth. The sensitivity of the microphone is controlled by a trimmer. The output of the HT8950 is amplified by a LM386 OpAmp chip. With enough amplification and a proper speaker (not included in the kit) the sound effect can be overwhelming even when one speaks softly into the mic. Amplification is controlled by a yet another trimmer that is included in the kit.

The wooden enclosure is made of plywood. Four equal pieces of 15 x 7 x 1.2cm. The front and the back are made of 6mm thick plywood. Besides MK171 kit the enclosure needs to accommodate: control buttons for the  HT8950 chip, speaker, potentiometer to control the volume and an on/off switch.

Next step is to finish the enclosure and fit all external components. Then I need to test the MK171 kit with the external components before fitting it into the enclosure. Lastly complete the set with the mic integrated in the Darth Vader mask.

MK171 kit, wooden enclosure and Darth Vader mask. The three parts needed for the cheap Darth Vader voice changer. 
Work in progress. The enclosure of the voice changer with the external components. The four push buttons at the bottom left to control the HT8950 chip.
Spray painting the wooden enclosure in an improvised card board paint booth.

Create a simple Audio Amplifier (LM386) part 2

Begin this week I created a simple Audio Amplifier with the LM386 (see previous entry). I noted that there was some noise coming from the speakers. I already had a 100uF capacitor on the breadboard to smoothen the power fluctuations. I searched the internet for solutions to further reduce the noise. I found three possible measures.

  1. Connect a 10uF to pin 7 of the LM386. In the schematics from HackaweekTV pin 7 (bypass) is not connected. On the website Learning About Electronics I found a tip to connect 10uF capacitor to this pin and ground it. Here is a link.
  2. On a another blog (Low Voltage. Mostly Harmless…) a 10nF capacitor is added to pin 6 and ground. Here is a link to this article.
  3. This is a feedback the LM386 output (pin 5) and pin 8. The feedback includes a 10k resistor and a 10nF capacitor in series. I found this tip here.
I included the three measures one after the other on my breadboard and then played some music. I found the the 1st and 3rd measure had a significant audible effect. The 2nd remedy, the 100nF capacitor added to pin 6, didn’t have an audible effect. With the combined measures the noise was indeed reduced to a very acceptable level although it was not entirely gone.

For a video that demonstrates the Audio Amplifier see below.

Original ‘noisy’ circuit.

Improved circuit with significantly reduced noise. The 10uF capacitor between pin1 and 8 is removed. I didn’t need the additional gain.