Page 2 of 2

Re: Wiring in relays for fan/water injection control etc.

Posted: Sat Oct 22, 2011 4:36 pm
by dontz125
The coils in the relays I'm using are 225 ohms, so 12v -> 53mA; switching them on and off is not the issue (every coil has a 1N4004 flyback diode in anti-parallel, so you don't need to worry about that either). The issue I see is that you're looking to use DIFFERENTIAL temperature (7 deg above ambient, 5 deg above ambient) as set points. Someone wiser may need to correct me, but I don't see any support for that in the code. You may wind up making your own little controller to drive whatever relay unit you come up with.

Re: Wiring in relays for fan/water injection control etc.

Posted: Sat Oct 22, 2011 5:41 pm
by anonymous.shyster
Hmm. I've got no idea how the programming of the MS is done, but I think I recall someone saying it was assembly? Hmm, well that could be difficult, perhaps if it were Python it could be more straightforward. I don't see how it would be difficult, or need more hardware. All it would need to do is pass information from two sensors, and calculate the difference, if < 5, disable relay. Greater than 7, switch relay on. The only thing I could see as being an impediment is having to program that in, as the Megatunix software probably don't have an option for that.

Re: Wiring in relays for fan/water injection control etc.

Posted: Sat Oct 22, 2011 6:00 pm
by anonymous.shyster
Though by nature the MS is a computer, as such, having input from two temperature sensors, and some very light computation going on for a binary output (relay on or not) should be very simple to achieve without designing any controllers. Unless the MS works entirely on firmware and can't be readily programmed without doing some ASM hacking, is this what you're saying?

Re: Wiring in relays for fan/water injection control etc.

Posted: Sat Oct 22, 2011 6:04 pm
by dontz125
Actually, the MicroSquirt code is C++ based. CodeWarrior, I think? My code-fu is pretty weak; I can't comment intelligently on how hard it would be to add two sensors and drive an output based on a differential.

I've just checked the standard output port options. The programmable ports can be turned on or off depending on the value of some internal variable relative to a set point - ie, ON if CLT > 190F (useful for a rad fan). There is no option to compare two internal variables, and certainly no option to compare the differential between two variables.

Since you're adding two temperature sensors anyway (intercooler coolant and ambient air temp), run them to a comparator. Assuming they both have the same voltage / resistance per degree and are fed from the same Vref (which could be raw 12v, depending on the model of comparator you select), a simple pot would be enough to dial in your delta-T. Wire the top of the relay coil to +12v, wire the coil outlet to the comparator 'outlet' (we're talking less than 60mA, remember), and call it soup!

Re: Wiring in relays for fan/water injection control etc.

Posted: Sat Oct 22, 2011 6:18 pm
by anonymous.shyster
Thanks, that sounds reasonable, though I would like to see if there is a way to do this utilising the computer and a little code! It's a bit cleaner and more elegant and makes use of what's there.

So, what is comparator? How do I choose one that is right?

Re: Wiring in relays for fan/water injection control etc.

Posted: Sat Oct 22, 2011 6:19 pm
by anonymous.shyster
One of these little tin cans?

Re: Wiring in relays for fan/water injection control etc.

Posted: Sat Oct 22, 2011 6:54 pm
by dontz125
That, or the little black spider thingies ... :lol:

Here's a pretty good page on how to use these devices - http://home.cogeco.ca/~rpaisley4/Comparators.html

Re: Wiring in relays for fan/water injection control etc.

Posted: Sat Oct 22, 2011 8:21 pm
by anonymous.shyster
Thanks!

Re: Wiring in relays for fan/water injection control etc.

Posted: Sat Dec 17, 2011 5:16 am
by kb0ou
Hey Dontz125
I am putting EFI on a 79 Goldwing, I might try your board.