I’ve got a rotary encoder hooked up to an ESP32-WROOM-32D setup in ESPHome. However, when turning the knob of the encoder, no change is recorded in the logs. Oddly enough, if I disconnect the positive jumper, rapid changes are recorded, is my ESP busted?
I guess I don’t know how breadboards work?? I unplugged everything and ran straight off the pins of the ESP32 to the encoder and it worked perfectly fine. Are you not supposed to use depont jumpers with these kinds of breadboards? This is the second type I tried with the same behavior…
Yes, it’s a prototype PCB…I made the assumption that electricity would flow as long as there were metal contacts. I guess I would have to solder everything in for it to work??
So ya…I assumed these prototyping PCB through-holes were wire throughout, appears that’s not how they are. Once I soldered everything together, it all worked just fine…sooo much to learn.
@frank451 I guess it depends on the encoder. The lowest voltage I’ve seen is 5v, including what I am using, but it seems to work on 3.3v just fine. I’m incredibly new to this stuff, but I would imagine you would use a 20v dc adapter, wire it into one side of the breadboard power rails, and then use a resistor between the positive rail and the encoder that would drop the voltage down to 5v. This calculator using 20v input, 5v output, and current draw of .050amps (Using the amperage output of the 3.3v on ESP32 as a reference), shows you’d need 300 ohm 3/4 watt resistor for each circuit. This would be a separate power supply from what is powering the ESP32 and use a set of power rails that does not connect back to the ESP32. The 20v would only power the encoders and then the CLK and DT pins would go back into the ESP32.
I think it would probably be better to ask this over in the hardware section though.
I think the answer is that decoding a rotary is well within the esp32’s capabilities. I would think you can run (as many as the esp32 has pins) /2 as they need two pins each.
If you want to use the handy switch that they usually have, I would say /3.