Autonomous Allsky camera with Raspberry PI. Part 1: overview.

Allsky (or weather) camera is one of the most important part of the modern observatory.
It’s very important to monitor sky condition during night observations, especially when observatory is remote controlled or should be fully automatic. Different vendors provides different solution. But all they are share the same problems: very high prices, lack of autonomy (PC is required) and lack of useful sensors like a temperature, sky temperature and so on. So, to build complete system you need: camera itself, PC, weather station, cloud sensor. Full price and complexity of this system is very high.
But this not a Jedi path, right?
With this article I’m starting the cycle of the materials dedicated to fully autonomous device, based on Raspberry PI. This device contains two cameras and a lot of sensors.

Continue reading “Autonomous Allsky camera with Raspberry PI. Part 1: overview.”

Simple Linux character device driver.

Character device is a one of the simplest way to communicate with module in the Linux kernel.
This devices are presented as special files in a /dev directory and supports direct reading and writing of any data, byte by byte, like a stream. Actually most of the pseudo-devices in /dev is a character devices: serial ports, modems, sound and video adapters, keyboards, some custom I/O interfaces. User space programs can easily open, read, write and do custom control requests with such device files.
Here I describing how to write a simple Linux kernel module which can create one or multiple character device.

Continue reading “Simple Linux character device driver.”

Connecting HTU21D temperature/humidity sensor to the Raspberry PI using simple C i2c interface

Previously in my projects I’m always used well known DHT22 (AM2302) temperature/humidity sensors. But I found that this sensors is not very stable and subject to hungs. In my case this device is worked about two weeks and then stops responding untill power rebooted. This is absolutely unacceptable on some distant and autonomous devices. After some googling I found that I’m not alone and some peoples also expirienced such problem.
I’ve decided to replace this sensors to something more reliable and more accurate. My choice fell on HTU21D from the Measurement Specialties. HTU21D is a quite reliable and precise sensor, much newer than DHT and uses standard i2c bus instead own 1-wire protocol. I2C interface was a determinative and in this article I want to describe connection of this device to the Raspberry PI in details.

Continue reading “Connecting HTU21D temperature/humidity sensor to the Raspberry PI using simple C i2c interface”

Isolated eqmod adapter for the telescope control

There are popular and quite cheap amateur telescope mounts from different vendors: Sky-Watcher, Celestron and so on.
Most of that mounts contains motors and some controller schematic. User can control this devices in different ways. One way is to use mount’s handcontroller, other way is connect to computer and use some software to control and guide the telescope. Such connection can be made through special adapters (often called eqmod). Technically this adapter is just some kind ot serial converter, RS232 to UART (TTL) or USB to UART.
Here I’m describing a very reliable and simple adapter with galvanic isolation that I was developed and made.

Continue reading “Isolated eqmod adapter for the telescope control”

Monitoring Linux networking state using netlink

Once in my work i needed to monitor all changes in the Linux networking subsystem: adding or deleting IP addresses, routes and so on.
Maybe the best way to do this is use socket-based netlink technology. Using netlink we can “subscribe” to some network-related notifications from the kernel, also it’s possible to send commands to the network stack and change routing table, interfaces configurations and packets filtering. For example, popular utilities like “iproute2” is also using netlink to do their job.
Easiest way to access netlink sockets from the userspace is to use libnetlink library which provides a bunch of macroses, defines and functions.
Worst part of this library and whole netlink technology is a lack of the good examples.
Good solution in this case is use iproute2 source code to discover things you interesting in. This article is also may be used as good startup point.

Continue reading “Monitoring Linux networking state using netlink”

Listening to aircrafts and receiving images from the satellites

In the previous article we discussed how to calculate and build simple Yagi-Uda antenna.
Now it’s time to play with this antenna and receive some interesting signals.

Continue reading “Listening to aircrafts and receiving images from the satellites”

144 MHz Yagi-Uda antenna

Yagi–Uda antenna is a directional and pretty effective antenna consisting of multiple parallel elements in a line, usually half-wave dipoles made of metal rods.

Best-known use of this type of antenna is as rooftop terrestrial television antennas, but it is also used for point-to-point fixed communication links and for long distance shortwave communication by shortwave broadcasting stations and radio amateurs.

In this article i will show how to build a simple 5 element antenna for 144 MHz band from widely available parts, and how to get some fun with it.

Continue reading “144 MHz Yagi-Uda antenna”

Converting DSLR RAW images into scientific FITS format. Part 1: UI

FITS – is an open standard defining a digital file format useful for storage, transmission and processing of scientific and other images. FITS is the most commonly used digital file format in astronomy. Unlike many image formats, FITS is designed specifically for scientific data and hence includes many provisions for describing photometric and spatial calibration information, together with image origin metadata.  (Wikipedia (c)).
Most of the astronomical software and hardware produces and working only with FITS files .
But there is a big amount of astrophotographers and amateurs astronomers (actually not all is really amateurs 🙂 ) who using only modern DSLR cameras and shooting in RAW format.
Modern DSLR cameras can be used for serious science, like searching for variable stars or astrometry of some objects. But only way to do that – convert RAW files to the FITS format for future processing in a astronomical software.
I wrote a little program that solves this problem and allow  easily convert files in a batch mode.

In this article i want to describe in details how it works.

Continue reading “Converting DSLR RAW images into scientific FITS format. Part 1: UI”

Connecting MLX90614 infrared thermometer to the Raspberry PI

MLX90614 is a cheap and popular infrared thermometer from Melexis. This device is made in different version for different purposes.
You can get generic purpose version with 0.5 accuracy or for medical purposes with accuracy up to 0.2.

Also you can choose voltage you needed: 3.3v or 5v versions is available.
With MLX90614 you can distantly measure temperature of the objects, even temperature of the sky. This enables a wide range of tasks in science and technics.
In this article i’ll show how to connect this device to the Raspberry PI microcomputer via i2c bus.

Continue reading “Connecting MLX90614 infrared thermometer to the Raspberry PI”