Switch Sufferings

I’m not sure what I did in a previous life to keep getting these niggles, but it must’ve been pretty bad!

Bit of an odd one:

Eratic behaviour from Proffie, traced to the MAIN switch often being stuck ON.

Except - it’s only stuck ON when the Proffie is powered. When the Proffie is unpowered the switch is mechanically disconnected until you press it. (i.e. working normally - according to my test meter anyway).

This video shows the symptoms:

The switch board is the one that came with the KR Eco Hero kit, and the reason I’m asking on here first before I dig any further is because I don’t think that switchboard will survive being unglued. Hence I was just wondering if anyone else has had anything like this before?

Initially I suspected the switch, but the fact that continuity seems to change based on whether the Proffie is powered or not has made me think maybe not.

I tried measuring reistance across the switch terminals and resistance between the MAIN switch terminals is 14 milliohms and on the AUX switch terminals it’s 2.2 milliohms. This compares to zero ohms (completely open) on a loose tactile switch which I had knocking about. I’ve no idea if these numbers are significant or to be expected or not.

Any thoughts welcome before I start unpicking stuff any more.

:slight_smile:

Serial monitor data below:

I just looked again at the serial monitor data. Interesting that it was running for about 40 seconds and the durations of the power holds and releases are consistent but climb steadily, starting at around 38,000 milliseconds and climbing through the 40 second window to around 72,000 milliseconds.

Seems a bit too uniform to be a random wiring fault.
Heat related perhaps?

You can’t really measure continuity and resistance in a live circuit. Those measurements requires the meter to put some current through the circuit and measure what happens to it, but a powered circuit will already have current/voltage and so measurements will be wrong. Sometimes this can work anyways, but unreliable measurements are pretty much useless.

However, we can measure if the circuit behaves like expected when on by measuring the voltage. When the board is on, it puts a voltage across the switch, which should normally be 3.3 volts. Once you push the button, it creates a short, and so the voltage should be zero across the button.

My guess is that you have a short between the power button and something else, but I’m not sure what. Maybe a speaker wire?

Aha! In that case the plot may have just thinnened!

I just checked the voltage between both switch lines and ground and the AUX switch was indeed giving 3.3 volts (well, 3.27, but close enough) but the MAIN switch was only giving 1.5 volts. I tried reflowing the solder joint in case that might be the cause but it made no difference.

I also tried checking for shorts and resistance between all of the pads that are used on the switch pcb, the pads in closest proximity to the MAIN switch pad, and the speaker pads for good measure. There were no shorts but there was micro amounts of resistance as follows:

MAIN - AUX = 6 milliohoms
MAIN - 3.3 volt = 19 milliohoms
MAIN - GND = Zero milliohoms
MAIN - LED Pad 5 = 18 milliohoms
MAIN - LED Pad 6 = 19 milliohoms

MAIN - LED Pad 1 = Zero milliohoms
MAIN - LED 2/3 = Zero milliohoms

MAIN - Speaker + = 13 milliohoms
MAIN - Speaker - = 17 milliohoms

Can’t help thinking though that only 1.5 volts is the key.
Is there an easy fix?

1.5 volts is definitely not normal, the question is what’s causing it.
There are a few possibilities:

  1. It’s a short to something that fluctuates quickly, making it look like 1.5 volts, but it’s really alternating between 0 and 3.3 volts. Depending on the speed of the fluctuation, you might be able to measure this using AC measurements.
  2. You’ve enabled something in your config file that uses that pin, like maybe SPDIF or I2C output. (Try the default_proffieos_config.h, do you still see 1.5 volts?)
  3. There is a high-resistance short to ground, something around 40kOhm. This type of short is unusual, but can be caused by flux and other semi-conductive material on or around the boards. Maybe the glue is doing it?
  4. The pullup resistor inside the CPU broke somehow, so it’s not able to do it’s job. This can be fixed, either by using a different pad, or by adding a resistor between the button1 pad and 3.3v.

