EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: Psi on February 21, 2024, 08:31:21 am

Title: DIP Switch reliability in automotive
Post by: Psi on February 21, 2024, 08:31:21 am
I'm looking at adding some DIP sw config options for switching between possible input signal types on an automotive product and I'm wondering what the reliability is like for dip switches in an automotive setting.

The product is in the passenger compartment so no engine vibration/heat.
The dip switches would just switch between AC or DC coupling by shorting/not-shorting a cap in series and shorting/not-shorting a parallel resistor.
The signals are either from a AC reluctance wheel speed sensor, or from a hall wheel speed sensor with DC offset.

Obviously the switches can't glitch or the signal would be affected.

Any thoughts.

One idea I had was to just use some opto isolators to connect/disconnect and use the dips to control them. Then I can add some noise rejection/filtering on the dips so any minor glitch's on the dip switches doesn't do anything.

Alternatively is there anything similar to a dip switch but more robust for automotive applications.
Title: Re: DIP Switch reliability in automotive
Post by: Psi on February 21, 2024, 09:36:33 am
Actually opto isolators probably wont work, in VR mode the input can be a few 100V and that makes the opto cost too high.
Title: Re: DIP Switch reliability in automotive
Post by: David Hess on February 21, 2024, 04:14:05 pm
I do not remember having reliability problems with DIP switches in industrial settings.  We did have problems with DIP switches getting contaminated by flux cleaner, but that was solved by soldering them in place after cleaning or not immersing them.

Title: Re: DIP Switch reliability in automotive
Post by: KE5FX on February 21, 2024, 04:18:11 pm
They are fine as long as nobody tries to reset them 20+ years later.  How long is the product expected to last?
Title: Re: DIP Switch reliability in automotive
Post by: sparkydog on February 21, 2024, 05:29:09 pm
Are these meant to be changed after installation? If not, I might consider using jumpers rather than DIP switches, and some hot glue to make sure they don't go anywhere. You could also arrange for the installed PCB to have something pressing down on the jumper, which would allow it to be removed later while still holding it in place during operation. (Also, an advantage of a jumper is you can use three pins as a dual-pole switch, which sounds like it might be useful in your application?)

If you don't need to change settings after initial installation and don't mind a little extra labor cost, you could even use solder bridges; those almost certainly aren't going to care about vibration. In theory, you could also remove the solder to make changes, but doing so is non-trivially harder than jumpers or switches.
Title: Re: DIP Switch reliability in automotive
Post by: Psi on February 22, 2024, 10:10:32 pm
I could use jumpers, the PCB gets encased in heatsink so that would hold the jumpers from ever coming off.

If the user purchases the wrong product for the sensors they have (which they do sometimes) it would be useful if they can change some jumpers/switches themselves to get it working rather than sending it back an shipping them a new one.

So the user being able to change the setting, while uncommon, would be very useful sometimes.
DIP switches would be better than jumpers for this, but I'm not sure I trust DIP switches that much, maybe expensive high quality ones would be ok but then they are expensive :(


Another is duplicating the SMT connector socket on the PCB so you plug it in one spot one sensor and another spot for the other sensor.
But this is a recipe for people using the wrong one and emailing support. Best to keep them as two products for purchase even though it's really just one product with some configurable settings.

Title: Re: DIP Switch reliability in automotive
Post by: PCB.Wiz on February 22, 2024, 10:34:03 pm
The dip switches would just switch between AC or DC coupling by shorting/not-shorting a cap in series and shorting/not-shorting a parallel resistor.
The signals are either from a AC reluctance wheel speed sensor, or from a hall wheel speed sensor with DC offset.
A more radical solution, giving far less support issues, would be to have the system auto-select.
If one source is AC and the other has a DC offset, that sounds not too difficult ?
Title: Re: DIP Switch reliability in automotive
Post by: Psi on February 23, 2024, 01:11:49 am
The dip switches would just switch between AC or DC coupling by shorting/not-shorting a cap in series and shorting/not-shorting a parallel resistor.
The signals are either from a AC reluctance wheel speed sensor, or from a hall wheel speed sensor with DC offset.
A more radical solution, giving far less support issues, would be to have the system auto-select.
If one source is AC and the other has a DC offset, that sounds not too difficult ?

Yeah, but the AC reluctance sensor puts out more voltage the faster you go, any auto switching system needs to handle at least 300V. (They recommend 600V caps in the system)

