Spark & Spark Relay controlled Peristaltic Dosing Pumps

Hello Dustin,
To keep things easy and straight forward, I recommend using a simple motor driver IC or shield to accomplish this. I’m sorry if this was suggested earlier. TLDR

Here are a few products:

  1. https://learn.adafruit.com/adafruit-motor-shield
  2. https://www.sparkfun.com/products/9457
  3. https://www.sparkfun.com/products/9670

Note: These are not the only options.

If you do not want to control the direction of the motor, then each one of these will be able to drive upto 4 DC motors.

Hope this helps!

Mohit

1 Like

Hey @mohit,

I'm actually looking for a manual option at the moment, mostly because I have people chomping at the bit for me to finish the DIY write up, hence my reasoning behind the suggestions I made.

I appreciate your suggestions. I might order one for future testing, but as of right now I'm sticking with a manual option for the dc motors.

The circuit I'm trying out today does as expected, I ran 5 tests on low for five minutes. At the end of the five minutes weighed the amount of water. So I did that at both low and medium speed and these are the results.

Low
84, 89, 93, 91, 90
Medium
103, 102, 102, 102, 102

I ordered a new controller today that is supposed to be better on the low end, it was recommended by someone. Of course I won't believe it until I run the tests. Here are the specs on that:

Working Voltage: DC 6V - DC 90V (Ultra wide working voltage)
Control Power: 0.01 - 1000W(Max current :15A)
Static Current: 0.005A ( Standby)
PWM Duty Cycle: 0% -100%
PWM Frequency: 15Khz
Voltage control:0-5v(Voltage -mode control ,can use PLC to control the motor speed directly)

With power reverse connection protection, has complete protection from
overvoltage, 20A to quickly fuse the ceramic fuse ,can use PLC voltage
to control directly.

If that works better, I'm hoping that I can dissect the unit and hopefully build them for a lot cheaper since I really don't need the pot that comes with it.

Hello Dustin,
That sounds reasonable. Please let us know how the testing goes and if you need any recommendations/suggestions.

As far as your previous post is concerned, TIP120 will do the job just fine. One way to go easy on these transistors and prolong their life is to gradually speed up and speed down the motors rather than hitting them up with fixed high or low values.

Here are a few recommendations for a freewheeling diode:

  1. http://www.digikey.com/product-detail/en/1N5818-T/1N5818DICT-ND/190657
  2. http://www.digikey.com/product-detail/en/SB340/SB340FSCT-ND/3504412
  3. http://www.digikey.com/product-detail/en/1N4007/1N4007FSCT-ND/965481

Hope this helps!

Mohit

Thank you @mohit
Correct me if I’m wrong, but won’t I need some caps as well?

Good call! Capacitor across the motor terminals do help reduce the electrical noise and lessen the interference with the WiFi radio signal. 0.1uF or 0.22uF ceramic ones are ideal.

Heres is an article: http://www.pololu.com/docs/0J15/9

1st prototype printing now :slight_smile:

2 Likes

You my friend…crazy cool!!

Im not sure if thats going to work… the FET is across the + and - rails, so it would basically be a short circuit. and im not sure if you can hook a pot straight up to a FET and get good results, things may get hot if only half on…

