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.  

























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










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































CAR alarm, GPSR, GPS and MEGA boeard

This week I received the NEO-6M GPS module. When the GPS is connected via TX3/RX3 all data is now available in the AFSM. Standard polling is disabled because of possible dataoverrun. All data is polled by the $PUBX command and data is stored in a struct datatype (GPSdata) every 1000mS. Presenting the data on the PC monitor at home is in most cases not very usefull, so I so implemented the GPS in a car alarm.

The car alarm is build with the GPS module and a GPRS shield. When present in the car and connected to 12VDC, the GPS modules is "following" the moves of the vehicle. When the car is not moving for a certain amount of time, a sms is send to a cell phone. It will send the position in the format of google maps. See also the picture below.  When clicking on the SMS message, goolge maps is started and you will see the satellite picture with the location of the car. It is also possible to send a sms to the shield to command the shield to send the current position to the cell phone. Another sms wich can be send is a sms with the text SALDO for returning the present saldo of the sim card of the shield (when using a pre-paid card).


IMG 0552 2

     IMG 0553


The source of this programm is listed under "projects". 

Below a picture of the GPS module: