Friday, 9 March 2018

Raven SmartBoom part 4, master switch

After using the SmartBoom for a couple of years, I've decided it's time to try to connect the existing master boom switch on the Flexi-coil switchbox to the SmartBoom master switch signal somehow.

Switch Box vs SmartBoom Signal Logic

As I've talked about before, the Flexi-Coil sprayer switch box has a bunch of toggle switches that drive the individual sections, as well as a master on/off switch. All of these switches drive digital logic inputs of the internal microprocessor. Each input from each switch is held high at 5v by a resistor, and when the switch is turned "on" it grounds this signal, pulling it low.

The SmartBoom master switch signals work opposite to the toggle switch signaling in the switch box. the master switch wire is held low by an internal resistor, and when you apply the 3.3v signal (provided on one of the output pins) to the master switch wire, that pulls the signal high, turning on the master switch.

Making Them Talk

So the question is, how can the digital logic signaling of the Switch Box internal toggle switch to the SmartBoom's master switch signal?

A P-type BJT transistor might do the trick, but if we draw current from the toggle switch signal, that might reduce the voltage enough to make the switch box think the switch was flipped. So the trick is we need to use this voltage as a signal without drawing any milliamps, ideally. Instead, what if we used a P-type fet transistor which switches on voltages, not current, and won't draw any current at all? Since both the SmartBoom and the switch box share a common ground, which we are already taking advantage of to connect the section controls, the connecting circuit will be super simple. Here it is:

The part of the circuit within the dashed box represents the switch box circuit board, which we can attach a single wire to the switch signal itself. The only external component needed is a single P fet transistor. The source side of this pFet is connected to the 3.3v coming from the SmartBoom, and the drain connects to the master switch signal. The resistor and ground on the SmartBoom side of the circuit are just to remind me that the signal we're talking to is normally low. The resistor and ground are internal to the SmartBoom. All we need is the master switch wire itself, and the 3.3v reference wire.

The way this works is that when the toggle switch is "off", the pFet gate input is held high, which means no current will flow from the source to the drain (p-type is exactly opposite to n-type transistors). With no current flowing across the fet, the master switch on the Smartboom will be low, and thus, "off." When the toggle switch is turned "on" this grounds the signal, pulling it low. Once the gate to the fet goes low, current will flow from the source to the drain, raising the master switch input high, turning it "on."

But will it actually work?

The next step is to build the little circuit and see if it will work. I need to bring the 3.3v and Master switch wires out of the SmartBoom, since my custom wiring harness doesn't currently have them. I'll put the fet inside the switch box, and use a 6-pin aviation plug (instead of a 4-pin I've been using) to bring these two additional wires in from the SmartBoom. That should be all there is to it.

Of course in the future, ideally I should build an isolation circuit that uses phototransistors to isolate the sensitive circuitry of the Flexi-coil switchbox from the SmartBoom signals.

It works!

Did a quick test with the mosfet in a breadboard, and it definitely works! The master switch will control both the sprayer master circuit and also the SmartBoom master on/off. I'm about ready to wire it up more permanently. Just waiting for some 6-conductor aviation plugs, and I'll also add a toggle switch or rocker switch to enable or disable the connection to the SmartBoom. I'll post when that is done, along with installation pictures.