Microcontroller with controllable voltage output.

Hello, I would like to get and advice about the selection of the Arduino board for my specific need. As I am more software oriented, I have very little experience working directly with hardware components.

I am in possession of micro fluid pup, which is very simple to operate. Connect it to 1V-3V power source and its running. Now because this pump must be used in scientific experiment and my colleague pushing a button, which connects and disconnects pump from AAA battery is not very scientific I have come up with and idea of making a computer do all the work.

Now I have some little experience in using arduino-nano, from before. In which case, I was controlling frequency output, not voltage. I even have user interface made in C# from the previous project, which could be very simply modified to work with new board and most likely would be more precise than my co-worker with the button :) .

Now the question for this forum community is it possible to get arduino board which would be capable of releasing voltage from 1-4V when it’s told to do so. If the answer is yes, which one would be best for this purpose?

Yes. The I/O pins operate at 5 volts. So, use a voltage divider to step the voltage down.

Yes. The I/O pins operate at 5 volts. So, use a voltage divider to step the voltage down.

I don’t think that is a very good option.

  1. The amperage capability of those IO pins may be less than the power requirements of the pump. If may fry the microcontroller.
  2. A voltage divider is not very efficient.
  3. A voltage divider would not be easily adjustable via software from a 1v to 4v range.

If anything, he may want to use arduino to output PWM to a FET to control voltage output of the FET. He could have the FET output feed back into the microcontroller to act as a feedback loop to stabilize the voltage output to a fairly accurate level as pump load varies. This would require proper software programming, proper FET selection, and proper filtering, but is very doable.

Well, he didn't specify power requirements. He should know better.

Not efficient? A couple resistors cost less than a dollar.

An AAA battery usually only has a typical drain of 10mA.

A simple BJT transistor would be easier and you could still have feedback from the output.

The Arduino zero has one analog output.

If you have 8 pins available, you can use any arduino and a ladder network with 16 resistors (total) to create an 8-bit DAC. See e.g. 8-bit Digital to Analog converter (DAC); can't vow for its correctness but the basics are correct ;)

If it's a motor-driven pump, it's very unlikely that you'll be able to drive it from either a voltage divider or a D-to-A output on most microcontollers. Motors usually take quite a bit of power (you should measure or look up specs for exactly how much your pump needs.)

You can drive it the same way you'd drive a high-power LED (transistor or relay.) And 5V PWM will probably work fine for control if you need variable speed.)

Why don’t you just use the Arduino to turn on & off relays like this or this and then you don’t need to worry about motor power levels as they would just act like the switches being pressed now.

Sorry, everyone I should have specified the pump before as I see now. As I said I am more software based so it never actually occurred to me at the time.

Here is the generic specification Discharge Rate: 0.45 ml/min ±15 % (tap water at 20oC) Discharge Pressure: 50 kPa (7.26 psi) Tube Material:Silicone (I.D. 1.5 mm) Motor: DC geared motor Rated Voltage:3 VDC Power Consumption: 0.12 W Weight: 11 g

Here is the link for more specifications: http://www.clarksol.com/PDF/RPQ1.pdf

Also I believe suggestion made by Riva could be ideal, to connect Arduino board with on & off relay. But the question which board would be best for that kind of connection?

Thanks for the clarification. You will be pushing an Arduino to its limit without using a relay or transistor, 36mA. If you are concerned about size, I would use a Micro.

That's just my 10 cents.

Not efficient? A couple resistors cost less than a dollar.

An AAA battery usually only has a typical drain of 10mA.

A simple BJT transistor would be easier and you could still have feedback from the output.

Efficient isn’t price. ‘Efficient’ is the ratio of energy in versus energy out. The power requirements of the electric motor already push the microcontroller to its limits. There is no need to also waste half the power by sending it needlessly to ground in order to drop the voltage available to the electric motor. Plus, a resistor divider isn’t exactly infinitely variable from a 1 volt to 4 volt range.

What he wants is to create a buck converter; just like I described.

I actually made a buck converter using an Sparkfun ATtiny85 based arduino clone. It was software adjustable via the microcontroller’s PWM output to a power FET. It had a feedback loop to read the voltage output of the FET and adjust the PWM output of the microcontroller as load changed in order to maintain the approximately same voltage as long as the load didn’t exceed the circuit’s capabilities (primarily the current capabilities of the FET and the amperage limit of the inductor before it became saturated at that PWM frequency). And it had two push buttons; one to increase the voltage output and one to decrease the voltage output to any desired value within the circuit’s capabilities.

It wouldn’t be much more work to add the feature of being able to turn on or off the circuit’s output depending on the microcontroller’s instruction from another computer. Or, even, the desired voltage range could be similarly instructed from another computer instead of using push buttons.

I never took a picture of it while I had it set up in buck converter configuration with feedback and push button control, but attached is a picture of it set up in boost converter configuration where it was able to convert 5 volt DC input into 152 volt DC output (but very low current of course).

Thanks for all the help and great ideas everyone. So I have successfully put together working prototype by using Uno board, relay and voltage divider. And it works just fine now. :)

If you look at the math of how the voltage divider works under the load you are using, a voltage divider isn't a very good approach. Look at the voltage and current distribution of the voltage divider with versus without the electric motor connected to the curcuit. Look how low of resistance you need for the voltage divider to work properly. Look at the current consumption wasted to ground. Everyone in all sorts of different segments of the industry use PWM now; for a reason. A voltage divider just doesn't make any sense for this purpose. Especially since you originally wanted to be be able to vary the voltage from 1 to 4 volts using software. But whatever. I can't keep arguing for the side of sanity; maybe you will see for yourself eventually.