Figuring out some numbers for a mini pump

Hey all,

I'm just now getting into electronics (I don't know why I waited so long) and I'm just figuring out some stuff. I picked up an Arduino kit from Vilros.com and a few other parts for my project.

This next paragraph is just fluff, read if you'd like, skip to /Skip To Here/ for the actual question
I'm currently trying to work on a project that is basically a humidor keeper. Living in So.California, it's extremely dry here and I would like a perfectly controlled environment for my humidor. I purchased a few things like some humidity sensors (as an input obviously), a humidifier (basically a water canister with a sponge and tubes) some tube splitters and twist valves and most importantly, a small air pump.

/Skip To Here/
The small air pump is what I'm having problems with at the moment. This is the pump. Obviously it's a 3v pump. I will be using the supplied 9v battery cable when the project is ready, so I understand I'll have to use resistors to bring the voltage down so I don't burn out the pump. As I said, I'm new to this, so I'm trying to figure out ohms law to find out what kind of resistor(s) I will need. The problem is, I don't know the amperage. Where would I find this?

I looked at the details for the pump and what looks like amps (or milliamps) is really just the product number. Can anyone help me out?

Right now, I have my equation as r=6v / ?i But where do I find the current?

This is my first post too, so please let me know if I'm being stupid.

Okay, you have the correct form for Ohm's Law, and have identified that you need to drop 6V across the resistor.

The problem you have, which you have also correctly identified, is the unknown current. Not only is it not specified, but it won't be constant either, changing as the load varies, the lubrication ages and even things like temperature. This is one reason why using a resistor to match your 9V supply to your 3V pump is not a wise choice.

The other reason is that using a resistor is horribly inefficient, and that matters when the pump is probably the biggest user of d.c. power in your system. Dropping 9V to 3V is 33% efficient, the 67% lost power being converted into heat, which you need to manage.

A better plan is to use a 9V pump, if you can find one, or use switch-mode-regulator to provide a constant 3V at a wide range of currents. To do this, you'll need to get a 3V pump and test it with a bench power supply and multimeter, under a variety of load conditions, to specify a regulator.

Does any of the above help?

Yes! what you've said helps a lot!

I've talked to some friends and acquaintances about this as well and they let me know that I should pick up a DC Variable Power Supply if I'm going to be doing any electronics anyways. I ordered one and it should be here soon. Then I, as you said, I can test the pump under different loads.

Another suggestion was made to me to put the pump on a PWM connection and allow the Arduino to control the maximum load to the pump. Is this feasible?

Some other suggestions: As you said, get a bigger motor, don't use a 9v battery anyways, don't use resistors, etc. I think I would like to switch over to using the appropriate amount of AA batteries (or possibly C batteries) to get enough voltage and mAh to run the board and the components for a while.

I've seen that the Arduino runs at 25mA while running code. Does that mean it will always be running at 25mA while it's waiting for a reading from a humidity sensor? Am I able to put the board on standby for a set amount of time? possibly hours? Then have itself take a reading and turn the pump on from there if it needs? If this is the case, then I would preferably want to run 4-6AA batteries in serial to get the voltage to 6-9v (hopefully I will only need ~2000mAh)

I'm fairly certain this has been discussed before, so if you try a search (top right corner) for humidor it might yield some useful information.

This topic isn't necessarily to talk about a humidor project, it's for me to learn best practices and general electricity. I've read those humidor projects and they don't take everything into consideration while making the entire process efficient.

I'm just getting some advice from the seasoned pros!

question about alternate ways to control the pump.

will this work ?

12v to the pump.
pump lead to a mosfet
pwm out to the mosfet at 30% duty cycle.

Another suggestion was made to me to put the pump on a PWM connection and allow the Arduino to control the maximum load to the pump. Is this feasible?

dave-in-nj beat me to it :slight_smile: You can make a switching regulator controlled by the Arduino. Not only will that be a simpler circuit which is easier to commission, if you want to learn about electronics that'll be a great sub-project. As Dave rightly says, if you run a switcher at 30% duty cycle, you'll get 30% of the input voltage at the output. But by using the inductor and diode, you get vastly better efficiency than using resistors, or by switching a mosfet alone without the inductor. Look up buck converter on Wikipedia, and if you want help choosing components, say so here so others can benefit/contribute/correct, or PM me if you prefer.

As you said, get a bigger motor

Ah, that's not quite what I said. A higher voltage motor isn't necessarily a bigger motor, it's just that its windings are optimised for a different voltage. More turns with thinner wire, higher voltage with less current, same power, same speed, same size.

