Spark & Spark Relay controlled Peristaltic Dosing Pumps

Hi @james211

I think that would be pretty easy. Might run out of functions at some point and need to remodularize a bit, but otherwise no problems.

Hey @bko, thats good to know. I donā€™t follow what it means to run out of functions. Can you explain?

So I have two pumps coming from China, just ordered on alibaba for $26/each. One is a DC gear drive, the other is a DC planetary gear - both of these are 6V. Here is a pdf from the supplier.

The Spark core supports up to four different functions in one core, so after that you have to combine and do more parsing on the core side. I used all four functions already in the previous code for the setRelay functions, so a bit of re-coding would be in order there.

1 Like

So I randomly met a gentleman yesterday who at one point worked with building commercial grade peristaltic dosing systems. I sent him my circuit, he made some tweaks and I ran it this morning, seems to work really well. Iā€™ll post it when I get home.

With that in mind, I was curious about getting a legit, custom board made that would support the spark and the FETs.

I know @Hootie81 is working something so Iā€™m curious if I should wait or move ahead with what I have going.

Ideally if like this board to have everything on it, the spark, the FETā€™s, a voltage regulator and the pots.

Is be curious what yā€™allā€™s thoughts would be on this.

Two notes, Iā€™m not opposed to this being a solder yourself (meaning the components, the board would be a professionally printed board) kind of board if that would drastically reduce the cost. Lastly, cost efficiency is a must as thatā€™s the number one priority of me working on this project.

2 Likes

Exactly what Iā€™m working on! trying to make it a little more universal than just driving pumps, once i have the circuit worked out ill post it on git.

the more we make the cheaper it will get.

1 Like

So here is the circuit this gentleman told me to try. So far this circuit has worked the best of any in terms of low duty and consistency, I was able to get down 16.6mL/minute. Prior I was never able to get below 20.

Now here is the problem Iā€™m running into, because of how cheap these little pumps are, Iā€™m finding that they eventually stall when set at low duty. When this happens my first instinct was to bump the pot a bit, but for some reason the spark or motor, stops responding to the pot. The only way to get it back to normal is to reset the spark core. Is this a circuit issue or a spark PWM issue?

what voltage are you running them at? and whats the duty cycle? can you up the voltage and reduce the PWM?

when the motor stalls they may drag the power supply down and make a lot of noise and interrupt the processor doing its thing.

My brain struggles to process schematics that dont have +ve at the top and -ve at the bottomā€¦ so i re-drew it, besides resistor values and the diode missing off the motor it looks the same.

the diode is there to stop noise and back EMF from damaging things.

Sorry..I'm still learning how to properly draw schematics.

The motor is being supplied with 12 volts. I'm not sure how to measure duty cycle, or reduce PWM. Again, the speed was being controlled by a 10k trimming pot.

I left the diode off of the schematic because I soldered it directly to the motor terminals.

we can try adding a few lines to see whats happening and make sure everything is doing what it should and get an idea of whats going on,

const int FETPin = D0; //pin FET is connected to 
const int POTPin = A0; //pin POT is connected to

void setup() {
Ā Ā Ā  pinMode(FETPin, OUTPUT); // Set FET Pin as output
Ā Ā Ā  Serial.begin(9600); // Opens the com port
Ā Ā Ā  while(!Serial.available()) SPARK_WLAN_Loop(); //Waits here for user input on computer

}
Ā Ā  Ā 
void loop() {
Ā  
Ā Ā Ā  int sensorValue = analogRead(POTPin); // read the potentiometer:
Ā Ā  Ā 
Ā Ā Ā  int outputValue = map(sensorValue, 0, 4095, 0, 255); // map the sensor value to a range from 0 - 255:
Ā Ā  Ā 
Ā Ā Ā  if (millis() % 1000 == 0) { // so we dont spam the serial port
Ā Ā  Ā Ā Ā  Ā Ā Ā  Ā Serial.print("Input: ");
Ā Ā  Ā Ā Ā  Ā Ā Ā  Ā Serial.print(map(sensorValue, 0, 4095, 0, 100));
Ā Ā  Ā Ā Ā  Ā Ā Ā  Ā Serial.print("% - Output PWM: ");
Ā Ā  Ā Ā Ā  Ā Ā Ā  Ā Serial.print(map(outputValue, 0, 255, 0, 100));
Ā Ā  Ā Ā Ā  Ā Ā Ā  Ā Serial.println("%");
Ā Ā  Ā }
Ā Ā  Ā Ā Ā  Ā 
Ā Ā Ā  analogWrite(FETPin, outputValue); // use that to control the transistor:

}

