Fuelab Prodigy Series Pump and Driver via Arduino

Thread Starter

rennie1080

Joined Apr 10, 2017
52
Hi Everyone

I have a fuel pump for a vehicle that allows its speed to be controlled by a varying PWM signal with positive voltage. It operates in the range of 500-1500Hz frequency.

Does any Arduino circuit exist that converts a 0-5 volt input to a PWM signal output in a way that allows the user to program how much the pwm signal will be affected by each voltage change? I want to add also a pot that control the speed. I'm new to Arduino and am watching / reading tutorials, so I would sincerely appreciate any help because I'm trying to get this vehicle running asap.

upload_2018-7-31_8-24-6.png
upload_2018-7-31_8-24-25.png
 

danadak

Joined Mar 10, 2018
4,057
Something like this. You have a conflicting requirement, you want to
control fuel pump by voltage and by pot/speed, which is it ? IF its
just pot then eliminate the diff channel used and just use the one
single ended channel of the SAR

upload_2018-7-31_6-48-23.png

Board to use $4 -

http://www.cypress.com/documentation/development-kitsboards/psoc-4-cy8ckit-049-4xxx-prototyping-kits

Code woul be fairly straightforward, read the A/D value for V, left shift it by 4 bits, and write
to PWM compare register. If you want the pot to control it read pot V, left shift value by 4
bits, and write to PWM compare register. Left shift is to handle fact that SAR is 12 bits,
PWM 16, and you want to write SAR value to MSBs of PWM.

You might have to place diode protection on inputs, cars power circuits very nolsy, maybe
even experiment with RC low pass filter on inputs to achieve noise reduction. or use A/D averaging
over many cycles. Thats a setting in SAR configuration.

PWM set to 1 KHZ. See attached


Regards, Dana.
 

Attachments

Last edited:

Thread Starter

rennie1080

Joined Apr 10, 2017
52
Hi , thank you for your answer.
I am using fuelab prodigy series pump. Pumps are parallel to each others. I have arduino and use it to control two parallel pumps. I want to control speed of them. To I his pumps include electronic circuit driver. So I dont need any driver. By applying pwm to mid pin, I can control but I dont understand how can I adjust two parallel pumps spedd with one pot ? I want to achieve the operation simultanepusly. What I should add to code for that purpose ? Happy days
 

Attachments

danadak

Joined Mar 10, 2018
4,057
UART or I2C or SPI link from one Arduino to the other. One measures
pot V, sets its PWM, and transmits that PWM setting to the other
Arduino.

Or one Arduino measures pot, sets its PWM duty cycle, the other Arduino
measure the duty cycle used on that pump and replicates the duty cycle
going to its pump by doing a period/pulse measurement.

First method most accurate.

Regards, Dana.
 
Last edited:

Thread Starter

rennie1080

Joined Apr 10, 2017
52
It is my fault , I am sorry for my drawing Dana. They are same arduino actually I should draw properly. Two pump's pwm input could be drive from one digital pin ? I am adding the system. Is it possible to drive two pump pwm from one digital pin ? ( I guess a friend of mine did that exactly but I havent seen anything before like this ? )
 

Attachments

danadak

Joined Mar 10, 2018
4,057
Yes, you would use two MOSFETs driven from same pin, one
handles one pump, the other MOSFET the additional pump.
Use a MOSFET driver from pin to drive MOSFET gates to get
them to switch fast.

How much current does pump need ?

Regards, Dana.
 

Thread Starter

rennie1080

Joined Apr 10, 2017
52
Pumps draw 14A at maximum. I wll drive pumps at maximum or another speeds. ( added graph). If I dont use mosfet, what happens. Can I directly wire pwm pins of pumps to arduino digital pin ? ( I guess it can handle the current ) . Total design includes 1 pot, 2 pumps, 1 arduino ( 1 digital pin for two pumps, 1 analog pin for pot ) .
 

Attachments

danadak

Joined Mar 10, 2018
4,057
Arduino outputs can only handle a few mA of current, you need to use
low Rdson MOSFET and a gate driver to minimize power consumed
by MOSFET and use it as a switch for controlling 14A motor current.

If pump has its own driver, and accepts logic level inputs, yes Arduino
can connect to those inputs directly. That would eliminate MOSFET and gate
drivers because pump has its own driver. But I looked at ad for pump, it
has none of this.

What are specs of pumps control inputs ?

Regards, Dana.
 

Kjeldgaard

Joined Apr 7, 2016
476
I still need to see the last details about that PWM control input.

It is stated that the frequency is typically 1 KHz, the voltage typically 12 V and the active area for PWM is 20% to 90%.

However, there is no information about: input resistance or input current, what maximum low input voltage and minimum high input voltage.
 

Thread Starter

rennie1080

Joined Apr 10, 2017
52
There is limited information about driver . I add features below. In datasheet, dont mention about resistors or anything to limit the current.

Electronic Features

  • Internal speed controller for variable flow operation
  • 12 to 16 volt vehicle electrical system compatibility
  • Accepts PWM input for speed control
  • No expensive add-on voltage regulators or pump controllers required!
  • Continuous duty–motor speed can be adjustedupload_2018-7-31_17-10-45.png
upload_2018-7-31_17-9-42.png
 

Reloadron

Joined Jan 15, 2015
7,517
Looking at the Operating and Installation Instructions for the pump while they do not overly get into control specifications they do mention a few worthwhile tid bits. There is also a few charts which show Current Draw Performance.

In the operating and installation instructions on page 4 of 6 where they cover using a switch or relay for high / low speed they mention:
"Current draw through this circuit is extremely low (much less than 1 amp), so a very low current rating for this 12 volt relay and switch can be used".

That lends me to believe that you will not need a whole lot of drive current on the Yellow speed control terminal from your PWM signal. While I don't know what "much less than 1 amp" actually is I think it's a safe assumption that just about any logic level MOSFET capable of handling an amp will suffice.

Does any Arduino circuit exist that converts a 0-5 volt input to a PWM signal output in a way that allows the user to program how much the pwm signal will be affected by each voltage change? I want to add also a pot that control the speed.
Yes, as Dana mentioned but with a focus on an Arduino since you mentioned an Arduino it is pretty easy to do. Here is an example of just about what you want to do. They use the example to drive an LED but rather than a LED you would drive a MOSFET gate. Also in your pump data they mention a PWM signal frequency between 500 to 1500 Hz. With an Arduino Uno the PWM frequency of most PWM pins is 490 Hz but pins 5 and 6 have 980 Hz. You may want to use pins 5 or 6 for your PWM out.

Also note where Dana mentions:
Code woul be fairly straightforward, read the A/D value for V, left shift it by 4 bits, and write
to PWM compare register. If you want the pot to control it read pot V, left shift value by 4
bits, and write to PWM compare register. Left shift is to handle fact that SAR is 12 bits,
PWM 16, and you want to write SAR value to MSBs of PWM.
In the example code this is done where you see:
Code:
// map it to the range of the analog out:
  outputValue = map(sensorValue, 0, 1023, 0, 255);
Don't know how much this will matter but we know from reading the pump manual that:
"When duty cycle is between 0-20%, the fuel pump is turned off. A duty cycle between 20%-90% will be variable speed between minimum and maximum speeds, while duty cycles between 90% and 100% are maximum Speed".

A typical pot offers about 260 to 270 degrees rotation. If we let 0 to 270 degrees represent 0 to 5 volts we already know that anything below 1.0 volt and above 4.5 volts does nothing. The lower 20% and upper 10%. I don't know if that is OK with you or if you want to modify the code or use a multi-turn pot for better pump speed resolution?

You also may want to consider how you plan to power your Arduino in an automotive application?

Ron
 

Thread Starter

rennie1080

Joined Apr 10, 2017
52
Dana I sent email but they said that dont know about arduino application for pump. Reloadron thank you for your answer. I added my code below. So in view of the fact that you said, Does this code work for my system ? As you said, How can I arrange pot degree for speed due to datasheet? I will power up arduino by using 5V dc/dc converter.

C:
#include <Wire.h> //I2C lib
#include <LiquidCrystal.h> // LCD lib
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

int pot_pin = A2;
int pump1_pwm= 5;

int pot_init= 0;
int pump1_init= 0;

void setup() {

  Serial.begin(9600);
  pinMode(A2,INPUT);
  pinMode(5,OUTPUT);
  lcd.begin(20,4);  // A4 - A5 connection SDA - SCL
  lcd.backlight();

}

void loop() {
 
pump_control();

}
void pump_control(void){
pot_init = analogRead(pot_pin);
pump1_init = map(pot_init, 0, 1023, 0, 255);
analogWrite(pump1_pwm, pump1_init);}
Moderators note : used code tags
 
Last edited by a moderator:

danadak

Joined Mar 10, 2018
4,057
Dana I sent email but they said that dont know about arduino application for pump.
Your request of them was for specs on pump, "Arduino" in the post gave them
the excuse not to help.

Regards, Dana.
 

Reloadron

Joined Jan 15, 2015
7,517
Your request of them was for specs on pump, "Arduino" in the post gave them
the excuse not to help.

Regards, Dana.
Yes, that gave them an easy out. The object was to find out more about external speed control requirements of their pump.

I also see where you plan to use a display. That was not included in the example I linked to. While I have a few Arduino boards laying around I don't have a display to to try. I'll kick it around today and see what I can come up with.

Ron
 

Reloadron

Joined Jan 15, 2015
7,517
Thinking about this a little more here is what I would try. The sample code does not include a display but should work. I ran the code and used a 10 turn pot 100 K simply because I had one. I also mapped the output to be more inline with what the manufacturer mentions.

Here is the code:
Code:
// Constants, pin naming conventions:
const int analogInPin = A0;  // Analog input pin that the potentiometer is attached to
const int analogOutPin = 5; // Analog output pin that the MOSFET is attached to

int sensorValue = 0;        // value read from the pot
int outputValue = 0;        // value output to the PWM (analog out)
int percentValue = 0;       // pump speed percent full scale

void setup() {
  // initialize serial communications at 9600 bps:
  Serial.begin(9600);
}

void loop() {
  // read the analog in value:
  sensorValue = analogRead(analogInPin);
  // map it to the range of the analog out:
  outputValue = map(sensorValue, 0, 1023, 50, 230);
  // map pump speed percent of full scale
  percentValue = map (outputValue, 50, 230, 0, 100);
  // change the analog out value:
  analogWrite(analogOutPin, outputValue);

  // print the results to the Serial Monitor:
  Serial.print("\t Speed Input = ");
  Serial.print(sensorValue);
  Serial.print("\t Speed Output = ");
  Serial.print(outputValue);
  Serial.print("\t Pump Speed Percentage = ");
  Serial.println(percentValue);

  // wait 2 milliseconds before the next loop for the analog-to-digital
  // converter to settle after the last reading:
  delay(2);
}
Basic screenshot:
Analog In PWM Out.png

With pot set for 0 V out:
Analog In PWM Out 1.png

Pot set for 5 Volts Out:
Analog In PWM Out 2.png

Scope image of 0 Volts applied from pot:
Analog to PWM1.png

Scope image of 5 Volts applied from pot:
Analog to PWM 2.png

Sweep time was 0.2 mS / Div and vertical gain was 2 V / Div. So we get just about a 1.0 KHz pulse repetition time and start at about 20% and finish at about 90% per the manual for the pumps.

My guess is that the pump PWM circuit is internal to the pumps. I would just use a single MOSFET to drive both pumps. I would try a generic logic level mosfet like a FQP30N06L with your Arduino pin 5 driving the gate and a 10K resistor gate to common. If that works then fine, if not we can worry about it later but I am betting it will work.

Ron
 
Last edited:

Thread Starter

rennie1080

Joined Apr 10, 2017
52
I will try it with pump immediately , thank you so much . I want to ask about code. Why dont u use pinout command ? Is is necessary for that purpose ?
 

Reloadron

Joined Jan 15, 2015
7,517
I will try it with pump immediately , thank you so much . I want to ask about code. Why dont u use pinout command ? Is is necessary for that purpose ?
In the beginning I call out the two pins I am using where we see:
Code:
// Constants, pin naming conventions:
const int analogInPin = A0;  // Analog input pin that the potentiometer is attached to
const int analogOutPin = 5; // Analog output pin that the MOSFET is attached to
That's all we need. I am using A0 for my analog in and using pin 5 as my analog out (my PWM).

Ron
 
Top