Internet of Things
Yes, at last, the FSM is communicating by internet. First i've used a CC3000 shield, but i was not able to get it stable working with VBA. After a long period of testing, and also making changes in the software for the CC3000, the connection was not stable for a period longer than 30 min. The board crashed, boot, hold. So, i had to look for another hardware solution. I found the populare ESP8266 in the form of a shield. The shield is communicating via TX1/RX1 hardware serial. For making the software for the shield i used the WiFiEsp library.
In fact, the VBA is not changed when using the new shield, only the software of the sketch is changed. The FSM is now stable. Still in test phase, but very enthousiastic about the Esp8266. I'am now using the Esp8266 only for the internet connection, but it is possible to programm the Esp8266 in the IDE. Maybe a nice project for the comming period. Yihaa..., the FSM IOT is alive!
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).
The source of this programm is listed under "projects".
Below a picture of the GPS module:
Write the sensor data and event logging to the database with the AFSM debug GUI. Click here for more information.
Click here for a demo video of the debug application
Yes..., now there is a generic plotter for the presentation of 3 I/O signals available! The plotter is an option of the Arduino Finite State Machine Monitor. See also the video of the monitor with the new plotter extension. The software will be available in the first week of 2017. Below a picture of a screen shot.