Sunday, March 20, 2016

Getting gathered data

Getting gathered data from Siemens Logo! is a bit laborious and take few actions. In later stages I will add some kind of HMI (Human Machine Interface) which will be gathering data on it's own.

Please see video on YouTube

Small automation with Siemens Logo!

To interact with real world some serious hardware is needed. Such a hardware needs a housing and place where to connect all these wires - yes serious wiring is required! That's what most believers in IoT keeps forgetting.

My favorite controller comes from Siemens - it's very simple, yet very robust. It has an ethernet connection and wide range of I/O alternatives. It comes with free programming tool written in Java thus it's platform independent.

Here how is look when completed:


Vital information is shown on the display. Meaning in English is:
  • Level 93%
  • Time since last pumping

And all begins like shown below. On the left side power supply module is located, right to it is controller itself with two additional extension modules. On bottom terminals and relays are located.

 


Output Level of Water Treatment Plant

On this chart is very nicely visible what happened in last 24 hours - it is clearly visible when we sleep and after analysis of several days one can deduct information when nobody is at home, how many people lives here. 



Data are gathered by the Siemens Logo! PLC I use for this kind of automation. In later posts I'll be sharing details, schematics, photos and how to with you.

Here is a code in R used for the processing of these data:

##########################################
## Set working directory with the file downloaded 
## from Logo! PLC
##########################################

working_directory <- c("/Users/C000-Generic-Stats/0006-Water_treatment/00 - DATA")
setwd(working_directory)

##########################################
## Loading data
##########################################

WATER_LEVEL <- read.csv ("data.csv",header=TRUE)

##########################################
## Formatting date and time
##########################################

WATER_LEVEL$Time_Formated <- strptime(WATER_LEVEL$Time,format='%m/%d/%y %H:%M:%S')

###########################################
### Printing data into chart
###########################################

gg <- ggplot(data= WATER_LEVEL,
                     aes(WATER_LEVEL$Time_Formated,
                            WATER_LEVEL$L1  ))
gg <- gg + geom_line() 
gg <- gg + ggtitle(c('Output Level of Water Treatment Plant'))
gg <- gg + labs(x=NULL, y=NULL, title=c('Output Level of Water Treatment Plant'))
gg <- gg + theme_bw(base_family="Helvetica")
gg <- gg + ylab("Water Level [%]")
gg <- gg + xlab("Date & Time")
gg <- gg + theme(panel.grid.major=element_line(size = 0.5),
                   axis.text.x=element_text(angle = 90, hjust = 0.5))
gg


Monday, February 22, 2016

Opravdu potřebujeme Internet Věcí?

Jsem opradu technofil a velký přítel veškeré automatizace.  Je to můj obor, který mě živí, dům mám plný špičkové technologie na bázi EIB/KNX. Ale vůbec nejsem přesvědčen o Internetu Věcí. V tomto blogu budu postupně rozebírat tento názor.

1. IoT zapomíná na hlavní věc - interakce s reálným světem
2. Opravdu si přejeme aby o nás ostatní věděli co děláme v jakýkoliv okamžik?

ad 1) Skutečné senzory je těžké zapojit, napájet, zajistit jejich spolehlivost a udržovat. Skutečné akce a interakce se světem vyžadují dráty, práci s nebezpečným napětím a různé akční členy. Toto vše se musí nainstalovat, správně zapojit a hlavně dodržovat normy aby to bylo bezpečné.

ad 2) Na jednoduchém příkladě stanice na pumpování vyčištěné odpadní vody z našeho domu budu demonstrovat jak moc informací se lze o naší rodině dozvědět z jediného čidla.

Prosím, neberte tento pohled jako pohled nepřítele IoT. Opak je pravdou a snažím se aby IoT fungovalo k našemu prospěchu, aby to nebyl pouze módní výstřelek a o to aby bylo zachováno naše soukromí.

Do we really want Internet of Things?

I'm big fan of technology - it's my job, my house has installed EiB/KNX equipment. However I'm not convinced at all about IoT. 

1. IoT forgetting one principal part - real world interaction
2. Do we really want that whoever will know what we really do all the time?

ad 1) Real sensors are difficult to wire, to power up, to maintain. Real actions takes again wiring and power. To switch on pump, socket, light always require to bring energy and some switches.

ad 2) On simple example such as sewage water pump I will demonstrate how much information can be extracted about our house, our family, our habits.

Don't take wrong I'm not against IoT, however (1) I want to point out how it's affecting our privacy (2) I want to show that real equipment require knowledge, skills and standards to be followed.