Dear all,
Hi. I'm trying to generate mechanical vibration with specific carrier and modulation frequency.
Some of my references stated, "vibrotactile stimulation based on a 175Hz sinusoidal carrier-wave modulated by a 27Hz wave."
I started from the simple blink code:
analogWrite(11, 255);
delay(25);
analogWrite(11, 0);
delay(25);
However, the vibration strength varied depending on delay, and I'm not sure if I went wrong.
According to the specification, its PWM frequency is 1000Hz, so I think it is possible to make the mechanical vibration, but my approach seems wrong.
I appreciate any comments and ideas.
Thank you!
P.S.,
I will attach vibration motors to PWM pins (+ for PWM pins and - for GND pins) to deliver the vibration, as others did
hammy
August 20, 2019, 12:06pm
2
What sort of modulation are you thinking of - amplitude or frequency ?
The author of the reference added the plot.
I think it's amplitude modulation.
Amplitude and frequency of vibration motors are hard coupled, you cannot change them independently.
A PWM signal output from a DUE will swing from 0V to 3.3V (no negative value).
nixie
August 20, 2019, 2:33pm
6
I assume you're not connecting the motors directly to the Due. You need some sort of amplifier/driver.
The vibration motors I have found consist of a dc motor turning an offset mass - which has high inertia.
Because of the inertia you will not be able to change the rotational speed (ie frequency) very fast.
You can find a circuit diagram to drive it from pwm on my page here
However I dont think you will be able to generate the vibration signal you require with a simple vibration motor.
KyunghoWon:
analogWrite(11, 255);
delay(25);
analogWrite(11, 0);
delay(25);
Don't know for sure about the Due but on most Arduinos that's equivalent to:
digitalWrite(11, HIGH);
delay(25);
digitalWrite(11, LOW);
delay(25);
[/quote]