Is this for a manual control? I would keep the dosing pump running PWM for the extra torque at low speed. this could be done with the spark, using a pot on an analogue input and connecting the FET to a PWM output. Or for an independent setup, buy a pre-made PWM motor controller (or make your own with something like a 555 timer, maybe this one http://www.dprg.org/tutorials/2005-11a/ )

there is a neat little hand drawn diagram at about post 36 in this thread, they are driving small DC blower motors.

BTW… V2 is printing now! 1st one i overcomplicated a bit, so ive redesigned and made it even more complicated!

Here's a snippet from the schematic, if that is useful to you.

Thanks for the reply…that was my first run at drawing a schematic, I should have just removed it once I figured out what I had done wrong…oh well.

I’ll check out that post you mentioned.

I’m looking at manual control independent from the spark at the moment, for two reasons. One I had a hard time getting a PWM controller to work on the spark without a lot of additions…if you know of a simple way please let me know. I’ve already spent a bunch of money on motor shields and either they were too big or just simply wouldn’t work. In the end the package needs to be small. And second, I didn’t want to have to bother more people to write code for me on here.

I also was looking into building a manual PWM controller but it started to seem like too much of a task when I figured out that I could buy them on amazon for $10.

I also have a few of these laying around, and they are the perfect size, but they don’t do well at low speeds. Someone mentioned I need to change the code in the avr tiny. I like them because of their size and simplicity. I also have spoken with the designer, Dale, and he was fine with me modifying it to my needs. He just doesn’t have the time to do it for me. He even gave me the eagle file for the board.

A few details that I found while using the PWM controller that I purchased on amazon, link above. At the lowest speed, just before stalling, the motor was drawing 4v @ 0.2A. I know the 4v is just an average, but its still an idea of whats going on. That was under load with about a foot of head pressure.

with the circuit from @coolnewt you really only need 5 extra components to the spark, thats 2 resistors, 1 diode, 1 FET and a Pot!

I should have some more time free next week , and ill have a bit more of a look into PWM for you. Im just waiting for filler to dry at the moment so i can start painting! (thats my excuse and im sticking to it)

v2 has finished printing, its a lot smaller than i had pictured but looks like it will work ok now to dig out my old nitro rc car from the attic to steal some rubber fuel hose… and then hack a servo to make it turn

As you seem to be spending a lot to get this working, may I suggest a single device that will work and give you protection at the same time?

Have a look at the BTS432 ProFET which is a high side switching device. I use these to drive high power relays and solenoids on hydraulic valve packs. They are virtually bullet proof and can switch inductive loads like yours without any extra external protection diodes.

http://sg.element14.com/infineon/bts432e2/mosfet-smart-switch-to-220-5/dp/743343?Ntt=BTS432

They may not be as cheap as a MOSFET but they will work directly with 3.3V and 5.0V TTL input. You also get back a status line to indicate if there is a short or a fault.

I use PWM to control the valve. I use 100% output for the initial pull in of the valve and then switch to a lower one, around 30% (testing finds the ideal value) and they work great. As they are being used for underwater use, the short circuit protection works great when there is water in the cables connecting the valve pack and the controller. I’ve never had to replace a device yet. With the old transistor and MOSFET based controllers I’ve replaced a fair few other the years.

2 Likes

@Hootie81 @coolnewt is the schematic you mentioned here on post #71 the schematic of the hand drawn diagram?

Given that I’m a newbie with these schematics, here is what I see in the schematic for parts (I might need some help here as I’m sure I’ll get something wrong)

J7: DC Barrel Jack
J9-1: ?
J9-2: ?
+12V: 12V Supply
D3: Diode (fairchild what??)
Q1G$2: N Channel MOSFET (I have TIP120’s laying around, does that qualify?)
R18: 330 ohm resistor
R17: 1k ohm resistor

My confusion with this is, would the spark control the PWM? The pot goes into an analog port on the spark?

@v8dave - I appreciate you taking the time, I took a look at your suggestion, the downfall is the price on your suggestion. At $8 for a FET that’s definitely a bit more than I’m looking to spend.

tip120’s are darlington transistors so they are a little different, plus i think they need 5v to turn on fully, but thats a guess as i haven’t used them in years and everything back then was 5v. and im not sure of the switching characteristics of them for PWM use. but give them a go and see how they work, dont worry about the PWM to start with just turn a pin high for 5sec then turn it low for 5 sec and see how the pump runs

yep J7 is the jack, J9-1 + 2 i would say are test points or solder pads and you dont need to worry about them, D3 is a diode to short circuit the back EMF from the motor when the PWM goes low, 1n4001 is a 2c diode that will do the job ok for what you need. Q1G$2 is the second FET in the tiny little package thats not really prototype friendly, its a SSM6N58NU. and you got the resistors

The circuit is the same as the hand drawn picture.

The spark is perfect for doing PWM, to drive the FET to turn the motor/pump. that gives you speed control. a pot connected to an analogue input could be used to control that speed. then maybe some buttons to start and stop the dosing, or control all of that from the interwebs like you were at the beginning! just input a speed and duration and time and dates etc…

Ok. Now the question is, which FET will work for prototyping? I ran into a problem before where the digital outputs didn’t provide enough voltage to open the gate on the FET. That was when I was trying a tinkerkit MOSFET module - it worked fine on an arduino, but not on the spark.

Your quick…I was scouring mouser, and they don’t have any in the 220 packaging that could find. Thank you.

i was looking at them earlier today…

renovations are done now, so tomorrow is a day to play with diy pump :smile: i think my design will be slow but precise

Thats good to hear! I appreciate your help, are you a coffee lover?

Back to business, where does the digital PWM pin hook into? I was under the impression that the digital pin would hook into the gate, the drain to the motor ground and the source to the spark ground.

So I’m really dumbing things down now, I did a fritzing diagram for how I see this being hooked up. Also, correct me if I’m wrong, but the spark core only has two PWM outputs correct? What if I want three PWM channels? Please let me know.

Concerning the PWM pins, according to the docs, there should be 8; https://github.com/spark/docs/blob/master/src/content/hardware.md
Take a look at the analogWrite. I’m not sure that’s the precise PWM that you want, but it’s PWM nonetheless.