Thursday, December 25, 2014

XBee-fy the ESP8266 WiFi module

With the new ESP8266 module, adding WiFi to any Arduino project became a lot cheaper.
This module has a serial interface; therefore it only requires connecting 4 pins: Tx, Rx, 3V3 and Ground, as shown in this image.

A few peculiar facts about ESP8266:
  • default serial baud rate is 57600; since this rate is too high for SoftwareSerial library, a hardware port should be used;
  • requires 3V3 for power and level shifting for Rx signal (5V to 3V3);
  • physical interface is a 2x4 pin male header;
  • firmware can be upgraded to a version that allows 9600 baud rate;
  • can be used either as client or server.
The first two characteristics makes it a perfect candidate for a module with an XBee footprint, as is WiFly, for example.

It took me about half an hour to do it, following these steps.
  1. cut a piece of 2-mm perfboard to the XBee dimensions;
  2. solder two 10-pin the 2-mm-spaced male headers on the sides;
  3. desolder (using wick) the 2x4 header;
  4. mechanically attach the header-less ESP8266 module to the XBee perfbord, by soldering 4 pins into the corner holes, aligned with holes in the perfboard;
  5. wire the pins 1, 2, 3 and 10 of the Xbee-type module to pins Vcc, Tx, Rx and Gnd of the ESP8266 module respectively.

And now a few photos. Start with these (XBee shown for comparison purpose):


to make this:



Then plug it any Xbee socket, like one on Wise Clock 4:


or Adafruit XBee adapter:


Hopefully now more people can try adding new WiFi features to their Wise Clocks without breaking the bank (paying $35 for WiFly).

Sunday, December 14, 2014

M4 receiver backpack for reliable wireless remote control

My investigation into the failure of the M4 receiver remote controlling my Wise Clock 4 concluded with the need to add a step-up converter. The Sure 1632 display makes the input voltage drop sometimes below the absolute minimum of 4.5V required for the M4 module to work properly. It's not the noise (spikes) in the 5V power, nor the interference on 315MHz.

I designed a simple "M4 receiver backpack" that uses a DC-DC step-up converter to ensure a 5V power for the M4 receiver module. The board supports 2 different kinds of converters, one from ebay (red in the photo below), the other from tindie (made by BBtech, black in the photo).


The backpack can be used, by default, without the step-up converter if the voltage is steady at around 5V. (A trace-jumper must be cut when a converter is added.)

The wireless remote pair of 4-key fob transmitter and receiver module is sold by Adafruit or vendors on ebay.

The assembled board wired to Wise Clock 4 is shown in the photos below. Note that only 3 out of 4 buttons on the remote have a function on the clock. Each button press could light up a (optional) LED on the receiver board for visual confirmation.


A new design of the Wise Clock 4 board should probably feature a header for plugging in the receiver module, otherwise the back of the board will show a bunch of ugly wires.


This M4 receiver backpack could be used for adding remote control to other devices with buttons, especially when these buttons are hard to access (due to enclosure design constraints), or hidden (for aesthetic purpose). One example that comes to mind is an oscilloscope clock fully enclosed in transparent acrylic; drilling holes for the buttons would require some design stretches.

Schematic and board layout are shown below.



The M4 receiver backpack would be also suitable for hacking old commercial alarm clocks. Please let me know if anyone is interested :)