wokwi / wokwi-elements

Web Components for Electronics and IoT Parts
https://elements.wokwi.com/
MIT License
185 stars 50 forks source link

wokwi-potentiometers #71

Closed jimf99 closed 3 years ago

jimf99 commented 3 years ago

Dial Potentiometers Series / Parallel Issues

I was using the Dial Potentiometer and noticed that the VCC and GND had no real effect. I tried connecting potentiometers in series and parallel, and the values were still within range of 0-1023 Only 1 value range was output. 0-1023 from the SIG pin. https://github.com/wokwi/wokwi-elements/blob/master/src/potentiometer-element.ts

urish commented 3 years ago

Hi Jim!

Thanks for the feedback. That's because we don't have a true analog simulation, only digital simulation.

The potentiometer is a special case: the output is fed directly into the ADC pin of the microchip, regardless of the VCC/GND connections. This is also mentioned in the docs - see the "Note" under Pin Names. Perhaps we should make this more prominent ?

jimf99 commented 3 years ago

Okay. Understood. I just jumped right in and started experimenting with the Potentiometers and "expected" certain predictable results, thanks for clarifying this. Kind Regards from Calgary Alberta Canada.