You're only looking at perhaps .1A for a pump like this. Your linked Amazon picture doesn't show scale well but the product dimensions show the motor as being only a little over 1cm in thickness.

Go on the safe side and assume it's rated for .050A. Use a 220 ohm resistor (1/2 watt rated) and see how well it works. If you don't have 1/2W resistors then use two 470 ohm 1/4W resistors in parallel. If you feel the motor getting hot then you need to use higher value resistors.

How often and for how long is the pump needed to be run? - Scotty

Here's my list of terms that I have been researching over the past few days:
MOSFET
Switcher
Inductor
Diode
Buck Converter

I will definitely take a look into everything. I'm trying to absorb as much as possible. I think for this project, since it's mainly just a prototype, I will use the PWM to control the motor without having too much of an issue. I know I will want to make this into a printed circuit eventually and I will need a lot of other parts/pieces/components, so I will absolutely ask about more!

@Billysugger, I stand corrected! You make a great point about the motor.
@Chagrin, Thank you for that answer. I will definitely need to use something of that nature when I step away from Arduino-land.

@Scottyjr, I believe the most the pump will be used is initially when I hook it all up. I have a large humidor with a lot of dry cigars in it. Since I live in So.Cal, the humidity in the box is around 50%rh. It needs to be up in 72-74%rh (74-75% for two weeks while the cigars settle again and regain the moisture). I assume it will run the most when I first start it, then when it reaches the right amount, the pump will stop and only be used to adjust up or down after that.

There's no way to tell right now how fast it will bring the humidity up in the box. I don't have the other parts yet, like the motor, the tubes, the humidifier, etc. Too many variables to make even a good guess about it. I have an idea in my head that it might take around 12 hours to pump the right amount of humidity into the box. After that, the pump will be off and it takes about 2-3 days for the humidity to fall from there. So, 12 hours on, 3 days off, 10 minutes on, repeat 3 days/10 minutes.

dave-in-nj:
question about alternate ways to control the pump.

will this work ?

12v to the pump.
pump lead to a mosfet
pwm out to the mosfet at 30% duty cycle.

No, it will likely burn out the motor. You'll have to experiment with the
duty cycle.

PWM with a single MOSFET is not linear in the PWM value, not even
slightly, and its load-dependent. You have to use an active rectifier or
fast decay mode in an H-bridge for the PWM duty cycle to accurately control
average voltage, otherwise the inductance just prevents the current dropping
during the off part of the cycle.

And you need a freewheel diode anyway, or you may burn out the MOSFET.

PWM with a single MOSFET is not linear in the PWM value, not even
slightly, and its load-dependent. You have to use an active rectifier or
fast decay mode in an H-bridge for the PWM duty cycle to accurately control
average voltage, otherwise the inductance just prevents the current dropping
during the off part of the cycle.

I beg to differ MarkT.

In the conventional buck converter circuit, ignoring the drop across the mosfet and the diode,
Duty Cycle = D = ton/(ton+toff) = Vo/Vi. Solve this for Vo and you get Vo = D x Vi.

ntgcleaner, you can make a simple version of this with just the mosfet and diode, (without the inductor and capacitor), but it will be no more efficient than the resistor method. Then, having gained control of the mosfet at your chosen duty cycle, you can add the inductor and capacitor to make the complete circuit. In fact, if you turn the whole circuit upside down, you can drive the mosfet gate directly from an Arduino port pin. (with a couple of judicual resistors). This is definitely a route you can follow one manageable step at a time. The starting drive circuit would look something like this...

For the purpose of getting this prototype made, should I just shoot for a pre-made buck converter? Something like this?

Eventually, I would love to be able to make my own, but I keep falling deeper and deeper into this rabbit hole! Would something like the above work for me for this purpose?

Also, for anyone following, I found out the amperage of the motor.
I got the motor a couple days ago and I connected it to my DC Variable Power Supply & Multimeter. I found out, when the pump runs at idle, it pulls .17A. When the pump output is blocked (or under load) it runs at .21A. So, If I were to do the math, it is a 3V air pump that uses .21A max with 14.28Ohms resistance. Correct? Do I do these calculations with the maximum current? or an average in between?

Do I even need to worry about this if I were to just purchase a buck converter?

For the purpose of getting this prototype made, should I just shoot for a pre-made buck converter?

Well, that's an option. Then you need to switch the output somehow, perhaps using a mosfet arranged as in the second circuit above. Then you're only two components away from a fully speed-controllable switching drive. But if you can live with the pump being on-off only, then switching a ready-made buck-converter will work with simpler software.

Billysugger:
But if you can live with the pump being on-off only, then switching a ready-made buck-converter will work with simpler software.

Perfect. Yes, the pump is only meant for on-off. I got a DC-DC power converter and did some tests on it with a DC power supply, I got it set at 2.5V output (so the pump doesn't run under full load - hopefully this will make the pump last longer). When I attach all of this to the arduino in the exact same set up (voltage IN coming from port 13 on the UNO board), I get a reading of 0.01V through the converter.

I tested port 13 to a multimeter to ground and when it turns on, it does output 3.6-4.5V (it varies a lot, is this normal?) but then I place the port 13 lead into the voltage IN on the converter and the voltage out reads 0.01V. Not sure what's going on here.

Here are some pics to explain a bit better...
Below - Testing the DC-DC converter. The power supply is set to 4.75V with the positive connector going into "Vin" on the converter. The second pin goes to ground and the third pin in "Vout" which is hooked to the multimeter. I set the converter to 2.5V. Even if I were to turn up or down the power supply, it stays at a very steady 2.5V without adjustment, which leads me to believe it's not a ratio, it's literally just set to whatever voltage I want.

Below - Testing the output of port 13 on the Arduino. It shows 4.5V (but this fluctuates pretty rapidly between 3.6-4.5)

Below - I've set up the converted in the exact same way as the power supply test above, though I've used port 13 as the voltage IN on the converter and it reads 0.01V

Any advice? suggestions? have I done something wrong? I've tested other ports too, just in case 13 had something strange going on. I've also used all different wires, again, just in case...

The pin 13 direct from the Arduino is not capable of driving the DC-DC converter itself. You need a power mosfet, or some other form of transistor, to switch the power. The best solution is to feed your d.c. supply into the converter, then use the second circuit in reply #11 to switch your 2.5V or 3V supply to the pump. I can't see enough detail in your photos to know whether you have done this. Can you draw a clear schematic and post that?

You must connect 0V from the Arduino to to your proto-board! Have you done that?

Ah, I see. Is this because there's not enough amperage? I checked out a video on YouTube and he showed several different ways to to connect a motor to the arduino. I purchased everything for all three ways (don't you love how inexpensive everything is?) and I'll try them all and see which way I like the best.

Here's a schematic of what I was trying to do...

I'll draw up what I'm about to do and see if it's good enough to do.

My problem is, do I always need to run the arduino and the motor from two different battery sources?

TECHNICAL ASIDE

when the pump runs at idle, it pulls .17A. When the pump output is blocked (or under load) it runs at .21A. So, If I were to do the math, it is a 3V air pump that uses .21A max with 14.28Ohms resistance. Correct?

No. You have a pump which draws typically 0.17A to 0.21A at 3V when new. A motor is not a resistor and simple Ohm's Law doesn't apply.

But if you take account of Ve, the "back e.m.f", the voltage generated by the motor when running, (because motors are also generators), then Ohm's Law makes more sense. The motor winding and brush resistance combination is constant, (ignoring changes due to temperature).

Ve has a linear relationship to speed, (sometimes expressed with a constant Kv in volts per RPM).

Motor torque has a linear relationship to current I, (sometimes expressed with a constant Kt in Nm per Amp)..

With open pump ports, you power the motor. Initially (briefly) the motor will take its stall current (Istall = V / Rm) and develop a high torque to turn the shaft. As the motor accelerates it will generate a back e.m.f, which reduces the voltage across the resistive portion (Rm) of the load. As this voltage difference decreases, the current decreases, (Irun = (V-Ve)/Rm), and the torque decreases. As the torque decreases the acceleration decreases until the motor runs at the point where torque produced matches the mechanical load torque from the pump mechanics.

If you restrict the pump flow, the differential pressure increases. This is mechanically translated to an increased load torque on the motor and the motor slows. As it slows, it develops a lower Ve, so the current rises. The motor reaches a new equilibrium at a slower speed, a lower back e.m.f. voltage, a higher current and a higher torque balancing the increased pressure.

To find the absolute maximum current, Istall, then you'll need to lock the motor shaft (turning it into a resistor), and measure current quickly. Only power the motor briefly, a second or two, to do this. Then you can use Ohm's Law to find motor resistance Rm = V / Istall.

Do I do these calculations with the maximum current? or an average in between?

It depends on what you are doing the calculations for. If it's for component sizing, then a sensible approach would be to take the higher current and add a 50% margin to allow for changes as the pump ages and your tubes fur up!