DC fan speed control

Can we control DC 12v fan speed using only bolt module or bolt-arduino combination alone. I do not have mosfet or other ICs. I have a potentiometer, can that be used for this purpose ?

Hi @swethatsunil.mec,

You cannot control a fan with the Bolt WiFi module only.

The recommended method to control the motor is via a motor driver ic. You can buy a module for the same via the following link.

Here is a query where the solution was provided before.

@vinayak.joshi Dear Sir,
I tried it with L298N, 9v battery and Arduino as per the following circuit


Except that I connected only 1 motor and my supply battery was 9v. The Arduino code is as shown below:

int enA = 9;
int in1 = 8;
int in2 = 7;
void setup() {
// put your setup code here, to run once:
pinMode(enA, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
analogWrite(enA, 255);
delay(2000);
}

But the motor is not rotating just shaking(like small trembles) a bit but not rotating. Please help soon.

No, we cannot control it, as bolt’s operating voltage is 3.3V. which is much lower to give a start to 12 V DC fan.

@srivijaykalki I am asking about Arduino, not Bolt module
Also, the L298N has 5v output, that is being used to supply power to Arduino

Upload the image of your setup. And dc motor is 9v or 12v rating?

@akshaykumar.kumar198


I am not sure of the motor rating as I did not buy it; I used one that was already available. It works when it is directly connected to 3v (2*1.5v) battery. I believe it is a 3-9V toy motor.

Hi @swethatsunil.mec,

The connection looks right.

Just that this code will run the motor on full speed.

If you want to reduce the speed, you will have to set the value in analogWrite(enA, 255), to a number below 255.

Try out different values such as 64, 128, 200 etc

@vinayak.joshi ina Yes I tried that too, still same situation

Dear Swetha,
I faced such situation years ago when I bought L298N from amazon and I surprised that same driver when bought from Robu.in worked. Sometime the problem of motor-drivers. I recoomemnd to check by connecting other L298N or L293D. best is to use Arduino L293D shield. I recently bought and it cost me Rs. 145/-.

@swethatsunil.mec It looks like you are giving the supply to the Arduino and Driver ckt from the same 9V battery. Have you tried giving the power to the Arduino from a separate source, say your PC/laptop or 9V adapter?? If not, then give it a try. Also, check if the yellow-grey wire pair is connected to appropriate terminals. If this works then alright otherwise try replacing the driver ckt.

1 Like

@akshaykumar.kumar198 @vinayak.joshi @prakash52kar I tried connecting a 12V DC fan instead of the motor and the circuit worked. This is the fan that I connected


But, the motor is still just shaking(trembling) not rotating when connected to the same circuit. So I believe that the circuit is working fine, it is something about the rating of the DC motor. Please help.

1 Like

You have to use 2 batteries in order to controll 12v Dc motor.One for motor shield and other for arduino.I hope it will work.

AkshyKumar’s point is very much correct!

Hi @swethatsunil.mec,

I beleive the motor you are using is not rated for 9v. It might be rated for 5 or 6v.

Also, please check by connecting the motor directly to the 9v battery.

The other possible issue could be the wiring between the motor and the motor driver circuit. Try changing the wiring.

@akshaykumar.kumar198
Sir, I tried that too. When i give different supply to Arduino and driver circuit I can hear the motor rotating and its vibrations, but the shaft is not rotating.

@vinayak.joshi The motor is working when connected directly to 9V and also when directly connected to 3V. And I believe the circuit is working because the same circuit with single common 9V supply to both Arduino and driver circuit is working for a 12V fan as mentioned in

If for one thing it s working and for another it is not working, then hardly I can help. There might be some loose connection.