Skip to content

ADC LN-02 (LN882HK) board always reads 820..840 on PIN0 #1667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
deadphreaker opened this issue Jun 1, 2025 · 0 comments
Open

ADC LN-02 (LN882HK) board always reads 820..840 on PIN0 #1667

deadphreaker opened this issue Jun 1, 2025 · 0 comments

Comments

@deadphreaker
Copy link

Describe the bug
When configure PIN0 as Btn external input with 10k resistor pull-up works fine.
When configure PIN0 as ADC (A0 pin in LN-02 pin description this is ADC2 channel) it always reads 820..840 even if it grounded and actual voltage on PIN0 is 0v.

Firmware:

  • Version: 1.18.109
  • Device: Elivco Cozylife 16A Mini Switch
  • Chip/model: LN882HKI, LN-02 module, model RMW002
  • Device config
    {
    "vendor": "Tuya",
    "bDetailed": "0",
    "name": "Full Device Name Here",
    "model": "enter short model name here",
    "chip": "LN882H",
    "board": "TODO",
    "flags": "1026",
    "keywords": [
    "TODO",
    "TODO",
    "TODO"
    ],
    "pins": {
    "0": "ADC;1",
    "1": "Rel;0",
    "19": "LED_n;0",
    "24": "Btn;0"
    },
    "command": "",
    "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",
    "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"
    }

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'PIN SETTINGS'
  2. PIN 0 set as ADC on channel 1
  3. short S1 and S2 terminal (pin 0 will get a 0v level)
  4. See readings in channel 1 = 820...840 at device's web interface

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Looks like ADC readings are from wrong pin number instead pin 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant