Go Down

Topic: Automotive Fan Controler (Read 309 times) previous topic - next topic

mike16889

Hello, this is my first real arduino project, i have fiddled around with the blink example and such.

i recently had to replace the clutch fan on my 4wd with a 2 speed thermo fan and i am trying to create a controller for it. the fan is very simple, it has 2 grounds and 2 positive wires, connect 1 positive to 12V and it spins at one speed, connect 2 and it go's faster. the car also has a thermo fan on the front for the air con which i would also like to control if the temperature gets to high. I am also including an oled display for the temperature and a buzzer as an overheat alarm.

if you look at the attached schematic the connectors go to the following:

1. automotive Thermistor that is 57R at 87°C (not using it at this point but its there in case my other sensor dies)
2. go's to a DS18B20 I have placed inside a housing for an automotive Thermistor (not sure how long it will last that's I have included the other.)
3. Automotive horn relay 1 30A (85R coil)
4. Automotive horn relay 2 30A (85R coil)
5. Automotive horn relay 3 30A (85R coil)
6. regulated 5V output, no purpose for it atm but the screw connectors come in pairs and i may need 5V

i have the sketch working to the point if i replace the transistors with LED's they switch on and off at the appropriate temperatures and the OLED screen works.

the problem I'm having is I have never really used transistors except in the multi-vibrator circuit at school 10 years ago. and I do't really know what i am doing, I think I have it right but before I go out and buy the components and make a PCB I would like you guy's to see if you can see anything wrong.

I know I will have to place a diode between the coil contacts but would I be able to place it between the output lines on the PCB and ground?

the switch at the top is 3 position On(1), Off, On(2). its an override switch, so I can turn all 3 fans full on, to automatic or to all off (for water crossings)


so if you guy's could have a look at it and see if you see anything wrong that would be great.



P.S. I'm building the sketch in the Arduino IDE not fritzing

P.P.S the buzzer is a 5V buzzer that consumes approx 40ma.

DVDdoug

Here is a schematic for a transistor relay driver.

KenF

#2
Feb 18, 2015, 02:54 am Last Edit: Feb 18, 2015, 02:55 am by KenF
Redrawing your implementation around Q2, Q3 and Q4 we have a problem.  A PNP transistor in this configuration will only turn off if you can supply about 13.7 volts to it's base (clearly something beyond the capabilities of an arduino)

You could get around this by adding an NPN transistor to drive the base of the PNP.  It adds slightly to the complexity of the circuit, but wouldn't be an enormous change.

mike16889

#3
Feb 18, 2015, 04:55 am Last Edit: Feb 18, 2015, 05:17 am by mike16889
what if i swap the PNP for an NPN and have the grounds from the relay's as going into the collector? same number of components just re-arranged. also same number of wires as the relay's have a direct line to the battery already and i just have to swap it so the leads going back into the cabin are now the ground wires.

also thanks for the help so far.

this is the transistor i would pick if this solution will work http://www.jaycar.com.au/products_uploaded/ZT2283%20-%20PN100.pdf

KenF

what if i swap the PNP for an NPN and have the grounds from the relay's as going into the collector?
If I'm reading this correctly, you'll have 14v going to one side of the relay and use the transistor to switch it's low side.  This is a much more conventional solution and works well.  You would also have to change the arrangment of your manual over ride switch too, as this too would need to be driving the low side.  (naturally your double diodes you have in place would also need turning around)

Sorry I didn't realise that it was your own relays being driven by these lines otherwise it's exactly what I'd have suggested. 
Quote
this is the transistor i would pick if this solution will work http://www.jaycar.com.au/products_uploaded/ZT2283%20-%20PN100.pdf
Looking through the spec.  it seems fine.

One final note.  You should also place a diode directly across the pins of the relays to give a path for flyback current.  These are connected with the anodes to the LOW side of the relay and the cathodes on the HIGH side. 

mike16889

Here is my updated schematic, they are my relay's they are the standard 40A horn relay type. the one the the air con fan isn't but i think that's ground switched anyway.

is the voltage regulator set-up ok? to filter out the alternator noise and the like.

even if i have to replace the air con fan relay its ok, i don't use the air con and the air con compressor will be being converted to an air compressor anyway.

KenF

I'm not quite sure I understand the logic behind switching out the GROUND to those transistors when you have the switch in the manual position.  Although I doubt it will cause any problem, I think you could have those emitters connected directly to GND with no issues.  (might save some wiring)

Your LM7805 implementation is theoretically OK but personally, I'd never use a plain vanilla linear voltage regulator in an automotive environment.  I'd have more faith in a buck converter.  Especially if it's mentions automotive use in it's specs.

mike16889

the reason for switching the grounds is i want to be able to completly switch off the fans. If you have ever driven a 4wd threw mud you will know why, the hole inside of the engine bay gets covered with mud.


I have a bit of a problem as far as the voltage regulator go's, getting electronic components were i live is extreamly hard as the only place that sells them localy is jaycar.com.au and i dont really want to wait 3 weeks for something off ebay. The only voltage regulators they stock are the lm7805 and simmiler ones.

mike16889

I do have a XL4016E1 but have no idea how to use it. It seems it needs a coil as well as some other components.

KenF

I do have a XL4016E1 but have no idea how to use it. It seems it needs a coil as well as some other components.
Yes the application circuit for one of those is quite a bit more work than a simple lm7805 but it's inherently more tolerant of the noise on the power supply (as found in automotive situations).  TB honest, if you buy a ready built buck converter from ebay, it'll probably cost you less than the components needed to get your bare chip implemented. (if you don't mind the wait for postage from the far east).

Alternatively, a quick google turns up the datasheet HERE Page 3 gives an application circuit that seems tailor made for your needs.

If you want simplicity then the lm2940 is a linear voltage regulator but better equipped to deal with the noise of the automotive environment.  It's NOT a drop in, pin for pin, replacement of the 7805 but it's application is pretty straight forward.

BTW Your thinking around the switching out of the emitter grounds (that previously miffed me) seems perfectly sound.

mike16889

Had a look at the datasheet for the lm2940 and it seems like it would be exactly the same as the 7805 except the caps are sized diffrently.

On the side of the buck converters off ebay, i've burnt threw 3 of them trying to charge nimh batterys at 2A (1C) within half an hour and supposadly they were ment to be able to handle 12A so i dont know how they will go mounted behind the dash and on for hours on end.

Would there be any way i could clean the input of the power going into a 7805 that will let me use one? As I have a few in my parts bin as well as 7812 and 7809's as well as a LM317

Go Up