Hi @jim-p
Could you please care to explain a bit more of your suggestion on this post
My suggestion was specific to the OP special case where the devices only respond when commanded or addressed.
Is that your case?
not exactly my case.
these are the sensors I am trying to connect.
they will be placed in key location in the house and as and when a human is no longer detected, the ESP would trigger SSR that would cut off power to aircon.
So what I think is that poll each sensor for a period of 3~5 seconds one-by-one and check for presence data would be okay. But that’s my idea.
furthermore, I plan to configure each sensor via the ESP through webserver.
So you will have one ESP for each sensor and transmit the data via WiFi to a webserver, is that correct?
No. Only one ESP. There are no wireless connections allowed between the sensors. Only wireless connection allowed is to the ESP. sensors are connected with the ESP via RS485. So each sensor would have two RS485 connecting the sensor to ESP. Issues is that ESP only have 3 UARTs and I would need a minimum of 4.
have a look at EspSoftwareSerial
Perhaps this device will allow you to proceed: https://wiki.dfrobot.com/Gravity:%20IIC%20to%20Dual%20UART%20Module%20SKU:%20DFR0627
If you buy the RS485 modules with the DE and RE pins (Driver Enable and Receiver Enable) you may be able to use them the multiplex the UART connections.
both the ESP32 and HLK-LD2410B use 3,3V logic make sure your RS485-TTL modules use 3.3V logic - many use 5V logic
oh that would be a good idea. let me look into that. Thanks.
It looks like most of the modules have pull-up resistors on all the signals and that may prevent doing what I suggested.
Also you need to consider that most modules are 5V I/O and the ESP32 and sensor are 3.3V.
Why you need uart for that in the first place, why don't you use the gpio-output?
And if you need to use uart, it supports low baud rates, so software serial for one sensor should be viable.
Correct setup would be to read the gpio-outputs multiple times with decent intervals and when there is confirmation for no presence, command the AC to turn cooling off.
This should be done over several seconds or minutes...
Are you making a PCB and using RS485 ICs or are you using all modules?
Have you considered the wear on the system with many, many off and on and off to the power?
this is noted and will use level shifters. thanks.
yes the final solution will encapsulate into a pcb. coz there is power delivery part also.
i mean I could always remove them as still in the prototype phase.
simpler to use a RS485-TTL module which works at 3.3V - e.g. XY-017 3.3v 5v 12v RS485 TO TTL
also look at 8:1 Serial Port Expander
could kindly care to elaborate on this pls?
so expensive, out of budget and anyone would know the chip used in it?