Open sylatupa opened 5 years ago
Simpler design with mosfet? https://www.precisionmicrodrives.com/content/how-to-drive-a-vibration-motor-with-arduino-and-genuino/
for back and forth control of the motor, but not needed here: https://www.precisionmicrodrives.com/content/ab-002-discrete-h-bridge-for-enhanced-vibration-control/
Pulse width modulation and a mosfet will give control over the freq and duty.
pwm12.freq(500) pwm12.duty(512)
See the docs: https://docs.micropython.org/en/latest/esp8266/tutorial/pwm.html
transistor used, 2N3904: https://www.sparkfun.com/datasheets/Components/2N3904.pdf