RTFrame on ESP32-P4 w/10″ Screen

I finally started up ESP32-P4 with a 10″ DSI screen and ported RTFrame HMI to it – big success. Using only one core I have very good refresh rates depending on content. Also the screens run on both Windows, Linux and Raspberry PI and ESP32-P4 – same SW recompiled which is cool. ESP32-P4 w/10″ DSI display is very attractive since it is a complete display solution for ca 100.- USD and it has sufficient speed for most gauges. What’s more is that with one core free I can do communication and IO + 16Mb Flash (32 on some) and 32MbPSRAM is quite a lot to play with. Sure a RPI5 is better, but RPI5 cost ca 200.- USD alone these days.

The screen above is 10″ 1280 * 800 resolution and it update at 21 FPS. The plot on the bottom is the heavy part, but it looks very smooth. This exact picture is from Windows, but it looks and behaves identically on ESP32-P4. It is quite amazing sitting on Linux/Windows designing, pressing a button and see it comes alive on an embedded device. Just for the record – the actual design diagram from Windows for this test app is shown below.

The last trick I use is that I can’t be bothered to keep track on how to build dit and dat, so I automated it inside RTFrame Designer – to build and run on any platform I just press Run and get the Output screen below.

radxa A7A – Failure

I finally got a radxa A7A with a 256Gb UFS Disk and 4Gb RAM. After some trouble I managed to get KDE running on a 2K screen, but it have trouble with the 4K screen creating an on/off blink show! And setting up the radxa Linux was not straight forward either, so I decided to leave this for now and test again later as their OS version mature a bit. radxa A7A is very comparable with a RPI5 with 4Gb and a M.2 Hat, but while Raspberry PI is straight forward to set up I found radxa to be challenging. radxa is right now ca 100.- USD cheaper than a RPI5 + it has 3TOPS og AI math, but as my usage right now is RTFrame and heavy graphics I will stick to RPI5 + Windows + I have some ESP32-P4 boards that provide a 2K screen driver for less than 20.- USD that I want to test as well.

RTFrame – ESP32-P4

I decided to add two different ESP32-P4 units to my collection because these have DSI display, Ethernet, Wifi, BLE and a dual core 400Mhz RISC-V. It can’t be compared with a RPI5 in graphics performance, but the price is also down to ca 20.- USD or even lower + not every display needs 60 FPS. ESP32 also have proper documentation making it more fun to work with. Seen from RTFrame HMI I can’t port the Vulkan/SDL drivers to this, but I can re-use the API and generate code for it.

This first board is a RPI clone from Waveshare and I have a 10.1 inch DSI display from Waveshare that can mount this on the backside. The unit below is a new one with similar features. I have seen loads of smaller units as well, but I like the Ethernet port options on these two + they are easy to fit directly on a DSI screen to act as a Display controller. Will be interesting to see what performance I can achieve – I did raster graphics on a 150Mhz Pentium some 30 years ago, and this have 2 x 400Mhz cores. It exist a HMI library, but I will be creating my own to duplicate the look and feel from RTFrame HMI.

RTFrame Designer

Most of you have seen this Designer before in C# version, but below is the C++ version. Performance is much, much higher on graphics + the model itself is much cleaner. PLD (Plain Logic Diagrams) are comung up and I actually generate C++ code this time and can use the Designer to create new parts of the Designer itself. The diagram below is bogus and you see a lot of warnings, meaning the Designer detect errors. TheĀ  HMI part is extremely fast to work with, but the challenge is the PLD part. I have added in a pseudo script + importing C/C++ code as well as a build in C/C++ editor to cover low level development. As the Designer generate code it can also target multiple platforms like Windows, Linux, Embedded MCU’s, Raspberry PI’s etc. I have just connected a RaspberryPI 5 so will start with that in parallell while finishing the Windows/Linux version. I want to see performance on RPI5 asap. Porting will be interesting, but since this is based on Vulkan/SDL it should be straight forward – that said – I still have a bit to go on PLD. Older RPI’s will be covered, but I will need time to convert to OpenGLES for these ones. As for Chinese clones – the challenge is the lack of SDK doc – I will give them a try, but I will not waste time searching for doc.

RTFrame – radxa A7A

I am a big fan of Raspberry PI so I will target them for GUI dev later, but I also wanted to test the radxa line of products. I have bought Chinese RPI clones earlier and they usually have some interesting HW, pricing and form-factor, but have ended up collecting dust for various reasons! I have no idea what I am up against on this one, but specks/price are interesting. So lets test. The only thing I miss is the NVME slot because I hate booting with SD cards (slow) so I bought a UFS (Fast Flash). This one costed me ca 90.- USD delivered in Norway – getting a RPI5 these days are far more expensive if you can get one at all – it is a lot of “sold out” at the moment.

The first challenge you find with radxa is documentation. It is supposedly a RISC-V MCU here, but good luck finding any info on that – this is why i love RPI – doc exist! ANyway – RTFrame HMI is based on Vulkan and this board suports Vulkan 1.3 according to speck.

Just for the record – RTFrame is as we speak Windows only, but it will migrate to Linux and all of these small Linix boards with display in time. Not all of them support Vulkan, but they do have OpenGLES etc – we can work with that as well even if we might need to reduce/limit the most advanced features a bit.

RTFrame – Designer

