Hopefully this will help someone else as well as myself.
I’m attempting to wire up the blade detect feature using a latching switch and I didn’t have any luck figuring it out myself aside from using the config generator and wiring it up exactly like shown.
https://fredrik.hubbe.net/lightsaber/v6/configurator.html
Before that I attempted to figure it out myself and I didn’t get too far but I just wanted to know if someone would have some insight on this. The main question I have is this
- Using the default blade detect setup via the config generator I assume I would wire this latching switch as such (mouser part #611-JS202011CQN)
Pin 1 (left pin) to Free1 (bladepin5)
Pin 2 (middle common pin) to L2/L3
The mouser link doesn’t seem to work.
The wiring you suggest should work, assuming the switch is closed when the blade is present. (And not the other way around.)
Note that if you’re trying to detect something else, like when the crystal is in, it might not work, because this wiring depends on the blade to work. This can be fixed though, just wire Pin2 to GND instead of L2/L3.
Seems like the mouser link preview was no good so I just took the link out and put in the part number.
You’re absolutely right, I tried it on lunch since all i had to do was move two wires around. I took the blade detect wire off the shtok pcb and ran it to pin 1 and L2/L3 to the middle common pin (pin2) and it works flawlessly. I’ll have to play around with connecting it to GND instead but as it is it serves the purpose I was going for.
Thank you very much for the help