Skip to main content

The ESP-Live

I was doing some shopping (read: surfing Amazon) for Black Friday and I was checking out all of the home automation gear. Things have come a long way! Home automation has been a passion of mine for many years - although to date I still haven't automated my lights! I will eventually prevail... I think that with the ESP-Live (my latest attempt) I will prevail.

Many years ago, when I was still in school, I remember interfacing some LEDs to my old Pentium I box via the parallel port. I had set up a Visual Basic 5 program to write bytes to the port. I messed around with logic chips to expand the number of input and outputs I had and I even had some transistors to switch relays. Sounds pretty primitive - right? The cool thing about this prototype system was I had a pretty good voice recognition system written using the Microsoft Speech API and it could respond to quite a few commands:

"Computer, turn LED one on.", "Computer, turn LED one off.", "Computer, start Linkin Park, Parpercut.", "Computer, set volume ten.", "Computer, pause music.", "Computer, pause music!!!". And it didn't work because it couldn't hear me over the music...

Nowadays the Google and Amazon speech recognition are getting really good. I think I will work on a project to interface the speech recognition into my home automation, one day.

Back to the point. Why do I still not have a working home automation system, you ask? I have spent many years trying to develop my own custom system. I personally think that buying a system off the shelf is too easy... and no fun! There are also features that I want, that probably don't exist except in extremely high end systems (and I haven't necessarily decided on these features just yet!). I have gone through many iterations of design with different technologies, but one fact remains: the switches must be wireless so that they are easy to install and they must fit into the wall to replace my current switches.

Perhaps some day I will write a post detailing all the light switched I have half designed... and why I stopped.

What is the ESP-Live?

Arduino has pretty much taken over the hobbyist world in my opinion. It's really easy to get something up and running in no time compared to the DIY approach with the raw microcontrollers, in circuit programmers, etc. Kind of like C++ versus C#, I guess.

I usually prefer to not use something like Arduino, because it's too easy. In recent years, however, I have changed my mind. I think that since Ardunio is literally just a comprehensive C/C++ wrapper on top of existing Atmel gcc, it's not really cheating... I still want to design my own hardware - but at least now I can do that and not waste too much time on bringing it to life.

I like the ESP modules because they have a lot of documentation and are powerful and really cheap! I like what NodeMCU has done in making the ESP8266 more like an Arduino, but I still want to do C programming and not script in Lua.

The ESP-Live is an ESP-12F module, on a fairly general purpose board with all of the IO's broken out, with a USB-Mini port for programming and debugging, power supply, etc.

What's different then? 

The ESP-Live has an on board AC/DC converter so that you can connect it directly to the mains! The shields can then be things like TRAIC or MOSFET dimmers, power measurement boards, etc. I have also designed it to be as compact as possible. The final design measures a mere 30x65cm! Small enough to fit inside a 2x4 inch light switch box inside the wall.

I'll post the design files on GitHub soon.

PCB and Schematic:

A 3D rendering of the top of the PCB. The areas for the ESP module is visible on the right. To the left is the area for the power supply module and AC input.


Popular posts from this blog

Simulink 2x1 MIMO Channel Estimation Test

I have been working on a MATLAB Simulink based Alamouti testbed for USRP software defined radio. I am using the Ettus B210.

I have implemented a very simplistic channel estimation scheme whereby I transmit each of the four QPSK constellation points on each antenna consecutively. I then receive using a single antenna, and after all of the frequency and phase synchronisation I divide what was received by the ideal constellation leading to a simple H-matrix.

Check out this video where you can see the pilot constellation change as I move the antenna! Awesome!

Custom VCSEL Bias Driver

I have been working on a laser diode bias driver for a while now, in line with my latest research project. ThorLabs recently released some great looking bias driver "chip" things, the MLD203 series. I felt that I could use these on a custom board to modulate laser diodes and VCSELs using my USRPs.

In the image above (and below) you can see the two red PCBs which I have designed and constructed. The bias driver (left) connects with an SMA connector to a Bias-T from Mini-Circuits to to TO-Can laser diode adaptor PCB which is visible on the right. I have designed everything to be low noise and high frequency compatible.

Unfortunately, I made a mistake with the laser diode footprint and so I had to mount it upside down! I soldered a SMD capacitor at the point where the little red wire connects to the diode to minimise adverse high frequency effects.

Check out the Git repo for this and more:

Aligning an LG Mode Sorter

The so-called "mode sorter" is a great optical device that allows for easy separation of Laguerre-Gaussian (LG) modes [Berkhout2010]. Combined LG modes, which contain Orbital Angular Momentum (OAM) are input to the one end of the mode sorter and on the other end they are output as "spots" which can be detected with a camera, fibre array, etc. This naturally has many uses in optical communications and physics in general.

I have been working with one of these devices and since the alignment is very tricky, I felt that it would be useful to document it here for my own reference and hopefully that of others!

The first thing to make absolutely sure of is the incoming beams' level. This beam must be perfectly parallel to the axis of the mode sorter, otherwise getting the alignment right after the installation of the mode sorter is close to impossible. I find it useful to mount the mode sorter in a pair of lens mounts. Before installing the sorter, use one of the mount…