Blog - Sketching with Hardware

Team 7/8 – The Magic Mashroom

Published on: | Author: Sven Unnewehr | Categories: 2015a, Projects

The Magic Mashroom 

Screen Shot 2015-04-07 at 23.03.32

The Team

Our group consisted of 3 students from the LMU : Sven, a master student in ‘Mensch-Computer-Interaktion’ with Alina and Chris, two bachelor
students in ‘Kunst und Multimedia’. We have been assigned group 7 and 8.

Keyboard hacking

Screen Shot 2015-04-07 at 23.02.53

On the first day our task was the simple keybord hacking. Our goal was to build a controller for the minigame Doodle Jump. We built a two-sided-controller, each side for the moving direction of the avatar (left or right). We used two plates of plastic and connected them to the keyboard circuit board. If you jump the left plate, the avatar in the game moves to the left and viceversa for the right plate.

The Concept

After some Brainstorming, we came to the idea to build the ‘Magic Mashroom’, our Arduino Music Instrument. This Mashroom creates an atmosphere depending on incoming impulses the user chooses. The atmosphere is created by a specific rhytm of music, a flashing light and the rotation of the mashroom. Depending on the different kind of music, the Mashroom creates a suitable athmosphere. If the Music is slow, the rotation e.g. is slow. If the Music has a high-frequented beat, the flashing light of the LED is flashing fast. As a special feature, we built a wind chimes inside the head of the mashroom.

Model Building

Screen Shot 2015-04-07 at 23.06.01

The mashroom head is a plastic bowl laminated with a lot of red and blue sheets formed as diamonds. Our stem is a plywood box, painted white. The stem’s cap is painted green to symbolize the grass. Those two elements are connected with a bar of wood, whose rotation is controled by a motor; so the mashroom’s bowl is able to circulate.

Implementation of the motor


The motor is one of the most important elements of our construction. Being fixed to the stick thus to the dome it is responsible for the whole rotation of the Magic Mashroom. For this reason it was necessary to check the function of the motor right after buying the equipment in order to start the realization of our project without problems. In our case we worked with a motor driver shield which is Ardunio compatible and the easiest way to implement and control a little low-voltage motor. With the help of our wonderful data sheets (DRV8835) we explained ourselves the different connections and their function. On the shield we soldered some headers supplied with the motor driver shield which are supposed to plug it on the original breadboard. Afterwards we matched the appropriate connections with the Arduino pins. Two of the connections are very important: The ENBL pin controls the speed of the motor and the Phase pin controls the motor direction. Some teams (I won‘t tell you names 😉 ) lost precious time asking themselves why the motor doesn‘t work with the software before they understood that they mixed them up. So it is quite useful to check them twice or mark them before coding. With GND and VCC corresponding to GND and 5V on Arduino we connected the Arduino side of the shield with logic power. The right side of the shield is the motor side and is connected to the battery/ motor power and the motor itself.

Our choice of LEDs


During the introduction days we directly fell in love with the RGB LEDs. That‘s why we were keen on using them for our Magic Mashroom as well. In our imagination it was perfect: A dancing mushroom which shines in a particular color corresponding to the mood of the melody playing. The mood should be figured out by the pitch level of the notes. In theory no problem but once we arrived in the electrical shop we recognized that our concept wouldn‘t work that way. As we wanted to illuminate a little dome for our mushroom top we were looking for big RGB LEDs and that‘s were we met obstacles. Big RGB LEDs as components are usually not in stock because having an extra cooler makes their setup quite tricky and expensive. A lot of little LEDs which are quite common and less difficult to implement would need a lot of cables which would cost us a lot of time and patience. So we all wanted to evade those kind of situations. At this moment it was obvious that even if we stick to our idea we had to go to plan B. Our alternatives were two little round boards each one 5 voltage with several little LEDs on top. Their light is a warm white light which we considered to be sufficient to illuminate the whole mushroom. Even if this was not our first choice we were quite happy with the light effect once we fixed the two LED boards under the opaque plastic dome.

Implementation of LEDs

