Page 1 of 3
Home made Cal Switch
Posted: Thu Nov 29, 2012 12:02 am
by tarmac terror
Hi folks, I dug up an old thread on Cal Switches that started a while back and it got me intrigued. I'm looking to make my own and have looked out what I believe is the necessary switch:-
http://uk.rs-online.com/web/p/rotary-sw ... 4E4F4E4526
I need to know what diodes to use, how many I need (11 for a 12 position switch??), how to orient them and where to put them. Now I'm not bad with the soldering iron and getting the job done, I just suck at specifying electrical components
I
BELIEVE I need to wire them up thus:-
Is this correct????
Any help/advice, especially diagrams would be fantastic....
TT
Re: Home made Cal Switch
Posted: Thu Nov 29, 2012 12:51 pm
by pavlo
Don't use diodes for a start. Beyond that you're probably not going to get much help from all the people that make and sell their own commerically!

Re: Home made Cal Switch
Posted: Fri Nov 30, 2012 10:42 pm
by pat
TT,
As Paul has suggested, using diodes for a 12 position switch will probably cause problems, normal silicon diodes won't work because their drop is too great, this leaves you with schottky diodes but even that has issues because the positions are so close together voltage wise and the diode forward drop changes with temperature so you may find that cal selection becomes incorrect at extremely cold or hot temperatures. To date no such problems have been encountered with normal silicon diodes in a chain of 7 but it is still possible.
The diode chain was chosen as a universally applicable solution : If you have an AU or AR input then you can use the tap and the ground end of the switch to generate voltage steps without needing to feed in +5V. If you have an AB or AV input then with the addition of a resistor to the top end of the diode chain it was possible to bias the chain, so once again the same sensor works as it should. As an added bonus it was also possible to fit additional diodes in positions 12,11,10,9 and use a ground-select switch which could move the "bottom" of the chain between 9 and 1 thereby selectively "adding" another 4 diode drops, so you could overload an input, that is to say you could have an "ALS Switch" that bumps the Cal up and down 4 at a go, then you just need to duplicate Cal1-4 into Cal5-8 with ALS off in 1-4 and on in 5-8 and hey presto, a "separate" ALS switch that doesn't use up an input.
Another method which should work is a resistor chain but it is not as flexible. I think Ryan posted an example of how to make one, but the premise is that there is a 3k pull up and for each step you need to add more resistance so that the potential divider you form gives you even steps. That works fine if there is a 3k pull up but not so great if there isn't one and it won't work with "bump up X positions" type of overloading, but it will be much more temperature stable.
Hope this helps,
Pat.
Re: Home made Cal Switch
Posted: Fri Mar 22, 2013 4:34 pm
by tarmac terror
Thanks Pat...ended up buying one from JTI in the end. There are times when DIY is best..this wasnt one of these times
TT
Re: Home made Cal Switch
Posted: Tue Dec 29, 2015 12:13 pm
by RICE RACING
For the DIY'ers out there, this is how I made my own.
My switch is 3 wire, (5v, AN ground, switch input)
1P12T switch
110ohm resistors
5v to pin 12, AN ground to pin 1 and 11 resistors soldered in between pins
1-2-3-4-5-6-7-8-9-10-11-12
Graphically (pins 1-12 Left to Right >) NOTE: Read the (---) as a physical pin on the rotary switch
1 2 3 4 5 6 7 8 9 10 11 12
Ground(---)110(---)110(---)110(---)110(---)110(---)110(---)110(---)110(---)110(---)110(---)110(---)5V+ (between each --- is a position IE:1,2,3,4 and so on)
R2---------------------------------------------------------------------------------------------------R1 (resistance nomenclature)
what is looks like
Formula to work this out is simply.
NOTE: R1 is always on the side of the 5v+ in
NOTE 2: total resistance is simply the sum of either side depending on pin position
R2/(R1+R2)xVin=Vout
Vin for mine us is 5v
When switch is all the way clock wise to PIN 1 thus the switch input voltage will be
(0x110)/((11x110)+0)x5
(0/12100)x5
0x5
=0 VOLTS YES! for position 1 on the rotary switch.
For position 2
(110/((10x110))+110)x5
(110/(1100+110)x5
(110/1210)x5
0.0909x5
=0.4545 VOLTS
***You can work out the rest!!!*
And so on it goes!
For pick below this was done with a battery at ~11.0volts so the value should be ~1.0volts, which you will see it is near enough.
This is my completed switch, cost around $10 in materials (all inclusive), so for any DIY'er out there, give it a crack, its not that hard to do, and you can say you made it yourself

Re: Home made Cal Switch
Posted: Wed Dec 30, 2015 2:26 am
by RICE RACING
Proof it works
This is the ECU Cal switch input and calibrations selected after correct set up of the voltage thresholds to pick the right cal position.

Re: Home made Cal Switch
Posted: Mon Jan 04, 2016 3:20 pm
by pat
As an added note...
This was for a 12 position THREE wire CAL switch, but if you only have a THERMISTOR type input left then you can make a 12 position TWO wire switch by using a chain of increasing resistor values :
300R, 360R, 442R, 549R, 715R, 953R, 1k33, 2k0, 3k3, 6k65, 20k
Start with 300R between 1 and 2, then 360R between 2 and 3 etc... with 20k between 11 and 12. Then put the GND wire on 1 and the input wire on the common contact of the switch and hey
presto, 12 positions. It should generate the following voltages :
0.00, 0.42, 0.83, 1.25, 1.67, 2.09, 2.51, 2.92, 3.34, 3.75, 4.17, 4.59
You would then set the thresholds to be 0.21 volts less so it is nicely in the middle of the jump value.
And finally.... if you wanted to use this as a THREE wire switch, then stick a 3k3 in series with the +5V and feed that into contact 12. That way you have a universal 2/3 wire switch - if you are using a THERMISTOR input then just don't connect the +5V and it will work. If you are using a 5V input then connect the 5V feed and it will continue to work just as it did on a THERMISTOR input.
Hope this helps,
Pat.
Re: Home made Cal Switch
Posted: Tue Jan 05, 2016 8:03 am
by RICE RACING
Hello Pat,
Thanks for putting that up.
I assume that is worked out with the 3k pull up on the S8? Could you put up how you work out the value in 2 wire mode for pin 1 and pin 2 position cause I cant seem to get the values 'Vout' you got.
Peter
Re: Home made Cal Switch
Posted: Tue Jan 05, 2016 6:57 pm
by TimH
Standard potential divider stuff.
Voltage on the switch contact in position 1 is (5*300)/(3000+300) = 0.45V.
In Position 2 it's (5* (300+360) )/ (3000+300+360) = 0.9V (not 0.83V).
A spreadsheet helps to work this out for all steps in the chain.
The values I use aren't the same as Pat's for what it's worth.
Re: Home made Cal Switch
Posted: Tue Jan 05, 2016 7:46 pm
by RICE RACING
TimH wrote:Standard potential divider stuff.
Voltage on the switch contact in position 1 is (5*300)/(3000+300) = 0.45V.
In Position 2 it's (5* (300+360) )/ (3000+300+360) = 0.9V (not 0.83V).
A spreadsheet helps to work this out for all steps in the chain.
The values I use aren't the same as Pat's for what it's worth.
Yes I know, just was not getting the voltage values he put up IE 0.42v, 0.83v etc