Help with PWM fan

Thread Starter

Nil80c

Joined May 28, 2020
4
Hi.
I am trying to use a 24v fan from a gas boiler in a project I'm working on. I have attached a circuit diagram.

I have a 24vdc supply hooked up to it.
I'm trying to use an arduino uno to adjust fan speed.
It's set up to output 3khz from pin 9 to the pwm input on fan.
There is a potentiometer wired in to change the duty cycle.

The problem is that I'm pretty sure the pwm needs a ground. It appears to be sharing the ground from the 24v supply in the circuit diagram.

But I've read that I cannot connect the 24v ground to the arduino without damaging it.

Can anyone explain simply how to wire this up?IMG-20200523-WA0004.jpg
 

Alec_t

Joined Sep 17, 2013
14,280
Welcome to AAC!
You should be able to use optoisolators, for both the PWM input control and the Hall sensor output, to avoid sharing a ground.
Btw, your left-hand opto isn't isolated as shown.
 

Thread Starter

Nil80c

Joined May 28, 2020
4
Hi Alec. Thanks for replying.
I probably should have said that I'm a total beginner. Therefore I'm about to ask some dumb sounding questions.

Would I connect the optoisolator between the 24vdc ground and the arduino ground?

At the moment I have the 24v supply connected to the fan, which causes it to run at full speed.
Not using hall sensor output.
Pwm wired to pin 9 on arduino.
Arduino powered with 9v battery
Altering potentiometer has no effect.
I'm assuming because there is no return from the fan to the arduino. Just an out.
 

Reloadron

Joined Jan 15, 2015
7,501
I can suggest how I would go about it. You want to vary the fan speed using an analog input and PWM output from your Arduino. Now we know the 24 volts and Arduino will not play well together. I would use a MOSFET to drive your fan. I would do it about like this.

PWM Fan 1.png

I would just use a 10K pot for your analog input then map your analog in to PWM out (0 to 1023 - 0 to 255). or actually whatever you low fan start is. You want to add opto couplers you can but I see not overwhelming reason to. The 24 volt supply and arduino supply do share a common ground.

Ron
 

peterdeco

Joined Oct 8, 2019
484
I would suggest a faster rectifier such as FR603. We had heating problems with 1N diodes on 12V and 24V motors. Otherwise, this is the tail end of an existing circuit we've used for years with no problem.
 

Thread Starter

Nil80c

Joined May 28, 2020
4
Thanks guys. I'm pretty sure I understand.
I'm not that familiar with electrical schematics so I've drawn it out as a circuit diagram.
Is this correct?20200528_201452.jpg
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
I would suggest a faster rectifier such as FR603. We had heating problems with 1N diodes on 12V and 24V motors. Otherwise, this is the tail end of an existing circuit we've used for years with no problem.
There is an ultra fast version of the 1n4002/7 versions now.
UF4002/7 etc.
Arduino seems a bulky solution when a small 8pin pic will do it all, with a logic level Mosfet.
Max.
 

Alec_t

Joined Sep 17, 2013
14,280
The post #6 circuit is incorrect. Wire it like Reloadron shows. The bottom horizontal line is the ground rail and connects to both the Arduino ground and the 24V supply ground.
 

Thread Starter

Nil80c

Joined May 28, 2020
4
Thanks Alec. I was trying to interpret Ron's drawing into something I could better understand. But it's clear I haven't understood his drawing.
I need to be able to see where each wire is going.
 

Reloadron

Joined Jan 15, 2015
7,501
There is an ultra fast version of the 1n4002/7 versions now.
UF4002/7 etc.
Arduino seems a bulky solution when a small 8pin pic will do it all, with a logic level Mosfet.
Max.
See this is what happens when people retire. The only way I am aware of new things is through the forums. I also agree as to a smaller 8 pin PIC.

If you go with an Arduino like the UNO let people know if you need any help.

Ron
 

djsfantasi

Joined Apr 11, 2010
9,156
See this is what happens when people retire. The only way I am aware of new things is through the forums. I also agree as to a smaller 8 pin PIC.

If you go with an Arduino like the UNO let people know if you need any help.

Ron
If the TS is already familiar with the Arduino AND he may have several projects that can use an 8-pin MCU, then consider an ATTiny series uP. A programmer is available for $17 that can program the ATTiny with the Arduino IDE.
 
Top