Help with Teensy 3.2 and a 3-way switch to read on a single analog pin

Status
Not open for further replies.

Geekness

Well-known member
So as a follow on from my last help request here, I am having another issue.
Not really sure if it's separate or was the actual cause of my last post or not.

Anyway, I have 2x 3-way switches, 1MD6T1B5M1QE (DPDT, on-on-on), labelled as 3W-L and 3W-R on my schematic.
Teensy RC 2.2 Schemtic.jpg Switch closeup.JPG 3 way switch function.JPG 3 way switch mechanics.JPG
Here's a pic of my schematic---------------------close up of the switch pins on my pcb----------switch functions highlighted in yellow-----------Switch geometry
here's is a link to the live schematic

I have the pins connected like this:
Switch wiring.JPG

L-3.3 comes from 3.3V1 on the teensy.
When I have the switch in the position 1, I get 0V out on my PCB signal wire coming out of my switch going into teensy (to read as analog)
The problem is that when I move the switch to another position, my 5V voltage regulator drops to 1.3V, causing my teensy to stop working.

In position 2, the analog voltage signal that goes into the teensy is 0.27V
In position 3, the analog voltage signal that goes into the teensy is 0.13V

As soon as I put the switch back to position 1, everything functions correctly again.

So I know I've done something wrong, but im not sure what. Hoping somebody might be able to point me in the right direction
 
Not making a lot of sense of your drawing - description suggests you are grounding the supply in one switch position, but if trying to get three states out of a switch I'd wire-

3.3V
1.7V from a voltage divider
0v

Alternatively enable the teensy pin pullup and leave one switch contact open, on with ~10k to gnd and on on gnd, same deal with the other three contacts being tied together and connected to the teensy.

to one row of switch contacts and tie the other three together and send them off to the teensy read pin. So you have three voltages, and which one gets connected to the teensy depends on the switch position - also check if the switch is make before break since that can be all sorts of fun if pairs can get connected during switch movement.
 
On my PCB, I have 2 10k resistors for my voltage divider. The switch is just wired directly to the PCB, as shown on the sketch.
I do believe I've grounded something, just can't figure out where. Im sure it has something to do with the way im wiring up the switch.

The way I designed it was to get the 3.3, 1.7, and 0V. It just isn't working that way.

Not making a lot of sense of your drawing - description suggests you are grounding the supply in one switch position, but if trying to get three states out of a switch I'd wire-

3.3V
1.7V from a voltage divider
0v

Alternatively enable the teensy pin pullup and leave one switch contact open, on with ~10k to gnd and on on gnd, same deal with the other three contacts being tied together and connected to the teensy.

to one row of switch contacts and tie the other three together and send them off to the teensy read pin. So you have three voltages, and which one gets connected to the teensy depends on the switch position - also check if the switch is make before break since that can be all sorts of fun if pairs can get connected during switch movement.
 
What is supposed to happen when the switch is in the middle position. Looking at the layout as drawn, both 2 and 5 are both connected to Gnd, and if switch is set to connect 3 to 2 that closes a path from +v to gnd.
 
What is supposed to happen when the switch is in the middle position. Looking at the layout as drawn, both 2 and 5 are both connected to Gnd, and if switch is set to connect 3 to 2 that closes a path from +v to gnd.

Would you have a suggestion on how to wire the switch up to have a Vin, GND, signal. With the signal wire to read 0V, 1.65, 3.3V in the 3 positions of the switch?
This picture is what I currently have.
3 way switch wiring.jpg
The 3 pictures on the left are how the switch works. The picture on the right shows how I have it wired up.

I also have the same switch in an on-of-on variation too if that helps.
 
Status
Not open for further replies.
Back
Top