Hello @cayan and welcome to the RobotShop community,
The speed of the motor will vary with the voltage applied to the motor. With regular motors you would use a motor controller to control the speed by using PWM but as this is a mini vibrating motor you could simply use a potentiometer (variable resistor) in series with the vibration motor. As the resistance is increased, there is a greater voltage drop across the resistor and therefore the voltage at the motor is reduced so it will decrease its speed. You can find many potentiometer options available in the Linear & Rotary Resistors section of the store.
Awesome, this is a great starting point for me. What about something that allows for various patterns of vibration? Also, how do I connect a battery to the motor and potentiometer what type of controller or connector do I need?
Like vibrating in a series like “buzz, buzz, buzz, pause, pause, buzz buzz” or something.
I’d like to control it remotely eventually, but I’m making a first version, where it doesn’t need to be remote just yet.
I don’t have a battery yet, and I’m not sure what type of connectors I need to buy on here to make it all work together. I don’t even know what a battery connector would be called.
Are you planning to have the battery, the microcontroller and the motor all in the same device? Or just the motor? If it’s supossed to be an oral massager you’d have to encase everything in a waterproof enclosure.
Awesome! Then you could use the motor you mentioned, a small microcontroller and a battery.
A nice option would be the Trinket Mini Microcontroller Board, unfortunately the 3.3V version is not available but this one is:
And you could do the PWM trick mentioned in the tutorial I shared to regulate the voltage. Then you would just need the battery and connector. For that microcontroller, you’ll need 5.5-16V so you can choose from a variety of batteries. A simple option is something like this:
And a good idea is using a switch to easily turn it on and off
And you could also get a button or a potentiometer to easily change between the “patterns” once you have programmed them.