Monday, May 25, 2020

Using a 4x4 keypad


The 4x4 Keypad is technical speaking just 16 buttons. Usually you will need one digital input pin for each button which is connected to ground or voltage. So you will need 16 digital input pins plus a common ground/voltage. But the keypad has only eight connectors. How does this work?

The Matrix

The first four pins are connected to all buttons row-wise. The last four pins are also connected to all buttons, but column-wise.
So the first pin has a connection to button 1, 2, 3, A, the second pin to 4, 5, 6, B and so on.
And pin five (the first pin from the other group) is connected to button 1, 4, 7, *.
Keypad matrix

How to read a button-press

In simple terms: if you can measure a connection between pin 2 and pin 6, button 5 is pressed.How can we realize it with an Arduino? You connect all eight pins to digital pins of an Arduino. Declare the first four pins as output pins (that would be the pins, responsible for the rows) and the last four pins as input pins (aka the columns). Then you would pull each of the output pins high (one after another) and read all the input pins. So you pull pin 1 HIGH and read pins 5 to 8. Then you pull pin 1 LOW again and pull pin 2 to HIGH. Again reading pins 5 to 8. You have to continue with pin 3 and 4. And if none of those input pins get a positive reading - you know no button is pressed. Otherwise you know exactly which button was pressed.



4x4 Keypad
Arduino Uno
Breadboard & Jumpercables

Monday, April 13, 2020

You don't know how to use the 3 seashells?


Since the Corona virus (Covid-19) caused a worldwide pandemic, we became aware how important it is to wash our hands properly. You should wash your hands for at least 20 seconds with soap. How to measure it? You can use your wet hands to start the stopwatch on your smartphone - not ideal. Or you can sing "Happy Birthday" twice. Well, this might be a little awkward. And if you are in hurry, you can sing the song much faster. I managed to sing two times "Happy Birthday" within 12 seconds. It would be nice to have a timer, that you can start touch-less. But it must look cool somehow. I remembered the classic SiFi movie Demolition Man (1993). Which takes place in 2032 and instead of toilet paper the people are using the three seashells. This would make a nice timer.

The parts

Most of the parts are somehow leftovers. The plastic box was a box containing chocolate sweets. I used three Neopixels from an old strip. The plastic seashells where also a sweet I know from my younger days. In German it is called "Schleckmuschel" or simply "Leckmuschel". Which both can hardly translated into English. Literally it would be "Seashell to suck" or "Seashell to lick". But I think the closest would be "Toffee in a Seashell". It was on sale as a retro campaign. A cheap IR proximity sensor and all of this controlled by an Arduino Nano.

The build

To remove the candy from the seashells, I could licked them, till they are clean. But first of all this would have taken ages and it tasted not as good, as when I was a kid. So I soaked them in warm water for quite a while until the toffee was vanished into the water. I needed a box for the controller, the sensor and the three seashells to fit on top of it. An empty box of candy will do. Just cut a hole for the sensor to reach though. The controller, the sensor and the connection for the Neopixel get their own PCB prototype board. Now gluing the Neopixels and the seashells on the top of the box and connecting everything. I choose to power everything with a small USB powerbank, which is connected to the USB port of the Nano. Usually I would connect the power rails of the Neopixel stripe directly to the power source. But since this are only three pixels, I have no hard feelings about connecting it to the 5V output pin of the Arduino.




Neopixels 30 px/m
Arduino Nano
"Schleckmuschel" - Toffee in a seashell
Proximity sensor
PCB prototype boards
 Neopixel connectors

Demolition Man (1993)


Code @ bitbucket

Monday, March 16, 2020

The Glowing Heart


Friends of mine are about to celebrate their 50th anniversary. And both love colorful, blinking LEDs like I do. So I decided to make a glowing heart for them. Since I'm only creative but not an artist, I never wasted a thought about creating the heart shaped form for myself. After hours of research, I found a heart made of wooden branches, that fits my needs.

The build

I used a 60 LEDs / meter Neopixel strip. I figured out that if I placed them on the inner side of the heart, I'll need about 48-49 Pixels. Well, with a little overlap I can make it 50 to honor the 50th anniversary. Since the strip's adhesive tape won't stick on the wooden surface, I additionally fixed it with some thread. That took about 10 minutes. I put the controller in one of those electrical installation boxes.

The Programming

I thought about using an ESP as a controller, but it shouldn't be too fancy. So I used an Arduino Nano. That limits the program to a few kbs. So I made ten different animations. Tried to be very efficient and flexible. The animation, I'm most proud of is the beating heart. I tried to use real heartbeat timings for this. And since the 50th anniversary is also called the golden wedding, I made three modes with only golden colors. And to change the modes, I implemented a push-button.
One of the modes is quite special. I made an animation, that simulates a heartbeat. For this I investigated how the correct timing for the heartbeat is and tried to implement it as accurately, as I can. Which worked out pretty well.


The parts

Wooden heart (a similar one)
60 LED/m Neopixel strip
Electrical installation box
Arduino Nano
PCB prototyping board



Source Code


The couple is quite happy with the present. In fact, after three month they are still enjoying it - which is longer than most of my relationships last.

Thursday, January 2, 2020

Elegoo Robot Mini Car - a review


Elegoo Industries contacted me and asked me if they should send me one of their toy-robots and I could do a review of it. I agreed under the condition, that I would do an honest review. They agreed and sent me the Elegoo Robot Mini car.

The Assembly

The car comes with a detailed assembly instruction printed on a huge piece of paper. But since it's marked as suitable for children, it should be possible for me to put those pieces together without it. And with a little trial and error, I could assemble the car within half an hour without reading the instructions. After that I checked, if I missed something out. I forgot the screws for the battery holder. Other than that - the assembly was quite self explanatory.

The Hardware

Well the complete chassis is made of plywood. With the controversy of the excessive waste through plastic, it's a good alternative. It really fells good and looks nice.
It has an Arduino Nano as controller, a Bluetooth adapter, light and distance sensor, a piezo speaker, three Neopixels, two geared motors, a motor driver and a Li-Io battery pack. So could start playing with it, without buying additional components. It has also a cable and pin-headers you can put on the roof of the car. So you could add additional sensors or LEDs to the car without opening it up again.

The Software

A preset of several functionalities are already uploaded to the controller of the Elegoo car. It has a line-following mode, an obstacle avoidance mode, a following mode and can be controlled with an app, that you have to install on your smartphone or tablet. So it should be playable right out of the box. You can download the complete source code for the robot from the Elegoo Website. That has the advantage that you don't have to reinvent the wheel. You can add functionalities or modify the existing ones.
The line following mode didn't work as expected. The avoidance mode works, but still can be improved.

The App

For remote controlling the robot, I downloaded the App from the PlayStore. Unfortunately I could not connect to the car. I've tried two different Smartphones and a tablet. None of them wanted to be connected to the car. So I can't really tell how good or bad the App is.



In short

What I like

I like, that you can download the car's software and chassis. So you can customize the car as you like. But you don't get a naked construction kit. So even when you are new to the robot building topic, you'll get something you can work with. It already has some functionality. You can see how other solve problems. I would recommend this robot over construction kits, where you get all the parts and have to develop software and logic for yourself.

What I don't like

If the preinstalled software promises several functionalities, I would have expected them to work somehow. The line-following mode didn't work at all (see video). And I couldn't use the app because the car won't pair with my phone.

All in all, I think if you want to build and program your first robot, you should go for the Elegoo Robot Mini Car. The 35 € are good invested.


Elegoo Website
Elegoo Downloads
Elegoo Robot Mini Car

Elegoo Robot Mini Car (20% off with discount code: NENIOC20 - valid till 10.01.2020)

Monday, March 25, 2019

The IoT TeaMaker


A wave of flu hit my hometown. And I wasn't spared. So my drink of choice for about three weeks was tea. I remembered how I saw a video, years ago, where someone used an Arduino Uno and a servo to dip a teabag into a cup. Well, it shouldn't be so hard to make a similar project with an ESP8266, should it?


Well, since I felt too sick to go outside, I took, what I've found in the basement. I still got some SG90 servos. And for the stand I used some angle brackets, which I fixed with some zip ties. As an arm for the servo, I found some plastic tongue depressors.


Quite simple. You can use the same 5V input for powering the servo and the NodeMcu. All you need is to select a digital pin for the servo. Any pin will do, since every digital pin on the NodeMcu has PWM capability.


Maker Faire

The IoT TeaMaker was first featured at the Maker Faire Ruhr 2019 in Dortmund, Germany. Everyone could see the TeaMaker in action and try it for themselves.



SG90 Servo
Tongue depressor
Angle Brackets
Junction box

Source code

Source code @ Bitbucket

Monday, February 11, 2019

The Magic Hat


AVNET invited me to the "electronica 2018" in Munich to hold a speech about IoT and Neopixels. So I thought, wouldn't it be great if I could finish my speech with presenting a functional project on stage by controlling Neopixels with a smartphone. Something with a practical, everyday use in home automation? .... Yeah, I got it! A hat! Home automation at it's finest .. somehow.


Quite easy. We just need a pin for the Neopixels. Although the WeMos and the Neopixels are working with 5Volts, they can be both be powered by a 3.7V LiPo battery for a short period. To wrap the stipe around the hat once, I needed a total of 19 Neopixels (with a specification of 60 LEDs / meter).



Off (0)

All LEDs are turned off

On (1)

All LEDs are on

Random (2) *

Colors changes randomly

Kight Rider (3)

K.I.T.T mode. Like in the TV series.

Blue Light (4)

Like a blue light of a fire truck

Driver (5) *

White on the front, red on the back

Blinky (6)

Makes the LEDs blink

* Mode doesn't use the selected color



Code @ Bitbucket

Part list

WeMos -
Neopixels 60/m -
Fedora -
LiPo 1200mAh -

Wednesday, December 12, 2018

Fingerprint Sensor with an Arduino or an ESP


There are different bio metric sensors on the market. They are commonly used to access a private area. Let it be a door, a safe or the privacy of your smartphone. The most known is the fingerprint sensor. A commercial bio metric sensor costs quite a fortune. But there is a cheap alternative for the Maker community. A fingerprint sensor for around 20€.
But how to save and identify a fingerprint with an Arduino? Well, you don't need to. The sensor does all the work. You only have to tell the sensor what to do.


If you're lucky, you'll get a color coded connection cable. If you aren't, you will get one where at least the GND line is marked. It should be in one of the corners of the cable. From there you can find the rest. The order would be: GND - RX - TX - 5V. And two pins without a connection.
 You have to connect GND to GND, VCC to 5V, TX to RX and RX to TX. But if you want to use the serial monitor to watch your results, you shouldn't use the Rx and Tx on the Arduino side, because it will conflict with the USB-port. You can use the Software Serial library and use pin 2 and 3.

The sensor, I received, was only 5V compatible. So if you want to use it with a NodeMcu or any other ESP, you have to add +5V to power the sensor.


There is no need to reinvent the wheel. If you search for "fingerprint" in the library manager of your Arduino IDE, you'll probably find two libraries. I used the one from Adafruit. It's equipped with examples for a quick start.
With the example sketch "enroll", you can start saving fingerprints to the sensor.
To test it, use the sketch "fingerprint". You'll get the found ID in the internal database of the sensor and the probability for a positive match. With that, you have all you'll need to build your own access control.




Fingerprint Sensor
Arduino Uno


Fingerprint Recognition Module --
Wholesale Arduino Compatible SCM --
More Electronics (EU Warehouse) --

5% off Industrial & Scientific New Arrivals --  (code: ab9275)