Software > Software

MIDI Conrolled Animatronic project


I am planning on using a 16 track MIDI controller to save and send wave files with PWM data which can be converted and sent to a PWM amplifier to drive the servos. 

Can I save PWM data on a wave file?

I was reading that I could use Audacity with the PWM plugin to generate these files.  I am not well-versed in WAV files and could use some help.  Having the midi controller would allow me to sync movement to music and sound.

Has anyone done this or know how it could be done. 

I have 11 servos to control.


I'm not sure what you mean by "saving wav files with PWM data".
(-and I thought a MIDI source would only send MIDI files? but anyway-)

There is already a lot of guides online that allow you to connect an Arduino to a MIDI output, and then have the arduino control LEDs in response to MIDI signals fed to the Arduino.
So you could just use plain MIDI files to do it.

It might help to know your level of experience with building electronics.

If you don't have any experience with DIY electronics--then this may seem like it's complicated, but it really isn't difficult to do.

This page describes a project to use MIDI signals sent to an Arduino to turn LEDs on:
The way they are turning a LED on and off is almost the same as what you would do to make a servo move.

To keep this as simple to do you would want a board that has enough PWM output pins (each PWM pin can operate 1 servo).
An Arduino Uno only has 6 PWM outputs so that's not enough.
An Arduino Mega costs more but already has 15 PWM outputs, so it could run as many servos as you wanted, directly.
This isn't the cheapest way to do it, but it is the easiest way.

The MIDI jack connects to the Arduino with only 3 wires and a couple resistors.
Each servo has two power wires that connect to 5v DC and 1 signal wire, that connects to a pin on the Arduino Mega.
You would want a power supply at least 7 volts for the Arduino board, and you would need a 5v power supply for the servos. There is different ways of doing that.

The Arduino sketch you may not know how to write, but if you get the hardware connected, people online will help with writing the sketch.

You would need a soldering iron and solder, and a multimeter.
A cheap soldering iron will probably work well enough.
Any cheap multimeter will work, it doesn't need to be expensive.

What it will cost depends on what country you are in, and how cheap you can obtain the parts.


[0] Message Index

Go to full version