Private Voice-Control of Philips Hue Bulbs with chipKIT Wi-FIRE and Audeme MOVI Shield

The combination of the Arduino-compatible chipKIT Wi-FIRE board and Audeme’s MOVI speech recognition shield lets users voice-control their Philips Hue bulbs without leaking private information into the cloud (i.e., voice recordings to Amazon or Google, Philips Hue hub data to Salesforce and other data brokers). It also allows for better control and customization of the light bulb configuration compared to using Alexa or Google Home.  Here is a short video of the experimental system:

This is an uncut, unedited video. The system works by connecting to the Hue hub via WiFi. It is powered here by a 9V block battery and a small 8ohm speaker for acoustic responses. Both voice commands and responses are fully customizable and MOVI can also speak and understand Spanish and German. 

The delay between the actual light switch and MOVI’s response is introduced by the Hue hub. It is not clear why but one possible cause could be the Hub’s necessity to wait for a timeout as it is not able to send data to the cloud.

Audeme will present the system at this week’s Maker Faire in San Mateo, CA (May 19th – 21st) and they are happy to let you play around with it. In fact, their plan is to create an Instructable and possibly a home kit solution. So stay tuned!

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

DC Motor Control using Raspberry Pi, chipKIT Pi and the Arduino Motor Control Shield

Overview

This post is intended to demonstrate compatibility of the chipKIT Pi with certain existing Arduino shields. In the second part of this post, we will also demonstrate how to communicate with the chipKIT Pi over a simple I/O line on the Raspberry Pi®, from a terminal window, to control the Arduino™ shield connected to the chipKIT Pi.

Hardware/Software Needed

Procedure

Let’s begin by simply controlling a common Arduino shield. NOTE: Always check the electrical characteristics of any shield that will be connected to the chipKIT Pi. As with the Raspberry Pi, this is a 3.3V system. Therefore, if a shield outputs voltages greater than 3.3V there is a possibility that you could damage the chipKIT Pi or the Raspberry Pi. Connect the Arduino Motor Control Shield as shown:
motor shield 1
  1. Start a new sketch in MPIDE
  2. We will be using Brian Schmalz’s SoftPWMServo library for this application. This is a very flexible library that will enable a PWM (square wave) output on any pin we like. This library comes already included as a core library with the MPIDE. Therefore, to use, simply add the header file to the library at the top of your sketch as follows:
      #include <SoftPWMServo.h>
  3. The remainder of the sketch follows set up as per the Arduino Motor Control Shield specifications. I’ve added comments to explain each line of code.
    //Include the SoftPWMServo Library
    #include<SoftPWMServo.h>
    void setup() {
      //set up channel B on the Arduino Motor Control Shield
      pinMode(13, OUTPUT); //Pin 13 controls direction
      pinMode(8, OUTPUT); //Pin 8 controls the brake
    }
    void loop() {
      //Turn the motor
      // First we disengage the brake for Channel B
      digitalWrite(8,LOW);
      //Depending on how your motor leads are connected to the Arduino
      //motor B header, the direction could be clockwise or counter clockwise
      //So let's just start by calling this direct 1 and drive pin 13 HIGH
      digitalWrite(13,HIGH);
      //We need to send a PWM to the Arduino MC shield to start the motor
      //turning. We also define a duty cycle that will set the motor speed.
      //The higher the duty cycle, the faster the motor will turn. Duty cycle
      //is set between 0 and 255.
      //So we send the PWM to pin 11 according to the Arduino MC specs at say
      // a duty cycle of 100
      SoftPWMServoPWMWrite(11, 100);
      //Let's run the motor for about 5 seconds
      delay(5000);
      //Now lets brake the motor
      digitalWrite(8,HIGH);
      //Give the motor a chance to settle
      delay(500);
      //change directions
      digitalWrite(13,LOW);
      //and run the motor for about 5seconds in the other direction
      delay(5000);
      //Again, we brake the motor
      digitalWrite(8,HIGH);
      //give the motor a chance to settle
      delay(500);
      //and repeat
    }
So, this is nothing really special and can be done on any chipKIT Board. However, we can make something pretty interesting by introducing some Python-based communication from the Raspberry Pi to the PIC32 MCU on the chipKIT Pi. Proceed to the next page to continue.
VN:F [1.9.22_1171]
Rating: 6.6/10 (10 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)