Hey all, I just wanted to jump in a little bit as Iā€™m building a system that is very similar - and I have yet to find the perfect parts.

First, I bought two of the small peristaltic pumps off of ebay (6V DC motor driven, plastic housing, Link to Pump on Ebay). I tested them initially with an ajustable power supply (3V, 4.5V, 6V etc.) and found that they run well at a lower duty cycle (4.5V for example).

@james211 Here is a schematic of a simple circuit that I was using (via a 100k trimpot) to drive the motor slower. I also installed a 3-wire volt-meter to measure the number of volts that is being drawn across the motor. Iā€™ve found that running it at normal (6V) setting is required to overcome the stall current, but once overcome you can drop the voltage by as much as 2 volts to run it at close to 50 rpm.

Apologies for the crappy looking schematic from LTSpice:

@Hootie81 I have a couple Nema17 Steppers lying around that I would love to stick a head onto, but I havenā€™t found any free-standing heads yet. Iā€™ve also contacted a company about their stepper based peristaltic moters (Link to Technical Specs) and am awaiting a reply.

My aim is to have continuous flow as low as 0.16ml/min (10ml/hr).

@MicroCircuit there is a link nice looking stepper driven pump on post 93 aboveā€¦ its pretty cheap compared to some

this is the circuit Iā€™m trying to squeeze into the size of the sparkā€¦ wish me luck!

anyone know how to change a library/package in eagle to make it osh-park acceptable? im trying to use a QSOP16 package but the pins are a tiny bit to close and throwing a DRC clearance error. I can send the library if needed its for the MAX6966 SPI PWM I/O expander

@MicroCircuit I looked at those pumps as well, I didnā€™t purchase because I didnā€™t like the way the mounts were. What is your project?

@Hootie81 thanks for the snipit of code, Iā€™ll hopefully get to it tomorrow - been a bit crazed last few days.

Alright, received the pumps from China today, 10x better then the ā€œel cheaposā€ from ebay. The planetary geared motor can get pretty slow using the circuit from post 128. Iā€™ll be very anxious to try with @Hootie81 board.

I have not run a load test using liquid yet so that will be the almighty test with these guys.

which ones did you get?

All the components are here nowā€¦ i just need the PCBā€™s

As i was writing the library i noticed something cool the h-bridge does that you donā€™t get with a single FET, between each on period of the PWM it shorts out the motor terminals effectively applying the brakes, so instead of getting
12v - free - 12v - free - 12v - free that you would get from the single FET you get
12v - brake - 12v - brake - 12v - brake, not sure how much better the control will be but will make a difference for sure
or it may just waste more power and make the motors run hotter!

That sounds pretty coolā€¦I donā€™t think the motors will ever run long enough to make it hard on themā€¦but who knows!

The motors I received were these. I received on planetary gear and one gear box. The planetary seems a lot smoother and so far seems to be smoother at lower duty as well.

Thatā€™s awesome they can be used with lots of different motors, i like the stepper ideaā€¦ slow and very precise dosing!

BTW, im updating my library when i get home from Italy to use the dual DC motor controller to run a single stepperā€¦ ive worked out how to do itā€¦ i just need to write it!

I didnā€™t price out the stepper, but I guess I should.

Check these links outā€¦Inspiration!

http://blog.aquanerd.com/2014/08/ghl-doser-2-pump.html

1 Like

Here is some more inspirationā€¦ Motor shield v1.0 and power supply v1.0 for Spark core



2 Likes