During the summertime, I have created and assembled a monitoring station based on Raspberry Pi and Raspberry Pi Camera module. The main purpose of this monitoring station was a video survivable system with some digital outputs to control the lights. The overall device is based on the Raspberry Pi 4 that sits inside a tight casing with the power supply module and the relay module. I do not want to write much about how it was built, but a bit more about how it is being maintained plus how it works during winter when temperatures are starting to go below zero.
Continue readingCategory Archives: Programming
GPS module for a RC plane
Today I would like to present you a small GPS module with super capacitor backup. Having GPS coordinates known during flight time is very beneficial. There are multiple ways in which longitude and latitude can be used to enhance the RC flight experience. Once again we have, and for the most obvious reason, the ability to track a plane or a drone. We can also calculate the current distance to a flying object in line of sight. Finally, using GPS coordinates, it is possible to implement an autopilot and a feature called return to home in case of broken radio link.
Continue readingRemoteLab goes open source
Finally, it is there! The RemoteLab platform is open source and is available on Github. Want to get a link and learn what is new? Continue reading!
Continue readingQuadrature encoders with Raspberry Pi Pico PIO
When you want to control a DC motor, there are two ways in which this could be approached. It can be controlled (a closed-loop approach) or simply driven (an open-loop approach). The open loop approach is the easiest one since it does not relay on any addition knowledge about the system or the motor itself. The control process is straightforward. You send the control signal and hope that the DC motor will rotate at the desired speed. However, in many situations, it is insufficient. For example, when a car goes uphill, it requires more torque, so the power output needs to be adjusted. In the end, the same control signal will not give the same results as the environment changes.
In this post the main emphasis is put on quadrature encoders. The quadrature encoder is a sensor mounted next to motor which allows to measure how fast the shaft is turning. Going further, the usual implementation of the quadrature encoder sensor counts how many times the state has changed. However, before going into details, let us focus first on quadrature encoders and how they work.
Continue readingOn-screen Display with Raspberry Pi Pico
For quite some time, I was curious about the on-screen displays (OSDs). It is a piece of equipment which enables you to put some text or graphics directly on a video stream. I am going to present you my solution for this device and, most importantly, why it is useful. The project was based on the RP2040 microcontroller which can be found on a very popular platform, Raspberry Pi Pico.
Continue readingSTM32 RTC Clock downsides and backup domain registers
The title for this blog can be a bit misleading but let me assure that all these three things have something in common. The RTC clock allows you to measure real time and by assumption this measurement should be very precise. And the key word is assumption because depending on what kind of clock source you will chose you can get completely different results. All of it is dependent on the clock source, thus the internal oscillator. Additionally, since RTC shares the same special register space I will also discuss so-called backup registers. Let us get started.
Continue readingMy quadrocopter adventure
Well, I feel like this will be one of these sentimental entries, but not entirely. I would like to present my journey with quadrocopters, or drones in general. I first started to invest in drones when I was at my university. The passion developed in 2012 when I was defending my Bachelor’s degree and I decided to make a thesis about it. The topic was ‘Filtering and validation of measurements from accelerometer and gyroscope in Matlab/Simulink for a quadrotor flying robot’. In this blog post, I will tackle different aspects, namely software and hardware (mechanics and electronics).
Continue readingRemoteLab a distributed Hardware-as-a-Service
This blog will be a little bit different from what I usually write about but not entirely. I am very proud of the results of what I did and I would like to share them with you. It is not a secret that I work at Wrocław University of Science and Technology. Apart from my research duties, I also run classes with my students. However, we should start the story from the beginning, that is, in the year 2019. At the dawn of 2019 we had COVID-19 outbreak. It did a lot of change in our lives and daily duties which still ought to be carried out. From the perspective of my university there were a lot of challenges. The lectures could be moved to the digital world pretty easily; however, project or laboratory classes were not that easy to move. They strongly depend on human-to-human interaction, and additionally when you work with hardware, it is even more challenging. What I did and what I will describe below was a way to respond to these difficulties. It involves a lot of hardware and not a small dose of software development.
Continue readingnRF905 — an another module for wireless communication
You might be already familiar with different transceivers I have described here, namely LoRa module. You can read about it here (STM32 driver for LoRa) and here (Raspberry Pi driver for LoRa). Now, time have come to give nRF905 module a try. As usually, the driver alone and an example are available at my github. If you do not want to read the rest of this blog, just jump straight to nRF905 driver or the example.
Continue readingADC is as fast as possible always the best approach?
Is as fast as possible always the best way to do things with STM?
Recently, I have stumbled upon an issue regarding ADC scan conversion on STM32 microcontrollers. I have wondered why the scan conversion was not taking place. As it turned out it did but it was not handled fast enough. In this blog post I will discuss the need to return from interrupt routine as fast as possible. However, it will not be only this one thing. Interested? So keep reading.
Continue readingLoRa driver for Raspberry Pi with Python wrapper
Here you will find my recent contribution to LoRa drivers. This post describes the LoRa driver for a Raspberry Pi SBC (Single Board Computer). Additionally, a wrapper written in Python is available making it very easy to use and prototype. Raspberry Pi gets more and more attention. Adding LoRa communication enables it to communicate with IoT devices such as remote thermometers, soil moisture sensors and many more others. You can find HAT boards thatoffer a LoRa module. Here, I describe how to connect and how to use a low-cost LoRa RFM95W module. This particular module comes with different frequency options. However, this post describes the one which uses 868 MHz frequency.
Continue readingTweak up your console work
I would like to give to you a bunch of tips about how to improve your work with console. If you are working remotely on Linux from Windows operating system then there it is hard to find a right solution. I will describe a few tweaks which make the work with Linux terminal on Windows a bit easier.
This post will manly focus on configuring a cmder terminal — a great tool for consoling on Windows. Also I will discuss screen which is nice application similar to tmux which allows you to have a bunch of virtual terminals open and ready for use.
Continue readingSerious clock bug in CubeMX
Recently I have discovered a serious bug in the new version of STM32CubeMX. It considers the clock configuration but does not always appears and is hard to debug.
Pan Tilt Camera for Raspberry Pi with STM32 and UV4L
I would like to present a simple project which involves Raspberry Pi with a camera. Sounds boring, right! But the camera can be tilted in two axis using two servos which are directly controlled via STM32 microcontroller which in turn communicates with Raspberry Pi. Furthermore, the RPi is hosting a web server with interface to control position and speed of the camera and of course the video is streamed so you can see what is going on i.e. in your room. If you are even a bit intrigued then keep reading.
Video streaming from Raspberry Pi with UV4L
Here I describe how to set up secure video streaming using Raspberry Pi and a dedicated camera with UV4L. This post is written in tutorial–like form and the set–up presented here will be used in my other projects.