First Attempt at DC Motor Auto Dosing Pump

Note:
The input resistance to a FET is infinite.
It does have capacitance, gate to GND, see data sheet.

R45 is there to protect the Arduino output.
i.e. it limits the output current to a safe level while the FET input capacitance charges.

If the only reason for R45 is to protect the Arduino, then wouldn't a larger resistance value be better? Or are you stating that, while this is true, 1K is still overkill?

Looking at your schematic, my main confusion comes from the 12 Volt and 5 Volts supplies you have at the top. I understand the 12 Volt would be coming from the wall and to the motors (as well as the voltage regulator). But then if I follow the output of the voltage regulator it looks like you have another 5 Volt source attached to that wire?

Is the "+5V" you have marked at the top simply stating that this wire is now 5 volts because of the voltage regulator and does NOT represent a separate voltage source?

Continuing to follow the schematic it looks like you're powering the Arduino with input to Pin 5, but also taking from this pin to power the RTC? Am I reading this correct?

Once again, thanks for taking the time to answer these elementary questions, I've learned more about circuits from you and this project than the last month trying to research online.

Also, I looked into more accurate (and slightly more expensive) RTC's but I thought for my final purposes this would probably be unnecessary. In the end, I really just want the capability to check and dose a few times per day, having this happen at the perfect time isn't a primary concern. I hear the cheap RTC's probably lose 2 to 10 seconds per day.

If we go with 10 seconds per day, that's 3650 seconds per year. There's 3600 seconds in an hour which means the time is off about 1 hour every year.

While annoying, I think I can live with this for the decreased cost. I'm open to arguments if you think otherwise though.

Thanks!
-Chase

P.S. - Thanks for the clarification on the 12 volt schematic. That's exactly the kind of thing I want to know so I can do things the right way.

If the only reason for R45 is to protect the Arduino, then wouldn't a larger resistance value be better? Or are you stating that, while this is true, 1K is still overkill?
If this resistor is too large, the input capacitance of the FET will charge slowly.
The FET will stay in the linear region too long causing internal heating.
220 ohms is a good trade off.

Looking at your schematic, my main confusion comes from the 12 Volt and 5 Volts supplies you have at the top. I understand the 12 Volt would be coming from the wall and to the motors (as well as the voltage regulator). But then if I follow the output of the voltage regulator it looks like you have another 5 Volt source attached to that wire?
This is just a NET name, not needed in this case, but brings your attention to the voltage level on this trace.

Is the "+5V" you have marked at the top simply stating that this wire is now 5 volts because of the voltage regulator and does NOT represent a separate voltage source?
Yes it is just a label.

Continuing to follow the schematic it looks like you're powering the Arduino with input to Pin 5, but also taking from this pin to power the RTC? Am I reading this correct?
The output of the voltage regulator is feeding the 5 volt pin of the Arduino and the RTC.

Also, I looked into more accurate (and slightly more expensive) RTC's but I thought for my final purposes this would probably be unnecessary. In the end, I really just want the capability to check and dose a few times per day, having this happen at the perfect time isn't a primary concern. I hear the cheap RTC's probably lose 2 to 10 seconds per day.
The DS3231 RTCs are off by ~ +- 2 to 7 seconds per month.
About $2.00

I would add D22 (by the circuit bug) to prevent the motors from drooping the +12 volts.


.

If you do use a DS3231, remove the charging diode on its PCB.

I must have been looking at some much fancier RTC's when I first did my research... That price is great.

Awesome schematic, above and beyond! I've always wanted to be able to read schematics and I feel like you're really helping me do that. The bug was a nice touch too haha.

Question 1:

On most voltage regulator circuits I've seen, the capacitors [C7 and C8 in your schematic] are split on both sides of the regulator like below.

I've read that the larger the capacitor the longer it takes to discharge, hence why you'd want a higher uF on the high side and a lower uF on the low side (smoothing out noise/ripples). Can you explain why you have both capacitors on the high side of the voltage regulator and why you chose the specific uF values that you did?

Question 2:

I would add D22 (by the circuit bug) to prevent the motors from drooping the +12 volts.

I did some research on this and want to make sure I understand correctly. Basically, when I run a motor (more likely if I ran more than one motor at the same time) I might experience a large voltage drop for a split second. This voltage drop might be enough to drop the output voltage of the voltage regulator and, in turn, turn off my Arduino. Placing a D22 and a capacitor at this location blocks the current from traveling backwards and charges/discharges up the capacitor, allowing the capacitor to keep the voltage up for the voltage regulator, and in turn, keep the Arduino on.

Close?

Question 3:

The capacitor you've placed between Pin 5 and ground I believe is a "decoupling" capacitor. I've only briefly researched this but will do some more reading to better understand. Not really a question I guess, just want to make sure this is how the capacitor is functioning so I can look up the correct information.

As always,

Thanks tremendously for your time.

