Maker Pro
Maker Pro

Is thisFoot Switch Relay useable with DC?

turgut

Nov 8, 2022
26
Joined
Nov 8, 2022
Messages
26
Hello everyone,
I have a foot switch. I want to connect foot switch with stm32 mcu. So Im wondering about, can I use foot switch with 12Vdc or 5Vdc?
Thank you for all..

Foot switch's link and specifications:



foot switch.png


WhatsApp Image 2023-05-26 at 15.15.19.jpeg
 

danadak

Feb 19, 2021
751
Joined
Feb 19, 2021
Messages
751
Short answer is yes. But you need to config pin, to use as input, on STM32 with either a pullup
or pulldown, and switch connected to pin to ground or pin to Vdd respectively. And debouce the
switch in code.

1685127679969.png

Also note if STM32 is running off 5V then pullup to Vdd as shown, for case SW1. or if its 3.3
then switch to Vdd of 3.3.



Regards, Dana.
 
Top