Vibration motor doesn't work with ATTiny85 on 32kHz

I have an ATTiny85 running on a 32kHz crystal using a 3V, CR2032 battery cell to run the following code:

http://pastebin.com/uEts5Wpe

This code basically is using Timer/Counter1 to wake up from an idle sleep every overflow, which is 4 seconds.

The crystal is connected to pin 2-3, which it should. Vcc and ground are connected correctly to the battery cell and pin 5, or pin PB0, is used for powering the led. This all works perfectly well, until I replace the led for a vibrator motor, which is what I need. This seems really weird to me.

The motor works perfectly well on 3V directly, or with a resistor. Specifications for the motor say 1.5-3V. is it that the ATTiny85 can't output 1.5V through its pins? The circuit works fine on the 5V or 3.3V(tbh, it júst works.) supplied by an arduino Uno.

I'm guessing the ATTiny85 has a lower pin output than Vcc, which makes sense. But this seems like quite a lot. Does anyone have a solution?

Yes.

You do not attempt to power motors from Arduino pins, since the Arduino pin cannot supply anywhere near sufficient current to drive a motor.

You need to switch the motor with a transistor, which is controlled by the Arduino through a 330 ohm resistor.

How much current is the vibration motor supposed to draw?

CR2032 batteries are not effective for high current loads, you may be asking too much of the battery too.

Put another way, I don't know if it's hitting the arduino pin current limit, or the limits of the battery's ability to supply said current first :-P

DrAzzy: CR2032 batteries are not effective for high current loads, you may be asking too much of the battery too.

Ah! Didn't notice that! :roll_eyes:

CR2032s are for powering clocks, personal scales (for very infrequent use), disposable keyring torches (well, the large ones anyway) and other such novelties.

The vibration motor in a phone runs from a relatively hefty LiPo cell.

That's what I read too, but shouldn't that mean that I wouldn't be able to power it from the battery directly? It must be hitting the pin output limit. I'll see if I can find a transistor somewhere and try it out.

castoer:
That’s what I read too, but shouldn’t that mean that I wouldn’t be able to power it from the battery directly? It must be hitting the pin output limit.

And that is true enough.

However.

It may be that when you attempt to power it from the battery, the actual voltage drops to a value that would not permit the Arduino to operate.

castoer:
I’ll see if I can find a transistor somewhere and try it out.

You don’t have transistors on hand?

I trust you have a digital multimeter. If you don’t, then I suggest you pack your Arduino stuff away until you get to the shop and buy at least a $5 digital multimeter - and some transistors. BC548 or (I think) 2N2222 or similar at least.

Paul__B: And that is true enough.

However.

It may be that when you attempt to power it from the battery, the actual voltage drops to a value that would not permit the Arduino to operate. You don't have transistors on hand?

I trust you have a digital multimeter. If you don't, then I suggest you pack your Arduino stuff away until you get to the shop and buy at least a $5 digital multimeter - and some transistors. BC548 or (I think) 2N2222 or similar at least.

I do, but my stuff is a great mess so finding one isn't always as easy as it sounds. I found one though, and it works fine now. For now.

i have found its quite possible to run most low rpm pager motors off an arduino pin and coin cell. it all depends on current draw. a quick test will show nearly all types will run directly off the coin cell or even low current button cell. maybe not full speed.

i have even managed getting 'nano' scale model airplanes to fly direct connect without transistors. the trick was to use multiple pins, in some cases all 8 portb. the real problem is preventing mcu reset but even that is solved with proper bypass and noise suppression. generally using a transistor is more practical with fet being better choice than bjt with its lower on resistance and no need for base resistor.