E V Forum
Sign up

  Author   Comment  

Junior Member
Posts: 1
Reply with quote  #1 

I am looking at getting 2 Evercool EC8015HH12BP  80x10mm (4-wire) PWM fans. However, I am looking at controlling the fan speed with the arduino via the PWM pins.

I found the following diagram that seems to be what I am looking for in order to hook the fan up to the Arduino:

enter image description here

The code that I think I can use is this:

int pwmPin =9;// digital pin 9int pwmVal =10;void setup(){  pinMode(pwmPin, OUTPUT);// sets the pin as outputSerial.begin(9600);}void loop(){if(pwmVal !=255){         analogWrite(pwmPin, pwmVal);//pwmVal += 10;Serial.print(pwmVal);// Print red valueSerial.print("\n");// Print a tab}else{Serial.print('at max high');// Print red valueSerial.print("\n");// Print a tab}  delay(1000);}

I gather that the PWM would be in the range of 0-255 when writing out to it from the ardunio? I will be using the DS18B20 Thermometer Temperature Sensor in order to see how fast I need to spin the fan.

However, the fan speed (max 12V right now) never slows down one bit.

I'm using D9 on the Arduino Nano ATmega 328.


Junior Member
Posts: 20
Reply with quote  #2 
I'd like to help, but am not at all conversant with the Arduino (which 'model' do you have?) nor the Evercool fans, but the DS18B20 is a one-wire bus protocol device.  I would have assumed that this is I2C or SPI, but the data sheet mentions neither, although it seems to be similar.  Collecting a temperature from the device would not be a trivial programming task; does the Arduino library have routines for this - you would know better than me!
Perhaps a silly sounding question, but if you have an oscilloscope then scoping the pwm signal would tell immediately if your scheme is working. HTH
Previous Topic | Next Topic

Create your own forum with Website Toolbox!