Raspberry PI 3b

The development of the debug application for the PC (Windows 10) is paused for a while. The actual version is stable, there are some improvements possible but they can be categorized as the remaining "10%". Probable extra development is taking lots of time. But... now i've received my first Raspberry PI version 3b. Goals for the coming period is making the same sort of debug application for the Arduino MEGA on the Raspberry, based on the AFSM as described in the website. The Raspberry is programmed in Phyton. At the moment the most basic components are working; the Raspberry is now able to send/receive Arduino messages as described under "HMI/GUI; sketch interface". So, with these parts working, development can start! The interface will be different from the PC version, but based on the same principles. When ready, a low cost PLC/Scada environment will be available (can't wait for rainy days to get going...).





























Summer 2017, Merke Wytgaard

Like every year we have a feast in our village called the "Wytgaardster merke". Like prior years i've build a little control in the years theme; for 2017 it was the letter "M". For our street we chose "Mearke". Mearke  stands for fairy tale. I had to build something for a fairy tale called "Rixt van Oerd" of the Frisian island Ameland.

Click here for the project.  

























Fridge broken on sunday!

Off corse, when the fridge gets broken, it must be on a day all stores are closed. In this case the thermostat is not working anymore after i cleaned the fridge. I've planned to replace the fridge a long time ago, because i had the feeling that after 16 years of service - and already replacing the original thermostat some years ago- a new fridge is a good investment. But.. broken on sunday. The compressor is stll working so why not make a litle temporary sketch with the arduino? Ofcourse i've used the FSM software for making the application. Put the I/O info into the UserConfiguration and the software for the FSM in the User FiniteStateMachine (very simple sketch, start the compressor at 6 degrees and stop at 4 degrees, a hysteresis of 2 degrees).

Making and testing of the sketch was easy done. For the compressor I made a switched socket for the compressor, and a wired short cut in place of the thermostat... and go. Now it is also possible to make a trend of the cooling and see how often the compressor is starting and log it all to a database. Bit freaky.., but why not for the moment.

Looking on a webstore for a replacement...


Click here for the UserConfiguration

Click here for the UserFiniteStateMachine































Internet of Things

I found the populair ESP8266/ESP-07 WiFi shield. The WiFi shield is communicating via TX/RX hardware serial with the MEGA board. I programmed the ESP-07 module to read data from the board and send it to the internet by Wifi and vice versa. The software for the IoT communication is all on the ESP-07 board. The Mega board software is almost identical to the software where the communication takes place by a bleutooth, USB to serial or radio module (APC220) connection. The great benefit of having the IoT communication software on the ESP shield: the MEGA board is handling the I/O via the hardware serial port which is proved to be realiable in combination with servos, temperature sensors. So, there is no extra software, extra interrupt handling and processor time needed on the MEGA for communication with the internet. It is also nice to program the ESP-07 with the programming language and IDE the same as Arduino. Error correcting -repeating lost or corrupt messages, connection failure- is also handled (ok..., with some data loss in case of the communication problems).  

For testing i've build a sketch for measuring the outside temperature and used the VBA IoT debug program on the PC to make a trend of the temperature. In the plot you can see the temperature curve and two extra signals. This red and bleu lines present an output and an input. The input is connected to the output. The output is switched at a frequency of 5 seconds and the input will follow the output signal (as expected). A thick red and bleu line is now painted on the form, because of a plotter interval of 2 minutes. Also visible are some interruptions; the white gaps in the red and bleu lines. At the position of the white gaps, the connection with the internet is disconnected and connected again (loss detection of the 5Hz block wave).

The sketch is now running for several days, no memory leaks, reconnected to internet when there is a connection problem. Altough i find a serial connection more reliable and faster than the Wifi internet, this communication can be used, especially for trending the "slower" analogue proces values on a PC. Remark; the sketch is reliable at all moments, only the connection to the PC/HMI by WiFi internet is less reliable, but still usefull. Ideal for weather station projects or that kind of stuff...

IoT plotter

In the HMI screen you can see the amount of reconnects to the internet
(now 452 times, over a period of almost 7 days (1)). Still a lot of interrupts.




The FSM is now stable. Still in test phase, but very enthousiastic about the ESP8266 on the ESP-07 shield.
I've also programmed an ESP-01 module. When knowing how, everything is easy. What a nice modules.

(1) Remark: the start time of a certain Windows 10 process can be determined by the downloadable ProcesExplorer (procexp64.exe). 

Write the sensor data and event logging to the database with the AFSM debug GUI. Click here for more information.


database image