Skip to content

And there was light...


Aug 23, 2017 - 3 minute read

Michał Zgrzywa AI Director

AI Director at Objectivity, experienced manager, software developer at heart. 

See all Michał's posts

HC NHS Survey Blog Ad


Die Wundrelampe

I was encouraged by Peter’s last post to share my pet project with the blog audience. The current manifestation of my progress is the 10-bit, monochromatic, intelligent, one and only “die Wunderlampe”. As a picture is worth a thousand words, behold: [video width="1920" height="1080" mp4=""][/video] I hope you feel enlightened. The lamp turns on and off, depending on the amount of light in a room. It additionally shows the status on the LCD screen.


This device is based on the Arduino Uno unit. The power supply is a single 9V battery. It utilises a photoresistor to measure the amount of light in a room. When the amount of light drops below a threshold value, a LED turns on. There is also an LCD connected, showing the state of the lamp (ON / OFF) and the level of light (in %). The most interesting part of this is, of course, the photoresistor. Depending on the level of light, it becomes a stronger resistor or a weaker resistor. So it changes the voltage in part of the system, which can be then read by a 10-bit analog-to-digital converter. Such information is then utilised to control the lamp and the LCD. The code that reads the input and steers the outputs (LED, LCD) is written in the “C-like” programming language, that is well supported by the Arduino community (including the free IDE). You can find the code here: code. (Just for the most observant readers: there is a bug in the code - if you manage to find it, you will win the possibility to write about it in the comments! Nice, isn’t it?)


Why bother playing with Arduino? Many reasons:

  1. What I like the most is the possibility to interact with the physical environment. As a former developer, it is natural for me to write software that is located on a machine, and people interact with it via a computer or a phone. Possibility to move an object or to react to the changing environment is a kind of magic for me.
  2. Not only I had to learn a lot, but also I could apply the knowledge I used to have and forgotten. For example, to understand how the photoresistor works, I had to understood Kirchhoff's Law. What fun!
  3. I can interact with the most primitive components of current hardware and understand how they are working.
  4. The Arduino Community is very strong. I can find countless components that will make almost any use case possible: LCD screens to show status, GSM, WiFi and Bluetooth modules to enable communication, servo engines that allows to build robotic arms, air temperature and pressure meters, distance meters, etc. There are also a lot of online courses and examples to learn from and libraries to reuse.
  5. I can pursue, and one day realise, my own pet project in its final form.

The final form

Is my project a robot? Is it a coffee machine? No! It is the control system for my floor heating! (Impressive, isn’t it?) The problem of floor heating is more difficult than you could expect. You can affect the temperature of your floor by adjusting the flow of hot water in the floor pipes. As a result, the floor heats the room. Sounds simple. Unfortunately, the system has quite some delay - counted in hours. Additionally, if you have a lot of windows in your house, on sunny days you will have significant heat gains. This will not happen on a cloudy day. You can also open windows and change the balance completely. In the end, assuring in an automated way that the temperature in your room is optimal is very difficult. Arduino may help in solving most of these problems. I will be able to measure temperature in different parts of my house using thermometers. I will be able to open and close valves with hot water using motors. Thanks to GSM gate I will be able to get the weather forecasts and adjust the setting during the night. I will be also able to measure the sunshine impact with photoresistors and react accordingly. A smart algorithm utilising all these inputs, historical data and a pinch of madness will move my heating system to an epic level. Will I ever finalise my project? I doubt myself. But the joy is in the journey and the opportunity to practice pure magic is just too tempting to ignore.

HC NHS Survey Blog Ad
Michał Zgrzywa AI Director

AI Director at Objectivity, experienced manager, software developer at heart. 

See all Michał's posts

Related posts

You might be also interested in


Start your project with Objectivity

CTA Pattern - Contact - Middle

We use necessary cookies for the functionality of our website, as well as optional cookies for analytic, performance and/or marketing purposes. Collecting and reporting information via optional cookies helps us improve our website and reach out to you with information regarding our organisaton or offer. To read more or decline the use of some cookies please see our Cookie Settings.