ATtiny13A for controlling a vibrator - Datasheet Question

Hi Everyone

I am developing a device which needs to run for as long as possible without recharging the battery. At times I need to turn on a vibration motor for up to ~20 minutes.
Because its small (size is an issue with my device) and requires very little power I am considering the ATtiny13A as controller.

I am wondering if I am correctly interpreting the datasheet.

I am wondering if I am interpreting following graph correctly: Section 19.9 (page 141 of the .pdf) Figure 19-33

If the device is powered with 1.8V, then a power drain which pulls 5mA will receive 1.4 volt @ 25°C
If I pull 3mA the voltage will be 1.6

Is this correct? If not, how should I interpret this graph?

For my application this would mean that I do not power my vibrator with the ATtiny, but directly from the power source, using the ATtiny to PWM a transistor, correct? (ok, I may need an h-bridge or something, have not really worked with regular dc motors before, but is this the general idea?)

The datasheet is attached to this post. If someone could take a quick look, I would be thankful.

Cheers

p.

attiny13a_datasheet.pdf (3.36 MB)

I agree with your reading of the graph. When running off 1.8 V the output pins can supply 1.6 V at 3 mA or 1.4 V at 5 mA.

Switching voltage with a transistor might be the solution but it is my understanding that a transistor has a voltage drop across it much like a diode. If you r power supply is 1.8 V this voltage drop might be significant. Maybe someone with real electronics training can help.

Low side switching with a transistor should work - you would need to pull the base of the transistor to 0.7V to turn it on. You would also have to be able to have teh vibrator work at 0.7V less than your supply.

so, if I power my system at 2.5V I connect the vibrator (which needs 1.8V and ~ 50mA) directly to the power source and the ground of the vibrator to the collector of a NPN transistor. I connect the emitter to ground and PWM the base.

(is that what is meant by low-side switching?)

where do I lose the 0.7 volt? Is it, because the whole system (vibrator+controller) act as a voltage divider? (i.e. sending 0.7 volt to the base, subtracts that from the available voltage for the motor? if so, what do you base that number (0.7v) on?)

The setup: Power supply to motor+, motor= to NPN collector, emitter to power supply- (call it ground). Arduino gnd connected to ground. Arduino has to source current into the transistor base to turn it on - limit the current with a series base resistor, something like 150 ohm so the transistor turns full on. (Arduino 1.8V - Vbe of transistor of ~0.7V)/50 ohm = 22 mA. Adjust resistor, do not let current exceed 35mA.

Voltage drop across the transistor, Vce, is also around 0.7V. (NPN transistor sort of acts like 2 diodes with cathodes connected at the emitter - one diode anode is the base, the other anode is the collector - when enough current flows into the base, the collector is allowed full current flow also).

Optionally, use an N-channel MOSFET which can have a very low turn on resistance, like 0.05 ohm (50 milliohm). Then the voltage loss across the transistor is 0.05 ohm * motor current (.05ohm * .05amp = 0.0025, or next to nothing) and the full power of the battery can be used for the motor. Use an additional 10K pulldown resistor on the gate to keep the MOSFET turned off while the arduino starts up and the outputs are floating as inputs until your sketch takes over.

Thanks for clarifying the setup, crossroads.

However, this part here provides a problem:

(Arduino 1.8V - Vbe of transistor of ~0.7V)/50 ohm = 22 mA. Adjust resistor, do not let current exceed 35mA.

The ATtiny13A which I am looking at right now simply cannot supply 22mA at any reasonable voltage (assuming I am correct in reading the datasheet, which was my original question.)

Even if I up the voltage to say 2.5V I still wont be able to reach 22mA (i think?), so I cannot source enough current to the transistor to turn on the motor.

In other words, I need to use a MOSFET instead of a regular transistor, or use a different controller, correct?

"The ATtiny13A which I am looking at right now simply cannot supply 22mA at any reasonable voltage "

Why not? Don't the output pins go to ~1.8V when commanded high? http://www.atmel.com/Images/doc8126.pdf Figure 19-33 seems to indicate a max of 6mA can be sourced from "regular pins" with Vcc = 1.8V. So yeah, a MOSFET would seem a better choice here.