-Chase

Also, just because I'm thinking ahead...

Any thoughts on this PH Sensor [Or any other since this one is on back order].

I plan on slowly making my way through THIS I2C LINK too.

Just an update for anyone who's decided to follow along.

A .1uf (100nf) ceramic capacitor has a low ESR (internal, Effective Series Resistance).
For high frequency filter circuits you need low ESR and low inductance capacitors.
Small ceramic capacitors with low ESR and low internal inductance are used to filter higher frequencies.

Large electrolytic capacitors have higher ESR and inductance which makes them noneffective to filter out high frequencies.
However, these capacitors are good for storing lots of electrical charge needed in filtering DC power supplies.

So, we combine electrolytic and ceramic capacitors in parallel to create a wide spectrum filter design.

I fact, it is best to use: 100uf, 10uf, 1uf, .1uf and .01uf to get a very good capacitor combination for a filter.

2016-04-14_21-56-12.png

A 7805 has high gain components inside.
These react with external noise and inductance.
Sometimes this combination can cause the output of the regulator to oscillate.
Having an effective input capacitor filter prevents oscillation.

It is very important C8 be as close to the regulator as possible so as to reduce inductance!

470uf is a standard capacitor.
If the 12VDC source is relatively low ripple, 470uf will supply enough DC storage for 1/4 to 1/2 amp of current to the Arduino.
But you could use more, such as 1000uf.

Question 2
Correct

Question 3
Correct.
It may not be needed as there are some on the Arduino itself, but still good practice.

Take a look at this:
http://www.murata.com/~/media/webrenewal/support/library/catalog/products/emc/emifil/c39e.ashx

Edit:
You put the large filter capacitor on the input of the regulator as you need to supply the regulator with needed inrush current.
A large output capacitor is generally not needed on the output.

Any thoughts on this PH Sensor [Or any other since this one is on back order].
I have not used one, but looks OK.
I plan on slowly making my way through THIS I2C LINK too.
Also:

Edit
Note
When powering the Arduino through the external voltage regulator do not use the USB or power jack.

motor selection

I used to work on photolabs that looked after their own chemistry, they used small dc powered bellow pumps to dose the chemistry.

these could be very easy to interface, you select the pump by bellow size ie 10ml, to trigger a 10ml dose you power the pump for a fraction of a second which start the rotation , an internal microswitch in the pump then keeps the power applied for one full rotation and hence one full dose , a rotation took a second or so..

the advantage is a very simple control system, with no feed back required , and of course a very accurate dose.

I am sure these pumps must still be sold some ware, maybe worth checking out

Instead of a 3 terminal regulator you could use a switching power supply like one of these.
I use them all the time now.
They are 80-95% efficient.
About $1.50 each

@sureview

I used to work on photolabs that looked after their own chemistry, they used small dc powered bellow pumps to dose the chemistry.

Thanks for the input! I recently bought a couple of these PERISTALTIC PUMPS to play with because they were so cheap.

Are you speaking about bellows pumps like THESE?

I like both designs because the fluid never touches any of the mechanics of the pump. With that said, I would imagine the bellows pump is much more accurate, however my system probably won't require that kind of accuracy. Also, my guess is that the bellows pumps are probably at least 3 times as expensive as the Peristaltic pumps.

Thoughts?

@LarryD

Instead of a 3 terminal regulator you could use a switching power supply like one of these.
I use them all the time now.
They are 80-95% efficient.
About $1.50 each
step down power supply for sale | eBay

Great idea Larry. I had heard that the 3 terminal regulators were very inefficient (like not even 50 percent efficient). And with the reduction in heat, as well as the adjustable nature of what you posted, I think I should go that route for sure.

Edit
Note
When powering the Arduino through the external voltage regulator do not use the USB or power jack.

Why not USB? If the USB takes 5 volts, isn't this exactly what the regulator will supply? Are we trying to protect the Arduino in the case that the voltage regulator isn't perfect and allows too much current (ie higher voltage) through?

Take a look at this:
http://www.murata.com/~/media/webrenewal/support/library/catalog/products/emc/emifil/c39e.ashx

Fantastic link! Thanks for sharing. I haven't had the time to fully dive into it yet, but I can tell it will prove invaluable. Also, the concise information you provided about ceramic and electrolytic capacitors was super helpful in understanding. Thanks!

I also found this which I felt was a great beginners guide to practically understanding some rules of thumb for anyone who is interested.

A Dummy's Guide To Understanding Wall Warts

I've got much to think about! Will hopefully have some time over the next few days to take it all in and update my schematic with all your suggestions and a few new things.

Thanks again, slow and steady progress... Can't wait to start building

-Chase

"Why not USB? If the USB takes 5 volts, isn't this exactly what the regulator will supply? Are we trying to protect the Arduino in the case that the voltage regulator isn't perfect and allows too much current (ie higher voltage) through?"

If your external supply is set to 5.2v and the USB supply (computer) was 4.9V I am not sure what the result might be.
There is a P MOS FET on the USB power input.
This connects USB 5v to the Arduino if there is no power coming into the power jack.
Now, if you plug the USB into the Arduino then turn on the external power supply that was 5.2v I would guess there may be back feed through the USB connector to the Arduino.

Maybe others could chime in here on this.

So I just purchased this Buck to Buck DC voltage step-down convertor and read that it says max output ripple is 30mV. I understand this as the maximum residual AC noise that will still be present in the output side of the converter.

Question 1:

When someone quotes "30 mV max ripple" does this mean 30 mV total, as in 30mV total between the bottom valley and top peak? Or does this mean 30 mV up AND 30mV down for a total of 60mV?

Basically if we have 5V, are we looking at a swing from 4.985V to 5.015V?

Or are we looking at a swing from 4.970V to 5.030V?

Also, this all naturally leads me to the question, how does one go about calculating an acceptable ripple value? I imagine it depends on the level of resolution needed in your circuit and therefore changes depending on the job.

For this circuit, the voltage after the step down converter will lead directly to power the Arduino. So I assume the question becomes, what is an acceptable ripple value to Pin 5 of the Arduino? My guess is that if you combine the 30mV max ripple of my new converter with C9 in Larry's schematic [.1uf Capacitor], this puts you in the sweet spot of very little ripple.

With that said, being new to electronics, I have no idea what is considered "very low ripple" and what's considered "ridiculous ripple."

Can anyone point me in the right direction?

Thanks,
Chase

If your external supply is set to 5.2v and the USB supply (computer) was 4.9V I am not sure what the result might be.
There is a P MOS FET on the USB power input.
This connects USB 5v to the Arduino if there is no power coming into the power jack.
Now, if you plug the USB into the Arduino then turn on the external power supply that was 5.2v I would guess there may be back feed through the USB connector to the Arduino.

Are you trying to voice concern over a situation in which I might have the system plugged into the wall and ALSO plugged into my computer to program?

If this is what you're saying, nothing to worry about, I can just make sure to always have the system unplugged from the wall when I'm updating the code. Although, for educational purposes, and for future projects, it would be great to know the answer to this. I suppose it would also get pretty annoying during the testing phase to have to unplug it every time you wanted to re-code something.

Thanks,
Chase

30mv ripple should be peak to peak but you cannot guarantee it is not RMS if they don't say.
No matter, this will not be an issue in this digital application.
An UNO will operate up to 5.5v, not sure what the lower limit is, I have seen mine work at 4.3v.

Adding a capacitor on the output will not significantly reduce the ripple.

.

Are you trying to voice concern over a situation in which I might have the system plugged into the wall and ALSO plugged into my computer to program

Yes, this is what would be a concern.

i.e. If we're feeding the +5v pin with the external supply and USB plugged also.

EDIT
After you download your sketch add a note on your Arduino:
"Disconnect External Supply before plugging in USB Cable"
Put Tape over the USB connector.

.

EDIT
After you download your sketch add a note on your Arduino:
"Disconnect External Supply before plugging in USB Cable"
Put Tape over the USB connector.

Fantastic idea. Spoken like someone who's had experience with less than desirable results haha :slight_smile:

Adding a capacitor on the output will not significantly reduce the ripple.

I must not understand something correctly. In my understanding, the purpose of C9 (the capacitor on the output) is to filter out whatever last bit of noise might be making it's way to the Arduino. Is there a difference between minimizing ripple and filtering? That might be where my confusion lies.

Thanks,

Chase

Noise, in this case ripple on the output of the converter, is made up of complex frequencies.
a single capacitor will not be effective to reduce all the components of the ripple.
You would have to use a complex LRC filter to do so.
Hence comes into play the law of diminishing returns.

Edit
For the USB/external power supply situation:
You could add a jumper as in the image on post #34.

.

HAHA understood...

What program do you use for schematics?.. I feel like creating new parts in Fritzing is too cumbersome.

I use WinQcad.
It is no longer available.
It was written to work on Windows 95 . . . Windows 10.
Probably the best PCB program "I" have used. I have used Orcad, SmartWorks, PCad, TraxMaker.
If needed, you can make a new part in about 5 minutes.
There may be a free version still available on some download sites.

Lots here use Eagle.

Edit
Since the voltage of the new switching supplies may be set to a much higher level from the factory,
first adjust the output to 5v with the supply connected to a dummy load.
Also, the potentiometer on the power supplies are the 10 turn type.
.

Edit
Since the voltage of the new switching supplies may be set to a much higher level from the factory,
first adjust the output to 5v with the supply connected to a dummy load.
Also, the potentiometer on the power supplies are the 10 turn type.

Roger that, thanks for the tips! Lots of finals studying coming up this week so unfortunately progress is paused at the moment.