Close

Connecting the Nextion 7" panel

A project log for Building the Thor robot

Building a 6-axis robot based on the Thor robot. When size DOES matter!

Olaf BaeyensOlaf Baeyens 07/01/2017 at 19:140 Comments

The Nextion 7" HMI panel is a self contained processor that drives the display independent of what is connected to it. The displays, button, interactions are configured using a micro SD card.

It has a bidirectional serial communication protocol Rx/Tx to tell the connected controller what button is pressed and the connected controller can then send data back that can be used to display.

Left is the Nextion 7" HMI display with 3 buttons programmed on it.

Right is the Thor controller (Ultrasonics v1.0 pro), which is basically an Arduino Due.

This Ultratronics v1.0 pro board does provide 5V and 3.3V power but this 7" draws way too much current so I had to connect the 5V to my 5V power output directly.

The power switch you see above top left is connected to the 24V. Early experiments turned out that the main power source I use is a but too powerful and when I pull the 220V power, it still has enough power to drive stepper-motors for a few seconds. I did not want to lose fingers during these few seconds so that is why this 24V cut of switch is there.

(In the future I want an internal 24V to 5V step down inside the box. so I only have to draw from the 24V main power supply.)

The Nextion display with test buttons.

The numbers you see here is the number of times I pressed the button, a command was sent to the Thor controller. The Thor controller incremented a number and send it back to be displayed. This is just a test-setup to verify the complete loop.

The Nextion displays operates on 5V. The Ultratronics v1.0 pro board runs at 3.3V. So I need a bi-directional level shifter that is able to step up,/down the Rx/TX signals.

Note that here we swap the RX to TX and the TX to Rx.


The Ultratronics v1.0 pro board has more than one UART and this one is using Serial1 (Don't confuse this with Serial without the number)

I want to point out that the Ultratronics board documentation is wrong or, the pin 1 assignment on the board is in the wrong place.

This is what the documentation tells me.

It took some time to figure this out but pin 1 is actually TXD1, pin 2 is actually RXD1 on the motherboard.

I drew the 3.3V for the bi-directional level shifter directly from the main board. The 5V was not enough to power the Nextion display.

Also note that the minus of the 3.3v is at the upper position. I accidentally connected it wrongly and I saw smoke coming out from my level shifter.

Discussions