Smart Home Automation Forum
How to utilize IO17 and IO16 - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20)
+--- Forum: KC868-A4 (https://www.kincony.com/forum/forumdisplay.php?fid=21)
+--- Thread: How to utilize IO17 and IO16 (/showthread.php?tid=2573)



How to utilize IO17 and IO16 - marcovasqz - 02-16-2023

Hi all,

I want to measure Carbon dioxide PPM levels using the MH-Z19B sensor with my KC868-A4. The sensor uses UART and that means I need to use IO17 (#28 U2T) and IO16 (#27 U2R) but these are being used in the RS232 connector:

   

I see that I can easily use the IO16 (Number 9 from above picture) from the DB9 connector, but I don't know what is happening to IO17 (Number 10 from above picture).

To summarize my question, how can I utilize IO17 and IO16 from a KC868-A4 board? Is it even possible to use MH-Z19B sensor with it? I'm using Tasmota on it.

I'm apologize if this is a dumb question, I'm new to all this.


Thank you in advance


RE: How to utilize IO17 and IO16 - admin - 02-16-2023

1. you need to confirm your sensor's serial level. is that RS232 12v level? or 5V TTL level?
2. if level no problem, just let your sensor's RXD,TXD connect to ESP32's any pins. because you will set the RXD and TXD pins in your software code, such as arduino IDE.


RE: How to utilize IO17 and IO16 - marcovasqz - 02-16-2023

(02-16-2023, 03:16 AM)admin Wrote: 1. you need to confirm your sensor's serial level. is that RS232 12v level? or 5V TTL level?
2. if level no problem, just let your sensor's RXD,TXD connect to ESP32's any pins. because you will set the RXD and TXD pins in your software code, such as arduino IDE.

1. After doing some research I found that this sensor works with 5V.

2. Is it possible to use Tasmota instead of arduino IDE to read the sensor values?

Thank you!


RE: How to utilize IO17 and IO16 - admin - 02-16-2023

1. you need to check whether the serial port of sensor is 5v, not sensor power supply whether is 5v.
2. i am not sure, because sensor have different protocol, whether tasmota can decode it? not sure. use arduino IDE write code by yourself is suitable.


RE: How to utilize IO17 and IO16 - AdamJC - 02-23-2023

Hello Marco,

If you successfully get the sensor connected to the modified board this link may help:

https://tasmota.github.io/docs/MH-Z19B/#tasmota-settings

Good luck!