|
|
|
#31
|
|||
|
|||
Much better results today. I was able to return the old fan and get a new one. I also found that the old fan may have been working just fine but I found that it takes about 5 second for them to start up and I may have been too quick to pull power on the old fan when I saw it wasn't turning. In any case it was good to return it because it was the older style which would have required more modification to install.
Couple of things I learned today. 1) I had a question about 3.5V vs 12V. Mine works from 3.7 to about 14V with no perceptible change in performance. I lost control if I tried to go below 3.7. Therefore I will set the Arduino up for 5V, which it seems very happy with. 2) My cheep function generator is low on performance. The output is dragged down by the components connected to it. I have to set up the function generator to 4V to get 3.7V when the fan is running. And gets dragged down to under 2V when power is shut off to the fan, but the PWM signal is still connected. The three pictures show the signal at the scope with the fan running, fan off and fan disconnected. So that means I have to set my function generator up for 4V to get 3.7 while the fan is running. 3) The fan remains under control with any PWM frequency between 10 and 15 Hz. 4) For this fan the lowest duty cycle I can run is about 13.5%
__________________
To see my 129 parts for sale visit: http://stores.ebay.com/The-Mercedes-SL-Store John Roncallo |
#32
|
|||
|
|||
A couple of good articles that I found that may be of help for people going down this path.
https://w220.wiki/WIS_20.40_Fan,_Fan_Clutch#Typical_PWM_Control_Signals https://www.benzworld.org/threads/w204-2008-electric-fan-fault-diagnosis-and-diy-replacement.2023625/#post-8900649 https://youtu.be/XGsTMF4OTT8 The second one kind of explains why I'm seeing references to both 12V and 3V The third on shows an installation video for an S500/S420. Nothing special in that video except it possibly shows a better fan for me to consider. Its a belt driven fan that may possibly fit my application a little better. Possibly I wont have to cut down the blades. Like I said I have a lot more work to do and investigating that belt drive fan is now #1 on my priorities.
__________________
To see my 129 parts for sale visit: http://stores.ebay.com/The-Mercedes-SL-Store John Roncallo |
#33
|
|||
|
|||
__________________
To see my 129 parts for sale visit: http://stores.ebay.com/The-Mercedes-SL-Store John Roncallo |
#34
|
|||
|
|||
So now its time to get the fan under control using the Arduino instead of the waveform generator.
To start with I built a small circuit that uses a 10K pot control the fan. It works very well as far as controlling the duty cycle, except I am unable to set the frequency to 10Hz. The PWM.h library is supposed to handle that but it doesn't seem to work at the moment and runs but just defaults to 500Hz. I have posted this on the Arduino forums and hopefully will have a solution in the next few days. And there are other methods I can try in the mean time. For testing the wiring schematic will be as shown in the last picture. #include int sensorPin = A0; int FAN = 3; int sensorVal; int PWMVal; int32_t frequency = 10; void setup() { // put your setup code here, to run once: pinMode(sensorPin, INPUT); Serial.begin(9600); InitTimersSafe(); SetPinFrequencySafe(FAN, frequency); pinMode(FAN, OUTPUT); } void loop() { // put your main code here, to run repeatedly: //this code prints sensor value to the console //Serial.println(sensorVal); //delay(1000); //read sensor value and set upper limit cap sensorVal = analogRead(sensorPin); if(sensorVal >1000){ sensorVal = 1000; } //map and assign pwm values to the fan output 0 to 255 corresponds to 0 to 100% PWMVal = map(sensorVal, 550, 1000, 26, 255); //set 550 as out cutout or cut in limit where the fan switches from off to the lower PWM limit if(sensorVal <550){ PWMVal = 0; } //write the PWM value to the pwm output pin pwmWrite(FAN, PWMVal); //Serial.println(sensorVal); //Serial.println(PWMVal); //delay(1000); }
__________________
To see my 129 parts for sale visit: http://stores.ebay.com/The-Mercedes-SL-Store John Roncallo |
#35
|
|||
|
|||
search for the coreyjfowler pwm library
__________________
90 300TE 4-M Turbo 103, T3/T04E 50 trim T04B cover .60 AR Stage 3 turbine .63 AR A2W I/C, 40 LB/HR MS2E, 60-2 Direct Coil Control 3" Exh, AEM W/B O2 Underdrive Alt. and P/S Pulleys, Vented Rear Discs, .034 Booster. 3.07 diffs 1st Gear Start 90 300CE 104.980 Milled & ported head, 10.3:1 compression 197° intake cam w/20° advancer Tuned CIS ECU 4° ignition advance PCS TCM2000, built 722.6 600W networked suction fan Sportline sway bars V8 rear subframe, Quaife ATB 3.06 diff |
#36
|
|||
|
|||
Thanks for the reply. All is good now
I actually found the problem. In order to get down to 1Hz you need the High Resolution version 16 bit version. There are two pins that handel that on the RoboRed board. pins 9 and 10. Set PWM value to a 16 bit number Use pwmWriteHR(FAN, PWMVal) instead of pwmWrite(FAN, PWMVal) Use PWMVal = map(sensorVal, 550, 1000, 6000, 65535) instead of PWMVal = map(sensorVal, 550, 1000, 26, 255) The code that works. ******************************************* #include // Note for low frequency < 31Hz,the high resolution pwmWriteHR() must be used with 16 bit PWM Value //For the RoboRed only pins 9 and 10 can be used with 16 bit resolution int sensorPin = A0; int FAN = 9; int sensorVal; int16_t PWMVal; int32_t frequency = 10; void setup() { // put your setup code here, to run once: pinMode(sensorPin, INPUT); Serial.begin(9600); InitTimersSafe(); //sets the frequency for the specified pin bool success = SetPinFrequencySafe(FAN, frequency); //if the pin frequency was set successfully, pin 13 turn on. Pin 13 can be used to light an LED etc. if(success) { pinMode(13, OUTPUT); digitalWrite(13, HIGH); } } void loop() { // put your main code here, to run repeatedly: //this code prints sensor value to the console //Serial.println(sensorVal); //delay(1000); //read sensor value and set upper limit cap sensorVal = analogRead(sensorPin); if(sensorVal >1000){ sensorVal = 1000; } ************************************************ Next step is to see If I can drive the fan directly with the Arduino. I will be trying this without a Mosfet as the new RoboRed beard will drive up to 2 Amps directly.
__________________
To see my 129 parts for sale visit: http://stores.ebay.com/The-Mercedes-SL-Store John Roncallo |
#37
|
|||
|
|||
2A should be orders of magnitude more than what's needed for the control signal.
__________________
90 300TE 4-M Turbo 103, T3/T04E 50 trim T04B cover .60 AR Stage 3 turbine .63 AR A2W I/C, 40 LB/HR MS2E, 60-2 Direct Coil Control 3" Exh, AEM W/B O2 Underdrive Alt. and P/S Pulleys, Vented Rear Discs, .034 Booster. 3.07 diffs 1st Gear Start 90 300CE 104.980 Milled & ported head, 10.3:1 compression 197° intake cam w/20° advancer Tuned CIS ECU 4° ignition advance PCS TCM2000, built 722.6 600W networked suction fan Sportline sway bars V8 rear subframe, Quaife ATB 3.06 diff |
#38
|
|||
|
|||
Some good news and some bad news.
I plugged the Arduino into the 5.5mm x 2.1mm power socket along with my fan. I got the Arduino to power the fan everything was working good until I shut it off. Then it would not restart. I noticed that when I turned it off the power light would still be on dim until I disconnected the PWM signal. For some reason I was able to reset it by plugging it into the USB port onto my computer. Then I was able to run it again. After repeating that several times it no longer runs. But it will still run if I plug it into the USB port except I cant power the fan that way. It seams that power is leaking back into the PMW signal probably from the Main power going to the control module which is powered at all times even with the ignition switch off. I believe I should be able to eliminate that with a diode on the PWM signal or using a MOSFET. I'm also concerned about the power on situation with the large power supply. The USB port is limited to ~1A and only drives the scope for testing. When connected to the 30A power supply with the fan motor as it will be in the vehicle there may be huge spikes that need to be dealt with. In any case I believe the RoboRed is dead and I will need to order a new one.
__________________
To see my 129 parts for sale visit: http://stores.ebay.com/The-Mercedes-SL-Store John Roncallo |
#39
|
|||
|
|||
I also had some issues with the Arduino on board voltage regulator and ended up moving the 5V regulator off board and bypassing the on board regulator. Double check your voltages on the Arduino
__________________
90 300TE 4-M Turbo 103, T3/T04E 50 trim T04B cover .60 AR Stage 3 turbine .63 AR A2W I/C, 40 LB/HR MS2E, 60-2 Direct Coil Control 3" Exh, AEM W/B O2 Underdrive Alt. and P/S Pulleys, Vented Rear Discs, .034 Booster. 3.07 diffs 1st Gear Start 90 300CE 104.980 Milled & ported head, 10.3:1 compression 197° intake cam w/20° advancer Tuned CIS ECU 4° ignition advance PCS TCM2000, built 722.6 600W networked suction fan Sportline sway bars V8 rear subframe, Quaife ATB 3.06 diff |
#40
|
|||
|
|||
Absolutely, I measured 75mA. But I think the transients from turning it on and off killed it. It wasn't unexpected. If I recall I may just need a zeaner diode at the the power on switch and the PWM signal to clamp the transients.
__________________
To see my 129 parts for sale visit: http://stores.ebay.com/The-Mercedes-SL-Store John Roncallo |
#41
|
|||
|
|||
Here's a quick sketch of the type of circuit I used. The resistor values are general not absolute. You could select different values to hit your ma targets. A small switching PNP transistor will get the job done. A bias resistor may be required on the transistor input, I honestly don't recall on that. Its an easy enough circuit to prototype and test.
__________________
90 300TE 4-M Turbo 103, T3/T04E 50 trim T04B cover .60 AR Stage 3 turbine .63 AR A2W I/C, 40 LB/HR MS2E, 60-2 Direct Coil Control 3" Exh, AEM W/B O2 Underdrive Alt. and P/S Pulleys, Vented Rear Discs, .034 Booster. 3.07 diffs 1st Gear Start 90 300CE 104.980 Milled & ported head, 10.3:1 compression 197° intake cam w/20° advancer Tuned CIS ECU 4° ignition advance PCS TCM2000, built 722.6 600W networked suction fan Sportline sway bars V8 rear subframe, Quaife ATB 3.06 diff |
#42
|
|||
|
|||
Quote:
__________________
To see my 129 parts for sale visit: http://stores.ebay.com/The-Mercedes-SL-Store John Roncallo |
#43
|
|||
|
|||
The resistors are just for current limiting. The arduino are typically limited to 40ma per pin. With a 5V supply you can plug those values into an ohms law calculator (https://ohmslawcalculator.com/ohms-law-calculator) to determine the resistance needed for that target. If you select a transistor with lets say a 20ma turn on current the calculator will solve for a 250 ohm resistor.
The resistor in the 3V source line is to limit current when the PWM signal is pulled to ground. This is essentially a direct short when the PWM pulls low so it should be limited to just a few ma. A bias resistor on the transistor input (not pictured in the sketch) would serve to immediately pull the transistor input to ground for a decisive quick turn off. It should be high enough value that it will not pull more than a few ma from the arduino pin nor drag down the pin's "on" voltage. An unconnected arduino pin not being actively driven can "float" between on and off. When the pin is low there is no pull down to ground since the transistor is off so it has potential to float. A bias resistor would ensure it goes to 0V.
__________________
90 300TE 4-M Turbo 103, T3/T04E 50 trim T04B cover .60 AR Stage 3 turbine .63 AR A2W I/C, 40 LB/HR MS2E, 60-2 Direct Coil Control 3" Exh, AEM W/B O2 Underdrive Alt. and P/S Pulleys, Vented Rear Discs, .034 Booster. 3.07 diffs 1st Gear Start 90 300CE 104.980 Milled & ported head, 10.3:1 compression 197° intake cam w/20° advancer Tuned CIS ECU 4° ignition advance PCS TCM2000, built 722.6 600W networked suction fan Sportline sway bars V8 rear subframe, Quaife ATB 3.06 diff |
#44
|
|||
|
|||
You are obviously a little more educated than I am on electronics. And I appreciate your help.
I haven't worked on it much today as the weather was good, so I took the wife out for some top down driving. One thing I did find out today is my board is good. Its just having trouble resetting because there appears to be some sort of voltage leakage into the PWM circuit from the fans motor. When you turn power off to the fans +12V activation circuit you get 12V at the PWM terminal. That 12V bleeds down to 2.5V when its connected to the Arduino PWM output and is keeping the Arduino from resetting it self. The power light on the Arduino remains lit dimly. Just by momentarily disconnecting the PWM wire will reset the board and allow it to run again. I believe I can take care of that with a simple diode.
__________________
To see my 129 parts for sale visit: http://stores.ebay.com/The-Mercedes-SL-Store John Roncallo |
#45
|
|||
|
|||
Quote:
I did find that with the MOSFET installed I am pulling down 12V to 0V with my setup. Without the MOSFET just feeding the fan directly am pushing up from 0V to 5V. It works either way but I also found that the I was mislead by the 2000ma capability of the Yourduino RoboRed. The 2000ma is the buss current only. And the digital switching current is limited to ~ 30ma. Another reason I may have damaged the board. I actually measure 70ma using a clamp multi meter on the PWM wire. But I am not really sure a clamp meter is the real way to measure this. It may need to be measured using a scope. I will need to figure out how to do that and measure it. I'm still now sure what the circuit you presented is doing but I just ordered a set of resistors and caps so I can play with things. So my current schematic looks like the attached.
__________________
To see my 129 parts for sale visit: http://stores.ebay.com/The-Mercedes-SL-Store John Roncallo |
Bookmarks |
|
|