Dingtian IOT Relay

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
manatwork81
New user
Posts: 7
Joined: 14 Dec 2022, 20:33

Re: Dingtian IOT Relay

#51 Post by manatwork81 » 14 Dec 2022, 20:42

Hello
I am using an ESP8266 with 1 x 74HC165, Collection E (latest)

1 have Connected the Chip
Q7 -> D6
CP -> D7
EN -> D0
PL -> D5
------------------------------------------
But shifting, is not correct Pin0 should be 1
but i got this result

Pin 0 --> 2
Pin 1 --> 4
.....
Pin6 --> 128
Pin7 --> (no output)

where is the problem?
Thanks 4 help ...

User avatar
Ath
Normal user
Posts: 3918
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Dingtian IOT Relay

#52 Post by Ath » 15 Dec 2022, 21:57

- Have you tried to add a pull-up resistor (suggested value 10k) on the Clock and Load pins?
- Is the Enable pin used?
- Is your wiring soldered or on a breadboard?
/Ton (PayPal.me)

manatwork81
New user
Posts: 7
Joined: 14 Dec 2022, 20:33

Re: Dingtian IOT Relay

#53 Post by manatwork81 » 04 Jan 2023, 09:21

Hi!

Pullup 10K on D0-D7
Enable pin is used
its on breadboard for testing
Config
Config
123.PNG (37.18 KiB) Viewed 2820 times
i get 2,4,8,16,32,64,128 (last pin no Value)
but it should start with 1 at pin D0
it looks like one shift is missing.

Thanks for Help, sorry for late answer.

User avatar
Ath
Normal user
Posts: 3918
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Dingtian IOT Relay

#54 Post by Ath » 04 Jan 2023, 09:45

Does it improve if you change the Sample Frequency to 50/sec ?
/Ton (PayPal.me)

manatwork81
New user
Posts: 7
Joined: 14 Dec 2022, 20:33

Re: Dingtian IOT Relay

#55 Post by manatwork81 » 04 Jan 2023, 09:59

No, same effect.

User avatar
Ath
Normal user
Posts: 3918
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Dingtian IOT Relay

#56 Post by Ath » 04 Jan 2023, 10:06

I will do an investigation later today
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 3918
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Dingtian IOT Relay

#57 Post by Ath » 04 Jan 2023, 20:56

manatwork81 wrote: 14 Dec 2022, 20:42 I am using an ESP8266 with 1 x 74HC165, Collection E (latest)

1 have Connected the Chip
Q7 -> D6
CP -> D7
EN -> D0
PL -> D5
...
where is the problem?
Edit: (Schematics shown in the Aliexpress link show differently from first version of this text)
You may have used the !Q7 output, (inverted Q7, can't create an overline in the forum, AFAICS) and that's pin 7 on the chip, but actually the Q7, that's on pin 9 of the chip, should be connected to the data in pin configured in ESPEasy. Because of the method of reading the data, only the Q7 output can be used.
If you have this configured on a breadboard it should take only a few seconds to change the configuration ;)

For testing I've used this board from Aliexpress, that has convenient pull-up resistors on all inputs. I can read all pins as intended (tested using the first chip only for now, but all 3 chips = 24 inputs, have been tested when I developed the plugin).
/Ton (PayPal.me)

manatwork81
New user
Posts: 7
Joined: 14 Dec 2022, 20:33

Re: Dingtian IOT Relay

#58 Post by manatwork81 » 05 Jan 2023, 20:24

I have used pin 9
aafbbdaac09d10587d7d78971c910726.png
aafbbdaac09d10587d7d78971c910726.png (10.79 KiB) Viewed 2761 times
if i use pin7 start is 255 an it will be subtract.

Pin9 --> Q7
pin 1 --> PL
pin2 --> CP
pin 15 --> EN
pin 16 --> VCC
pin 8 --> GND

11,12,13,14,3,4,5,6 Pin are Inputs Results: (2,4,8,16,32,64,128,x)



