Output voltage drops to 0 V

Hi everyone,

Tried to look for similar issue/topic but no luck. Happy to be directed to one if such exists.

I am working on plant watering system, i use ATTiny85, a soil moisture sensor and a mini water pump (4-12V). If i connect water pump directly from ATTiny VCC pin it works just fine, however if i connect water pump to any other (PB0-4) ATTiny pins it doesn't get power. I have used a multimeter to measure the voltage and when the pump is not connected to any pins, i do get nearly 5V however once i connect the pump, the voltage drops to 0V straight away (and gets back to 5V after disconnecting the pump).

Any thoughts what am i doing wrong?

Thanks!

Any thoughts what am i doing wrong?

Powering an inappropriate load from an I/O pin.

smekla:
Any thoughts what am i doing wrong?
Thanks!

The first thing wrong is..... lack of a diagram. Accurate connection diagram will help convey the points.

At the moment.... when you are talking about connection of water pump..... are you saying you are trying to power the pump using the arduino's data pins?

Probably using a 9 V battery too! :roll_eyes:

Southpark:
The first thing wrong is..... lack of a diagram. Accurate connection diagram will help convey the points.

At the moment.... when you are talking about connection of water pump..... are you saying you are trying to power the pump using the arduino's data pins?

The diagram is really basic, direct connections to the attiny (attached).

I suppose i should use a transistor and a diode or a relay for proper circuit but shouldn't it just work if the pump is 4-12V?
The power comes from micro USB charger from the PC.

but shouldn't it just work if the pump is 4-12V?

But, as you already pointed-out, the voltage is zero (or very close).

I'm quite sure that pump will draw way more than the 40 mA of current the ATtiny pin can supply. You need a driver for it, or you're going to kill your ATtiny (if you didn't do so already).

There's more wrong. No decoupling cap at the tiny and no flyback diode at the motor.

smekla:
but shouldn't it just work if the pump is 4-12V?

No it shoudn't just work because you have no consideration of the current the motor takes. It is taking way more than the Arduino pin can, give so much so the Arduino pin voltage has dropped to very close to zero. Measure it properly it is not actually zero.

Read this about power supply impedance on pins. It is written from the Raspberry Pi point of view but it applies to all processor pins. ( except the programmable drive bit )
http://www.thebox.myzen.co.uk/Raspberry/Understanding_Outputs.html

Thanks all!
Off to read an article and make changes in my circuit.

Like others have mentioned, you are assuming that just because the pump runs off the VCC pin, that the digital PINS just magically "connect" to VCC unihibited. This has never been the case. As you guessed... yes, a device DOES switch to make the signal at the pin go to 5V... but it is a SIGNAL and not a power rail.

This SIGNAL is a low current indicator to another device that the output pin is asserting a logic level of a "1" or a "0" state. It has never been about supplying GND or VCC to an active or passive load unless that load is roughly close to digital logic device.

We get away with driving LEDS because they have low enough current demands to not overwhelm the tiny gate transistors. Other loads like motors and relays need a driver... to convert the logic signal into some "muscle" with a larger and more capable transistor switch.

smekla:
Thanks all!
Off to read an article and make changes in my circuit.

That is a good start. To read articles and to go through enough tutorial examples to get an understanding of what can be done...... and what is not done or can't be done.

This means that you probably did not put in any time or effort to look for tutorials involving arduinos and dc motors .... or arduinos and small pump motors etc.

The main thing to remember is that these arduinos are not designed to drive the motors 'directly' from any of its output pins. The maximum power that can be supplied by the output pin (ie. supplied to a device connected to the output pin) without damage/overheating/limiting etc....... is well under the amount of power that is needed to get the pump motor moving.

So if you had gone through adequate tutorials..... you would have encountered motor driver circuits - which goes between arduino and motor.

Put another way, logic signals work at power levels of a few milliwatts only, far less than DC motors (which
tend to be in the range watts to hundreds of watts).

Also motors, relays, solenoids are all inductive loads, and without suitable protection circuitry an inductive
load will produce highly destructive voltage spikes when switched (off), quite capable of junking any small
semiconductor device instantly.

Southpark:
That is a good start. To read articles and to go through enough tutorial examples to get an understanding of what can be done...... and what is not done or can't be done.

This means that you probably did not put in any time or effort to look for tutorials involving arduinos and dc motors .... or arduinos and small pump motors etc.

The main thing to remember is that these arduinos are not designed to drive the motors 'directly' from any of its output pins. The maximum power that can be supplied by the output pin (ie. supplied to a device connected to the output pin) without damage/overheating/limiting etc....... is well under the amount of power that is needed to get the pump motor moving.

So if you had gone through adequate tutorials..... you would have encountered motor driver circuits - which goes between arduino and motor.

I did read many articles and projects but majority are using at least 12V motors where mine can run from 4V and like Grumpy_Mike has stated, i did not consider the current. But hey we all learn from our mistakes don't we, i'm still very new to arduino world and learning electronics/physics again as it was never my favorite subject at school :slight_smile:

Thanks all for quick responses!

Many 12V motors will run off 4V - but have very little power left.

Same for your 12V water pump, it'll run off 5V but your maximum head height will drop to just a fraction of the stated number.

No pump can be run off a pin directly. You need a driver for that. Likewise, no pump can be powered through an Arduino's 5V pin, it's bound to overload the regulator.

As I understand you run the system off a 9V power source - use a driver circuit as in #9 replacing the relay whith your pump, and then run the pump at 9V. Consider using a MOSFET rather than BJT transistor for lower losses.

smekla:
I did read many articles and projects but majority are using at least 12V motors where mine can run from 4V.....

What I mean is..... if there are no tutorials or instructions or diagrams on the internet or in any document or book whatsoever that teach us to connect a pump motor to an arduino GPIO pin directly........ then it very likely means - it is not going to work if we go ahead with it.