Wiring in relays for fan/water injection control etc.

Forum for discussing how to install MicroSquirt(TM), choose and troubleshoot sensors, wiring, and communications for MicroSquirt (TM) and MicroSquirt Module(TM).
Forum rules
Read the manual to see if your question is answered there before posting. If you have questions about MS1/Extra or MS2/Extra or other non-B&G code configuration or tuning, please post them at http://www.msextra.com The full forum rules are here: Forum Rules, be sure to read them all regularly.
dontz125
Master Squirter
Posts: 375
Joined: Mon Jun 29, 2009 1:00 pm
Contact:

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

Post 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.
anonymous.shyster
Helpful Squirter
Posts: 75
Joined: Fri Oct 21, 2011 9:46 pm

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

Post 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.
anonymous.shyster
Helpful Squirter
Posts: 75
Joined: Fri Oct 21, 2011 9:46 pm

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

Post 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?
dontz125
Master Squirter
Posts: 375
Joined: Mon Jun 29, 2009 1:00 pm
Contact:

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

Post 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!
anonymous.shyster
Helpful Squirter
Posts: 75
Joined: Fri Oct 21, 2011 9:46 pm

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

Post 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?
anonymous.shyster
Helpful Squirter
Posts: 75
Joined: Fri Oct 21, 2011 9:46 pm

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

Post by anonymous.shyster »

One of these little tin cans?
dontz125
Master Squirter
Posts: 375
Joined: Mon Jun 29, 2009 1:00 pm
Contact:

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

Post 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
anonymous.shyster
Helpful Squirter
Posts: 75
Joined: Fri Oct 21, 2011 9:46 pm

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

Post by anonymous.shyster »

Thanks!
kb0ou
MegaSquirt Newbie
Posts: 1
Joined: Fri Jan 28, 2011 3:56 am

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

Post by kb0ou »

Hey Dontz125
I am putting EFI on a 79 Goldwing, I might try your board.
Post Reply