As our motor driver shield was equipped with two connections we quickly came up with the idea of using the second connection which is not occupied by the motor for our new LEDs. The only problem we could see before trying it was the fact of plugging some LEDs which react just on HIGH and LOW signals to a connection which works in two different directions. In order to cause no damage which could affect us afterwards we first connected the shield with some cheap LEDs. But surprisingly it worked well and the LEDs turned on. We already thought ourselves safe – Too early? We then soldered some cables onto the LED boards, wired both of them parallel and connected the main LED board to the motor shield pins. All in all this seemed relatively simple but quite the opposite of the hoped-for result happened: The big illumination stayed out and our mushroom remained dark. Everything could be easy but unfortunately it wasn‘t. As the big LEDs didn‘t work with the motor shield we had to implement them in an other way. For this reason we had to face the implementation of transistors which can switch the electrical power trough Arduino. We were not so happy with this alternative as we were told that transistors always cause problems but there was no other solution. So at the end we connected the LED boards trough our breadboard with a power adaptor of 12 voltage which is down-regulated to the 5 voltage of Arduino by our transistor. And finally we succeeded. Let there be light! Later on we matched the light signal with the notes played by our Magic Mashroom. Note on turns the LED on, note off turns the LED off. Now our little mushroom was able to play a little melody and to blink in rhythm with the music.



Next, we worked on assembling the speaker which is supposed to play the audio signal that is received from the input MIDI port. Our first approach was to use a battery driven speaker with a built-in amplifier. However, this speaker had a 3.5 mm audio jack and connecting it to the Arduino was not trivial because there are no adapters. After some unsuccessful attempts we decided to use a simple speaker and a separate amplifier as seen in the picture. We quickly managed to successfully connect the speaker and play basic sounds using the Arduino. Nonetheless we quickly faced another challenge: the volume of the speaker was lower than we expected. After some experiments we found out that the low voltage supplied by the Arduino was the root of the problem. We changed the power supply to a 12V battery and immediately achieved a very loud and promising volume.

MIDI Ports

Screen Shot 2015-04-04 at 19.02.14

Finally, we came to the last missing part of our Magic Mashroom: the MIDI ports. Not only were the MIDI ports a requirement for the project itself, they were also essential for the functionality of our device. The MIDI ports make it possible to receive an audio signal that can be transformed, played and then sent over the output MIDI port.  Wiring the MIDI ports was simple because they only use three pins for voltage, ground and the audio signal. Furthermore, the input and output port were identical. The last and most difficult step was to adjust our software and test the functionality. For testing we used a USB to MIDI device that allowed us to send and receive MIDI signals using a computer. After getting everything to work it turned out that we were the first group with working MIDI ports and that our Mashroom was the perfect testing device. Other groups could plug in their output or input port and the Mashroom either played the ingoing signal or supplied an outgoing test signal.


After wiring everything up and making sure all electronics were working as expected, we focused on fine-tuning the Arduino software. Writing the software was an ongoing process because it was required at all stages to test the components and the wiring.
The general functionality of the software was relatively simple: Read a MIDI signal, modify and play it, control LEDs and engine and finally send a MIDI output signal. For everything sound-related we used the Arduino Mozzi library that provides many pre-made sound transformations and effects. One disadvantage of this library is that it puts the Arduino to its limits and changes many basic behaviors, e.g. delays and timing. For reading and sending MIDI signals we also used a library that made the process very simple. Finally, the LEDs and engines were adjusted to the incoming audio signal, i.e. the engine speed was based on the amount of tones and the LEDs were turned on and off when notes were played. By doing this, the Magic Mashroom rotates according to the speed of the incoming song and also blinks in rhythm to the music.


Concerning the creative and technical work in a team we all took a lot of different experiences from this course. The most important thing for us was the motivation and the fun we had during the introduction days and the realization of our Magic Mashroom. Sketching with hardware increases the curiosity to open electric devices and to play with electric circuits even if you never thought that you will love this. After some days it makes you want to do it again and again. And yes WE want to loose our nerves again if something doesn‘t work after trying a thousand times for just having this little second of joy if something is moving, blinking or making an annoying sound.

Video: See the Magic Mashroom in action!

linked categories 2015a, Projects


Write a comment