“Mary Had A Little Transistor”

Our First Project

We are currently making progress with our first mini-project. The idea is to program an  Arduino to make 2 motors play the popular children’s song, “Mary Had A Little Lamb.” We are going to try to make this as creative as possible by adjusting certain variables, coming up with our own lyrics, and attaching a strong speaker to make it as loud as possible. Once we complete this, we will be moving on to our 2nd project.

Arduino-Mega-ADK-Pinout.jpg

The Arduino Mega

What is Arduino? Arduino is both a microcontroller as well as a programming environment. Using the programming language C you can program your Arduino to do many things. The Arduino uses inputs and outputs to perform tasks like activating a motor, flashing a light, or posting a tweet. Arduino is open source, which means that everything is published and available to everyone, which provides guidance for others in addition to inspiration.

Potentiometer

The potentiometer, also called the “pot” for short, is used in our musical contraption to adjust the pitch of the notes. The pot allows you to adjust the resistance by rotating the shaft. The potentiometer has a much smaller nob as well, for adjusting the resistance on a much smaller scale.

Stepper Motorstepper-motor

A stepper motor is a motor that is activated in individual steps. When activated in sequence the motor can be controlled very precisely. This enables accurate control over speed and positioning. Our musical contraption creates tones through stepper motors that make humming noises. By adjusting the frequency of the steps we can change the tone of the motor.

Stepper Motor Driver

What the stepper motor controller does is receive control signals from the Arduino and boost the voltage so that it is capable of driving the motor. The stepper controller both stepper-motor-driverselects the direction that the motor rotates as well as selects at what speed it rotates. The L297 stepper controller operates with the L298 dual full-bridge driver. The L298 is a high voltage, high current, dual full-bridge driver, designed to drive inductive loads such as relays and stepping motors. The stepper controller also regulates the amount of current going to the motor, in addition to selecting direction, speed, and torque.
Voltage Limiting Circuit

Using a voltage limiting circuit we were able to connect the high voltage output from the motor driver to the lower voltage audio connection. This was necessary to lower the voltage going into the speaker that has a built in amplifier.

This project was created by Spencer Weingord and Ravi Prasad as part of a summer electronics challenge.

screen-shot-2016-10-09-at-9-56-53-am

This is the Arduino IDE (Integrated Development Environment). The code language that Arduino uses is C which is fairly simple and easy to use. This piece of code is used to read the infrared remote. All of Arduino is open source.

Our Original Lyrics:

“Mary had a little transistor

Little transistor

little transistor

Mary had a little transistor

That operated at 40 volts

screen-shot-2016-10-09-at-10-29-47-am

WATCH OUR VIDEO

It was a 2n3904

3904

3904

It was a 2n3904

That is what it’s called

It helped drive a switch one day

Switch one day    

Switch one day

It helped drive a switch one day

To turn on a light bulb

Everywhere that Mary went

Mary went

Mary went

Everywhere that Mary went

her transistor was sure to go”

Special thanks to

  • Arduino – https://www.arduino.cc/
  • Adafruit – https://www.adafruit.com/
  • Sparkfun – https://www.adafruit.com/
  • Dang Gang for the blender tutorial and 3D printing help
Advertisements