A while ago I wrote about how to use PlatformIO with PunchThrough Lightblue Bean in a post here on how to use the new Bean Loader CLI from PlatformIO. Of course the reason for that was not merely being able to do it, but having a agile development environment to do something useful with them.
I’ve been looking for a paper I had read a few weeks before I started playing with the Beans. But I have not been able to find it. The paper talked about using sensors and controllers to create simple but fun games for the kids. One of the projects described in the paper was a “play catch” game where the kids had to chase each other trying not to trigger and alarm they had on a bracelet with an accelerometer. If they ran too fast or move too sharply an LED would flash and they had to stop until it went off.
One might think that one of the typical uses for a smart wireless switch (like Sonoff devices) is to be embedded behind a normal wall switch so it becomes a “smart” wall switch. It may seem obvious but it’s not that straight forward. There are several things that get in the middle.
Most (all?) the boards have momentary push buttons while wall switches are (normally) toggle switches
Most of the available boards in the market are SPST, even those with SPDT relays often only provide terminals for COM and NO, not NC. I only have one one-throw switch at home, all the others are one-way-two-throw and are being used as part of a multi-way switch.
First problem can be easily solved in code. Instead of detecting one edge of the button signal (usually the rising edge since most push buttons are configured with pull-ups) you can detect both edges.
Sometimes Chinese manufacturers throw a mysterious, unlabelled, IC into their designs so we can spend a few hours trying to figure out what they are and what they do. It’s such fun! I’ve been playing with one of those this afternoon, trying to answer those questions but also trying to understand why! Why is that chip there? Why did someone decided she needed that chip there?
Some weeks ago a user of ESPurna asked me if the firmware supported Itead’s 1CH self-lock/inching board. My answer was “why not” since all Itead’s products are very much alike. Wrong. This one is different. Let me summarise why:
There is no entry in the Itead’s wiki for the device
There are no schematics, drawings, in the store
It uses (and brings out) a Songle SRD-05VDC-SL-C SPDT relay (there is only one other product using this relay in Itead Studio store)
Lately I’ve been quite busy with the ESPurna firmware. It’s growing bigger and gaining some momentum. It’s really fulfilling to see other people using it and reporting back. But at the same time it’s very time consuming. Last Saturday I released version 1.5.0 with some new functionalities and bug fixes and I decided to use some of my free time over the weekend to work on a project that’s been waiting for a month in the shelf.
A few weeks ago I was playing with the Sonoff TH and I wrote a post about its sensor interface and the possibility of using lots of different digital sensors, including I2C sensors since the board can be easily hacked to export 2 digital pins over that interface.
And having I2C not only increases the number of potentially usable sensors but also opens the possibility of using I2C Analog to Digital converters to overpass the lack of analog inputs in the device. Here it comes the Texas Instruments ADC121 (datasheet), an 12-bit precision ADC with I2C support priced 2.74€ in quantities of 1.
Last December Itead Studio updated their Home Automation product line with a new and different product. The main difference is that it doesn’t have a relay and it’s mainly sensors and no actuator (if we don’t define a notifying LED as an actuator). The Sonoff SC is a sensor station that packs a DHT11 temperature and humidity sensor, a GM55 LDR, an electret microphone with an amplifier circuit and a Sharp GP2Y1010AU0F [Aliexpress] dust sensor in a fancy case that looks like it was originally meant for a speaker.
The device is packs an ESP8266 as expected and is compatible with the eWeLink app. But, such a collection of sensors, with 3 of them having analog interfaces, cannot be run from the single-ADC ESP8266 so Itead has thrown in a good old ATMega328P to drive the sensors and report the Espressif with the data.