Vacuum pump control code example?

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
WillMarchant
 
Posts: 28
Joined: Thu Sep 21, 2017 4:42 pm

Vacuum pump control code example?

Post by WillMarchant »

Hi Folks:
I'm trying to use the https://www.adafruit.com/product/4699 with a Crickit as shown in the video on that product page. Could someone point me to the code used in that video, please? I'm using the motor drive code from the crickit tutorial to try and drive the vacuum pump without success. It's making noise but doesn't appear to be moving air. I suspect I just need a different PWM setting or something .
Best wishes,
Will

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: Vacuum pump control code example?

Post by dastels »

Can you post clear photos showing your wiring and connections?

Dave

User avatar
SongYeager
 
Posts: 3
Joined: Tue Mar 08, 2022 1:35 pm

Re: Vacuum pump control code example?

Post by SongYeager »

Hi, I have the same issue.

Image

I also used this https://github.com/jumejume1/pi-l298n-d ... 298n_dc.py

Thank you

User avatar
WillMarchant
 
Posts: 28
Joined: Thu Sep 21, 2017 4:42 pm

Re: Vacuum pump control code example?

Post by WillMarchant »

Sorry it took so long to get back.

The pump is hooked to the motor1 lines.

Criket power is from the 4A supply recommended on the Adafruit site. The Arduino power is from a 10W Apple wallwart.

The pump works when I move the lines from the motor1 port to the 5V and GND lines on the Criket.

The example code just yields a high pitched hum.
Attachments
CriketPump.jpg
CriketPump.jpg (290.86 KiB) Viewed 224 times

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: Vacuum pump control code example?

Post by dastels »

What PWM values are you using? It will need to be above some threshold to get the motor spinning. That will be specific to that motor/gearbox/pump combination. Try it with a 100% duty cycle, which will be like connecting it directly to 5v.

Dave

User avatar
WillMarchant
 
Posts: 28
Joined: Thu Sep 21, 2017 4:42 pm

Re: Vacuum pump control code example?

Post by WillMarchant »

Sigh, I've lost the code that makes the motor buzz but not pump. Here's the code I just tried and the pump makes no noise at all:

Code: Select all

#include "Adafruit_Crickit.h"
#include "seesaw_motor.h"

Adafruit_Crickit crickit;

seesaw_Motor motor_a(&crickit);

void setup() {
  Serial.begin(115200);
  while ( ! Serial ) delay( 100 );
  Serial.println("RunPump");
  
  if(!crickit.begin()){
    Serial.println("ERROR!");
    while(1) delay(1);
  }
  else Serial.println("Crickit started");

  //attach motor a
  motor_a.attach(CRICKIT_MOTOR_A1, CRICKIT_MOTOR_A2);
}

void loop() {
  Serial.println( "Start pump" );
  motor_a.throttle(1);
  delay( 5000 );

  Serial.println( "Stop pump" );
  motor_a.throttle(0);
  delay( 5000 );
}
So I suspect something is wrong with that basic code.

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: Vacuum pump control code example?

Post by dastels »

I don't see anything wrong with the code.

By "no noise" I take it the motor isn't running.

If that's the case check your wiring/connections. I wouldn't put much faith the how you have it wired. Too many iffy connections for my comfort. Ideally wires soldered to the motor with the other ends in the terminal block.

Dave

User avatar
WillMarchant
 
Posts: 28
Joined: Thu Sep 21, 2017 4:42 pm

Re: Vacuum pump control code example?

Post by WillMarchant »

I just soldered ~6" of wire onto the pump and tried it across the +5 and GND lines: very vigorous pump action. That code, with the pump connected to the Motor 1 connector, and the pump gives a very faint click for every (both 1 and 0) of the call to motor_a.throttle. I switched over to the b/2 side with the same result.

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: Vacuum pump control code example?

Post by dastels »

It should automatically do the conversion but what happens is you change 1 & 0 to 1.0 and 0.0? What happens if you change 1 (or 1,.0) to -1.0?

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: Vacuum pump control code example?

Post by dastels »

SongYeager wrote:Hi, I have the same issue.
No, this is a completely different setup. All that seems to be the same is the motor. Please make this a new topic.

Dave

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: Vacuum pump control code example?

Post by dastels »

Do you have other DC motors you could test with? There could be a hardware problem with the Crickit.

Do other parts of the Crickit work? That would give some indication as to whether the seesaw & I2C connection is good.

Dave

User avatar
WillMarchant
 
Posts: 28
Joined: Thu Sep 21, 2017 4:42 pm

Re: Vacuum pump control code example?

Post by WillMarchant »

Explicitly using floating point speed constants didn't change things. And the -1.0 was the same result as the 1.0.

I hooked up a Dagu DG01D motor and that works fine.

The Dagu specs are 190mA max current.

The https://www.adafruit.com/product/4699 page says that the pump draws about 500 mA. And the https://www.adafruit.com/product/3093 page says the Crikit should be able to supply 1 Amp.

I measured across the pump terminals and got 1.2 Ohms. At 5V that's over 4 Amps. So the shorted power supply will, barely, handle that. But it's way beyond the capability of the Crikit driver.

So the pump is defective.

The order was January 11 so I guess I'm just out of luck and will need to order a new pump.

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: Vacuum pump control code example?

Post by dastels »

It's a motor so it's more complex than just resistance, but it does sounds like a bad motor since a different one works.

Please email [email protected] with a link to this thread, your order number, and request the replacement of one Air Pump and Vacuum DC Motor - 4.5 V and 2.5 LPM - ZR370-02PM

Dave

User avatar
WillMarchant
 
Posts: 28
Joined: Thu Sep 21, 2017 4:42 pm

Re: Vacuum pump control code example?

Post by WillMarchant »

The new pump showed up. It buzzed out at about 10 Ohm. And it works when the Crikit tells it to! Thanks for your help!

Locked
Please be positive and constructive with your questions and comments.

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”