i have tried an other Chip too ...
same result.

i have connected an i2c Display

User avatar
Ath
Normal user
Posts: 3918
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Dingtian IOT Relay

#59 Post by Ath » 05 Jan 2023, 20:47

Hm, that's kind of unexpected.

Can you try to set the EN pin configuration to None (or disconnect from the ESP and pull-down to GND), and try again, as my board doesn't have that pin available for connection and it might give different results when it is used.
/Ton (PayPal.me)

manatwork81
New user
Posts: 7
Joined: 14 Dec 2022, 20:33

Re: Dingtian IOT Relay

#60 Post by manatwork81 » 05 Jan 2023, 22:10

Exactly the same result

manatwork81
New user
Posts: 7
Joined: 14 Dec 2022, 20:33

Re: Dingtian IOT Relay

#61 Post by manatwork81 » 06 Jan 2023, 09:09

I have try to Change the Pins on MCU, same result.

i am using Collection E mega-20221224_35f2ff8 could this be a Bug?

I have tried to delete all settings (Factory Reset) and make new setup.
same result.

Did anyone have an compiled (working) Version for ESP8266 4MB, just for trying?

Thanks

User avatar
Ath
Normal user
Posts: 3918
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Dingtian IOT Relay

#62 Post by Ath » 06 Jan 2023, 09:38

I have tested using the latest code, that didn't change since the 20221224 release (yet), and also have a PR to start using direct GPIO pin access (for better/faster GPIO response especially on ESP32), and for both the old and the new code it has been working fine.
I'll share a locally built .bin file later today (4-5 hours from now, when I'm off from work) for testing.
Or when you are in a bit of a hurry, you can download the PR build with my latest changes from Github Actions, here (you'll need a Github account to be able to download the Binaries.zip file)
/Ton (PayPal.me)

manatwork81
New user
Posts: 7
Joined: 14 Dec 2022, 20:33

Re: Dingtian IOT Relay

#63 Post by manatwork81 » 06 Jan 2023, 12:13

I have download the bin, same result.

All my settings.

Hardware:
https://www.az-delivery.de/products/nod ... 24fa&_ss=r

Pin1 --> D6 (Load)
Pin2 --> D7 Clock
pin3 --> pulled down 10K
pin4 --> pulled down 10K
pin5 --> pulled down 10K
pin6 --> pulled down 10K
pin7 --> empty
pin8 --> Ground
pin9 --> D0 (Data)
Pin10 --> Ground
pin11--> pulled down 10K
pin12 --> pulled down 10K
pin13 --> pulled down 10K
pin14 --> pulled down 10K
pin15 --> Ground
pin 16 --> VCC


when pin 10 is empty i got on pin 6 the missing 1 ;), but sometimes 3 instaed 2, or 129 instead 128 ....
should this be correct?

User avatar
Ath
Normal user
Posts: 3918
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Dingtian IOT Relay

#64 Post by Ath » 06 Jan 2023, 17:23

Ok, "I went down and got it for you" (from the Britney Spears song Oops, I did it again), took the e-bike to the electronics shop today (gas is quite expensive these days :o ) and bought me a set of 74HCT165 chips.
Put one on a breadboard, just like you describe, in the post above this one, and tested: All working fine (D0..D7 to VCC brings me 1, 2, 4, 8, 16, 32, 64, 128), repeated with DS disconnected: same result, repeated with EN wired to the configured ESP pin: same result. Then swapped the pull-down to pull-up resistors, and connected each pin to GND: every pin is neatly reported as a 0 (looking at the BIN output) and decimal 254, 253, 251, 247, 239, 223, 191, 127, so, effectively: same result (repeated with DS and EN connected/grounded, like before, too).

So, the question remains, what's wrong, at your end?
breadboard_74hct165.jpg
breadboard_74hct165.jpg (833.76 KiB) Viewed 2685 times
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests