making a device for generating different vibration frequencies

I hope someone can help me build a small device which can easily generate different vibration frequencies. I am currently currently driving a 'precision microdrives' 8mm vitration motor (ie a small button that vibrates) using arduino, however, the signal is not 'pure'; it is contaminated with other frequencies than what I nominate within my ardino protocol.
Can anyone suggest a small (no greater than 1cm) device that can be driven by arduino to vibrate at different frequencies (between, say 10-100 Hz). Even placing a rod on a small speaker might work.......

To provide further information, here is the protocol I'm currently using to drive my microdrive.....

int high_in_millisecond = 50; // how long 5V is sent (in ms)
int low_in_millisecond = 150; // how long 0V is sent (in ms)
int nb_of_iterations = 20; // nb of pulse repetition
int my_pin = 5; //avoid pin 13, 0 and 1

//--------------------------------------------------
//--------------------------------------------------

// the setup routine runs once when you press reset:
boolean todo = true;
void setup() {
pinMode(my_pin, OUTPUT); // initialize the digital pin as an output.
}

// the loop routine runs over and over again forever:
void loop() {
if (todo) {
for (int i=0; i < nb_of_iterations; i++){
digitalWrite(my_pin, HIGH);
delay(high_in_millisecond);
digitalWrite(my_pin, LOW);
delay(low_in_millisecond);
}
todo = false;
}
}

Thanks immensely for your time and I really appreciate any input you're able to provide. Cheers, Lucy

Why does it need to be so small?

The problem is that you're driving it with a square wave, which contains all the odd harmonics of your fundamental frequency. If you want just one frequency, you must synthesize a sine wave. That's a little hard to do cleanly in an Arduino, but it's possible for very low (<100Hz) frequencies.

You will need to read the mega328 datasheet about the internal operation of Timer2, which is 8 bits. By carefully programming that timer, you can get PWM signals at up to I think 62.5kHz and with a suitably sharp analogue lowpass circuit (200Hz?) you could filter out much of the PWM noise.

Having configured Timer2 for high speed PWM, you also install an overflow interrupt handler on it, in which you compute the pulse width for every PWM pulse, and you vary them sinusoidally at your chosen frequency. Using a precomputed sine table (in PROGMEM), you can synthesize fairly clean, low-frequency sinewaves from Timer2 using high-speed PWM.

'precision microdrives' 8mm vitration motor (ie a small button that vibrates)

To drive a motor use analogWrite. Value 'd define average current, and consequently speed of rotation or RPM, and freq = 60 X RPM.(Hz)

Why not just use this ? (VCO-Voltage controlled oscillator /sinewave)
http://datasheets.maximintegrated.com/en/ds/MAX038.pdf

LucyPalmer:
I hope someone can help me build a small device which can easily generate different vibration frequencies. I am currently currently driving a 'precision microdrives' 8mm vitration motor (ie a small button that vibrates) using arduino, however, the signal is not 'pure'; it is contaminated with other frequencies than what I nominate within my ardino protocol.
Can anyone suggest a small (no greater than 1cm) device that can be driven by arduino to vibrate at different frequencies (between, say 10-100 Hz). Even placing a rod on a small speaker might work.......

When you say 'not pure' are you looking at the electrical signal or the resultant physical vibration? Regardless, I'm just trying to think about this from the -motor's- point of view, and a weighted vibration motor is a fairly odd duck.

The reason I ask what exactly you're measuring is that you might be overthinking/overengineering this. The vibration motor doesn't -need- a 'timed pulse' to make low frequency vibrations because it's designed to -mechanically- make vibrations all by itself. If you send a PWM generated -voltage- to turn it at 'x' RPM - voila - vibration at 'x' CPS. No 'timing' needed, the weight does all the work.

Further, the motor -itself- might be in a sense 'interfering' with the timings. Or at least in some way making the CPS seem to not work right... When you give it a command to turn, the motor says 'OK, I'll do that,' and off it goes. When the timing tells it to turn off, the motor says 'yeah sure, let's just wait for this offset weight on the motor shaft to carry though it's momentum.' That can take 'a while.' If the momentum is winding down, and another 'pulse' comes in while the motor is still turning, well, then all bets as far as vibration frequency are thrown off.

Another choice to make a vibration with very -accurately- -timed- pulses is a -plain- motor with no offset weight. It'll turn on and especially off much faster and therefore more accurately than the weighted motor.

OK if I'm completely off about this and the pulse electrical timings really are screwed up the other thing to look at is a state machine to turn the motor on and off and 'do nothing' when there's nothing to do. It's possible that there're other background CPU housekeeping functions that can only be performed -between- the pulse 'delays.' Housekeeping says 'I have things to do but I need to waaait for the delay.' The delay ends, housekeeping does it's thing, but because it's been waiting so long and it has so much to do it interferes with the -next- pulse cycle. A state machine more evenly the timing loads of housekeeping vs computing, and those two aspects interfere with each other a lot less.