I'm trying to design a relay circuit that will replicate the functions of the relay shown in the attachment accept it only needs to work with about 100ma to run an Arduino and I would like to integrate it onto a PCB board.
It will be used to run a automotive fan for ~ 60 seconds or so after engine shut off. The relay in the attachment will do exactly that but is way too big for what I need. I have tried a circuit using a 555IC but all the examples I see of that require a momentary short to ground to operate. I need this to activate once the 12V ignition switch is turned off.
Any ideas of how to make something that works just like it.
A 555 timer circuit may be simpler. If a negative pulse is needed then you could use the diminishing ignition voltage.
I am not familiar with 555 devices and I am guessing that somene will come along here soon to add to my sugestion.
What part do you need help with? The relay activation or the initial trigger?
There are thousands of examples of turning a relay on or off with an arduino. Just search the forums or buy a relay board.
As far as how to trigger the behavior, monitor the switched 12V ignition line -- ideally use an optocoupler or a resistor and zener diode to reduce the 12V to something safe for arduino, then turn the relay on when it drops out and hold the relay closed for 60 seconds. Simple code to read input, activate relay and as long as switched 12V doesn't come back on, keep relay closed until 60 second timeout.
You'll need to power the arduino from the unswitched 12V acc line of course.
You will also need to clean that power supply up. I suggest a reverse-protection diode on the 12V input, followed by a large cap (around 100uF or so), into a 7805 regulator and feed that to the arduino 5V input. Do not feed the 12V into Vin: you're almost guaranteed to eventually kill the arduino's on board regulator.
I'm certainly trying to avoid a mechanical relay. The one I presented does the job but is way over kill for powering an Arduino. I can picture that it may be possible to pull the mechanical relay out of that one and just power the Arduino with whatever is in there to activate the relay coil. So I believe I need everything without the relay. But when I look inside of it there are quite a few surface mount component doing whatever they are doing. I certainly cannot use that many components because I am unable to surface mount and don't have that much room to play with.
I did find this very simple possibility that I am now playing with now. At ~ 4:40 in the video they are using just a cap. I tried that with my biggest cap but the LED goes out in about 1 or 2 seconds. At about 7:00 in the video they use a cap and transistor. I tried that and it runs for about 50 second.
In the 555 scenario the Arduino would replace the LED and resistor between pins 1 and 3. I have tried this and it will successfully delay the shut off of the Arduino. The problem is the S1 switch is just a momentary switch between pin 2 and ground. All I have to activate this is a 12V signal that goes away when I turn off the ignition. It is nice that its adjustable but in order to use it, I would need to replace S1 with some kind of electronic switch that momentarily makes contact as power is turned off. Does such a switch exist and is it available in a solid state form?
The 555 one-shot trigger pulse (pin 2) must be shorter in duration than the timing period duration, otherwise the output (pin 3) will stay HIGH as long as pin 2 is low before starting to time out.
600w at 12v? We are talking about 50A current!
I have never worked on anything sucking 50A but am sure u have no choice but to use relay (ex. RA-700112-RN From littlefuse)
For timing no need to go for 555, rc circuit fed to inverting input of comparator can solve your problem then u need npn or pnp bjt to switch the relay on or off.
So I had a plan based on the video in post #4. At 30 ma the equivalent resistance should be ~ 483Ω. So I replaced the LED and resistor with a 470Ω resistor and measure the voltage over time. I replaced the cap until I found one that makes the voltage drop in ~60 sec. Turned out that a 2200µf capacitor would run the Arduino for ~ 80 seconds, perfect. But I also found out another thing, It really wouldn't run for 80 seconds just on the capacitor. I didn't realize what was happening in the video in post #4 and why I needed such a huge capacitor for the first method he presented at about 4:45 in the video and only a 2200µf cap for the method presented at about 7:00. It turns out that the cap in the first method runs the full load. In the second part of the video the cap only runs the base leg of the transistor and consequently very little current. The only down side to the second method is you need to bring in battery direct power circuit 30 power as well as key on circuit 15 power and ground. That let's the car battery run the Arduino and the cap runs one transistor. The schematic below shows how this is set up. Note I am not using an MC6821, that just represents an Arduino. I believe the resistor going to the transistor can be variable to change the delay time.
Now I have one problem left. The circuit shown appears to be switching the ground on the Arduino. It works on the bench but I would prefer to switch power. I believe my lack of understanding or transistors is not allowing me to do this. I have tried putting the collector and emitter on the hot side, I also tried turning it around and I also tried a PNP transistor instead of an NPN. They don't work. The transistor I am currently using is a 2N222A. But I really don't know how to select these.
Can anyone help me figure out how to get that to switch power instead of ground. Other than that the circuit does exactly what I need to do and is a nice compact solution that can be integrated onto a PCB.
@surepic
Yes 600W, they also make an 850W. Big huge 6ga wires going to that, but just a 20ga wire from the Arduino control to the motor to drive the PWM signal. The littlefuse relay is really a bigger version of the one I presented in post 1. But I really need a smaller solution that can be integrated onto a PCB and just run the 30ma Arduino to control the fan.
Any details on the "rc circuit fed to inverting input of comparator" you can share
Start power with switch/car 12V. Send 12V also to an input (use a voltage divider) to monitor ignition on/off. When main power ends run an Arduino timer for x seconds then shut off the control circuit.
That's interesting and looks like it may work. It's a little more complex than the solution I posted in post 10 but it does show me how to use a MOSFET to switch Vin instead of ground. But I'm still thinking that there is a more direct way, between PNP, NPN, MOSFET and PFIT's of replacing my 2N2222A with one component to switch Vin instead of ground. Looks like a P channel MOSFET might work. It appears to be the way to switch the load side.
Charge a cap that through a resistor holds a BJT open until it drains in 39 sec.
The BJT switches 100mA battery power (~13V) to the fan, the cap holds the NO closed. It would take a soda can size cap to run a fan for a minute or so --- 6 can start a 6-cyl engine.
An Arduino Nano 33 BLE. But it only applies the PWM signal to the motor. Power is direct from the battery with huge cables. Without the PWM signal the motor is off.
Another thought:
Unless the car has a separate water pump, water circulation will stop when engine stops. Running fan will only cool water standing in radiator.
I actually started out that way. I found it very difficult to program, because there is other logic that needs to be considered, like you don't want the fan coming on when you just turn the key on to raise the window etc. I would say it can be done, and I believe I certainly can do it but I started to realize that I was running the Arduino 24/7 checking the voltage to see if the key is on or if the engine was actually running.
I believe I'm pretty close to getting it right. I believe this circuit may actually do the job. but I don't have a MOSFET to test it yet. I would also like to find on component that will do the job of both the MOSFET and the NPN transistor. I believe that one component may be called a Thyristor.