hacking eBay speed control for 8A 12VDC fan

so I have eBay speed control that I want to control with Arduino for a 12V dc radiator fan

my idea is that if I remove the potentiometer and run a Arduino GND wire to the GND pin on the eBay board and an analog out from the Arduino to the centre potentiometer pin (white) to produce a 0-5V range?

the eBay board has:

1 x NE555P chip
1 x RU7088 N-Channel Advanced Power MOSFET
2 x L7812CV regulators

Specifications:
Working Voltage: DC 6V-90V
Rated Current: 8A
Max. Current: 15A
Controlled Power: 0.01-1000W
Static Current: 0.005A (Standby)
PWM Pulse Width Modulation Range: 0%-100%
PWM Frequency: 16KHZ

and using my 'temp' variable from my DHT22 i could control the fan by:

int tempMin = 40;
int tempMax = 90;
if((temp >= tempMin) && (temp <= tempMax)) {
fanSpeed = map(temp, tempMin, tempMax, 32, 255); // where 32 is minimum fan speed
analogWrite(fan, fanSpeed); 
}

(found this code at ElectroSchematics)

How do you plan to do that without a schematic of the speed control ?

An arduino doesn't have analog out. It only has analog in.

You could add an RC LPF to a PWM signal but that wouldn't do you any good because the speed control runs on voltages that exceed the 5V maximum for the arduino.

raschemmel:
How do you plan to do that without a schematic of the speed control ?

I guess by trial and error?

An arduino doesn't have analog out. It only has analog in.

oh, OK.

the speed control runs on voltages that exceed the 5V maximum for the arduino.

how do you know that?

Did you look at the part number of the 8-pin chip on the speed controller ?

yes, I even put in my post above:

Wareemba:
the eBay board has:

1 x NE555P chip
1 x RU7088 N-Channel Advanced Power MOSFET
2 x L7812CV regulators

raschemmel:
How do you plan to do that without a schematic of the speed control ?

I am also basing it on this that is printed on the board itself:

ESCsml.png

the speed control runs on voltages that exceed the 5V maximum for the arduino.

how do you know that?

Because it has two 12V regulators ?

What you need is not voltage , but a pot.

Take a look at this similar circuit.

You may think this silly, but it would be much simpler if you just abandoned the idea of hacking the circuit and used an ordinary RC servo to drive the pot knob, using the servo library.

How do you plan to do that without a schematic of the speed control ?
I am also basing it on this that is printed on the board itself:

How does that help you hack it ?

ALSO - I recall reading a thread on here about connecting directly to pin 2 of the 555 chip with the Arduino PWM output, but can find the thread now...

would this possibly work instead?

ALSO - I recall reading a thread on here about connecting directly to pin 2 of the 555 chip with the Arduino PWM output, but can find the thread now...

would this possibly work instead?

If you want to do that you need a CD4050 TTL to CMOS converter chip to convert the 5V PWM to 12V PWM.

but why does it say 0-5V on the pot input socket?

Actually I didn't see that until you mentioned it. I suppose you could try putting a meter across the pot to measure the voltage to see if it really is 0 to 5V. If it is , you could probably use pwm with an RC LPF circuit to smooth the voltage out. (4.7 k ohm/4.7 uF)

I don't know if it has occurred to you , but if you have an arduino , you don't need an LM555 ic.
You already have PWM output. All you need to do is use the PWM library and a mosfet driver chip, which you need because at 16 kHz, the arduino can't charge and discharge the mosfet gate fast enough due to the large currents necessary at that speed.

Look at this sketch:

 // Arduino UNO DDS

#include <PWM.h>

int32_t frequency_9 = 12000; //frequency (in Hz)
int32_t frequency_3 = 16000; //frequency (in Hz)
 

void setup()
{

InitTimersSafe(); 

SetPinFrequencySafe(9, frequency_9);
SetPinFrequencySafe(3, frequency_3);
 
}

void loop()
{
 int val = analogRead(A0);
 val = map(val, 0,1023,0,100);
 
 int dutyC =512; // Duty Cycle 0 (0%) - 1023(100%)
 pwmWrite(9, dutyC / 4);
 pwmWrite(3, val);
 delay(30);
 
 }

I can post a photo of the oscilloscope screen while running this but I don't think it's necessary. The period is 60 us so the frequency is 16,666 Hz.

If you use this sketch with this mosfet driver chip (powered by a 12V regulator on a heatsink)

and the same power mosfet you already have on that board (by doing a real hack and cutting the trace to the gate and connecting it to the output of the mosfet driver) The souce will need to connect to the motor supply GND and the arduino GND.

The mosfet driver chip would need to be powered by 12V/1.5A supply.

You will be able to control the same motor , running on the same voltage, using either a pot (like the one used in the sketch connected across 5V & GND with the wiper connected to A0 ), or you can comment out that code and use code to control the duty cycle.

Doesn't that make more sense that fooling around with a 25 cent 555 timer chip ?

raschemmel:
Because it has two 12V regulators ?

but why does it say 0-5V on the pot input socket?

raschemmel:
What you need is not voltage , but a pot.

Take a look at this similar circuit.

thanks that explains it for me.

You may think this silly, but it would be much simpler if you just abandoned the idea of hacking the circuit and used an ordinary RC servo to drive the pot knob, using the servo library.

yeah, but was hoping to have no moving parts, so can I build a circuit myself with a MOSFET?

so how do I connect the pot shaft to the servo shaft?

google images is not really giving me many hints?

Read Reply #6.
You posted several messages while I was modifying it.

For the servo shaft coupler do a search on Sparkfun for servo shaft coupler. (compatible with small diameter pot shaft)

I suppose you could try putting a meter across the pot to measure the voltage to see if it really is 0 to 5V. If it is , you could probably use pwm with an RC LPF circuit to smooth the voltage out. (4.7 k ohm/4.7 uF)