Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
1,068 Views

UART sensitivity of Edison for Arduino

Hello everyone!

I am using an Intel Edison board for Arduino which is connected to an ITEAD Nextion HMI by a UART cable.

It looks like the Nextion HMI gives off some noise during transmission. The width of this noise is minimal and negligible.

Nevertheless, Edison's UART interprets this noise as data, when it must actually ignore it because the noise is too tiny.

To demonstrate this, I prepared a test program and used a Saleae logic analyzer with a sample rate of 500 MS/s to see what was going on.

The analyzer was able to catch some of these noise signals, but others were too small for it to even notice.

But still, Edison's UART thinks these noise signals are data and proceeds to fill its buffer with rubbish 0xFF bytes.

I've included a test program below and enclosed materials which illustrate how it works.

HOW CAN I POSSIBLY AVOID THIS EFFECT WHICH HAS PROVEN TO BE A REAL NUISANCE?

***Source code***

checkFF (){

 

unsigned int er;

char* buf_w;

char rx_buf[400] __attribute__ ((aligned (4))) ={0} ;

char rx_buf1[400] __attribute__ ((aligned (4))) ={0};

char rx_buf2[400] __attribute__ ((aligned (4))) ={0};

char startFF[]="\xFF\xFF\xFF";

char connect[]="con_nect.val=1\xFF\xFF\xFF";

mraa_init();

mraa_uart_context m_uart = mraa_uart_init(0);

er= mraa_uart_set_baudrate(m_uart,9600);

er= mraa_uart_set_mode(m_uart,8,MRAA_UART_PARITY_NONE,1);

er= mraa_uart_set_flowcontrol (m_uart,false,false);

er= mraa_uart_set_non_blocking (m_uart,false);

// Read everything that appears after program start and Initialization of UART

buf_w = rx_buf2 + 4;

while(er){ 

if(mraa_uart_data_available (m_uart,<span style="color: #...

0 Kudos
9 Replies
Highlighted
New Contributor I
14 Views

Forgot to add the diagrams of my setup. I've enclosed it here.

0 Kudos
Highlighted
Valued Contributor II
14 Views

Added info for those who are able to help solve for

Nextion is a TTL Serial 5V display device

Code for commands over serial are terminated 0xFF 0xFF 0xFF

Nextion baudrate is limited to top speed 115200, default user is using is 9600

Edison Arduino from is outputting TTL (idle high) based on Logic readings

User is using Intel System Studio IOT Edision and libmraa

(versions of Studio, libmraa, firmware yet to have been determined)

What seems to be where the problem arises

2ns noise on serial line seems to trigger full reading byte from falling edge of noise.

This 2ns is not long enough to be the start bit

should have been ignored by hardware UART in my opinion (maybe)

So has there been an issue noise triggering full byte in register

- is this a misconfiguration of the UART

- if so, perhaps how to configure serial properly

Other?

0 Kudos
Highlighted
Valued Contributor II
14 Views

older thread of issue

0 Kudos
Highlighted
New Contributor I
14 Views

To clarify the versions of the software and firmware:

mraa 1.7.0

System Studio 2016.4.012

Edison Firmware 201606061707

0 Kudos
Highlighted
Valued Contributor II
14 Views

Original thread contains more relevant info.

better that discussion continues than re-explain all

0 Kudos
Highlighted
Community Manager
14 Views

Hi Cyrillicsoft,

 

 

Thanks for contacting us!

 

 

We appreciate all the information you provided, please let us investigate a little bit more regarding this behavior, and as soon as we have useful information we'll let you know.

 

 

We'll appreciate your patience during the meantime.

 

 

Regards,

 

-Yermi A.

 

0 Kudos
Highlighted
Community Manager
14 Views

Hi Cyrillicsoft,

 

 

Thanks for your patience. We have been trying to replicate this behavior, however we haven't gotten any issue with the UART interface. We believe that the Edison is not the root cause of the issue, but the ITEAD Nextion HMI is because the Edison is reading the noise given by the ITEAD device. For this particular issue, we would suggest using a low pass filter to reduce the 2ns noise and possibly eliminate it from the Edison interpreting it as data. Unfortunately, our suggestions are limited since we don't have the same UART device to run further tests.

 

 

Regards,

 

-Yermi A.

 

0 Kudos
Highlighted
New Contributor I
14 Views

Thanks a lot for the time you put into this!

It looks as though I am probably the only person to have paired a Nextion display with an Edison for Arduino, seeing how nobody else has encountered this issue.

ITEAD doesn't seem to think that this noise emitted by its display is worth removing and isn't planning on making any improvements to address it, so I will do as you suggested.

Could you please provide me with some guidelines or information on how to make/install such a filter?

0 Kudos
Highlighted
Community Manager
14 Views

Hi,

 

 

You may take a look at this pdf provided by Lattice Semiconductor: http://www.latticesemi.com/view_document?document_id=50728 Improving Noise Immunity for Serial Interface, there you will find some techniques to improve noise immunity such as an external RC low-pass filter, among others.

 

 

Hope this helps.

 

 

Regards,

 

-Yermi A.

 

0 Kudos