So any switching system needs to connect/disconnect components when the system could be at like 300V.
Using opto-isolators to connect components into the circuit would work and be easy to control, however most opto-isolators are for 80V or so.  300+V switching is less common.

Title: Re: DIP Switch reliability in automotive
Post by: PCB.Wiz on February 23, 2024, 01:55:40 am
The dip switches would just switch between AC or DC coupling by shorting/not-shorting a cap in series and shorting/not-shorting a parallel resistor.
The signals are either from a AC reluctance wheel speed sensor, or from a hall wheel speed sensor with DC offset.
A more radical solution, giving far less support issues, would be to have the system auto-select.
If one source is AC and the other has a DC offset, that sounds not too difficult ?

Yeah, but the AC reluctance sensor puts out more voltage the faster you go, any auto switching system needs to handle at least 300V. (They recommend 600V caps in the system)

So any switching system needs to connect/disconnect components when the system could be at like 300V.
Using opto-isolators to connect components into the circuit would work and be easy to control, however most opto-isolators are for 80V or so.  300+V switching is less common.

That's not sounding like a brick wall.

One hopes the existing design is not so delicate, that it immediately fails, given you said this already above :   8)

If the user purchases the wrong product for the sensors they have (which they do sometimes) it would be useful if they can change some jumpers/switches themselves to get it working rather than sending it back an shipping them a new one.
Title: Re: DIP Switch reliability in automotive
Post by: Psi on February 23, 2024, 02:11:58 am
Existing design only handles the AC sensors, but the DC sensors are getting more common now and more people ordering it by mistake.
There's a mod I can do by hand to support the DC sensors before shipping if I know about it when they order.

Also I've used up the last of my PCBA stock, so best to design a new PCB that can support both.
It's just a question of how to do this. DIP switches, Jumpers,  soldering some 0R resistors on the boards, or an electronic switching solution.
Title: Re: DIP Switch reliability in automotive
Post by: Whales on February 23, 2024, 02:45:11 am
I was thinking an M3 screw with a split-in-half pad underneath, but there is a risk that someone might install the screw loosely (it will then become intermittent).

For DIP switches: I suspect dirt ingress under vibration might be a bigger issue than accidental switch flips under vibration.  Some DIP switches might be easier to seal (with tape?) than others?
Title: Re: DIP Switch reliability in automotive
Post by: PCB.Wiz on February 23, 2024, 03:00:51 am
It's just a question of how to do this. DIP switches, Jumpers,  soldering some 0R resistors on the boards, or an electronic switching solution.

Jumpers are very KISS - multi sourced and great for one-off config setups.
Title: Re: DIP Switch reliability in automotive
Post by: Whales on February 23, 2024, 03:34:25 am
Do a combined TH jumper + SMD resistor pad so you can chop and change to whatever is better in the current situation:

Small SMD resistor:
Factory install: cheap/free
Pre-ship addition: easy
User removal: easy ("put a big blob of solder on your iron and place it on the middle of the part")
User addition: beyond most user's confidence levels

Jumper link or TH resistor:
Factory install: expensive if you don't already have lots of TH jumper links or resistors
Pre-ship addition: easy
User removal: easy ("cut it out")
User addition: probably easier than an SMD resistor
Title: Re: DIP Switch reliability in automotive
Post by: ejeffrey on February 23, 2024, 04:26:50 am
Most DIP switches are not rated for such high voltage. They will probably work fine when new and clean, but I would be concerned about the longevity of an open DIP switch with 300 VAC across it.  I would use jumpers if I couldn't find a reasonable way to automatically work with both.
Title: Re: DIP Switch reliability in automotive
Post by: PCB.Wiz on February 23, 2024, 04:45:57 am

For DIP switches: I suspect dirt ingress under vibration might be a bigger issue than accidental switch flips under vibration.  Some DIP switches might be easier to seal (with tape?) than others?

Some switches are tagged High pressure contact system  or High contact force to break through oxide or dirt layers
See :
https://www.te.com/commerce/DocumentDelivery/DDEController?Action=showdoc&DocId=Catalog+Section%7F1308111-1_SWITCHES_CORE_PROGRAM_CATALOG%7F0308%7Fpdf%7FEnglish%7FENG_CS_1308111-1_SWITCHES_CORE_PROGRAM_CATALOG_0308.pdf (https://www.te.com/commerce/DocumentDelivery/DDEController?Action=showdoc&DocId=Catalog+Section%7F1308111-1_SWITCHES_CORE_PROGRAM_CATALOG%7F0308%7Fpdf%7FEnglish%7FENG_CS_1308111-1_SWITCHES_CORE_PROGRAM_CATALOG_0308.pdf)
Title: Re: DIP Switch reliability in automotive
Post by: JPortici on February 23, 2024, 04:46:15 am
we use dipswitch for configurations, as almost our competitors do (or did), even in products that go in the engine compartment, so vibration has never been an issue. Depending on wether we had to pot the board we would go for sealed dipswitches (otherwise the compound would leak into the switches making the configuration "permanent"

same for jumpers. But we had to select for jumpers that would work in a high vibration environment to prevent them detaching over time
Title: Re: DIP Switch reliability in automotive
Post by: Psi on February 23, 2024, 11:29:25 am
I think maybe the jumper idea is the winner, maybe with two jumpers in parallel for each switch required, just for that extra confidence.

I'm not worried about jumpers falling out since the PCB gets heat shrunk tight.
And if the user cuts the heat shrink off to change the jumpers for an in-field re-config they will be following instructions for the new jumper positions so I can provide instructions that the jumpers must be held in place with hot glue or maybe the piece of cut-off heatshrink is reapplied over the PCB and taped back together.

In-field re-config will be rare, maybe 1 in 100 so I think the risks are pretty low and the user will be told what needs to be done.

The header block will probably have to be one of those alternating-side SMT 2.54mm header blocks, since the PCB has no TH parts on it atm. It makes no sense to add TH to the PCBA cost just for a few jumpers.

I assume for reliability i need to spec gold plated headers and jumpers?
Title: Re: DIP Switch reliability in automotive
Post by: Rerouter on February 23, 2024, 01:01:42 pm
They are in use in the speedometers for a number of buses and trucks up to about 2012,
Though they tend to use the nicer rocker style one over the more common slider arrangement,

https://upload.wikimedia.org/wikipedia/commons/8/8b/RockerDipSwitch.png
Title: Re: DIP Switch reliability in automotive
Post by: max_torque on February 23, 2024, 02:09:46 pm
It'll almost certainly be easier and cheaper (DIP sw are expensive!) and much more reliable to simply have an input circuit that can take both inputs without any config / switching.

the Hall sensor input isn't going to require masses of current, so simply hiding the raw input behind suitable resistors and a zeners is an easy win, costing practically nothing.  It's also worthing noting that realistically you are going to need to do exactly this for the reluctor type sensor, which may indeed get up to 300v when unconnected but as you are only detecting the ZERO crossing event, there is no requirement for you input circuitry to actually have to have this voltage cascade through any input protection / filtering. In fact here, +-5v or +-10v is more than enough to provide noise rejection etc


 :-+
Title: Re: DIP Switch reliability in automotive
Post by: Rerouter on February 23, 2024, 02:29:08 pm
Ah, now that I've read it better, yeah you don't need the jumper at all (My day job is automotive instrument clusters)

There are 3 main signal types

Inductive, These have a minimum signal strength of 0.4V pk-pk and more commonly its around 1.3V above 20kmph
Hall Effect (Passive) these have a pullup resistor around 10-100K in the cluster and the sensor pulls down the signal 8 or 25 times per rotation (some weird ones do exist)
Hall Effect (Active), VCC or 5V, with a true push pull output, current limited to 5 or 10mA, and some models have a non 0V offset to detect sensor faults, e.g. Isuzu loves a 2V to 7V signal range,

Outputs from ECU's can be the same as the last 2, open collector output, or logic output, and Coil low side is more or less the same, but the spike is a good whack stronger

Then the less common stuff,
Generator senders, (They are much fatter than normal ones, like 50mm across), these put out about 60-100V AC open circuit, but the current is rather small, the speedometers where effectively a current meter, and had a dedicated output for the odometer for this reason

Alfa Resonators (I Hate these with a passion), they oscillated around 35-80KHz depending on if the metal tooth was near the sendor or not, and being part of a tank circuit could get up to 400V pk-pk,

Loop signal, These are effectivly low side switching but current based,


As for the input, The attachement is how I approached it, it could use with some more selectivity to set the noise floor, higher for some signal types, but it works for all the common signal types including coil low side, (Remove C3), The diode transistor pair are there to dump the current pulses from the uglier signal sources,
Title: Re: DIP Switch reliability in automotive
Post by: Psi on February 24, 2024, 04:29:27 am
which may indeed get up to 300v when unconnected but as you are only detecting the ZERO crossing event, there is no requirement for you input circuitry to actually have to have this voltage cascade through any input protection / filtering. In fact here, +-5v or +-10v is more than enough to provide noise rejection etc

You raise a very good point here.


Inductive, These have a minimum signal strength of 0.4V pk-pk and more commonly its around 1.3V above 20kmph
Hall Effect (Passive) these have a pullup resistor around 10-100K in the cluster and the sensor pulls down the signal 8 or 25 times per rotation (some weird ones do exist)
Hall Effect (Active), VCC or 5V, with a true push pull output, current limited to 5 or 10mA, and some models have a non 0V offset to detect sensor faults, e.g. Isuzu loves a 2V to 7V signal range,

These are the sensors on the ABS tone rings.

The reluctance type is pretty simple, 2 wire passive and just spits out AC voltage as a tooth passes the sensor. Faster gives higher voltage. We use a Maxim reluctance sensor IC to grab this signal.

The Hall sensor is 2 wire active sensor. The + wire just goes to 12V.  The - wire goes through a 100R to gnd. The output pulses are generated by the sensor changing its current draw which gives between 1.5V or 3V across the 100R resistor to GND.

For the HALL sensor we have just been decoupling the 1.5-3V data wire with a cap and resistor and feeding that into the maxim chip so it pulls its inputs above/below other input at ground. Like the reluctance sensor would and like the IC expects.
Downside of doing it this way is the maxim chips are expensive and not really needed for HALL sensors, we could do it cheaper with an separate product using comparator at 2.25V for hall sensors instead of maxim IC, but using the maxim IC makes the product generic which is more important for us atm
Title: Re: DIP Switch reliability in automotive
Post by: NiHaoMike on February 25, 2024, 12:25:41 pm
Yeah, but the AC reluctance sensor puts out more voltage the faster you go, any auto switching system needs to handle at least 300V. (They recommend 600V caps in the system)

So any switching system needs to connect/disconnect components when the system could be at like 300V.
Using opto-isolators to connect components into the circuit would work and be easy to control, however most opto-isolators are for 80V or so.  300+V switching is less common.
Would it work to have a zener clamp and a series resistor?
Title: Re: DIP Switch reliability in automotive
Post by: joeqsmith on February 25, 2024, 05:41:52 pm
...I'm wondering what the reliability is like for dip switches in an automotive setting.  ...  Any thoughts.  ...
I've seen a fair amount of aftermarket products that used DIP switches.  Tachometers would commonly use them to set the number of cylinders and such.    Some of the aftermarket electronics I use with my motorcycles have also used DIP, push buttons and rotary switches.  With some products, they have also used resistors embedded into a connector that you plug in to the product to program some feature.   I have not had a problem with any of these devices failing but the duty cycle is very low (racing applications) and their life may be very short.   

In cases where I have used DIP switches (in general), I use sealed parts.  This allows them to run through the wash.  If we had to conformal coat the boards, we would mold covers for them.   
 
When I worked in automotive, we would use both sensors you mention.  In our case, we need to use a variable threshold for the VR as the phase error was important to us.   In cases where we supported both sensor types, we had dedicated inputs and would select them with firmware. 
Title: Re: DIP Switch reliability in automotive
Post by: Psi on February 26, 2024, 08:34:55 am
Yeah, but the AC reluctance sensor puts out more voltage the faster you go, any auto switching system needs to handle at least 300V. (They recommend 600V caps in the system)

So any switching system needs to connect/disconnect components when the system could be at like 300V.
Using opto-isolators to connect components into the circuit would work and be easy to control, however most opto-isolators are for 80V or so.  300+V switching is less common.
Would it work to have a zener clamp and a series resistor?

Yeah, it was a design decision ages ago to not mess with the sensor signal at all, since we are tapping onto an existing system to read the sensor data and didn't want to interfere with anything else reading the data.  So we just left it un-clamped and spec'ed the inputs to handle 300V on the sensor wires.  Going that route was simple since the Maxim chip we use to read the VR sensors is all setup to handle that. 
But now that we are adding some more smarts on the input side we probably should revisit that assumption.