Automatic hot water circulator

After moving to a new place, I’ve found new challenges to solve here and there. One such unresolved thing was the hot water circulation control. In this post I present one possible solution which is according to the user’s behavior.

The problem

This is a tiny project to control a water pump. In a typical domestic hot water system, there is a common problem that the water gets cold in the pipes if some faucets are too far. So you have to waste a lot of water (and time 🙂 ) until you get the hot water, if is was not used recently.

The base of the solution is to build also a returning pipe between the last faucet and the boiler or hot water tank, where a pump can circulate the returning water, so that keeping the pipes hot.

Read more ›

C++ on AVR

Hi all,

[disclaimer] Comparing to others here, this post assume you are familiar with the C++ language on a basic level.

I would like to share my thoughts about the topic in the subject: using C++ programming language for AVRs. Nowadays I am dealing with C++ during my daily work (on x86) and I was happy when I saw that avr-gcc actually can compile C++ code as well (avr-g++). So that in one of my recent AVR (atmega) projects I tried this new (at least to me :)) stuff. I will share some code design principles which I use often.

There are only a few reading available in the topic out there: link, link.

The warnings can be disappointing because you can not use a lot of cool stuff from the language constructs. Basically these are NOT available:

  • exceptions at all
  • missing new/delete, meaning you can not create object dynamically (technically there is no real heap in the AVR, I think this is the real reason)
  • no STL (you can not create dynamic size containers like vector or map)
  • possible performance drawbacks: codesize, implicit first parameter for the member functions (this), searching in the vtable in case of virtual functions takes time, etc

Looks like a painful list. Is there any remaining stuff which is still useful? I think yes. You can still design your code with true OO architecture. You can create interfaces through inheritance, encapsulate data into objects which can manage themselves, using templates(!), etc.

I’ve found a book which is about howto use C as an OO language. Respect for the people who can do it that way. Really :). I think you pretty much lose the type safety, and have to create for example the *this pointer explicitly as a function parameter for your methods. So the drawbacks are more or less reproduced by hand. If you don’t have the choice to use C++, than it is OK. I’ve read somewhere that the AVR community is pretty lucky as they have GCC which has very nice optimalization capabilities, so C++ code can be still very compact. Read more ›

linux based router reloaded

Hi,

It’s been a long time since I set up my mini-itx based router/download machine. It got a few unavoidable HW upgrade (power supply, new HDD) but the performance of that is remained. From SW point of view however, it has a lot more load and responsibility. The HD age with the smart TVs are here, so that the machine is not anymore a basic router/NAS, but something like a HTPC. I use minidlna to stream the content towards our smart TVs. Now the performance of the famous Intel Atom 230 is over unfortunately. The 100Mb/s internet is also a reality now and if the content is downloaded at max speed to the encrypted HDDs, it consumes the CPU entirely and the stream basically starts to lag. Of course it is possible to limit the CPU usage or the downloading bandwidth for rtorrent, but that would be a workaround only. Read more ›

Project: Grass Head [time lapse video]

Story

Last week we started to foster a grasshead. After the first day I remembered a cool project which can remotely trigger any DSLR camera which have IR or wired remote shutter option. I have a Pentax K200D which is a regular camera with such a 2.5mm jack based shutter trigger. This DIY trigger is great for a lot project. Some time ago I decided to build it to capture some lightning without observing the thunder during a whole night. Of course I’ve never built it 🙂 .

So I decided to create a time lapse video of the grasshead while the grass is growing. Needless to say that the linked project is an overkill to achieve this and I had only one day before the grass started to grow as it was already sprinkled 🙂 . So the quick and dirty solution was selected, which is a small AVR and a solid state relay, nothing more. The selected time interval was one picture in every half hour. Rendering into a 15fps movie, one day will take 3.3 sec.

Read more ›

C++ library for my LED cube

In the last two years I was mainly interrested in exploring C++. One result of my learning is the subject of this post. I started to reimplement the snake game using C++11 for the LED cube. Later I divided the code into two sections. The general part became a base library for creating games or animations. The snake specific code is now only an application, which is based on the general library part. Later, the famous 2048 game was also implemented on top of the library.

Read more ›

[UPDATED] Mastech MAS-345 digital multimeter Windows GUI

Hello,

I had some time to improve my software for my MASTECH MAS-345 multimeter. Now it has a lot of features, such as:

  • save/load to an own binary format
  • export to excel own binary format (reloadable)
  • graph (had to change the platform to .NET 4.0)
  • comment and color all measurement
  • check for update (notifies when a more recent version is available)

Here is the screenshot:

Now it’ under GPL.

Read more ›

Exploring Nokia 3310 LCD

Hi,

This project is a general purpose library implementation for the famous Nokia 3310 LCD (PCD8544). Almost everybody has old phones like 3310 at home. If not, you can buy it for a few dollars, which is pretty cheap I think for at least for a graphic LCD. The display can be controlled easily on several AVR pins.

Read more ›

Site is over 10000 visits!

Thanks! 😀

3D snake game for the LEDcube

Hi!

I’ve just finished the next application for my FadeCube, a 3D snake game! It is a very small pure C application, developed under Linux with CodeBlocks IDE. It uses a multithreaded solution. Actually it is my first try to use POSIX threads.

The first thread is listening for the keyboard. Another one is computing the snake pieces and the food. Tthe third is responsible to render the cube data and sends it to the cube. It’s always blocked on a mutex, until the snake thread sends a signal.

The snake length is always incremented when it eats 🙂 . It is controlled by WASD and /’ buttons.

The result:

It seems much better in live.

The code: https://github.com/libesz/FadeCube_3D_snake

Cheers!

 

Six channel audio selector with remote control

Hi again!

Today I’m going to show You an audio selector, which I made for my friend and which has an extra feature: it can be controlled with a regular IR remote controller (which you probably have at home :)).

I could say it is a general remote control reciever library with a demo application: an audio selector :-). I could say this because I completely rewrote my infra red handling code, which I made for my IR remote switch, on a way that it can be used for any other applications easily. The decoding is the same as before, I have 4 IR remote controls around me, and it works with 3 of them. The biggest improvement is that you don’t have to measure the startbit with an other application before you can use one of your controllers, it is automatic now. The code is under 2kBytes, so you can port it even to an ATtiny25 (I used ATmega8, cause (now at Hungary) it is for the same price as an ATtiny or an ATmega48). An other comfort feature is to remember the last selected source in case of the device is switched off.

Read more ›