Geiger–Müller counter with three STS-5 lamps

The Geiger–Müller counter is a relatively simple tool to measure ionizing radiation. In today post I will present my construction of the Geiger–Müller counter that contains three soviet STS-5 lamp. I've used more than one because that increase sensitivity, that's important for me because I want to measure natural sources of (low) radiation like soil, rocks. I have also in plans building my home radiometric station (it would be part of part of a weather station) connected to the web, so I get the data wherever I am.

The electronic circuit of a Geiger–Müller counter

TODO: description.

Homemade Geiger–Müller simplified circuit

Waring! The device uses high voltage, this can lead to injury or death when used inappropriately. Don't touch it when power is on, discharge capacitors after use or wait a couple of minutes.

Simple tool to deobfuscate JavaScript code

I've brought to life my old HDD, so I will share one of my old project that I've found there. It was originally shared on my first blog - it brings back memories :) So here it is (slightly modified).

Somewhere on my disc, I've found a page with an obfuscated JavaScript code, that you can see below. In this form it's completely unreadable, but this can be improved easily.

(function(){var s=true,t=false,aa=window,u=undefined,v=Math,ba="push",fa="slice",ga="cookie",y="charAt",z="indexOf",A="gaGlobal",ha="getTime",ja="toString",B="window",D="length",E="document",F="split",G="location",ka="href",H="substring",I="join",L="toLowerCase";var la="_gat",ma="_gaq",na="4.8.6",oa="_gaUserPrefs",pa="ioo",M="&",N="=",O="__utma=",qa="__utmb=",ra="__utmc=",sa="__utmk=",ta="__utmv=",ua="__utmz=",va="__utmx=",wa="GASO=";var xa=function(){var j=this,h=[],k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";j.uc=function(m){h[m]=s};j.Nb=function(){for(var m=[],i=0;i<h[D];i++)if(h[i])m[v.floor(i/6)]^=1<<i%6;for(i=0;i<m[D];i++)m[i]=k[y](m[i]||0);return m[I]("")}},ya=new xa;function Q(j){ya.uc(j)};var za=function(j,h){var k=this;k.window=j;k.document=h},R=new za(aa,document);var Aa=function(j){return function(h,k,m){j[h]=function(){Q(k);return m.apply(j,arguments)};return m}},S=function(j){return u==j||"-"==j||""==j},T=function(j,h,k){var m="-",i;if(!S(j)&&!S(h)&&!S(k)){i=j[z](h);if(i>-1){k=j[z](k,i);if(k<0)k=j[D];m=j[H](i+h[z](N)+1,k)}}return m},Ba=function(j){var h=t,k=0,m,i;if(!S(j)){h=s;for(m=0;m<j[D];m++){i=j[y](m);k+="."==i?1:0;h=h&&k<=1&&(0==m&&"-"==i||".0123456789"[z](i)>-1)}}return h},U=function(j,h){var k=encodeURIComponent;if(k instanceof Function)return h?

[...]

USB powered thermometer with an interesting data display

Almost each person interested in building electronic devices has built at least one thermometer and power supply in his life. I'm not different, to add to this, today I will present one of my thermometers.

Original concept was different, I wanted to use it as a weather station, wake up, go to my balcony, smoke a cigarette and check what on this device what is the temperature, humidity and air pressure. At the end I decided to build a small thermometer (in future with all mentioned features), that I could plug to my computer and check conditions in my home.

What is nice here is that the data is displayed original way, there are two rows of nine LEDs, if on the upper row second diode is on, and on the bottom row fifth diode is on, then the value presented by the device is 2*10 + 5 = 25. It can sounds complicated at first, but in practice it's fast and intuitive. Below is an example, value presented on the display is 25:

Popularne pytania z rozmów wstępnych dla programisty C/C++

W tym wpisie podzielę się zbiorem pytań, które często powtarzają się na różnych rozmowach wstępnych na stanowisko programisty C/C++. Są to pytania techniczne - nie opisałem tu żadnych pytań miękkich (HR'owych). Spotkałem się z nimi sam (już prawie 10 lat pracy, jak ten czas leci..), a niektóry zadawałem osobiście, gdy byłem po drugiej stronie stołu i prowadziłem rekrutację. Mam nadzieję, że taka lista będzie pomocna wielu ludziom podczas przygotowań do rozmowy rekrutacyjnej.

Kolejność losowa, może kiedyś to jakoś uporządkuję. Zaczynamy!

  • Napisz program, który jest poprawny składniowo w C, a nie jest w C++.
  • Czym są słowa kluczowe (w kontekście zmiennej, w kontekście metody) static i const? Co oznacza słowo kluczowe volatile?
  • Czym jest wyciek pamięci? Czym jest wyścig wątków? Czym jest zakleszczenie (deadlock)? Jak wykrywać te problemy w już istniejącym kodzie?
  • Czym różni się alokacja pamięci na stosie od alokacji pamięci na stercie? Jak to zaimplementować (np. zaalokować 10 liczb)? Kiedy stosować jedno, a kiedy drugie?
  • Czym jest smart pointer? Kiedy go stosować? Jakie są rodzaje?
  • Czym jest język obiektowy? Czy C++ jest językiem obiektowym? (w zależności od przyjętej definicji języka obiektowego można powiedzieć, że jest, lub, że nie jest).
  • Czym są wzorce projektowe i dlaczego je stosujemy? Podaj przykład wzorca projektowego (innego, niż singleton)?

USB heater for ant colonies

As some of you already know, I'm a big fan of ants and for one of my colony, I decided to make a heater. Today I will describe the current state of this device, however it's far from being finished. It uses a resistor that (as any other resistor) produce heat when current goes through it

Let's start from the theory, what should be the value of the resistor (resistor's max power and resistance) if it would be desirable to obtain as much power from USB as possible? The USB supplies always constant voltage (5V) and maximally it can supply 0.5A of current. The maximal power consumption of the device connected to the USB (a resistor in this case) is P=U*I = 5V*0.5A = 2.5W. From Ohm's law, R=U/I = 5V/0.5A = 10Ω.

I placed this resistor in gypsum form (created from matchbox, after it dried-out the paper was scratched out by using a knife).

Before even trying to connect it to the USB port, I verified if it works by using my lab power supply, it worked but I observed two negative things, the first one was the amount of power drained from power supply - was a bit too big, the second was that the heater heats itself way too much, it was too hot. That's why I plan to add some sort of PWM regulation to decrease power consumption, after that I think that it will be a quite useful gadget.

USB sound card made from a broken USB headphones.

If you have old USB headphones you can easily transform them to a USB sound. This card can be helpful during testing of home built devices connected to the speaker or microphone ports on the PC (for example A proof of concept of a simple sonar and Constructing a homemade microphone).

I used broken Audio 655 DSP headphones with working electronic inside. They have below features:

  • Powered from USB.
  • Stereo output.
  • Built-in microphone.
  • Mute/unmute switch.
  • Volume up/down switches.
  • Power on LED indicator.

Some of my current projects or what I will present here in the future.

Yellow Tank

This is a project of a simple tank robot, it's connected to one of my previous experiments, except that now I used prefabricated chassis instead of building one by myself.