Page 1 of 4

Rotary switches for calibration changes, type question

Posted: Mon Nov 07, 2011 8:09 pm
by Chris Wilson
I want to make some 10 position rotary switches for general ecu calibration purposes, things like dash mounted boost or traction control. I will have a 220 ohm resistor across the pins around the switch, and one each in series in the 0V and 5V wires. Does it matter if they are break before make, or will the ecu potentially see a voltage drop to zero as a glitch, and I should use make before break types? Thanks. I want to be able to use these on various ecu's, in various vehicles, so need to be sure I buy something as broadly compatible as possible.

Re: Rotary switches for calibration changes, type question

Posted: Mon Nov 07, 2011 8:37 pm
by TimH
On the Syvecs, you programme in a settling time, so the voltage read has to be stable for some while before the change is acted on. So it won't matter if you use make-before-break or break-before-make.

FYI, a common approach with the Syvecs CAL switch is to use series diodes, but no reason not to use resistors that I can see: when all's said and done, it's just reading a voltage, and you can tell the Syvecs what voltage thresholds to use.

Can't speak for other ecus though :)

Re: Rotary switches for calibration changes, type question

Posted: Tue Nov 15, 2011 10:06 pm
by Chris Wilson
Thanks for the reply. Is it a PITA to briefly describe how and why you use diodes rather then resistors please?

Re: Rotary switches for calibration changes, type question

Posted: Tue Nov 15, 2011 10:14 pm
by TimH
Diodes will always have a (near as darn it) stable voltage drop across them, regardless of how accurate or stable the +5V feed is at the top of the chain. With resistors, the voltage drop will be (obviously) dependent on the voltage, and could also be influenced by any voltage drop in the wiring leading to the switch.

Having done a simple spreadsheet, I can't see it being an issue in practice, but diodes are definitely more predictable: they're the pedant's choice :)

IMHO :)

Re: Rotary switches for calibration changes, type question

Posted: Tue Nov 15, 2011 10:30 pm
by Chris Wilson
Thanks for the fast reply Tim, I may give diodes a try on the next switch then :) Pedantry rules!

Re: Rotary switches for calibration changes, type question

Posted: Fri Nov 25, 2011 4:17 am
by Benkku
Althought the forward voltage drop in diodes is linear, but the change (slope) certainly is more as a function of temperature, than in metal foil resistors - also the forward voltage value differs between (same production batch) diodes.

<clip>
Foil resistor

The primary resistance element of a foil resistor is a special alloy foil several micrometres thick. Since their introduction in the 1960s, foil resistors have had the best precision and stability of any resistor available. One of the important parameters influencing stability is the temperature coefficient of resistance (TCR). The TCR of foil resistors is extremely low, and has been further improved over the years. One range of ultra-precision foil resistors offers a TCR of 0.14 ppm/°C, tolerance ±0.005%, long-term stability (1 year) 25 ppm, (3 year) 50 ppm (further improved 5-fold by hermetic sealing), stability under load (2000 hours) 0.03%, thermal EMF 0.1 μV/°C, noise -42 dB, voltage coefficient 0.1 ppm/V, inductance 0.08 μH, capacitance 0.5 pF.[8]
</clip>

For comparison...
http://www.alpha-elec.co.jp/e_machine.html
0.14ppm/deg.C (Typical)
vs.

1N4148
page 2 forward voltage vs. temeprature chart
http://www.vishay.com/docs/81857/1n4148.pdf
2 mV/Dec.C (Usual)

Binary resistor network (also called R/2R ladder network) is tried and tested 'technology', diode networks certainly aren't so common. Silicon diode suits better 'to sensor' in temperature measurement application, than voltage divider or binary network . ;)

'Quite academic' in this application - as there are only few voltage threshold levels, but if usage temperatures differs much. Summer/winter, it is possible, that some of the predefined voltage threshold levels do not cross, when switch is turned.

Re: Rotary switches for calibration changes, type question

Posted: Fri Nov 25, 2011 10:51 am
by Chris Wilson
Nothing to do with electronics is ever straight forward, is it....? :) There are times when carburettors and points in a distributor with bob weight timing seems very appealing ;)

Cancels order for diodes....

Re: Rotary switches for calibration changes, type question

Posted: Fri Nov 25, 2011 12:35 pm
by TimH
IMHO the variation in temperature will be negligible compared to the 0.65V step size. Yes, the drop varies per diode, so you have to calibibrate each setup, hence the ability to define the thresholds within Syvecs.

The main advantage of diodes, as I see it, I think, is that the voltages are independent of the pullup resistor or drive voltage at the ecu. Should Syvecs/Life Racing decide to change the pullup value within the ecu, the nominal thresholds won't vary.

But, to be honest, either solution works just fine in the real world.

And to add just a third variation on this theme - the toucan touchscreen display drives an actual voltage rather than relying on diode drops etc, and has a feedback loop: within reason, the voltage will not vary at all regardless of load etc :)

Re: Rotary switches for calibration changes, type question

Posted: Tue Nov 29, 2011 10:10 pm
by Benkku
I don't agree that the temperature change is negligible. See the datasheet chart - change is 'easily' 0.2-0.3 volt over one diode at 30 degree temperature change - so when combined that with switch position 7 for example - total voltage change is also 7 times more (1.4 - 2.1 volts).

In my opinion, diode solution do not 'work', when expected temperature change over the course is 'big' (20 degrees is enough). Cabin temperature change plays a role here also in hot / cold summer days, winter likewise.

Re: Rotary switches for calibration changes, type question

Posted: Wed Nov 30, 2011 8:38 pm
by TimH
Assuming we're looking at the same chart (Vishay datasheet) then the variation over 30C is more like 60mV at (the worst case) 0.1mA?

Based on that, I ran some numbers and I still think we get away with the use of diodes, and that with careful setting of the syvecs threhold's it will be fine.

But, like you, I don't like "borderline" and you have persuaded me that resistors are better - and I will change the design of the CAL switches I supply from now on :)

Thanks for pointing this out and forcing me to think about it :D