Alexa controlled fan with XinaBox
|1||×||Xinabox WI-FI CORE (ESP8266),CW01||174-3701|
|1||×||USB Programming Interface (FT232R)||174-3703|
|1||×||XinaBox OC03 Relay Out for PCA9554A Module||174-3715|
|1||×||AVX BTB Series, Male PCB Edge Connector SMT, 10 Way, 2 Row, 2mm Pitch, 2.5A||174-4977|
|1||×||RS Pro Non-Fused Terminal Block, 12 Way/Pole, Screw Down Terminals, 4 mm² Through Hole, Nylon, 400 V||492-8700|
|1||×||Sunon MB Series Axial Fan, 40 x 40 x 20mm, 18.36m³/h, 1.38W, 12 V dc||758-8324|
|1||×||Echo Dot (2nd Generation) - Smart speaker with Alexa - Black|
|1||×||RS Pro, 40W Plug In Power Supply 12V, 3A Level V 1 Output, 2.1 x 5.5 x 10 mm Inside Positive Power Adapter||821-5351|
I built this project using XinaBox xCHIPS, a generic 12V DC Fan, some generic srew down terminals, an Amazon Echo Dot, the XinaBox ZeroTouch app for iOS and the Arduino IDE. It is a 10 min project , that allows you to control a fan with your voice via the Alexa and via the Alexa app on your phone. I chose to use the xCHIPS because they eliminate the need for soldering and serious circuit design.
Step 1: Downloading the libraries
- Go to XinaBox on GitHub
- Download the xCore ZIP
- Install it into Arduino IDE by going to "Sketch", "Include Library", then "Add .ZIP Library". As seen below
- Download the ZeroTouch ZIP
- Add the library the same way as you did for xCore
- Repeat for the Arduino_OC03
- Before you can programme you need to ensure you're using the correct board. In this project I make use of the XinaBox CW01. You can download the board library here.
Step 2: Circuit Build
- Connect the IP01 and CW01 using an xBUS Connector. Make sure the xCHIPS' names are orientated correctly.
- Next you want to use some wire strippers to strip part pf the wires of the fan and power supply to that they can be screwed appropriately into the OC03 and terminal in a circular loop as seen below.
Step 3: Programming
- Insert your IP01 and CW01 into an available US port in your computer.
- Donwnload the zip file on the right of the screen. Open the .ino file in with Arduino in the folder
- Make the changes to the file in Arduino as shown below
- Compile to ensure there are no errors
- Upload to the CW01
- If you are an iOS user you can upload the xZeroTouch in the AppStore shown below. With this app you can Select the WiFi SSID and password without needing to reprogram the core if the network changes.
- Watch the GIF below to see how it works
- As a second option instead of uploading the code with Arduino you can download the xFlasher tool.
- After downloading the tool you can upload the Binary file from the zip folder you downloaded from the downloads section on the right. Below is a video of what uploading and provisioning the binary file could look like. The variable sof WiFi, switch name, etc is provided for in the provisioning.
Step 4: Alexa Setup
- Install the Amazon Alexa app from your App Store
- Create a Sinric account by following the steps found here
- Follow the steps to add the Sinric skill to your Alexa App
Connect your OC03 to your CW01 as shown below
Step 5: Starting up your Alexa Fan
- Ask Alexa to discover devices after you've made sure your CW01 is connected to the internet.
- She should find the device FAN if you haven't changed the name in the code
- Now you can control the fan as shown in the video below