I think the first thing I would do is to try an ultra-simple config file to rule out config file problems.

After that, I would de-solder the wire from the button1 pad and then try to figure out if the problem is somewhere on/near the board, or if it’s on/in/near the button.

OK, so it looks like it’s the config. Loaded up the base config from the proffie page and we’re up to 3.3 volts.
The question now is why?
My guess is it’s something to do with the OLED as this is the only aspect of this build that I’ve never done before.

Config is here:

OLED is wired as per the manual with Positive from the SD power pad and neg to ground.

Any thoughts welcome. At least we know it’s not a hardware problem which is good.
:slight_smile:

In case it’s relevant, this is the prop I use. It’s a tweaked SA-22C, but my edits are clearly shown:

The only other tweaks are OLED config settings in the Shared folder. Here:

I don’t see anything obviously weird in your config file.
I would try removing one thing at a time until the problem goes a way.
(Make sure you have a copy of your config file first.)

I would do it something like this:
(In between each step, compile and test if the problem is still there.)

  1. Remove all presets except one. (This just makes it easier when you modify the blades later.)
  2. Remove the OLED defines.
  3. Remove CONFIG_PROP section
  4. Remove all blades except one. (and update NUM_BLADES and remove extra styles from the preset.)
  5. Remove all defines that are not in the default_proffieboard_config.h

OK, with the OLED defines all taken out, the voltage would pulse between 3.3 volts and around 2.2 volts.
I suspected this was in time with the accent LED animation in the KR switch pcb, so I changed those blade presets to just being Black.

Voila - 3.3 volts back at the switch pad.

I then reinstated the OLED defines and config.ini, reloaded and the 3.3 volts still worked.

So the issue is with the switch pcb LEDs somehow causing problems for the switch lines.

I guess all I can do is get back to KR and let them know, but I suspect even if the manufacturer tested it, they’d say there’s no fault and it’s within spec, and as such it wouldn’t surprise me if any replacement board exhibited the same problem. But I’ll drop Khal a line and see what he says.

Thanks so much for your help tracing this one Prof. Without that little nugget of knowledge about the 3.3 volts at the switch pad, I know I’d never have figured it out. I’m in your debt as always.

So this PCB, does it have a single ground for LEDs and switches?
How is it actually wired?

There are seven pads on the back:

Red +
Red -
Green +
Green -
Switch 1
Switch 2
Common (Switch ground)

I bridged Red+ and Green+ from the 3.3 volt pad, but I assume the reason they’re separate on the pcb is because some boards switch the positive rather than the negative for LEDs.

But other than that, there shouldn’t really be much to go wrong. I would have thought all the traces would be completely separate, but maybe not.

Time to start measuring.
However, there is one other possibility.
Do you have resistors for the LEDs? Or are they on the board?

The switch pcb has resistors fitted to it already from the factory - 68 ohm on red and 1 ohm on green. Though I don’t know whether they are across their respective positives or negatives.

Well, that means my other suspicion is not the case (I thought that maybe the LEDs were dragging down the 3.3v rail.)

So then it’s just a matter of trying to find where the short is. Unless you’ve separated the boards already, it’s still possible that the short is somewhere on/near the proffieboard.

No I haven’t separated anything yet, but I’m confused. Surely a short is physical? But my test meter says there is no short anywhere. Also how would a short be manifest when the LED is lit/animating, but disappears when the LED is off?

When the LED is off, the FET that controls it basically cuts off the connection.
So when the LED is off, the button can function as normal. When the LED is on, it will pull down down through the short.

If I had to guess, I would think the short would be between the LED and the resistor, and that’s why you’re seeing 1.5 volts instead of 0 or 3.3. But it could also be because the FET is actually turning the LED on/off 800 times per second, and so what you’re seeing is an average value.

So that still leaves us looking at the switch pcb as the culprit doesn’t it? - as the switches, LEDs and resistors are all integral…