Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
No RS485 on output KC868 A2
#1
Hi Kincony,
I hope you are well.

I have recently purchased the KC868-A2 via AliExpress.
This is a great device with ethernet and RS485. It is a very fine unit. It joins my KC868-A4 and KC868-A8 in my systems.

This unit was purchased to interface with ModBus water meters at a remote site.
This has been progressing well until I had a problem making the RS485 work.

The board is KC868-A2-V2.4. I notice this is slightly different to the circuit diagram on the website which is made for V2.3. I am not sure if this is part of my problem as I might be testing incorrect pins?

My issue is I cannot see RS485 waveforms at the output.
In my fault finding I traced back and looked at the signal at several points:
1. P6 9H connector on the "A and B" points. No signal during transmit.
2. I checked the output of MAX13487ELSA (pin 6 and pin 7) to find no output during transmit.
3. The output of the ESP32 Pin 8 shows the ModBus command (Siglent Storage Oscilloscope).
4. I checked input of  MAX13487ELSA (pin 4 to gnd)  to see the RS485 signal coming from the ESP32 Pin 8. It is good level. The ESP32 is running latest version Tasmota 14.1.0 and the UI confirms that the ModBus signals are working (this I think means the code is correct).

I see that the Pin 2 and pin 3 of the MAX13487 are held high (measures 5.2V) and so the device should present data on the RS485 oututs Pin6 and 5. There is no signal at A &B on P6 during transmit.

Do you have anysuggestions as to what is happening? 
I am doing something incorrect or is there possibly a fault?

Many thanks for any assistance you can provide.

Rgds

Adam
Reply
#2
you can test with our arduino demo code firstly, here is RS485 code for KC868-A2: https://www.kincony.com/forum/showthread.php?tid=2640
if test OK, that means hardware PCB is well, then you can check with your software.
Reply
#3
Thank you.
I will try that today.

Adam
Reply
#4
(07-23-2024, 01:16 AM)admin Wrote: you can test with our arduino demo code firstly,  here is RS485 code for KC868-A2: https://www.kincony.com/forum/showthread.php?tid=2640
if test OK, that means hardware PCB is well, then you can check with your software.

Hi Kincony,

I have tested with the demo code and there is no communication happening on the P6 header. Attached is the programming code and output monitor. I can also say it compiled without error.

No output was seen.

As I noted earlier the ESP32 generates the signal on IO32 but it does not appear on the output of the MAX13847 chip on PINs 6,7.


Code:
//A2
#define A2_RS485RX  35
#define A2_RS485TX  32
void setup() {
  Serial.begin(115200);
  Serial2.begin(115200,SERIAL_8N1,A2_RS485RX,A2_RS485TX);
   Serial2.println("RS485 SEND is OK!!");
   Serial2.println("******************");
 
}
void loop() {
  /*print the received data of RS485 port*/
  while(Serial2.available()>0)
   {
    Serial2.print((char)Serial2.read());//Read rs485 receive data  and print it
   }
  delay(200);
}




Output monitor.

Sketch uses 279409 bytes (21%) of program storage space. Maximum is 1310720 bytes.
Global variables use 20200 bytes (6%) of dynamic memory, leaving 307480 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.6
Serial port COM4
Connecting......
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: a0:a3:b3:fe:3b:44
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00054fff...
Compressed 19744 bytes to 13604...
Writing at 0x00001000... (100 %)
Wrote 19744 bytes (13604 compressed) at 0x00001000 in 1.6 seconds (effective 99.2 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.1 seconds (effective 266.5 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.2 seconds (effective 410.2 kbit/s)...
Hash of data verified.
Compressed 279776 bytes to 156518...
Writing at 0x00010000... (10 %)
Writing at 0x0001bbe5... (20 %)
Writing at 0x00024208... (30 %)
Writing at 0x00029897... (40 %)
Writing at 0x0002eb36... (50 %)
Writing at 0x00033f15... (60 %)
Writing at 0x0003ca39... (70 %)
Writing at 0x000466a9... (80 %)
Writing at 0x0004bcef... (90 %)
Writing at 0x0005125f... (100 %)
Wrote 279776 bytes (156518 compressed) at 0x00010000 in 13.9 seconds (effective 161.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Reply
#5
i have tested code with my USB-RS485 adapter. no problem.
   
   
Reply
#6
Hi Kincony,

Many thanks for the information in this thread.

I ordered and received new RS485 converters.
I also utilised the same software application you had used so it was simple to replicate your test setup.
The setup was straight forward and code loaded correctly as noted earlier.

Unfortunately the system did not work and failed to provide return.

Again checking using the oscilloscope the KC868-A2 board did not show a transmit signal at the output of the P6. The transmit signal is present coming from the ESP32 from IO32 and can be measured at U8 input but does not display on the RS485 output.

I can tell you that there is no output from U8 to the P6 header. This is shown by no response on the UART Assistant UI.
       

Please advise.

Rgds
Adam


Attached Files Image(s)
           
Reply
#7
when you bought the KC868-A2?
which store URL you bought?
Reply
#8
(08-08-2024, 09:48 AM)admin Wrote: when you bought the KC868-A2?
which store URL you bought?

I see and understand.
It appears the store I purchased is not you. I didn't realise this might not be your official store.
https://kinconycontroller.aliexpress.com

What does this mean?

Rgds

Adam
Reply
#9
this is not our official store. If you really have problem with hardware , you can contact with seller.
maybe you can re weld the U8 RS485 chip.
Reply
#10
(08-08-2024, 12:21 PM)admin Wrote: this is not our official store. If you really have problem with hardware , you can contact with seller.
maybe you can re weld the U8 RS485 chip.

Hi Kincony,

Thank you for helping me understand the situation.
I believe my best answer is to buy a new unit direct from you.
In that way I can make sure I get your factory support.

Thank you for offering the repair option but as this device is not supplied by Kincony I could not and will not consider it for my applications.
I have been examining the KC868-A8,A4 and A2 for future projects and I have selected the A2 as the correct unit for my future needs.
I see the risk of not purchasing direct from your official store as too great a risk to take so this grey market device shall not be used in the future.

I recommend this way for all of Kincony's customers and I encourage purchasers not to purchase from non official vendors.


Kind regards
Reply


Forum Jump:


Users browsing this thread: