Arduino 433 MHz Wireless Module

433 MHz Wireless Module
The 433 MHz wireless module. Transmitter: top-left. Receiver: bottom-right.

This post provides a quick reference for the 433 MHz wireless module, which is widely used in combination with the Arduino. The VirtualWire library is one possible way of utilizing the module.

Before you get started make sure you have attached antennas to both, transmitter and receiver. The wavelength can be calculated using the following formula.

$$\lambda = \frac{c}{f}$$

For $f=433\text{ MHz}$ this leads to $\lambda = 0.6923\text{ m}$.

Wiring

Transmitter

VCC 3.5 – 12 V Power supply
ATAD Arduino pin 12 Serial data
GND GND Ground (0 V)

Continue reading “Arduino 433 MHz Wireless Module”

Microsoft HoloLens: First Impression

HoloLens TimoToday, 14. Dec 2016, I got the chance to try the new Microsoft HoloLens. This article explains briefly what that is and which impression I got.

The Microsoft HoloLens is a pair of augmented reality goggles. Opposed to virtual reality headsets you can still see your surroundings when wearing the HoloLens. What’s exciting about it? A transparent screen inside the headset adds 3D elements to you view. Pretty much as shown in Microsoft’s commercials.

HoloLens Space Shuttle 1
This Space Shuttle was flying around in our office. No matter how one would walk around it, it was staying in the exact same spot. Below the model is a little control panel.

Thoughts

The added 3D elements are not lagging behind when you move your head. That’s something I did not expect to happen. From VR goggles I got used to the fact that acceleration sensor based motion tracking lags at least a little bit. Not with the HoloLens – the screens, menus, and other 3D models were staying in the exact same spot within the room when I was walking around or moving my head. Very astonishing!
Continue reading “Microsoft HoloLens: First Impression”

Smart Home Security Camera

This post explains the technical background of the security camera system, shown in the following movie. The post will answer the questions: How to detect a thief, how to take a photo, how to get notifications on your phone, and whether the system would work in reality.

For cutting the movie I made use of iMovie.
iMovie was used for editing.

Links and Quick Facts

The source code is not publicly accessible. For the development I used this configuration.
Buy the system for your home / shed / garage.
Movie background music: LCMC music
Additional information about me.

Technical Details

How to Detect a Thief?

In order to detect a thief I made use of an acceleration sensor that I placed at the apartment’s door. The sensor listens for significant changes in the measured x-acceleration. This technique was so precise, that even the slightest knock triggered the motion detection.

bool motionDetected(float tolerance) {
  readMPU6050SensorData(&mpu6050Data, MPU_addr);
  int16_t accX = mpu6050Data.acceleration.x;
  return (accX > boundaries.max + delta * tolerance || 
    accX < boundaries.min - delta * tolerance);
}

Continue reading “Smart Home Security Camera”

Ambient Light (Arduino Project)

This blog post explains the technical details of my Ambient Light project. If you don’t know what this project is about, watch the following video first:


Video summary: Sometimes a screen is just a light spot in a dark room. To make the entire scenery more appealing, I created my own, Arduino-powered ambient light. A PC software (written in C#) reads color information of the screen, performs some processing and forwards the color information to an Arduino, which is connected via USB. The microcontroller then regulates one or more RGB LEDs.

System Architecture

Ambient Light System Architecture

  1. The C# Program starts two threads: UI thread and “Screen color reading” thread
  2. The “Screen color reading” thread samples the average screen color.
  3. The average screen color’s saturation is being increased by a user-defined factor.
  4. The RGB value is being transmitted through the PC’s Serial Port.
  5. The Serial Port forwards the data to the a Microcontroller (e.g. an Arduino) via USB.
  6. The Microcontroller makes one or more RGB LEDs shine in the received color.

Continue reading “Ambient Light (Arduino Project)”

Install Node SerialPort on Raspberry Pi

Since I had a lot of trouble installing the npm package serialport on my Raspberry Pi B Rev 1 (and Rev 3), I want to share how it eventually worked.

When installing serialport I ran into a lot of errors.
When trying to install using npm install serialport you might see those errors.

Enable serial port usage by adding  enable_uart=1 to the file /boot/config.txt.

If the normal  npm install serialport doesn’t work for you try the following.

Install Node 6.x

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs 
sudo apt-get install -y build-essential

Install node-gyp and node-pre-gyp globally Continue reading “Install Node SerialPort on Raspberry Pi”

Die drei ??? Telegram Bot

Since the publisher Europa uploads new Die drei ??? episodes on Spotify quite frequently, I have been wanting to get an update every time they upload something new. For me the most convenient way to be notified is to get a message on my smartphone. The free messenger Telegram is predestinated for that task because of its open API and bot capabilities.

A bot is like a Telegram user. The only difference: You are not chatting with a person but a program that is running on a server somewhere else. For my bot that is a Node.js script, being executed on my Raspberry Pi.

How does it Work?

To get updates you have to search for the bot on Telegram (the name is @DieDreiFragezeichenBot) or click on that link: @DieDreiFragezeichenBot

Then you have to subscribe by writing /start. The bot will respond with a success message. Now you are on a list of subscribed clients and the next time the bot detects new episodes, you will get an update pretty much like that:

Once there are new episodes you'll get an instant update.
Once there are new episodes you will get an instant update.
The bot just looks like a normal chat partner.
The bot just looks like a normal chat partner.

Continue reading “Die drei ??? Telegram Bot”

Node.js: Develop on Mac, Run on Raspberry Pi

For me the solution for productive Node.js development on Mac, with code execution on a Raspberry Pi was usage of Samba. After following the steps you will be able to develop Node.js applications right on your Mac, execute them on your Raspberry Pi (just by pressing cmd+S) and see the console output and errors on your Mac, without much hassle. This tutorial covers the entire setup.

Login to your router interface and assign a static IP address to your Raspberry Pi’s MAC address (e.g. 192.168.0.120). The router menus differ from each other, if you have trouble check the router manual.

IP Address Reservation Router Interface

Then connect to your Raspberry Pi via Secure Shell (SSH) from your Mac.

ssh pi@192.168.0.120

Install Node.js and the npm packet manager on the Raspberry Pi.

apt-get upgrade
apt-get update

apt-get install nodejs npm
ln -s /usr/bin/nodejs /usr/bin/node

Continue reading “Node.js: Develop on Mac, Run on Raspberry Pi”