Regular readers will remember me ranting about a little board we were making to fit on the back of a Nextion to make it wireless.
Well yesterday was a very productive day – the boards came back from China. Somehow they’d managed to disconnect the top floor layer from earth – hence the keen eye will notice a little extra soldering and a wire in this prototype – but we’ve had a good learning experience out of it.
So the basic idea was to make a very small board that would sit on the back of a Nextion – and using a soft UART, talk to the Nextion, allowing MQTT control of output to the board and similarly MQTT output from buttons etc. I got all of that working some time ago but wanted a board to play with to test and that is the purpose of this one.
In the process we’ve realised that this very small board is good as a general purpose one and immediately we sat down and looked at the board, knowing fine well they’d have to do another batch – we came up with ideas for improvement, implemented them – so the next version (maybe a couple of weeks or so) will actually bring out all of the IO to that side connector together with more ground pins.
Funny how you do things without thinking because you always have. On our last boards (Home control 2016) we had a button on GPIO2 for setting the web interface (WIFI and MQTT setup) – this time we put a button on GPIO1 for resetting and forgot all about the web interface – and then of course the obvious thought occurred – why not do both on one button – hold before power up to program, hold after powerup for web interface. Makes sense really!
I’ve just made a VERY simple demo on the Nextion display itself – a line of text and 2 buttons – currently the display has been sitting overnight updating the time from Node-Red on my Pi every second… and I’ve tried hundreds of button presses and not lost any yet – the text in the button is a variation of an MQTT command using a tilde as a separator between topic and payload… so for example the buttons turn on of my modified SONOFFS on and off directly (in actual use the commands will talk to Node-Red which will then do the control but this was easy for testing).
So the Nextions can output text on a button press – the text I put in was for example
print “sonoff1/toesp~out0:1”
That is split up by the software in the backboard (same software I use elsewhere with a new “nextion” mode).
Of interest the serial software came straight off github, modified to remove a GPIO setup routine which interfered with other GPIO settings. Interrupt-drive serial comms – I’m running at 56k baud and it is working a treat. This of course leaves the normal serial available to program the little board via the FTDI connector holes (6 way connector).
That’s an ESP12 incidentally.
The board has it’s own 3v3 regulation and the 4 way connector for power and serial simply wires through to the Nextion directly - in the photos I used the smallest available Nextion board but of course this could be used with any of them.
For programming the Nextion, all we have to do is hold down the programming button on powerup and that tristates the ESP IO pins – allowing normal Nextion serial programming. Amazing the functionality you can get out of one button.
This prototype could well end up as a secondary heating display and control panel – don’t be put off by the simple test display- amazing what you can do with a little Powerpoint graphics.
I’ll do a more in-depth article soon when we get replacement boards and I’m waiting for a new board from Itead – might even make the backboard available. All we need now is a decent bezel (don’t say “just run one off on your 3d printer”) – cream – slim with wall fixings – yeah, good luck with that, I know.
Watch this space for drastically improved display and new ideas. I’ve always wanted a decent low-cost WIFI touch display.. and now… it is within sight.




