Connecting a vibration motor to FRDM K64F

Hi,

I am trying to connect a small vibration motor to FRDM K64F. However, only port PTA1 and PTA2 works, and it doesn’t work for any other port (such PTC4 …).
I am using more than two motors, so I need to use ports other than PTA1,2.
below is the mbed code:


the code turns the motor on/off for 1 second.

When I connect an LED across the 4 ports, it works for all of them, but for the vibration motor only PTA1,2.

I am missing something?

Thanks,
Abdoulah

Hi there,

If leds is working and motors not, it can not be about power current consumption?

BR, Jan

Thanks for you the reply,

if this the case, then does that mean port A give more power than port C ?!

regards,
Abdoulah

I do not know, it was only my tip, maybe I am total out but when I tried to ask Google about “Current of mobile vibration motor”, I found something about 70mA and I think that is too much. Also will be here probably a current spike at the start.
I think you need to control the motors via transistors and from different power supply instead of the onboard one.

About the ports. Nope I not think the PortA gives more power, but you set these pins to 1 as first and boards have usually a overcurrent protection/management or something like that.
It leads me to your claim “When I connect an LED across the 4 ports, it works for all of them”

It is only a teory.

BR, Jan

Thanks, I really appreciate your help.

I have used a transistor with the inboard 3.3V, and it works perfectly.
emitter connected to 3.3v
base to pin PT…
collecter to motor.
This seems to be the only way to make it work.

Regards,
Abdoulah