Musical Pitch Sensor for VEX
Go to Home Page

Special Order        VPITCH    VEX Pitch Sensor    $39.00  

Minimum quantity = 10.   Build time = 6 weeks.  Contact Techno-stuff to schedule build.

The Pitch Sensor lets your robot respond to sounds and musical notes.

One of the ways humans communicate is by sound.  We use spoken words, music, warning bells, etc.  Making a robot respond to spoken words or complex music.is difficult.  Making it respond to simple musical notes is easier.  The Pitch sensor lets your robot respond to simple sounds and musical tones.  The sensor is optomized for use with a flute or recorder.  It responds best to simple tones that have no overtones or harmonics.  The Pitch sensor is compatible with the VEX robotic system.
 

  

       Pitch Sensor.
 


Programming

The Pitch Sensor is programmed like a light sensor. Use the “Light Sensor” block in EasyC to generate the statement

YourVariable = GetAnalogInput (1)

This reads the sensor on port 1 and loads the value into the variable named YourVariable. The sensor value is an integer with range 0 – 1023. (This is actually reading the 10 bit A/D converter in the VEX computer.)


Sensor Output Values

The pitch sensor has a frequency response of 100 Hz to 5 KHz. The response is optimized for use with a recorder or flute.

These values will vary slightly between sensors. The output value may vary slightly as your battery voltage drops. Make your program respond to a range of values.

Response to a recorder

Many school music programs use a low cost wind instrument called a recorder. This is similar to a flute, and produces a pure tone. The Pitch sensor has been optimized for use with a recorder. Maximum distance is about six feet in a quiet room. (Less in a noisy room) Below are some typical VEX values generated by notes on a recorder.

515 All holes open

594 Thumb & top two holes closed.

671 Bottom 2 holes open.

730 All holes closed


Simple and fun Robot.

You can control where this robot goes by playing different notes on a flute or recorder.   You can use a low note to make it go forward.  Use a medium note to turn left, and a high note to turn right.

A variation on this is a break dancer.  Choose random actions for different notes.  The robot will skip and spin as you play a song.


Specifications

Technical Description

An electret microphone drives a high-gain amplifier. The amplifier is overdriven, so the output saturates, producing a square wave. The square wave feeds a charge pump with a bleeder resistor. This creates a voltage that is proportional to the frequency. The voltage controls the current through a transistor, which is connected across the VEX terminals.

Any frequency component that is strong enough to drive the amplifier near saturation will affect the output. Musical tones that have strong harmonic content will produce values that are quite different from the fundamental tone.