Ocarina of Sole(noid)

Our team created a self playing Ocarina. An Ocarina is a flute type wind instrument that plays notes by covering air holes and blowing into a mouthpiece. This project uses solenoids to cover and uncover the holes of the ocarina in conjunction with an embedded processor to play specific tunes and scales.

/media/uploads/kevinrhyne/ocarina.jpg

Hardware

Components:

Setup and Connections:

The Ocarina was set onto a wooden slab and hanger wire was put into place around it. This hanger wire was bent in appropriate ways and the Solenoids were attached with little pads on the end so that they would be covering the finger holes when not activated. When activated the holes would be uncovered as the solenoid retracted.

Ocarina Setup

Ocarina Parts

Because of the lack of solenoids and the size/placement of the holes it was decided that our team would cover the 8th, 9th, and 10th hole while the 11th and 12th would always be open. This allowed for a range of 11 notes and one rest sequence. Below are how the set up was made and what notes were accessible.

Hole NumberCoveragembed
1PadP25
2PadP26
3PadP27
4PadP28
5PadP23
6PadP22
7PadP21
8CoveredNone
9CoveredNone
10CoveredNone
11CoveredNone
12CoveredNone
FibblePadP24

Fingering Chart

Hole (Pin)CDEFF#GG#AA#BCRest
1 (P25)011111111110
2 (P25)001101010110
3 (P25)000111111110
4 (P25)000011111110
5 (P25)000000111110
6 (P25)000000001110
7 (P25)000000000010
Fibble (P25)000000000001

Pin Connections

Because there are 8 sets of MOSFETs and solenoids, in the chart below they are numbered based on their finger hole from the above section.

mbedMOSFET (1)Solenoid (1)MOSFET (2)Solenoid (2)MOSFET (3)Solenoid (3)MOSFET (4)Solenoid (4)MOSFET (5)Solenoid (5)MOSFET (6)Solenoid (6)MOSFET (7)Solenoid (7)MOSFET (Fibble)Solenoid (Fibble)External Power Supply
Vin5V
GNDJP2-2 GNDJP2-2 GNDJP2-2 GNDJP2-2 GNDJP2-2 GNDJP2-2 GNDJP2-2 GNDJP2-2 GNDGND
P21JP2-3 Control
P22JP2-3 Control
P23JP2-3 Control
P24JP2-3 Control
P25JP2-3 Control
P26JP2-3 Control
P27JP2-3 Control
P28JP2-3 Control
JP1-1-
JP1-2+
JP1-1-
JP1-2+
JP1-1-
JP1-2+
JP1-1-
JP1-2+
JP1-1-
JP1-2+
JP1-1-
JP1-2+
JP1-1-
JP1-2+
JP1-1-
JP1-2+
JP2-1 RAWJP2-1 RAWJP2-1 RAWJP2-1 RAWJP2-1 RAWJP2-1 RAWJJP2-1 RAWJP2-1 RAW5V

Because of the nature of the solenoids, our external power source was a 5V/10A source. This was because each solenoid pulled about 1A apiece.

Solenoc Software

The Ocarina of Solenoids is driven by a basic software design implemented in the below (Playing a Song) code. Each Song is constructed in the "buildSong()" function in the Song class. The Song class contains a vector of note/length pairs which is iterated through in the Solenoc function playSong(). This playSong function interfaces the HardwareController and Song classes, where the binary representation of each note is returned through one of Song's member functions, getBinrayNote.

Inside getBinaryNote, each note is represented as a string (notes C, D, E, F, etc.) and converted to a 8-bit binary number. Every individual bit in this number represents a control bit for an individual solenoid in the array of solenoids. The binary representation is returned back up to Solenoc where HardwareController is called with playNote(binaryRepresentation), where the solenoids are driven using the DigitalOut pins on the MBED.

Playing an Arpeggio

Playing a Song

Import programSolenocarina

Self-playing Ocarina!

Team Members

Kevin Rhyne

Clay Proctor


Please log in to post comments.