I am currently only focusing on HMI design, creating a new C++ HMI Designer and generating code. I am close to finish so will soon switch to actual PLD diagrams again. RTFrame Designer replaces the previous BSA developed in C# and I am amazed over performance and how fast development in C++ is once I created the SDK. Below is a few pictures of progress.

The new HMI Design allows you to create a specification of a user interface and then generate source code for a selected target. In this case I have also added two Precentation Objects which are rectangles on screen to select content – see next picture for usage. These rects can be switched off.

This last pic shows a Document designer where I get selected paper size and can drag precentation objects into the document. These again can be printed on a printer, PDF or Web Pages. So as you design with RTFrame Designer you can also automate the documentation tasks. And since I am on Windows using Visual Studio it obviously generate C++ code and project for Visual Studio that can be opened and run …

This is the final app after being compiled by Visual Studio and started – running stand-alone. This part is still a bit work in progress, but it is very cool to see a HMI designed, dokumented and running like this.

RTFrame – Real Time Framework

I got tired of messing with Phyton, Java or C# or web/cloud apps to make real-time systems, so I finally started on a pure C++ library with high performance desktop graphics. Graphics is only a start, but it is the most important one. Not much have been done in this area the last decades and as everything else uses C++ at core it it unfair that we don’t have a proper C++ library as well. I have worked with MFC, Qt, C#, Delphi and a few PLC solutions and while Qt was close it also is very heavy to work with, hardly C++ anymore and heavy licensed with close to no tools. I abandoned Qt for C# earlier and while C# is great it only exist for real on Windows and it is and will always be an interpreter with performance issues. Even Qt uses JavaScript on theire QML and it is not nice to work with as you spend far to much time in debugging. So, pure C++ here we go. I will deal with Web and Smart Phones later, lets first create a RTFrame that cover Windows and Linux so we can make advanced graphics apps with a mix of 2D and 3D functionality easy.

Below are some images of demoes and applications on their way – see text below pictures:

Some of you have seen BSA written in C#, I am redoing the concept in C++ due to performance issues. And on the way I also create tools/API to make HMI very, very fast. The target is advansed SCADA type applicationr ot PLC, but the framework is generic in nature. That said I expect that C++ will mosltly attract developers facing technical projects where performance do matter.

One of the first tools I needed is PixelArt – a 2D Image editor so I could open, Edit and Save images. This is not finished, but is included in the SDK/Designer.

I have already shown the draft for a 32 channel logic analyzer/oscilloscope in a previous entry. This is an app building on RTFrame that display 32 channels real-time at extreme speed. This is a tool I want myself and I will run it on a RaspberryPI 10″ screen. A key milestone was to achieve 32 channels at 60FPS with very low CPU usage – that is what the GPU gives me.

I have only made one Circular Gauge yet, but they will come in numbers and shapes – this was just a performance test filling a 4K screen with analogue meteres that all move 60FPS – it’s beautifully and my 12 year old laptop is a 9% CPU usage.

 

This last one is a demo with some controls including a 3D control. I can place the mouse on the triangle and turn it in all directions – presentation graphics 3D control miced with ordinary 2D controls.

And stay tuned because this is coming out fast. This is something I have wanted for years before I finally started it just a few weeks ago. At precent I focus on Windows, Raspberry PI/Linuz, but I will address more platforms later. The objective is high performance, precentation graphics at a minimum of developer cost – meaning minimum of coding time.

Logic Analyzer

One of the instruments I always wanted is a Logic Analyzer that can combine whatever signals I have available on a computer. Some will be digital, others will be analogue or calculated protocol decoding and they will come in with different sampling. Getting data in is not the difficult part, presenting it at 60FPS with 32 channels was – but the demo below does exactly that. It is still work in progress, but I am impressed by the graphic performance. This is precentation graphics done by GPU using my new HMI SDK RTFrame. And this is pure C++ that run on Linux, Windows, Raspberry PI for now – I will add others later.

PnP – New machine design

I started building this machine before I realized it would be easier to draw it first to get things right. This is a ca 700mm x 700mm x 700mm design – It is a machine that is designed to be mounted bolted to a floor. What you see below is just the raw design – it still lack a few details + it lack the outer cabinet.

I currently count 26 x 2020 frames – 550, 600 and 650mm length. I did not want to cut a single 2020 frame. The number of 8mm feeders illustrated is 56, but I can mount on all 4 sides increasing number of feeders to above 100 + I can extend the machine to 1200mm in feeder direction. I have options, but the reality is that I will be using strip/tray feeders a lot – so the large work-space in the middle is 600 x 345mm and this can be extended if I use less feeders.

I use 3 different Nema motors – Nema17, Nema11 and Nema8. Nema8 is 20mm wide and is key to get the needle that narrow. Nema11 is used to move the needle up/down on he Z axis. Nema17 is used to move X and Y axis. The main challenge I had was mounting of X and Y axis – it was difficult to find parts. I am not happy with the Nema17 motors sticking out, so I am looking for a different solution to that – it might be that I need to include plastic design to strengten metal design – lets see. I have all the parts, so I just need time to build this and I am sure I will get a few surprices as I assemble the machine.

I have shown the new Feeder back in may, what I lack is the electronics – I have the main control system, but lack the electronics for the feeders. I will be back on that later.