Archive

Posts Tagged ‘automation’

Designing a 3D Printed Jig to Flash Firmware to ESP8266 based Light Bulbs

September 18th, 2017 6 comments

Karl here. I have to say that my favorite part of 3D printing is designing things from scratch. Recently a reader was asking about a way to flash a lot of Ai Lights on a project he was working on. I suggested 3D printing a jig that pressure fits pins. He didn’t have a printer, and we exchanged contact information and he sent me one of the lights and some pogo pins from Amazon.

Click to Enlarge

Design in Fusion 360

I started by taking a picture of the light to get my pin placement. I set a scale by measuring a known distance then printed and tested. It took about 3 iterations to get them to line up in real life. Keep in mind camera lenses distort reality and knew It would take a couple times. I would just let a few layers print then stop and line everything up. I had a mostly working prototype in a couple hours. I did have to go back and add an additional pin after I found out that 100 needed to be grounded when powering up so took a couple more tries to line that pin up. The first couple times pressing into place it is very snug. After 3 or 4 times it becomes easier to remove.

Click to Enlarge

Click to Enlarge

Click to Enlarge

First Iteration

Building the Jig

I built this thing too many times, but I finally settled a reproducible method. First print at least 2 copies of the jig. Insert pins in jig then place on 2ng jig with pins up. 2nd jig is only for alignment and to keep straight. Once aligned super glue the pins to the jig and let dry. Do not get glue inside the pins or they will get stuck. When I was first putting this together I was doing it the other way, and glue kept on seeping down to the pins and making them stick. This method of gluing worked the first time.

After gluing solder on your leads, use some shrink tube, and make sure to connect pin 100 to the ground. I thought it needed to be temporary, but I forgot to disconnect one flash. I test flashed the light about a dozen time with 100% success.

The method I used to connect is with the leads connected to PC, I press the jig in place slightly offset clockwise a couple degrees. Press in, then turn counter clockwise until you hear a click. When it clicks into the pads and PC dings it is ready to flash.

This was a fun little project and if you would like to print it you can find it here.

Click to Enlarge

 

Review of Vobot Alarm Clock with Alexa

September 17th, 2017 3 comments

Karl here with a review of Vobot sent By Cafago. I had to Google it when I was asked to review it. Turned out it was an Echo type device with a pixel display and a battery. It started as an Indiegogo campaign. I had been wanting to try to do some sort of voice control with my home automation so I agreed to review it.

Vobot Clock C1 Specifications

These are pulled from Vobot’s website. No power supply is included but a long USB cable is.

Click to Enlarge

Vobot Setup

I let my wife do the initial setup as I figured that she would use it the most. She followed the instructions, and it seemed straightforward from what she told me. She said she had to reboot it once during a step but it continued the setup with no problems. She tied to our Amazon Prime account, and she quickly was playing some music. During research, I did find out that it was not an always listening device.

Firmware Update

I logged into myvobot.com today to see if anything had changed, and there was an update. It suggested that I rebooted the device so I did before updating. Without logging in I wouldn’t have known there was an update. Maybe I missed something but I don’t remember seeing or hearing some sort of notification. I received a verbal notification that it could take up to 10 minutes, but only took a few minutes. The thing is I have no idea what has changed or improved. There is no changelog.

Vobot Display

Display settings allow you to set Brightness, and the time to display Time, Date, Day of Week, Battery Status, and Date + Time.

Click to Enlarge

That’s what the time display looks like.

After pressing the mic button

Get this at times and the eyes blink

Date and time

Hard to catch this one..Starting to play music

Unplugging power and of course get different one when plugging in

Loading music stream

Teardown

I wanted to do a teardown when I first received the speaker, but I was afraid to break it. Now here at the end, I finally put some force behind it and finally got it apart. Only a few minor scratches and it seems to be fine. The teardown reveals that it is running on a Mediatek MT7688AN, and confirms battery’s capacity. 512MB NANYA storage NT5TU32M16FG-AC completes the list of the main chips. Maybe some enterprising soul will hack this and bring some imaginative new usage.

One big issue

Everything that I tried worked the way I expected for the most part . Home assistant can emulate a Hue bridge, but after reading in the forums, it only works with an Amazon Echo or Google Home speaker. Bummer, that is not the real issue I wanted to bring up. I really wish that it had an always listening microphone. You have to press the button to put it in listening mode. I understand that it has a battery, and would drain the battery but why not have it always listening when plugged in and use the button when roaming about.

Random final thoughts

OK now that I have a device that will take voice commands now what. I like the scrolling display. It is pretty cool and a little retro. I used this about 95% of the time just to play music. Don’t expect much from the speaker, but you can send audio to a home system through the 3.5mm jack on the back.

I know that there are 1000’s of skills but few attracted me. I did like the idea of calling another Alexa device but not supported. Arggh, OK maybe another issue. I did use the weather feature asking about the weather for the next day on occasion.

My 5 year old son was easily able to start music, and it could understand his voice which surprised me. The display is nice, and battery powered is a plus, but I don’t understand one thing. For just about the same price, I can get an Echo Dot which gets me always listening, and 100% works with all the features but no battery or display. I bet that the limitations with the exception of the always listening is inherent to all non Echo devices.

If you are looking for a portable Alexa powered device with a display then the Vobot might be for you. Seems sturdy. Descent battery life. I listened for about 2 hours and it still had a charge on the battery. To get an official Echo Tap it sets you back $120. It is the only official Echo that has a battery.

I would like to thank Cafago for sending the device for review. They provided a coupon code “V3127SA” for the Vobot which is good until 9/30/17, and brings the price down to $ 41.99/€36.1. You’ll also find it for $45 and up on other sites such as DX.com or Amazon.

Review of Sonoff RF Bridge, Sonoff 4ch Pro, and Sonoff POW with Sonoff-Tasmota Firmware

September 12th, 2017 No comments

Karl here. Today we are going to look at 2 new and one older Sonoff devices.

I spent very little time with the stock firmware on the device. I don’t like the fact that an Internet connection is needed, and I am not in control. As of the time of this writing I found the Ewelink was not configurable enough to meet my needs. There is one feature that is really nice that I could easily see keeping stock firmware. It is the Alexa Skill. It worked. I am also currently reviewing Vobot Smart Alarm Clock with Alexa integration and had no trouble controlling the Sonoff devices with Alexa. But unfortunately I am lazy and want everything automatic so I can’t keep it. With the RF bridge I was unable to trigger a light from a motion sensor. In comes Arendst ‘s Sonoff-Tasmota firmware  to the rescue. It gets better all the time. It is dead simple, and so configurable now. He continues to add features and devices.

RF Bridge

You may have seen my previous article building a 433toMQTTto433 bridge to use cheap 433mhz devices. I never did build a case for it, and it’s a little bit of an eyesore. When I found out about a nicely packaged one, I was excited to check it out. Like I stated previously, it didn’t work as I anticipated and was glad when I found out Arendst got one as well. He has a good wiki with on the github page and all the needed information to flash and configure so I won’t go into it. It flashed uneventfully. I was a little scared by the design that it was only going to be able to receive 16 individual codes and pass onto MQTT but that is not the case. It passes everything it receives. You can only send 16 different codes right now which need to be saved ahead of time. So after monitoring the MQTT server I ran into first hurdle. I was getting this example json value.

And actually I found after much frustration that “Data” is a nested json value. This took a while for me to figure out. After that it was relatively easy to parse in Home Assistant and move my automations over from the previous bridge.

and

From the previous article payload off is a made up value and is only used internally to turn the sensor off after a minute.

Just a couple gripes about the rf bridge which are superficial. There is a noticeable increased delay over the homemade bridge from the time it senses a trigger until the light comes on. It is only about half a second but a noticeable difference. And my wife pointed quickly that the led indicating it is on is very bright. I might remove it or install a varistor to tone it down. The receiver does not appear to be as good or might just be that it is in a case or my positioning. I am still able to cover my house but the trigger on my mailbox across the street doesn’t trigger. It was hit or miss on the old one but never triggers now.

FYI I am still running off the same batteries I initially installed in the 433mhz motion sensors over 6 months ago.

Sonoff 4ch Pro

Click to Enlarge

Click to Enlarge

Click to Enlarge

I also received the Sonoff 4ch Pro with 433mhz transmitter remote.

I tested it with stock Ewelink software and all tests done before worked. I quickly installed the alternative firmware from above, and again no loss in functionality. I was still able to pair and clear the 433 MHz remotes. It is weird that it does not indicate with a light that it is in pairing mode as of right now but when you press the button the light blinks when it is learned. The inching, self locking and interlock continued to work as well via switches. I can definitely see this being used for lighting, or if you needed to control multiple items in close proximity. Maybe simple access control. Possibilities are endless. On the product page, it shows wiring with motors as well which looks cool. If I find a unique or interesting project I will share.

The 4 button transmitter is very powerful. It transmits further than any of my other 433mhz devices.

Sonoff POW

Click to Enlarge

A buddy of mine gave me a Sonoff POW to play with. The Sonoff POW is very similar to the Sonoff Basic, but has the ability to measure power usage. I didn’t bother testing the stock software. I went straight to Arendst software. I didn’t have anything to measure power before and this is a welcome addition to my tools arsenal. I don’t need super accurate readings just a good idea what the draw is. I installed a light rated at 75w to test and got the results below. If a more accurate load is available you can calibrate the POW and instructions are in the Wiki.

OTA Firmware

Who wants to drag all their devices back to the PC and flash new firmware? I finally checked it out. It is really simple to do.

First uncomment BE_MINIMAL then export compiled Binary. After a while you will have a bin file in your sketch folder.

Click to Enlarge

After uploading comment BE_MINIMAL, upload again. The 2 steps procedure is because he is running out of space with all the features. He is trying to reduce the code down, and hopefully make this a single step in the future. If you have a web server there are instructions to automate this.

Conclusion

I would like to thank Itead Studio for sending the Sonoff RF Bridge, 4ch Pro and 4 button 433 MHz transmitter. They keep expanding their Sonoff line and make them hacker friendly. I would also like to thank Arendst for his tireless work on Sonoff-Tasmota firmware. If you are just looking to control your lights via Alexa, and don’t mind requiring the Internet to be available the stock firmware might work for you.

X-Powers AC108 is a Quad-Channel ADC Chip for Microphone Arrays

August 28th, 2017 2 comments

X-Powers, a company better known to supply PMIC “companion” chip for Allwinner processors, also made some audio chips including AC108 is a chip specifically designed for microphones arrays with support for 4 microphones, and a I2C + I2S output interface to the host processor. Microphone arrays are particularly useful for smartspeakers, and especially hot word detection (voice activity detection) as single microphone setups like I use with Orange Pi Zero, may have trouble detecting hot words like “OK Google” in noisy environments (music playing, alarm ringing…).

X-Power AC108 specifications:

  • 108 dB dynamic range (A-weighted) @ 0 dB boost gain
  • -90 dB THD+N (total harmonic distortion plus noise) @ 0 dB boost gain
  • 4x programmable boost amplifiers with 0dB to 45dB in 3dB step
  • ADC sample rates supported – 8kHz,12kHz,16kHz, 22.05kHz, 24kHz, 32kHz, 44.1kHz, 48kHz,96kHz
  • Analog mixer and digital mixer in record data path
  • 4x fully differential microphone inputs: MIC1P/N ~MIC4P/N configurable as pseudo differential,  single-ended mode, or digital MIC data pin
  • 4x low noise mic bias outputs: MIC1_BIAS~MIC4_BIAS with a 1.5V to 4V programmable bias voltage
  • 2x DMIC SCLK output @ 1M~3.25M
  • Two I2S data output configurable as
    • I2S/PCM format using 1 pin to output 2 channel data of 1 devices.
    • I2S/PCM format using 2  pins to output 4 channel data of 1 devices.
    • TDM format using 1 pin to output 4 even 16 channel data of 4  devices.
    • Encoding format using 1 pins to output 4 even 16 channel data of 4  devices.
  • DPLL support a wide input for 6-/12-MHz, 6.144-/12.288-MHz, 5.6448-/11.2896-MHz, 13MHz and 19.2MHz.
  • Control Interface – I2C / TWI from 100 kHz up to 400 kHz
  • Integrated LDO allowing single 3.3V supply
  • Power Consumption – < 4mA per ADC channel
  • Package – 48 pin, 6×6 mm2 QFN

The product page does not provides that much more information, but there’s apparently EVM which you can purchase by contacting the company.

Click to Enlarge

I could not find pricing information, but X-Powers normally provides price-competitive solutions. I could not find any boards using AC108 yet, but we should get more info about that tomorrow.

Categories: Audio, Hardware Tags: audio, automation, speaker, x-powers

Sonoff Wireless Switches & Light Bulbs Now Work With Google Home

August 8th, 2017 No comments

ITEAD Studio Sonoff wireless switches can be controlled by voice commands using Amazon Alexa or Google Home, but so far, the latter was only possible by emulating Belkin Wemo switch in alternative open source firmwares such as ESPurna or Sonoff-Tasmota. For people who don’t want to update the firmware themselves, and instead prefer to use the stock firmware with eWelink mobile app, the manufacturer has now announced support for Google Home, on top of the already supported Amazon Alexa service.

Click to Enlarge

The instructions are explained in details in ITEAD’s blog post, but basically, you need to start Google Home app in your mobile, select your Google Home device, go to Home Control to add Devices, select Smart We Link, login to eWelink with your username/phone number and password, name the devices you want to control and you’re done.

You should now be able to control devices or rooms with voice commands such. For single port devices it’s easy:

OK Google, turn on the bedroom light.
Hey Google, turn off the bedroom light.

For switches with multiple sockets or switches you also need to add the name of the “gang”:

Hey Google, turn on dual switch light one.

You can set the color and dim your lights too:

Hey Google, turn on {light name}
Hey Google, turn {light name} green
Hey Google, set {light name} to 50%
OK Google, dim {light name}
Hey Google, brighten {light name}

If you have assigned devices to rooms, you can control a complete room, or all devices with one voice commands, for example:

OK Google, turn off all of the lights
Hey Google, turn on lights in living room

Some features are not supported, and it’s unclear whether they’ll ever be, such as setting timers, or adjusting the temperature threshold for SonoffTH10/TH16. Since I recently configured an Orange Pi Zero board with Google Assistant, I wanted to try, but Google Home app cannot detect my device. That’s normal as Google Assistant SDK release notes list this as an issue:

Account linking for third party services requires owning a Google Home and installing the Google Home application. This affects using services like Uber, or connecting to home automation devices like Hue.

That means you need an actual Google Home, and solutions like AIY Projects Voice Kit with Raspberry Pi 3 board won’t work, at least for now.

HTTM Backlit Capacitive Touch Switch / Button Sells for about one Dollar

July 27th, 2017 1 comment

You may have some project that requires buttons to turn on and off devices, or perform other tasks like navigating a user interface or playing games. One interesting and inexpensive solution for this could be HTTM (HelTec Touch Model) capacitive touch buttons that include three pins for power, ground, and the button status, as well as a backlight. You’ll find them on many websites, and one of the cheapest option is a pack of 10 buttons going for $9.91 on Aliexpress.

HTTM button specifications:

  • Voltage input range: + 2.7v to + 6v
  • Signal output – Voltage: + 3.3v; Current up to 500 mA
  • Header – 3-pin with GND, VCC, and OUT
  • Backlight color – red, blue (cyan), or yellow
  • Dimensions – 20.4 x 16.6 mm
  • Operating temperature range: -30 ℃ to + 70 ℃

You’ll find more details on the manufacturer’s product page including a user manual (Chinese only), and their DIYtrade page implies they may have versions with up to four keys:

HTTM is HelTec Touch Model shorthand;
□ → Number of keys: S- single key, D- double keys, T- triple keys, F- four keys;
◇ → Version attribute: C- conventional version, S- Special Edition (customized version);
△ → backlight colors: B- blue, R- red, G- green

But I could not find any of those. The company (Chengdu HelTec Automation Electronics Technology Co. Ltd) also makes some OLED displays, which may be worth checking out.

I learned about HTTM button via Pete Scargill’s blog, and he shot a video showing how to use the switch directly connected to a relay board (The demo starts at the 1:50 mark). Since it’s using capacitive touch, he explains you could place one or more buttons inside a box, and it would still work. Those buttons are also likely more durable than mechanical switches.

Sonoff G1 AC Powered Smart Power Switch Works Over 2G GSM/GPRS

July 22nd, 2017 1 comment

Today, I’ve searched for AC powered wireless switched similar to Sonoff devices, but with ESP32 instead in order to get WiFi and Bluetooth, since the latter is better to use with a battery powered buttons. I did find a DC powered board, but no AC powered ones yet. However, as I visited ITEAD website to check if they had anything of the sort, I discovered they had a new model called Sonoff G1, similar to Sonoff TH16, but instead of using WiFi, you can use 2G GSM/GPRS to control the switch remotely.

Sonoff G1 specifications:

  • Wireless Module – ST86 quad band GSM/GPRS module
  • GSM/GPRS connectivity
    • GSM850, EGSM900, DCS1800 and PCS1900 MHz support
    • GPRS multi-slot class 10, GPRS mobile station class B
    • 1.8V, 3V  SIM card slot
    • Transmit power: Class 4 (2W): GSM850, EGSM900; Class 1 (1W): DCS1800, PCS1900
  • Relay – Up to 16A (3000 Watts max)
  • Terminals – 6 terminals for mains and load’s ground, live and neutral signals. 90~250V AC (50/60Hz) input supported
  • Misc – LEDs for power and connection status, button for manual on/off
  • Standby Power Consumption – 1.0 mW
  • Dimensions – 114 x 52 x 32mm
  • Weight – 100 grams
  • Temperature range – Operating -40°C to +80°C, but recommended is 0 to 40°C… So go figure.

Such system could be useful if you need to control devices in remote locations, as long as you are in a zone not affected by 2G sunset like China and Europe.

You’ll need to open the device to insert your own SIM card, install the usual eWelink app, scan a QR code on the device to initialize it. Once this is done, you can turn it on/off, set timers, integrate it into scenes, and share it with other permitted users. Basically anything you can do with the WiFi model, including Amzon Alexa & (soon) Google Home support, but it adds checking the remaining balance. This is explained in more details in the Wiki and links there. There’s also Sonoff G2 model for mainland China with a built-in China Mobile SIM card. You’ll have to happy with using eWelink Android/iOS app, as that model is unlikely to hackable with a custom firmware.

ITEAD sells Sonoff G1 for $19.90 plus shipping.

ModBerry Industrial Automation Controllers Leverage Raspberry Pi, FriendlyELEC, and AAEON Boards and Modules

July 19th, 2017 1 comment

TECHBASE’s ModBerry Linux based industrial controllers have been around since 2014 with their first model being ModBerry 500 powered by a Raspberry Pi compute module. Over the years, the company has kept adding new ModBerry controllers with now an interesting choice of Raspberry Pi 3 board or compute module, FriendlyELEC’s NanoPi M1 Plus board, or Intel Atom x5 based AAEON’s UP board.

Click to Enlarge

All programmable automation controllers (PAC) runs Linux 4.0 or greater, with Debian or Ubuntu Core rootfs including ready tools and pre-compiled packs including C/C++, JAVA, SQL, PHP, SSH, and VPN support. The firmware is upgradeable over the air, and the controllers can run the company’s iMod control software and interface with iModCloud cloud computing service for telemetry, remote control and data sharing. Typical uses include C-L-V functions with conversion to collect and transmit data over communication interfaces, logging via iModCloud or a SCADA, and visualization via a web browser.

Click to Enlarge

All models share many of the same features, with some models having more I/Os beside the different board, but to get a better idea of the systems, I’ll have a look at ModBerry M700 specifications:

  • SoC – Allwinner H3 quad core Cortex A7 @ 1.2 GHz with an ARM Mali-400MP2 GPU
  • System Memory – 1GB DDR3
  • Storage – 8GB eMMC flash + micro SD card slot
  • Video & Audio Output – HDMI 1.4 and 3.5mm jack for CVBS (composite + stereo audio)
  • Connectivity

    ModBerry M700 – Click to Enlarge

    • Gigabit Ethernet
    • 802.11 b/g/n WiFi and Bluetooth 4.0 LE
    • Optional Zigbee, LTE/3G, GPS, WiFi, and Bluetooth cards
  • USB – 2x USB 2.0 host ports, 1x 4-pin USB 2.0 host header, 1x micro USB port (OTG/power)
  • Expansion I/Os
    • 4x digital inputs, 4x digital outputs up to 30V DC
    • 1x RS-232/RS-485
    • 1x PCIe slot
    • Optional 1-wire
    • Optional ExCard I/O modules for more RS-232/485 ports, Ethernet ports, PCIe slots, analog input and output, digital I/Os, relays, M-Bus interface, and more
  • Misc – RTC with battery, watchdog timer,
  • Power Supply – 7~30V DC up to 20-35W
  • Dimensions – 106 x 91 x 61 mm (ABS casing with DIN railin enclosure)
  • Weight – 300 grams
  • Operating Conditions – Temperature: -30 ~ 80°C; humidity: 5 ~ 95% RH (non-condensing)

The ExCard are DIN rail module that plugs into the ModBerry like LEGO’s, and up to 3 ExCard is supported per ModBerry.

Click to Enlarge

Applications for such systems include PLC, telemetry module with data logger, serial port server, protocol and interface converter, programmable controller, MODBUS Gateway/Router, SNMP Agent, Web server with PHP and SQL database support, SMS Gateway, LTE/3G/GPRS router and more.

TECHBase has not released pricing for the controllers, but you can find more details, including detailed PDF product briefs and links to purchase the controllers and expansions (you’ll still have to ask for the price), on the products page.

Via LinuxGizmos