Skip to main content

Posts

Showing posts from 2014

Why Open-Source Software works

Many people, specially outside the technology industry are surprised that something like open-source software could exist, specially at the scale and sophistication it quite obviously does. Many vendors of proprietary - i.e. closed-source software, have long tried to discredit open-source as either suspicious and subversive "Commie-stuff" or as hobbyist toys and playthings, not fit for serious applications. Looking at the development of human knowledge and culture throughout history, it should not be surprising that open-source software would exist and be thriving in the long run. On the contrary, closed-source software, like any idea or innovation that is kept secret essentially dies with its inventor, cannot influence new ideas and ongoing innovation and essentially becomes an evolutionary dead-end. In the short-lived word of technology, this can happen within decades rather than centuries, as historically no tech company has managed to stay dominant for more than a few d

Lernstick

When looking for a platform to learn Linux and Python programming, Raspberry Pi would be on top of most peoples mind today. The success of the Raspberry Pi brand has created an active and novice friendly community, where help and advice is easy to find. However, just using a Raspberry Pi as a low-end desktop computer is surprisingly complex and setting up a room for a programming workshop requires a few crates of additional equipment (keyboards, mice, monitors etc.). It seems that the strength of Raspberry Pi platform is in low-cost, low-power embedded and physical computing applications, like robotics, control and measurements systems. Despite the enthusiasm for Raspberry Pi, it may not be the best choice for organizing a programming class/workshop, specially if the school already has plenty of PC hardware available. The Lernstick is a Debian live-image based distribution which can be booted off a DVD or USB stick. It is being developed by the School for Teacher Education

Raspberry Pi Temperature Data Recorder - Part III: Visualization

<- Part II: Data Collection Once we have accumulated some data in the RRD database, we can start generating some plots with the RRDTools built-in graph function. The graph above shows the values of the DS18B20 temperature sensors over 3 unseasonably warm days in January. Because of the short cables, the sensors are not optimally placed. E.g. the inside temp sensor is relatively close to the radiator, the outside one is on the ledge, just outside the window and still behind a partially closed shutter in a narrow alley between 2 old poorly isolated buildings. According to the weather report, the current outside temperature is about 3-4 C less than what the sensor shows. From the chart, we can see that the heater feed temperature seems to fluctuate a bit, maybe a sign of  hysteresis  in the burner controller. The heater temperature is also lowered a bit for about 6h during each night, but this seems not to have any noticeable effect on the room temperature. There are small gaps in

Raspberry Pi Temperature Data Recorder - Part II: Data Collection

<- Part I: Hardware In the previous part of this tutorial , we looked at how to connect a few DS18B20 digital temperature sensors to a Raspberry Pi and read their values. The next part of the problem is periodically collect and record these measurements and store them for graphing and further analysis. It is always possible to store measurement data in a general purpose database e.g. SQLite or MySQL  and then plot the data for example with the Google charts API . For this project however, we are going to use RRDTool , which is a special purpose database optimized for recording, aggregating and graphing time-series data. It is particularly popular for network and system monitoring applications and for example at the base of smokeping  which we used in an earlier example . However this time, we need to configure and setup our own database from scratch. Some of the reasons why RRDTool is particularly nice for this type of application: Fixed-size, fixed-interval sliding

Raspberry Pi Temperature data recorder - Part I: Hardware

The Raspberry Pi seems ideal for all kinds of "physical computing" applications, as it is small, cheap, low-powered and yet more powerful and feature rich than a traditional micro-controller. One way to showcase such applications in an educational context could be to control science experiments which require long term measurements and data collection. One of the easiest measurement sensors to connect to a Raspberry Pi is the DS18B20  digital thermometer,. It can be read out via a multi-device 1-wire bus that is directly supported by a driver in the Linux kernel. Several sensors can be connected in parallel to the same data-wire and read out individually over the bus interface by their hard-coded IDs. All we need to connect one or more DS18B20 sensors to a Raspberry Pi, is to connect the VCC pin to 3.3V, GND to GND and data to GPIO4 on the Raspberry Pi GPIO header as well as connect a 4.7k Ohm resistor between the VCC and data lines of the sensor. The sensor is available

Wi-Pi : 802.11 Networking for Raspberry Pi (EW-7811Un)

One of the most conspicuously absent standard interfaces on the Raspberry Pi is built-in support for 802.11 WiFi wireless LAN networking. A low-cost, low-power way to remedy this is for example the Edimax EW-781Un USB WiFi adapter which plugs easily into one of the USB ports on the Raspberry Pi and is supported out of the box by the current Raspbian distribution. It seems to be very popular for use with Raspberry Pi and is available for about $10 in many places where Raspberry Pi are sold. WiFi Client Connecting to an existing WiFi network is trivial, once we know the SSID and access password for the network we are trying to connect to. After plugging in the adapter, it should be automatically recognized by the linux kernel - the output of lsusb should contain an entry like this: Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS] In order to connect to a typical home wifi network, we only need to add the f