📣📪 🚚 Adafruit will not be shipping USPS orders Monday October 14, 2019 🗓. Expedited USPS orders placed after 11am ET 🕚 Friday October 11 will go out Tuesday October 15 📣📪🚚
0

How to control the speed of a blower with arduino?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

How to control the speed of a blower with arduino?

by angelicatorres15 on Mon Jul 22, 2019 10:12 am

Hello! I need assistance in regards the control of speed of a blower that is powered with 24V and 10A. The speed control voltage goes from 0-4VDC. The cables that the blower use are 18awg, is that something important to considered? I will leave a picture of the arrangement to seek for feed back, also the code of the system.
int pot=A1;
int vBlower=11;
int relay=4;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(pot,INPUT);
pinMode(vBlower, OUTPUT);
pinMode(relay,OUTPUT);

}

void loop() {
// put your main code here, to run repeatedly:
digitalWrite(relay,HIGH);
int potRead=analogRead(pot);
int velocity=map(potRead, 0, 1023, 0, 818);
Serial.println(velocity);
analogWrite(vBlower, velocity);
}
Attachments
Picture1.png
Picture1.png (263 KiB) Viewed 116 times

angelicatorres15
 
Posts: 40
Joined: Fri Mar 29, 2019 11:33 am

Re: How to control the speed of a blower with arduino?

by adafruit_support_bill on Mon Jul 22, 2019 10:23 am

What problem are you having? What happens when you run the system as pictured?

adafruit_support_bill
 
Posts: 74603
Joined: Sat Feb 07, 2009 10:11 am

Re: How to control the speed of a blower with arduino?

by angelicatorres15 on Mon Jul 22, 2019 10:38 am

If i do such connection, I dont see the blower operarting.

This note appears on the drawing of the blower.

"blower speed is proportional to the voltage applied between the speed command and the ground pins. Full speed is achieved at 4V or less depending on blower operating point. USer may connect the speed command pin together with the 24V power supply to ensure full speed"

angelicatorres15
 
Posts: 40
Joined: Fri Mar 29, 2019 11:33 am

Re: How to control the speed of a blower with arduino?

by kcl1s on Mon Jul 22, 2019 10:46 am

One thing I see is analogWrite takes values from 0 - 255 not 0 - 818. The easiest way would be to divide velocity by 4 after you do the mapping. Also this is a pwm signal not true DC is the blower ok with that?

Fellow hobbyist
Keith

kcl1s
 
Posts: 1288
Joined: Tue Aug 30, 2016 12:06 pm

Re: How to control the speed of a blower with arduino?

by angelicatorres15 on Mon Jul 22, 2019 10:55 am

I used input of 0 - 818 because I thought that would be the output voltage of 0-4V that the blower needs to control de speed.

angelicatorres15
 
Posts: 40
Joined: Fri Mar 29, 2019 11:33 am

Re: How to control the speed of a blower with arduino?

by angelicatorres15 on Mon Jul 22, 2019 10:55 am

I will try your recommendation

angelicatorres15
 
Posts: 40
Joined: Fri Mar 29, 2019 11:33 am

Re: How to control the speed of a blower with arduino?

by kcl1s on Mon Jul 22, 2019 11:00 am

Your wire diagram and sketch don't agree...

code
int pot=A1;
int vBlower=11;
int relay=4;

Wiring
pot= A0
blower signal = A1 (not a pwm capable pin)
relay = 12
button??? = 2

Send a photo of actual wiring for a closer look.

Keith
Last edited by kcl1s on Mon Jul 22, 2019 11:21 am, edited 3 times in total.

kcl1s
 
Posts: 1288
Joined: Tue Aug 30, 2016 12:06 pm

Re: How to control the speed of a blower with arduino?

by angelicatorres15 on Mon Jul 22, 2019 11:04 am

I will do some changes give me 5 mins

angelicatorres15
 
Posts: 40
Joined: Fri Mar 29, 2019 11:33 am

Re: How to control the speed of a blower with arduino?

by adafruit_support_bill on Mon Jul 22, 2019 11:04 am

As Keith points out, "analogWrite" on most Arduinos does not put out an analog DC voltage. It outputs a variable duty-cycle PWM signal. Depending on the input characteristics of your blower controller, you may need to do some low-pass filtering on that to get a steady DC voltage: https://www.instructables.com/id/Arduin ... analog-DC/

adafruit_support_bill
 
Posts: 74603
Joined: Sat Feb 07, 2009 10:11 am

Re: How to control the speed of a blower with arduino?

by kcl1s on Mon Jul 22, 2019 11:10 am

angelicatorres15 wrote:I used input of 0 - 818 because I thought that would be the output voltage of 0-4V that the blower needs to control de speed.

On the Uno analogRead returns 0 - 1023 using 10 bit conversion. analogWrite takes values 0 - 255 which is 8 bit resolution. As I said the easy way to get them in the same range is to divide by 4. So 4 volts pwm is about 4 / 5 * 255 = 204. You used 818 / 4 = 204 in int math.

Make sure you check the wiring also.

Keith

kcl1s
 
Posts: 1288
Joined: Tue Aug 30, 2016 12:06 pm

Re: How to control the speed of a blower with arduino?

by angelicatorres15 on Mon Jul 22, 2019 11:20 am

int pot=A0;
int vBlower=A1;


void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(pot,INPUT);
pinMode(vBlower, OUTPUT);
}

void loop() {
// put your main code here, to run repeatedly:
int potRead=analogRead(pot);
int velocity=map(potRead, 0, 1023, 0, 818);
Serial.println(velocity/4);
analogWrite(vBlower, velocity/4);
}
Attachments
proto.png
proto.png (269.55 KiB) Viewed 94 times
Optimized-20190722_111657.jpg
Optimized-20190722_111657.jpg (340.02 KiB) Viewed 94 times

angelicatorres15
 
Posts: 40
Joined: Fri Mar 29, 2019 11:33 am

Re: How to control the speed of a blower with arduino?

by angelicatorres15 on Mon Jul 22, 2019 11:23 am

the power supply is of 24V, not 12V

angelicatorres15
 
Posts: 40
Joined: Fri Mar 29, 2019 11:33 am

Re: How to control the speed of a blower with arduino?

by kcl1s on Mon Jul 22, 2019 11:26 am

No analogWrite on pin A1. From https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/ the Uno can do analogWrite (pwm) on digital pins 3, 5, 6, 9, 10, 11 only. Try one of those.

Keith

kcl1s
 
Posts: 1288
Joined: Tue Aug 30, 2016 12:06 pm

Re: How to control the speed of a blower with arduino?

by angelicatorres15 on Mon Jul 22, 2019 11:30 am

update: I started to move turn the potentiometer an I could see that thw blower is receiving a signal put not constant

angelicatorres15
 
Posts: 40
Joined: Fri Mar 29, 2019 11:33 am

Re: How to control the speed of a blower with arduino?

by angelicatorres15 on Mon Jul 22, 2019 11:31 am

kcl1s wrote:No analogWrite on pin A1. From https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/ the Uno can do analogWrite (pwm) on digital pins 3, 5, 6, 9, 10, 11 only. Try one of those.

Keith

I will make the changes

angelicatorres15
 
Posts: 40
Joined: Fri Mar 29, 2019 11:33 am

Please be positive and constructive with your questions and comments.