SPDT Switch as On/Off Switch

I’m trying to use a SPDT switch as an on/off switch, using the schematic below. I’ve received the PCB, but no matter which position the switch is in, the attiny still gets powered, which just randomly flashes LEDs. I have the switch on the back of the board which is copper filled to the VCC net, so I tried cutting off pin 3 on the switch to see if that would work, but that had no effect. The only way I was able to get the switch to not turn on the LEDs was to touch some wire to pin 3 of the switch to ground, but using a multimeter on the attiny was giving a reading of 3v.

Is using a SPDT switch as an on/off switch just not possible?

I chose that switch because I couldn’t find any SPST switches under the Slide Switch category on digikey. I’ve now found some under the DIP Switch category, but I’d like to make use of the switches I already have.

The switch is fine, but you have an error in your schematic, the label VCC on pin 8 connects it to VCC. If you remove that label it would be OK.

You might be able to get the board working by carefully lifting pin 8 and running a wire to SW1, but you would need to use pin3 of SW1. or disconnect pin 1 of SW1 from VCC as well.

1 Like

Thanks! I’ve spent 3 days trying to figure this out, I’m almost disappointed it was something so simple :slight_smile: