Smart mirror

After reading My Bathroom Mirror Is Smarter Than Yours, an article about a smart mirror made from a one-way mirror, an old LCD screen and an Amazon Fire TV stick , I told myself “Why not doing my own ?”. After all, my daily life is about working inside the Android framework on a custom board, write AOSP customizations and Android services, so I should be able to do something.

Hardware

The first step of the project was to find the hardware pieces I would use. The main problem with this kind of project is to solve the compromise between having the perfect hardware (size, connectivity, etc) and the price of such hardware.

The screen

Overview

The main piece I needed is a screen to put behind the mirror. I was looking for a screen big enough for the mirror, with a HDMI input and if possible a LED backlight to avoid consuming too much. I finally found a Fujitsu screen with a  LG 19″ LED panel. It provides an HDMI input which is perfect for the kind of usage I wanted.

Fujitsu LED-LCD 19″ screen.

I extracted the LCD panel with its LED backlight (LG LM190E09), the screen controller and the power supply to mount it directly in the mirror frame.

Inside the mirror

The LCD panel with its power supply and its controller.

On one hand, the panel is connected to its controller through a flat ribbon cable that carries the display data as a dual LVDS signal. On the other hand it is connected to the supply board that provides the regulated power for the backlight (probably a PWM signal). Finally the controller  drives the power supply board to tell how intense the backlight should be. I also kept the small button board to be able to manipulate the screen menu if needed.

I slightly modified the screen electronic to implement a custom backlight control. It allows to control the brightness according to the ambiant light, thus we avoid seeing the screen behind the two way mirror. This is done using a mezzanine board for the Hikey (see the paragraph below) that provides an Arduino like chip. The chip measures the light received through the mirror using a small sensor, and compute the correct PWM value for the power stage of the backlight (on the power supply board).

The main boards

LeMake Hikey (system board)

The main board chosen for the mirror is a board from 96Boards, the Hikey. This platform is officially supported by the Android Open Source Project (AOSP) which eases the development of the mirror main application, as there’s almost nothing to do in the Board Support Package (BSP).

LeMaker Hikey board.

The board is equipped with a HiSilicon Kirin 620 System on Chip (SoC) with 1 GB of RAM and 8 GB of flash memory. The low speed expansion connector allows to connect a mezzanine board useful to extend the I/O capabilities.

I/O extension (96Boards sensor mezzanine)

To improve the interactions between the main board and the other hardware pieces of the system, I chose a mezzanine board made by 96Boards too. It provides an Arduino like chip to manipulate easily PWMs and GPIOs, and some connector facilities. It is possible to plug packaged sensors from Grove.

96Boars sensors mezzanine.

Software

The mirror software is based (obviously) on the Android Open Source Project (AOSP). The board support package is provided by the AOSP itself (see the reference boards page) and the mirror display is a simple Android application that behaves as a launcher.