Tag: Relay

The Magic Mirror – EMC interference

Quick Update! My uncle got me a mirror sample, so this is how the whole thing looks with glass in front of it 🙂
Spiegelmuster

As it seems my components interfear somehow and influence each other… I recently added a button to shutdown the mirror. It works by constantly setting a GPIO-pin to 3.3V, pressing the button grounds the pin and draws the voltage to 0V. A Python script registers this change and shuts down the OS. Strangely this also happens if the motions sensor enables the monitor. At first I assumed there might be something wrong with my circuits, so my uncle and I thought about how the 230V from the monitor could influence the Pi over the relays. Another guess was, that the monitor drains to much power at startup and with that collapses the 3.3V for a really short amount of time. Later I realized that this was also happening if I connected the monitor directly to a power outlet without the relay in-between.

alte LampeI just picked up this old lamp, because I needed some light to correctly judge how reflective the mirror actually was when used normally.  Well, I didn’t quite expect what happened next… Turning on (and off) the lamp (when placed a certain points near the other components) turns of the monitor for about two seconds. It does not seem to influence the Pi though but probably something similar is going on with the shutdown triggers.

UPDATE 22:22

I experimented a bit further with the lamp or to be precisely with its power cable. If I place the lamp’s cable over the Pi, the same thing happens, as if I turn on the monitor, a shutdown gets triggered as soon as the lamp is turned on or turned off. The problem therefore probably really is some kind of electromagnetic radiation.

The Magic Mirror – Raspberry Pi

I recently started a new projected, which of course is a great reason to write an article about it!

I had a DVI-monitor laying around in my room for quite a considerable time now. It was always connected to my Raspberry Pi with ever changing functionality. In the beginning I used it as a XBMC media center to watch movies and listen to music on my stereo. After that I wanted to use it to display useful information but found it strange pretty quickly to have a monitor standing around just to display information. Besides I didn’t even know what kind of information to show on it, so I again used it as a media center again.

Some time ago – while searching for interesting Raspberry Pi projects – I rediscovered the “Magic Mirror” build by Michael Teeuw and spontaneously decided to build one myself. I then found my self dissembling the monitors housing and starting to think how to best accommodate the Pi in this setup. I also changed some bits of Michaels original interface, from showing the same compliments in the UI all day to showing compliments based on the time of the day (my first Git-Pull-Requests; yeah!).

I didn’t really like the idea of having a monitor in my room, running 24/7 even if no-one was present who could actually look at the screen, so I ordered a relay and a motion sensor and wrote a small Python script to turn the monitors power only on when someone is in the room. Jonathan from Studio Einz helped me build this small circuit to switch the relay’s 5V circuit with the 3V from the Pi’s GPIO-pin’s. (Look at that fancy LED! We sadly didn’t have a diode so the LED had to do the trick :D)

Transistor Board

Relais

Bewegungsmelder

Raspberry Pi

Some users of the FRITZ!Box (a German internet router and phone system) may know: The device has a build in call monitor, which is easily read for example with Node.js and this handy module. Incoming calls then get redirected  to the web interface trough Socket.IO, which further displays this nice alert.

Anruf

There also is a feature to alert me when someone is ringing at the door in my code but before that’ll work I first have to connect my bell to the FRITZ!Box. Now I just need an actual mirror and a housing for the project.

Oh! If someone has an idea what else I could display on the mirror: I am listening!

Copyright © 2024 MeType

Theme by Anders NorenUp ↑